Method and system for mapping table data
By defining extraction rule templates and compiling extraction mapping rules, the table data is automatically analyzed and extracted, and the graph content is constructed, which solves the cumbersome and inflexible problems when converting table data into graph content in the existing technology, and realizes efficient and flexible data conversion and processing.
Patent Information
- Application Number
- CN202411684815.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-22
- Publication Date
- 2025-04-22
AI Technical Summary
When converting table data into graph content, the existing technology requires customized program development, resulting in cumbersome process, lack of flexibility, and difficulty in dealing with changes in dynamic data requirements.
By defining the extraction rule template, preparing the extraction mapping rules, and extracting the standardized table data to construct the graph content. The method includes entity extraction rule templates and relationship extraction rule templates, which can automatically analyze and determine the relationship between nodes that need to be extracted in the table and the nodes.
It realizes efficient and flexible conversion from tabular data to graph data, reduces manual intervention, improves the efficiency and accuracy of data processing, and can better cope with changes in dynamic data requirements.
Smart Images

Figure CN119862949A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data processing technology, and in particular to a method and system for graphing tabular data. Background Art
[0002] As a core tool for recording business data, tables can carry a large amount of complex information. Each row of data contains a detailed business description, and the data columns contain the inherent logic of business operations. However, as business relationships become increasingly complex, multiple tables are often needed to record them comprehensively, which makes it difficult to intuitively grasp the relationship between data, and even after detailed explanations, it is still challenging to understand.
[0003] In contrast, knowledge graphs provide a clearer perspective on data objects and their connections through an intuitive display of nodes and relationships. Converting tabular data into graph form is undoubtedly an effective way to improve data visualization and understanding efficiency. This type of data is usually stored and managed in a graph database.
[0004] Unfortunately, the diversity of current domain ontologies poses challenges to the construction of knowledge graphs. In the process of converting tabular data into graph content, customized program development is often required to parse and convert data, which is not only cumbersome but also inflexible. Whenever new data requirements emerge, the parsing logic and processing flow must be redesigned, which not only increases development costs, but also slows down the pace of data integration and application, highlighting the shortcomings and limitations of existing technologies in dealing with dynamic data demand changes. Summary of the invention
[0005] In view of the problems existing in the prior art, the present invention provides 1. a method for graphing tabular data, characterized in that it includes:
[0006] Step S1, defining an extraction rule template, performing data analysis on a table to be extracted according to the extraction rule template to determine the nodes to be extracted in the table to be extracted and the relationship between the nodes, and then performing standardization processing on the table to be extracted;
[0007] Step S2, compiling extraction mapping rules according to the extraction rule template;
[0008] Step S3, extracting data from the standardized table to be extracted according to the extraction mapping rules to obtain node data and relationship data, and constructing graph data according to the node data and the relationship data to obtain graph content.
[0009] Preferably, the step S1 comprises:
[0010] Step S11, defining the extraction rule template, wherein the extraction rule template includes an entity extraction rule template and a relationship extraction rule template;
[0011] Step S12, determining the node information contained in the nodes in the to-be-extracted table according to the entity extraction rule template, and determining the relationship information between the node information as the relationship between the nodes according to the relationship rule template;
[0012] Step S13, splitting the merged rows and merged columns in the table to be extracted, and adjusting the title bar of the table to be extracted to obtain a standardized table to be extracted;
[0013] Step S14, determining the columns corresponding to the node information and the relationship information in the standardized table to be extracted, so as to complete the standardization process.
[0014] Preferably, the step S11 includes:
[0015] Step S111, respectively defining an entity type definition, a node basic information extraction definition, and a node attribute extraction definition to obtain the entity extraction rule template;
[0016] Step S112, respectively defining a relationship type definition, a relationship basic information extraction definition, and a relationship attribute extraction definition to obtain the relationship extraction rule template.
[0017] Preferably, the extraction mapping rules include entity extraction mapping rules and relationship extraction mapping rules, and the step S2 includes:
[0018] Step S21, filling the entity type definition in the extraction rule template and the attribute data columns corresponding to each entity type definition as entity extraction mapping information into a predefined mapping rule template table to obtain the entity mapping extraction rule;
[0019] Step S22, fill in the identification column information of the head and tail entities of the relationship between the nodes in the extraction rule template, the corresponding relationship type definition and the attribute source column information as relationship extraction mapping information into the predefined mapping rule template table to obtain the relationship mapping extraction rule.
[0020] Preferably, the extraction rule template includes an entity extraction rule template and a relationship extraction rule template, and the step S3 includes:
[0021] Step S31, parsing the extraction mapping rule, and encapsulating the node type definition and node attribute extraction definition in the entity extraction rule template into entity object definition information;
[0022] Step S32, encapsulating the relationship type definition and relationship attribute extraction definition in the relationship extraction rule template into the relationship object definition information;
[0023] Step S33, obtaining all data values in the table to be extracted, and storing them separately according to header data, row data and column data;
[0024] Step S34, extracting data from each row of data according to the entity object definition information, encapsulating the extraction result as node data and storing it in a node data set, and determining whether each node data in the node data set exists in the graph database:
[0025] If so, updating the node data in the graph database with the same storage ID according to the storage ID of the node data;
[0026] If not, adding the node data into the graph database and generating the storage ID;
[0027] Step S35, extracting data from each row of data based on the relationship object definition information, encapsulating the extraction results into relationship data and storing them in a relationship data set, and determining whether each relationship data in the relationship data set exists in the graph database:
[0028] If yes, then perform an update operation according to the storage ID of the relational data;
[0029] If not, the relationship data is added into the graph database and the corresponding storage ID is generated;
[0030] Step S36, constructing graph data based on the node data and relationship data in the graph database to obtain the graph content.
[0031] Preferably, the node data further includes type classification, and the step S34 further includes a temporal and spatial data extraction process, including:
[0032] When the type classification is not an ordinary entity and there is a time formula in the preset time data definition, the time formula is parsed by a regular expression to obtain the corresponding time data column in the table to be extracted and the parsed time formula, and after the time data is extracted from the time data column, the time data is calculated based on the parsed time formula to obtain time attribute data and add it to the node data.
[0033] Preferably, the node data set includes a node data set that does not include a storage ID and a node data set that includes a storage ID. The node data extraction process in step S34 includes:
[0034] Step S341, for each row of the row data, determine whether there is an entity name table column name:
[0035] If yes, encapsulate the entity object, set the corresponding attribution graph attribute, and obtain the corresponding identification data as the node business ID of the entity object when the entity identification table column name definition exists, and go to step S343;
[0036] If not, go to step S342;
[0037] Step S342, determine whether there is an entity identification table column name:
[0038] If yes, encapsulate the entity object and set the corresponding attribute graph property;
[0039] If not, exit;
[0040] Step S343, determine whether the entity object exists in the existing graph:
[0041] If yes, go to step S344;
[0042] If not, go to step S345;
[0043] Step S344, determining whether the entity object has been extracted:
[0044] If yes, the currently extracted entity object is deleted, and the entity object that has been extracted is retained as the node data;
[0045] If not, the entity object currently extracted is used as the node data and the storage ID is extracted, and then the node data is added to the node data set containing the storage ID;
[0046] Step S345, determining whether the entity object has been extracted:
[0047] If yes, the currently extracted entity object is deleted, and the entity object that has been extracted is retained as the node data;
[0048] If not, the currently extracted entity object is used as the node data and added to the node data set that does not contain the storage ID.
[0049] The present invention also provides a system for graphing tabular data, which uses the above-mentioned graphing method and comprises:
[0050] A table processing module is used to define an extraction rule template, perform data analysis on the table to be extracted according to the extraction rule template to determine the nodes to be extracted in the table to be extracted and the relationship between the nodes, and then perform standardization processing on the table to be extracted;
[0051] A mapping rule preparation module, connected to the table processing module, for preparing extraction mapping rules according to the extraction rule template;
[0052] A graph construction unit is connected to the mapping rule compilation module, and is used to extract data from the table to be extracted after standardization according to the extraction mapping rule to obtain node data and relationship data, and to construct graph data according to the node data and the relationship data to obtain graph content.
[0053] Preferably, the table processing module includes:
[0054] A template definition unit, used to define the extraction rule template, wherein the extraction rule template includes an entity extraction rule template and a relationship extraction rule template;
[0055] An information determination unit, connected to the template definition unit, configured to determine the node information contained in the nodes in the to-be-extracted table according to the entity extraction rule template, and determine the relationship information between the node information as the relationship between the nodes according to the relationship rule template;
[0056] A table standardization unit, used for splitting the merged rows and merged columns in the table to be extracted, and adjusting the title bar of the table to be extracted to obtain a standardized table to be extracted;
[0057] A column determination unit is connected to the information determination unit and the table standardization unit, and is used to determine the columns corresponding to the node information and the relationship information in the standardized table to be extracted, so as to complete the standardization process.
[0058] Preferably, the template definition unit includes:
[0059] An entity rule definition subunit is used to respectively define an entity type definition, a node basic information extraction definition and a node attribute extraction definition to obtain the entity extraction rule template;
[0060] The relationship rule definition subunit is used to respectively define the relationship type definition, the relationship basic information extraction definition and the relationship attribute extraction definition to obtain the relationship extraction rule template.
[0061] The above technical solution has the following advantages or beneficial effects:
[0062] 1. Define the extraction rule template: Set a common rule framework for the conversion of table data to graph data. This simplifies the subsequent data processing work and enables the system to automatically analyze and determine the nodes and relationships between nodes that need to be extracted in the table.
[0063] 2. Prepare extraction and mapping rules: Based on the extraction rule template, customize the mapping rules for specific table data, and clarify how to map and extract data from the table to construct the nodes and relationships of the graph. This ensures the accuracy and pertinence of data conversion.
[0064] 3. Data extraction and graph construction: Using these mapping rules, the system can automatically extract data from standardized tables and construct them into graphs. This process reduces manual intervention and improves the efficiency and accuracy of data processing. BRIEF DESCRIPTION OF THE DRAWINGS
[0065] Figure 1 A schematic diagram of a process of a method for graphing tabular data in a preferred embodiment of the present invention;
[0066] Figure 2 This is a flow chart of step S1 in a preferred embodiment of the present invention;
[0067] Figure 3 This is a flow chart of step S11 in a preferred embodiment of the present invention;
[0068] Figure 4 Schematic diagram of the process of step S2 in a preferred embodiment of the present invention;
[0069] Figure 5 This is a flow chart of step S3 in a preferred embodiment of the present invention;
[0070] Figure 6 The figure is a schematic diagram of the structure of a system for graphing tabular data in a preferred embodiment of the present invention. DETAILED DESCRIPTION
[0071] The present invention is described in detail below in conjunction with the accompanying drawings and specific embodiments. The present invention is not limited to this embodiment, and other embodiments may also fall within the scope of the present invention as long as they conform to the gist of the present invention.
[0072] In a preferred embodiment of the present invention, based on the above problems existing in the prior art, a method for graphing tabular data is provided. Figure 1 As shown, including:
[0073] Step S1, defining an extraction rule template, performing data analysis on the table to be extracted according to the extraction rule template to determine the nodes to be extracted in the table to be extracted and the relationship between the nodes, and then performing standardization processing on the table to be extracted;
[0074] Step S2, compiling extraction mapping rules according to the extraction rule template;
[0075] Step S3, extracting data from the standardized table to be extracted according to the extraction mapping rules to obtain node data and relationship data, and constructing graph data based on the node data and relationship data to obtain graph content.
[0076] Specifically, in this embodiment, first, an extraction rule template is defined. This set of rules is designed for the storage structure of the target graph database, which determines how to effectively extract and convert the required information from the table data, laying the foundation for subsequent automated processing.
[0077] Secondly, the extraction and mapping rules were compiled. These rules are based on the extraction rule template defined above, and are refined according to the characteristics of each specific table data, clarifying how the node and relationship attribute data in the graph should be mapped and extracted from the table, ensuring the accuracy and completeness of data conversion.
[0078] Next, the tabular data was parsed and extracted. Using a rule-based parsing program, the standardized tabular data was deeply parsed and extracted, thereby converting the tabular data into the node and relationship form required by the graph data, thus achieving the initial transformation of the data.
[0079] In addition, multi-table data fusion is also realized. This technology can support the supplementary extraction of data from multiple related tables, integrating the relevant information scattered in multiple tables into one, forming a more complete and comprehensive content display.
[0080] Then, the graph data is stored and updated. The extracted graph data (including nodes and relationships) is stored in the graph database to construct the graph content, and the data is updated according to actual needs to ensure the timeliness and accuracy of the graph data.
[0081] Finally, a graph data viewing tool is also provided to view the graph content. This tool enables users to easily view and verify the generated graph content, so as to intuitively understand the relationship and structure between the data, providing strong support for subsequent data analysis and application.
[0082] Through the comprehensive application of these technical means, this technical solution successfully solves the problem in the prior art that special programs need to be developed for each table, and realizes the efficient and flexible extraction and construction of the required map data from the table data, greatly improving the efficiency and accuracy of data processing.
[0083] In a preferred embodiment of the present invention, Figure 2 As shown, step S1 includes:
[0084] Step S11, defining an extraction rule template, the extraction rule template includes an entity extraction rule template and a relationship extraction rule template;
[0085] Step S12, determining the node information contained in the nodes in the table to be extracted according to the entity extraction rule template, and determining the relationship information between the node information as the relationship between the nodes according to the relationship rule template;
[0086] Step S13, splitting the merged rows and merged columns in the table to be extracted, and adjusting the title bar of the table to be extracted to obtain a standardized table to be extracted;
[0087] Step S14, determining the corresponding columns of the node information and the relationship information in the standardized table to be extracted, so as to complete the standardization process.
[0088] In a preferred embodiment of the present invention, Figure 3 As shown, step S11 includes:
[0089] Step S111, respectively defining entity type definition, node basic information extraction definition and node attribute extraction definition to obtain an entity extraction rule template;
[0090] Step S112, respectively define the relationship type definition, the relationship basic information extraction definition and the relationship attribute extraction definition to obtain a relationship extraction rule template.
[0091] Specifically, in this embodiment, it is necessary to define the extraction rule template, determine the storage format of the knowledge graph data in the graph database and relational database based on the business, including the types of node data and relationship data, the range and representation of the corresponding attributes, and define the extraction rule template based on the corresponding attribute data requirements. The rule template definition is generally carried out in the following steps:
[0092] 1. Determine the data content to be extracted based on the storage format of the knowledge graph data in the graph database
[0093] The basic information of node data generally includes labels, business types, and node names; the basic information of relationship data generally includes labels, business types, and relationship names; other attributes of node / relationship data vary depending on the business scenario. It should be noted that:
[0094] In graph databases, some target knowledge graphs use labels as the business types of nodes / relationships, while others use fixed information as labels. The business types of nodes / relationships are formed by a combination of multiple attribute fields. It is necessary to understand the specific combination method and record the corresponding attribute names. This difference will lead to significant differences in the encapsulation and storage of graph database information.
[0095] In addition, the attribute names and data types of other business attribute data of knowledge graph nodes / relationships in the graph database also need to be clearly and clearly recorded. Some attribute data may be stored in relational databases or other types of databases, and attribute data is represented by associating with graph node IDs. The storage method of this part of the attribute list needs to be clarified and clearly recorded.
[0096] 2. Define the extraction rule template in the form of a table file
[0097] Create two sheet pages, define the entity extraction rule template and the relationship extraction rule template respectively. In each sheet page, specify a row to define the name of the content to be extracted, usually the first row. The content range is determined by referring to the attribute list required for the actual knowledge graph data storage. The defined name needs to be easy to understand its business meaning, and the business name is convenient for subsequent mapping rule filling.
[0098] (1) Entity extraction rule template: The entity extraction rule template needs to define three parts: entity type definition, node basic information extraction definition, and other node attribute extraction definition.
[0099] For entity type definition: it is mainly used to define the label / business type information of the graph node, and also includes the hierarchical relationship between types. It can be understood as the definition of the entity type list used to standardize the graph ontology. Depending on the specific graph data storage requirements, the definition of the type will vary. Here, a more general model is generally used for definition, which can generally include:
[0100] Tag name, entity type name, entity type table column name, parent entity type name, parent entity type table column name, entity type description, etc.
[0101] If the name of the entity type is fixed, use "entity type name" and "parent entity type name" to define the entity type. If the name of the entity type comes from a column of the table data, use "entity type table column name" and "parent entity type table column name" to define the entity type.
[0102] For the definition of node basic information extraction: it is mainly used to define the extraction source of the basic attributes of the generated graph nodes. According to the needs, it can generally include: entity name table column name, entity identification table column name; the column in the "entity identification table column name" data table stores the unique identification identifier of the node object, and identifies the node object when adding relationships between nodes and supplementing attribute data across tables. If the identification of the entity object needs to be assembled through the data of several columns, you can add a column "entity calculation rule" to define it, and you can agree to use "$column name$_$column name$" and other methods to define it. The identification of the entity object can be determined based on three methods, in order of priority from high to low: entity identification table column name, entity calculation rule, entity type name + entity name table column name.
[0103] For other node attribute extraction definitions: mainly used to define the definition of graph business attributes, indicating which column of the data table the relevant attributes need to be extracted from. This part is defined according to specific business needs. Refer to the definition content of the previous "type classification". This part can include the following definitions: start time column name, end time column name, place name column name, longitude column name, latitude column name, sea level elevation column name, ground plane elevation column name.
[0104] (2) Relationship extraction rule template: The relationship extraction rule template needs to define three parts: relationship type definition, relationship basic information extraction definition, and other relationship attribute extraction definition.
[0105] For relationship type definition: it is mainly used to define the label / business type information of the graph relationship, and also includes the hierarchical relationship between types. It can be understood as the definition of the relationship type list used to standardize the graph ontology. Depending on the specific graph data storage requirements, the definition of the type will vary. Here, a more general model is generally used for definition, which can generally include:
[0106] Tag name, relationship type name, relationship type table column name, parent relationship type name, parent relationship type table column name, relationship type description.
[0107] If the name of the relationship type is fixed, use "Relationship Type Name" and "Parent Relationship Type Name" to fill in the relationship class name. If the specific relationship type name comes from a column in the table data, use "Relationship Type Table Column Name" and "Parent Relationship Type Table Column Name" to specify the specific data table column.
[0108] When the type affects the extraction scope of attribute data, other type control fields can be added to mark it, such as adding "type classification" with optional values: normal / tense, then the extraction scope of table data and the storage content of data can be controlled according to the corresponding assignment. Other optional values can also be added as needed. Similarly, "type attribution" can be added to mark whether the relationship type belongs to the meta-ontology or the domain ontology.
[0109] Definition of basic relationship information extraction: mainly used to define the extraction source of basic attributes of generated graph nodes. Generally, it can include:
[0110] Header entity name table column name, header entity type, header entity type table column name, header entity identification table column name, tailer entity name table column name, tailer entity type, tailer entity type table column name, tailer entity identification table column name, whether it is valid, etc. Among them, the column in the "header entity identification table column name" and "tailer entity identification table column name" data table stores the identifier of the relationship-related node, and identifies the node object when adding relationships between nodes. When using this column of data, the corresponding entity name and entity type definition can be omitted. When it is necessary to support the combination of multiple columns to define entity identifiers, you can add "header entity calculation rules" and "tailer entity calculation rules" to define them.
[0111] For other relationship attribute extraction definitions: they are mainly used to define the definitions of graph business attributes, indicating which column of the data table the relevant attributes need to be extracted from. This part is defined according to specific business needs. Refer to the definition content of the previous "type classification". This part can include the following definitions: start time column name, end time column name.
[0112] In addition, there will be a lot of duplicate data in the data table. For some attribute data, you may need to extract only the first row, or extract the minimum, maximum or average values. You can define corresponding built-in functions to calculate and obtain the attributes of the corresponding nodes based on multiple rows of table data, such as min($column name$), max($column name$), and avg($column name$).
[0113] After defining the entity extraction rule template and the relationship extraction rule template, analyze the table data to be extracted and standardize the table. Analyze the table to be extracted to determine the node information and relationship information that need to be extracted, including the type information of nodes and relationships, the relationship information between types, and the mapping of node and relationship attributes to table columns, and determine the data column in the table that uniquely identifies the node or relationship. Standardize the table structure as needed. Split the data and merge rows and columns, remove the merged table header, and adjust the header name.
[0114] 1. Determine the plan based on the connotation of the graph formed based on the tabular data, determine the required node list based on the content, and determine the relationship between the nodes that need to be extracted.
[0115] 2. Determine the type information of the exported nodes, determine the type information of the relationships between the nodes, and determine whether the node / relationship type data is a fixed value set by default or extracted from the data table. If it is a fixed value, it needs to be defined.
[0116] 3. Standardize the table structure as needed. Split all merged rows and columns in the table and restore them to the most basic row and column data. Copy the original row and column data and fill them into all the split rows and columns. Adjust the header title bar of the table to keep only one row of the title bar, adjust the title content of the title bar to make it non-repetitive and easy to understand, and finally delete the other title rows.
[0117] 4. Determine which column in the data table represents the entities and relationships to be extracted, as well as the corresponding attributes.
[0118] In a preferred embodiment of the present invention, the extraction mapping rules include entity extraction mapping rules and relationship extraction mapping rules, such as Figure 4 As shown, step S2 includes:
[0119] Step S21, filling the entity type definition in the extraction rule template and the attribute data columns corresponding to each entity type definition as entity extraction mapping information into a predefined mapping rule template table to obtain an entity mapping extraction rule;
[0120] Step S22, fill the identification column information of the head and tail entities of the relationship between each node in the extraction rule template, the corresponding relationship type definition and the attribute source column information as relationship extraction mapping information into the predefined mapping rule template table to obtain the relationship mapping extraction rule.
[0121] Specifically, in this embodiment, extraction mapping rules are compiled according to a defined rule template, and mapping information is filled in based on the defined mapping rule template form filling requirements, including entity extraction mapping information and relationship extraction mapping information.
[0122] 1. Entity extraction mapping rule information: first fill in the entity type definition information, and then fill in the attribute data columns of the attribute of each entity type. If multiple columns of data in the same row need to be extracted as the same type, you can define them in multiple rows. The main thing is that the corresponding types also need to be copied at the same time.
[0123] 2. Relationship extraction mapping rule information: first fill in the relationship type definition information, then fill in the identification column information of the head and tail entities for a set of extracted relationships, then copy the corresponding relationship type definition information to the corresponding column, and finally fill in the source column information of other attributes.
[0124] In a preferred embodiment of the present invention, the extraction rule template includes an entity extraction rule template and a relationship extraction rule template, such as Figure 5 As shown, step S3 includes:
[0125] Step S31, parsing and extracting mapping rules, encapsulating node type definitions and node attribute extraction definitions in the entity extraction rule template into entity object definition information;
[0126] Step S32, encapsulating the relationship type definition and relationship attribute extraction definition in the relationship extraction rule template into the relationship object definition information;
[0127] Step S33, obtaining all data values in the table to be extracted, and storing them separately according to header data, row data and column data;
[0128] Step S34, extract data from each row of data according to the entity object definition information, encapsulate the extraction results into node data and store them in the node data set, and determine whether each node data in the node data set exists in the graph database:
[0129] If so, the node data with the same storage ID in the graph database is updated according to the storage ID of the node data;
[0130] If not, add the node data into the graph database and generate a storage ID;
[0131] Step S35: extract data from each row of data based on the relationship object definition information, encapsulate the extraction results into relationship data and store them in the relationship data set, and determine whether each relationship data in the relationship data set exists in the graph database:
[0132] If yes, then perform an update operation based on the storage ID of the relational data;
[0133] If not, the relationship data is added to the graph database and a corresponding storage ID is generated;
[0134] Step S36, constructing graph data based on the node data and relationship data in the graph database to obtain graph content.
[0135] In this embodiment, data is extracted from the standardized table based on rules to form graph data.
[0136] In a preferred embodiment of the present invention, the node data set includes a node data set that does not include a storage ID and a node data set that includes a storage ID. The node data extraction process in step S34 includes:
[0137] Step S341, for each row of data, determine whether there is an entity name table column name:
[0138] If yes, encapsulate the entity object, set the corresponding attribution graph attribute, and obtain the corresponding identification data as the node business ID of the entity object when there is an entity identification table column name definition, and go to step S343;
[0139] If not, go to step S342;
[0140] Step S342, determine whether there is an entity identification table column name:
[0141] If yes, encapsulate the entity object and set the corresponding attribute graph property;
[0142] If not, exit;
[0143] Step S343, determine whether there is an entity object in the existing graph:
[0144] If yes, go to step S344;
[0145] If not, go to step S345;
[0146] Step S344, determine whether the entity object has been extracted:
[0147] If yes, delete the currently extracted entity object and keep the extracted entity object as node data;
[0148] If not, the currently extracted entity object is used as node data and the storage ID is extracted, and then the node data is added to the node data set containing the storage ID;
[0149] Step S345, determine whether the entity object has been extracted:
[0150] If yes, the currently extracted entity object will be deleted, and the extracted entity object will be retained as the node data;
[0151] If not, the currently extracted entity object is used as node data, and the node data is added to the node data set that does not contain the storage ID.
[0152] Specifically, node data and relationship data are extracted from table data based on rules, and graph data is constructed and multi-table data is combined according to the agreed node uniqueness identification method to finally form the required graph content.
[0153] Table-based graph data extraction is divided into new extraction and incremental supplementary extraction. The difference is that new extraction requires the generation of a new graph identifier, while incremental extraction needs to be based on existing graph identifiers.
[0154] After the target graph identifier is determined, the processing steps of the graph data parsing based on the mapping rule are as follows:
[0155] 1. Parse the mapping rules to form internal rule data objects. This includes entity definition sheet data parsing and relationship definition sheet data parsing
[0156] (1) Entity definition sheet data analysis: Map the fields in the entity object with the headers in the entity definition template, and encapsulate the data in the entity extraction rule template into the entity object definition information. The entity object definition information includes node type definition related data and node attribute definition related data;
[0157] The columns related to node type definition include: entity type name, parent entity type name, type affiliation, and type classification.
[0158] The columns related to the node attribute definition include: entity name table column name, entity identifier table column name, start time column name, end time column name, place name column name, longitude column name, and dimension column name.
[0159] (2) Relationship definition sheet data analysis: Map the fields in the relationship object with the table headers in the relationship definition template, and encapsulate the data in the node extraction rule template into the relationship object definition information. The relationship object definition information includes the relationship type definition related data and the relationship attribute definition related data;
[0160] The columns related to relationship type definition include: relationship type name, relationship type table column name, parent relationship type name, type affiliation, and type classification.
[0161] The columns related to the relationship attribute definition include: head entity name table column name, head entity identifier table column name, tail entity name table column name, tail entity identifier table column name, validity, start time, and end time.
[0162] 2. Extracting table data content
[0163] Get the document's workbook object according to the document address, then get all the data values in the EXCEL sheet, and store them separately according to header data, row data, and column data.
[0164] 3. Extract existing data in the graph, including node data extraction and relationship data extraction.
[0165] (1) Extract the graph node data and construct the node data map according to the rules. The key value is constructed as follows: "node business ID + name + type + ontology". The "ontology" here refers to the ontology to which the node type belongs. According to the planning of the graph attribute data, if ontology information needs to be added to the graph node, the key here can add the "ontology" information. The ontology information can be passed in as an interface parameter during parsing, and is generally not set in the parsing rule template to improve the applicability of the template.
[0166] (2) Extract the graph relationship data and construct a relationship data map according to the rules. The key value is constructed as follows: "relationship name + relationship type + head entity name + head entity type + tail entity name + tail entity type + ontology". The "ontology" here refers to the ontology to which the relationship type belongs. According to the planning of the graph attribute data, if it is necessary to add ontology information to the graph relationship, the key here can be added with the "ontology" information. The ontology information can be passed in as an interface parameter during parsing, and is generally not set in the parsing rule template to improve the applicability of the template.
[0167] 4. Node data extraction and packaging. All row data extracted from the data table are processed in a loop, and node data is extracted based on each row.
[0168] Based on the entity object definition information list, loop processing is performed, and the current row data is extracted based on each entity object definition information, and the extraction results are encapsulated as node data objects. The specific extraction and processing methods are as follows:
[0169] (1) When there is an entity name table column name, encapsulate the entity object and set the attributed graph. Check the name format and limit the data range: only data that meets the required range is meaningful. If it is meaningless, this rule will not be parsed. Determine whether there is an entity identification table column name definition. If so, obtain the identification data and set it as the node business ID (different from the storage ID automatically generated by the graph database)
[0170] (2) When there is no entity name table column name, but there is an entity identifier table column name, encapsulate the entity object and set the belonging map attribute.
[0171] (3) Check whether the encapsulated entity already exists
[0172] Construct the node key and check whether the node object already exists in the existing graph or whether it is a newly parsed object:
[0173] If the object does not exist in the existing graph and has not been extracted before, the new object will be included in the "data set without storage ID";
[0174] If the object does not exist in the existing graph, but the corresponding object has been extracted before, discard the newly created object and use the previously created object;
[0175] If the object already exists in the existing graph and has not been extracted before, extract the storage ID of the node, put it into the new object, and include the new object in the "data set containing the storage ID";
[0176] If the object already exists in the existing graph, but the corresponding object has been extracted before, the newly created object is discarded and the previously created object is used;
[0177] (4) Extraction of temporal and spatial data
[0178] When the type classification is not a common entity, time and space data are extracted and attribute data is added to the object data.
[0179] Check whether there is a formula in the time data definition. If there is a formula, obtain the corresponding column and specific formula through regular expression parsing. After extracting the corresponding data based on the column name, perform calculation based on the formula, such as min($Time$).
[0180] In some data tables, the time column is filled with relative time information. If necessary, you can set a base time during parsing. When it is detected that adjustment based on the base time is required, the acquired time data can be combined with the base time to obtain an absolute time.
[0181] (5) The generated entities are managed and stored by constructing a Map with "node business ID + name + type + ontology" as the key, which can be used to determine duplication. The extracted entities are divided into a data set containing the storage ID and a data set not containing the storage ID, and are managed separately to facilitate subsequent node data storage and update.
[0182] 5. Relational data extraction and encapsulation
[0183] All row data extracted from the data table are processed in a loop, and relational data is extracted based on each row.
[0184] Based on the relationship object definition information list, loop processing is performed, and the current row data is extracted based on each relationship object definition information, and the extraction results are encapsulated as relationship data objects. The specific extraction and processing methods are:
[0185] (1) Whether the data is to be extracted is determined based on the setting of [Is it valid]; if the setting is invalid, this rule will not be processed.
[0186] (2) Relationship type extraction: Extract data based on the relationship type name and relationship type table column name in the relationship mapping extraction rule, set the relationship name and relationship type related attributes of the relationship data object, and set the belonging map attributes.
[0187] (3) Head node data extraction: If the head entity is extracted according to the head entity definition information in the rule, the extraction processing logic is as follows:
[0188] a) If the "head entity identification table column name" is defined, the identifier is extracted according to the "head entity identification table column name", and then the object existing in the graph or the parsed node object is extracted according to the "node business ID + name + type + ontology".
[0189] b) If the "header entity identification table column name" is not defined, but the "header entity calculation rule" is defined, the identification calculation rule information is extracted according to the "header entity calculation rule", and the specific data column name used to form the identification is obtained after regular expression parsing, and then the node identification can be assembled after data extraction based on the column name. Based on this identification combination, the parsed node data object is obtained.
[0190] c) If "header entity identification table column name" and "header entity calculation rule" are not defined, then according to "header entity name table column name, head entity type, head entity type table column name" and the extracted information are assembled as a key to extract the corresponding node data object.
[0191] (4) Tail Node Data Extraction
[0192] a) If the "tail entity identification table column name" is defined, the identifier is extracted according to the "tail entity identification table column name", and then the object existing in the graph or the parsed node object is extracted according to the "node business ID + name + type + ontology".
[0193] b) If the "tail entity identification table column name" is not defined, but the "tail entity calculation rule" is defined, the identification calculation rule information is extracted according to the "head entity calculation rule", and the specific data column name used to form the identification is obtained after regular expression parsing, and then the node identification can be assembled after data extraction. Based on this identification combination, the parsed node data object is obtained.
[0194] c) If "tail entity identification table column name" and "tail entity calculation rule" are not defined, then according to "tail entity name table column name, tail entity type, tail entity type table column name" and the extracted information, assemble them into a key and extract the corresponding node data object.
[0195] (5) Relationship object construction
[0196] a) Set the header entity: set the obtained header entity object to the relationship object;
[0197] b) Setting the tail entity: setting the acquired tail entity object to the relationship object;
[0198] c) Setting the relationship data according to the data items defined in the template: setting the acquired relationship type data to the relationship object;
[0199] d) Determine whether the relationship exists: Based on "relationship name + relationship type + head entity name + head entity type + tail entity name + tail entity type + ontology". If it already exists, get the storage ID of the object and set it to the relationship object.
[0200] (6) When the type classification is not a common entity, time series data processing is performed.
[0201] (7) Extraction of time series data.
[0202] When the type classification is not a common entity, time series data is extracted and attribute data is added to the object data.
[0203] Check whether there is a formula in the time data definition. If there is a formula, obtain the corresponding column and specific formula through regular expression parsing. After extracting the corresponding data based on the column name, calculate it based on the formula, such as min($Time$).
[0204] In some data tables, the time column is filled with relative time information. If necessary, you can set a base time during parsing. When it is detected that adjustment based on the base time is required, the acquired time data can be combined with the base time to obtain an absolute time.
[0205] (8) A Map is constructed with "relationship name + relationship type + head entity name + head entity type + tail entity name + tail entity type + ontology" as the key for management and storage, which can be used to determine duplication. The extracted relationship objects are divided into data sets containing storage IDs and data sets without storage IDs, and are managed separately to facilitate subsequent storage and update of relationship data.
[0206] 6. Graph data storage and update
[0207] (1) Node data storage and update
[0208] The steps for node data storage and update are as follows:
[0209] The node data to be stored in the node data set is processed cyclically, each node is stored, the existence mark of the node to be stored is judged, and different processing methods are performed according to the judgment result:
[0210] If the node already exists in the graph database, an update operation is performed based on the node storage ID to add new attribute data.
[0211] If the node does not exist in the graph database, the graph node addition operation is performed, and the ID generated when storing in the graph database is returned, and the information is added to the node object.
[0212] (2) Relational data storage and update
[0213] When storing relational data, you need to bring the previously stored node object list to obtain the storage ID of the node in the graph database.
[0214] The steps for storing and updating relational data are as follows:
[0215] The relational data to be stored in the relational data set is processed cyclically, each relational data is stored, the existence mark of the relation to be stored is determined, and different processing methods are performed according to the determination result:
[0216] If the relationship already exists in the graph database, an update operation is performed based on the relationship storage ID to add new attribute data.
[0217] If the relationship does not exist in the graph database, the graph relationship addition operation is performed, and the ID generated when storing in the graph database is returned, and the information is added to the relationship object.
[0218] 7. View the graph data content
[0219] Based on the graph content viewing tool that comes with the graph service or a self-built graph viewing tool, combined with the graph attribution identifier, the content of the corresponding graph can be extracted for viewing, and the content of the graph can be viewed.
[0220] The present invention provides a method for graphing tabular data, which mainly includes: defining extraction mapping rules in combination with target graph storage requirements, and constructing rule-based parsing and extraction programs; analyzing the table to be extracted, determining the content to be extracted, and compiling extraction mapping rules based on rule templates, including mapping of various attribute data of nodes and relationships in the graph to the table to be extracted. By extracting each row of data in the table according to the defined mapping rules, the relationships between nodes can be extracted and converted into graph database data for storage.
[0221] Based on this method, a mapping rule template and parsing program are constructed on the basis of determining the target graph storage structure. When facing different data tables, it is possible to extract content from the table data and construct the required graph data without the need for targeted program development.
[0222] More specifically, in an embodiment of a practical application of the present invention, the extraction and mapping rules for the content table of international events data are compiled according to the following steps:
[0223] The target graph storage data has the following main attributes:
[0224] (1) Use fixed node labels and relationship labels to distinguish specific types based on type attributes.
[0225] (2) Node attributes: label, entity name, entity type, ontology identifier, belonging map identifier, business ID, time series type, start time, end time, place name, longitude, latitude, and elevation. The specific attribute names need to be defined according to actual use. Here, the Chinese names are used to explain the specific meanings.
[0226] (3) Relationship attributes: label, relationship name, relationship type, ontology identifier, belonging graph identifier, business ID, time series type, start time, end time. The specific attribute names need to be defined according to actual use. Here, the Chinese names are used to explain the specific meanings.
[0227] 2. Extraction mapping template definition: Based on the attribute requirements of the target graph, the definition is as follows:
[0228] (1) Use two sheets to define the extraction rules for entities and relationships respectively.
[0229] (2) The column names of the entity extraction mapping template defined in the entity definition sheet are as follows:
[0230] Entity type name, parent entity type name, type attribution, type classification, entity type description, entity name table column name, entity identification table column name, entity data object name table column name, entity data object identification table column name, start time column name, end time column name, place name column name, longitude column name, latitude column name, sea level elevation column name, ground level elevation column name.
[0231] (3) The column names of the relationship extraction mapping template defined in the relationship definition sheet are as follows:
[0232] Header entity name table column name, head entity type, head entity type table column name, head entity identification table column name, head entity calculation rule, tail entity name table column name, tail entity type, tail entity type table column name, tail entity identification table column name, tail entity calculation rule, whether valid, relationship type name, relationship type table column name, parent relationship type name, parent relationship type table column name, type attribution, type classification, relationship type description, start time, end time.
[0233] 3. Target table data
[0234] (1) After the data content of major international events is tabulated, the column name information is as follows:
[0235] Event ID, Event Date, Source Name, Source Sectors, Source Country, EventText, CAMEO Code, Intensity, Target Name, Target Sectors, Target Country, Story ID, Sentence Number, Publisher, City, District, Province, Country, Latitude, Longitude
[0236] (2) The three examples of table data content are as follows. Use “,” to separate the data.
[0237] (a)37542416, 2022 / 10 / 17, Media (South Africa), Media, Social, South Africa, Consult, 40, 1,, Ideological, Parties, South Africa, 56632803, 6, Daily Dispatch, East London, Buffalo City Metropolitan Municipality, Province of Eastern Cape, SouthAfrica, -33.0153, 27.9116
[0238] (b)37542893, 2022 / 10 / 17, Luiz Inacio Lula Da Silva,, Brazil, Makestatement, 10, 0,, 56633256, 2, Reuters News, Sao Paulo, Estado de Sao Paulo, Brazil, -23.5475, -46.6361
[0239] (c)37542894,2022 / 10 / 17,Jair Bolsonaro,,Government,Brazil,Makestatement,10,0,,Parties,Brazil,56633256,2,Reuters News,Sao Paulo,Estado deSao Paulo,Brazil,-23.5475,-46.6361
[0240] 4. Determine the type of graph to be formed and define entity types and relationship types
[0241] (1) Common entity types: actors, fields, and countries.
[0242] (2) Type of space-time entity: event.
[0243] (3) General relationship types: country of origin, territory of origin, and place of occurrence.
[0244] (4) Temporal relationship type: event subject and event object.
[0245] 5. Determine the corresponding mapping relationship when extracting based on table data
[0246] (1) Ordinary Entity:
[0247] $Target Name$-->Actor
[0248] $Source Name$-->Actor
[0249] $Source Sectors$ --> Field
[0250] $Target Sectors$-->Sector
[0251] $Source Country$-->Country
[0252] $Target Country$-->Country
[0253] $Country$-->Country
[0254] (2) Space-time entity:
[0255] $Event Text$-->Event
[0256] Time: $Event Date$, Longitude: $Longitude$ Latitude: $Latitute$
[0257] (3) Ordinary relationship:
[0258] $Source Name$--Country-->$Source Country$
[0259] $Source Name$--Field-->$Source Sectors$
[0260] $Target Name$--Country-->$Target Country$
[0261] $Target Name$--Field-->$Target Sectors$
[0262] $Event Text$--Place of occurrence-->$Country$
[0263] (4) Temporal relationship: subject of behavior and object of behavior.
[0264] $Event Text$--Behavior Subject-->$Source Name$Time$Event Date$
[0265] $Event Text$--Behavior Object-->$Target Name$Time$Event Date$
[0266] 6. Define mapping files based on rule templates
[0267] According to the determined mapping method, fill in the mapping file based on the mapping rule template. The mapping template is filled in row mode. Because there are many mapping fields, for easy reading, the rows and columns are transposed and displayed here.
[0268] The node mapping definition information is shown in the following table:
[0269] Node mapping definition information transposition table
[0270]
[0271]
[0272]
[0273] The relationship mapping definition information is shown in the following table:
[0274] Relationship mapping definition information transposition table
[0275]
[0276]
[0277] In a preferred embodiment of the present invention, the node data also includes type classification, and step S34 also includes a time-space data extraction process, including:
[0278] When the type classification is not an ordinary entity and there is a time formula in the preset time data definition, the time formula is parsed through a regular expression to obtain the corresponding time data column in the table to be extracted and the parsed time formula. After extracting the time data from the time data column, the time data is calculated based on the parsed time formula to obtain the time attribute data and add it to the node data.
[0279] Specifically, when the type affects the extraction scope of attribute data, other type control fields can be added to mark it, such as adding "type classification", whose optional values are: normal / temporal / spatial / time-space, then the extraction scope of table data and the storage content of data can be controlled according to the corresponding assignment. If the ontology needs to distinguish levels, such as meta-ontology and domain ontology (domain ontology inherits from meta-ontology, the types in meta-ontology are highly abstract concepts, and the types in domain ontology are common concepts in the domain), "type attribution" can be added to mark and distinguish whether the currently defined entity type belongs to meta-ontology or domain ontology.
[0280] The present invention also provides a system for graphing tabular data, using the above-mentioned graphing method, such as Figure 6 As shown, including:
[0281] Table processing module 1, used to define an extraction rule template, perform data analysis on the table to be extracted according to the extraction rule template to determine the nodes to be extracted in the table to be extracted and the relationship between the nodes, and then perform standardization processing on the table to be extracted;
[0282] A mapping rule preparation module 2, connected to the table processing module 1, is used to prepare extraction mapping rules according to the extraction rule template;
[0283] The graph construction unit 3 is connected to the mapping rule preparation module 2, and is used to extract data from the standardized table to be extracted according to the extraction mapping rules to obtain node data and relationship data, and to construct the graph data according to the node data and relationship data to obtain the graph content.
[0284] In a preferred embodiment of the present invention, Figure 6 As shown, the table processing module 1 includes:
[0285] A template definition unit 11, used to define an extraction rule template, the extraction rule template includes an entity extraction rule template and a relationship extraction rule template;
[0286] The information determination unit 12 is connected to the template definition unit 11, and is used to determine the node information contained in the nodes in the to-be-extracted table according to the entity extraction rule template, and determine the relationship information between the node information as the relationship between the nodes according to the relationship rule template;
[0287] The table standardization unit 13 is used to split the merged rows and merged columns in the table to be extracted, and adjust the title bar of the table to be extracted to obtain a standardized table to be extracted;
[0288] The column determination unit 14, the connection information determination unit 12 and the table standardization unit 13 are used to determine the columns corresponding to the node information and the relationship information in the standardized table to be extracted, so as to complete the standardization process.
[0289] In a preferred embodiment of the present invention, the template definition unit 11 includes:
[0290] The entity rule definition subunit 111 is used to respectively define an entity type definition, a node basic information extraction definition and a node attribute extraction definition to obtain an entity extraction rule template;
[0291] The relationship rule definition subunit 112 is used to define the relationship type definition, the relationship basic information extraction definition and the relationship attribute extraction definition to obtain the relationship extraction rule template.
[0292] The above are only preferred embodiments of the present invention, and are not intended to limit the implementation methods and protection scope of the present invention. Those skilled in the art should be aware that all solutions obtained by equivalent substitutions and obvious changes made using the contents of this specification and illustrations should be included in the protection scope of the present invention.
Claims
1. A method for graphing tabular data, characterized in that: include: Step S1, defining an extraction rule template, performing data analysis on a table to be extracted according to the extraction rule template to determine the nodes to be extracted in the table to be extracted and the relationship between the nodes, and then performing standardization processing on the table to be extracted; Step S2, compiling extraction mapping rules according to the extraction rule template; Step S3, extracting data from the standardized table to be extracted according to the extraction mapping rules to obtain node data and relationship data, and constructing graph data according to the node data and the relationship data to obtain graph content.
2. The method for mapping according to claim 1, characterized in that: The step S1 comprises: Step S11, defining the extraction rule template, wherein the extraction rule template includes an entity extraction rule template and a relationship extraction rule template; Step S12, determining the node information contained in the nodes in the to-be-extracted table according to the entity extraction rule template, and determining the relationship information between the node information as the relationship between the nodes according to the relationship rule template; Step S13, splitting the merged rows and merged columns in the table to be extracted, and adjusting the title bar of the table to be extracted to obtain a standardized table to be extracted; Step S14, determining the columns corresponding to the node information and the relationship information in the standardized table to be extracted, so as to complete the standardization process.
3. The method for mapping according to claim 2, characterized in that: The step S11 comprises: Step S111, respectively defining an entity type definition, a node basic information extraction definition, and a node attribute extraction definition to obtain the entity extraction rule template; Step S112, respectively defining a relationship type definition, a relationship basic information extraction definition, and a relationship attribute extraction definition to obtain the relationship extraction rule template.
4. The method for mapping according to claim 1, characterized in that: The extraction mapping rules include entity extraction mapping rules and relationship extraction mapping rules, and the step S2 includes: Step S21, filling the entity type definition in the extraction rule template and the attribute data columns corresponding to each entity type definition as entity extraction mapping information into a predefined mapping rule template table to obtain the entity mapping extraction rule; Step S22, fill in the identification column information of the head and tail entities of the relationship between the nodes in the extraction rule template, the corresponding relationship type definition and the attribute source column information as relationship extraction mapping information into the predefined mapping rule template table to obtain the relationship mapping extraction rule.
5. The method for mapping according to claim 1, characterized in that: The extraction rule template includes an entity extraction rule template and a relationship extraction rule template, and the step S3 includes: Step S31, parsing the extraction mapping rule, and encapsulating the node type definition and node attribute extraction definition in the entity extraction rule template into entity object definition information; Step S32, encapsulating the relationship type definition and relationship attribute extraction definition in the relationship extraction rule template into the relationship object definition information; Step S33, obtaining all data values in the table to be extracted, and storing them separately according to header data, row data and column data; Step S34, extracting data from each row of data according to the entity object definition information, encapsulating the extraction result as node data and storing it in a node data set, and determining whether each node data in the node data set exists in the graph database: If so, updating the node data in the graph database with the same storage ID according to the storage ID of the node data; If not, adding the node data into the graph database and generating the storage ID; Step S35, extracting data from each row of data based on the relationship object definition information, encapsulating the extraction results as relationship data and storing them in a relationship data set, and determining whether each relationship data in the relationship data set exists in the graph database: If yes, then perform an update operation according to the storage ID of the relational data; If not, the relationship data is added into the graph database and the corresponding storage ID is generated; Step S36, constructing graph data based on the node data and relationship data in the graph database to obtain the graph content.
6. The method for mapping according to claim 5, characterized in that: The node data also includes type classification, and the step S34 also includes a time-space data extraction process, including: When the type classification is not an ordinary entity and there is a time formula in the preset time data definition, the time formula is parsed by a regular expression to obtain the corresponding time data column in the table to be extracted and the parsed time formula, and after the time data is extracted from the time data column, the time data is calculated based on the parsed time formula to obtain time attribute data and add it to the node data.
7. The method for mapping according to claim 5, characterized in that: The node data set includes a node data set that does not include a storage ID and a node data set that includes a storage ID. The node data extraction process in step S34 includes: Step S341, for each row of the row data, determine whether there is an entity name table column name: If yes, encapsulate the entity object, set the corresponding attribution graph attribute, and obtain the corresponding identification data as the node business ID of the entity object when the entity identification table column name definition exists, and go to step S343; If not, go to step S342; Step S342, determine whether there is an entity identification table column name: If yes, encapsulate the entity object and set the corresponding attribute graph property; If not, exit; Step S343, determine whether the entity object exists in the existing graph: If yes, go to step S344; If not, go to step S345; Step S344, determining whether the entity object has been extracted: If yes, the currently extracted entity object is deleted, and the entity object that has been extracted is retained as the node data; If not, the entity object currently extracted is used as the node data and the storage ID is extracted, and then the node data is added to the node data set containing the storage ID; Step S345, determining whether the entity object has been extracted: If yes, the currently extracted entity object is deleted, and the entity object that has been extracted is retained as the node data; If not, the currently extracted entity object is used as the node data and added to the node data set that does not contain the storage ID.
8. A system for graphing tabular data, characterized in that: Applying the mapping method as described in any one of claims 1 to 7 comprises: A table processing module is used to define an extraction rule template, perform data analysis on the table to be extracted according to the extraction rule template to determine the nodes to be extracted in the table to be extracted and the relationship between the nodes, and then perform standardization processing on the table to be extracted; A mapping rule preparation module, connected to the table processing module, for preparing extraction mapping rules according to the extraction rule template; A graph construction unit is connected to the mapping rule compilation module, and is used to extract data from the table to be extracted after standardization according to the extraction mapping rule to obtain node data and relationship data, and to construct graph data according to the node data and the relationship data to obtain graph content.
9. The graphing system according to claim 8, characterized in that: The table processing module includes: A template definition unit, used to define the extraction rule template, wherein the extraction rule template includes an entity extraction rule template and a relationship extraction rule template; an information determination unit, connected to the template definition unit, for determining the node information contained in the nodes in the to-be-extracted table according to the entity extraction rule template, and determining the relationship information between the node information as the relationship between the nodes according to the relationship rule template; A table standardization unit, used for splitting the merged rows and merged columns in the table to be extracted, and adjusting the title bar of the table to be extracted to obtain a standardized table to be extracted; A column determination unit is connected to the information determination unit and the table standardization unit, and is used to determine the columns corresponding to the node information and the relationship information in the standardized table to be extracted, so as to complete the standardization process.
10. The graphing system according to claim 9, characterized in that: The template definition unit includes: An entity rule definition subunit is used to respectively define an entity type definition, a node basic information extraction definition and a node attribute extraction definition to obtain the entity extraction rule template; The relationship rule definition subunit is used to respectively define the relationship type definition, the relationship basic information extraction definition and the relationship attribute extraction definition to obtain the relationship extraction rule template.