The invention discloses a method for converting CSV (Comma-Separated Values) data labeled by
metadata to
RDF (
Resource Description Framework) data. The method comprises the following steps: reading and analyzing a CSV file, obtaining tabular data, and storing the tabular data into a memory
data structure; reading and analyzing a
metadata description file, obtaining
metadata, and storing the metadata into the memory
data structure; combining with the obtained tabular data and metadata, generating an
RDF triple set, and storing the
RDF triple set into the memory
data structure; and outputting the generated RDF triple set as an RDF
data file of a Turtle grammatical format. The method for converting the
data format converts the CSV data labeled by a metadata model vocabulary defined by a W3C (
World Wide Web Consortium) technical specification <Web Tubular Data and
Metadata Model> into the semantically equivalent RDF data, so that a traditional
software tool can be utilized to conveniently publish the RDF data obtained by conversion onto an associated data network for various
semantic web applications to share, reuse and process the tubular data from the CSV file, and therefore, a great quantity of large-coverage CSV data can perform the maximum potential.