Zero-configuration knowledge graph construction method, device and medium
By employing dynamic semantic analysis and cross-table entity merging algorithms, the hard-coding problem in knowledge graph construction is solved, enabling a flexible and easy-to-use knowledge graph construction method. This improves the accuracy of field identification and the completeness of the knowledge graph, and supports entity association and semantic fusion of multi-source data.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- INSPUR ENTERPRISE CLOUD TECHNOLOGY (SHANDONG) CO LTD
- Filing Date
- 2025-12-02
- Publication Date
- 2026-04-21
AI Technical Summary
Existing knowledge graph construction technologies suffer from hard-coding defects, making it difficult to achieve flexible and easy-to-learn construction methods, and unable to effectively perform cross-table entity intelligent recognition and semantic fusion.
It employs dynamic semantic analysis algorithms to analyze field names and data content, automatically identifies and merges identical entities through cross-table entity intelligent merging algorithms, constructs an intelligent knowledge graph, and builds a multi-level relationship network through JSON composite field decomposition algorithms and unique aggregation node mechanisms, supporting a visual interface and seamless integration.
It enables adaptive knowledge graph construction for arbitrary database table structures, significantly improves the accuracy of field semantic recognition and the completeness of knowledge graphs, lowers the technical threshold, supports entity association and semantic fusion of multi-source heterogeneous data, and provides high-quality knowledge graph construction and visualization interaction functions.
Smart Images

Figure CN121257685B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of knowledge graph technology, specifically a zero-configuration knowledge graph construction method, device, and medium. Background Technology
[0002] Knowledge graphs, as a core technology for data intelligence, provide powerful semantic association and knowledge reasoning capabilities. Traditional knowledge graph construction utilizes techniques such as entity extraction, relation recognition, and ontology construction, combined with complex field mapping and rule configuration, to achieve the transformation of structured data into knowledge networks, the discovery of semantic relationships, and the construction of knowledge systems. While supporting applications such as intelligent search and decision analysis, it provides crucial knowledge infrastructure support for enterprise digital transformation.
[0003] However, existing knowledge graph construction technologies are not yet sufficient for intelligent cross-table entity recognition and the generation of generalized knowledge networks. Directly writing entity mapping rules is too difficult for non-professionals, requiring specialized technical training, which is time-consuming and costly.
[0004] Therefore, how to overcome the hard-coding defects in traditional knowledge graph construction, achieve a more flexible and easier-to-use construction method, and thus realize data source entity association and semantic fusion is a technical problem that urgently needs to be solved. Summary of the Invention
[0005] The technical objective of this invention is to provide a zero-configuration knowledge graph construction method, device, and medium to address how to overcome the hard-coding defects in traditional knowledge graph construction, achieve a more flexible and easier-to-use construction method, and thus realize the problem of data source entity association and semantic fusion.
[0006] The technical objective of this invention is achieved as follows: a zero-configuration knowledge graph construction method, the specific method of which is as follows:
[0007] Intelligent database deep analysis is achieved by performing field name semantic analysis and data content analysis through dynamic semantic analysis algorithms: all data table resources are acquired, and deep structural analysis of the data table resources is performed on field type analysis, data distribution statistics and constraint relationship identification. Combined with dynamic semantic analysis algorithms, field name semantic analysis and data content analysis are achieved to generate a comprehensive analysis report that includes table overview, field semantic mapping, entity field identification and relationship field identification.
[0008] By automatically identifying and merging identical entities across multiple tables using a cross-table entity intelligent merging algorithm, multi-table collaborative intelligent search is achieved. A multi-table collaborative search strategy based on field semantic features and data quality assessment is designed. By assigning differentiated search weights and priorities to different tables, and employing parallel search techniques that fuse fuzzy matching, exact matching, and semantic reasoning, the strategy maximizes the discovery of data records related to query keywords. Furthermore, the strategy collects multi-dimensional occurrence patterns of keywords in different tables and fields in real time, including frequency of occurrence, contextual environment, and associated data characteristics. A query keyword role intelligent identification algorithm dynamically determines the semantic role of the query keywords.
[0009] Building an intelligent knowledge graph: Based on keyword role characteristics, the system automatically selects the optimal construction strategy (core entity, attribute value, or hybrid mode) through a multi-strategy relationship building engine. It independently builds a local knowledge graph for each data table to ensure internal consistency. Through intelligent cross-table entity merging, it realizes entity similarity calculation and conflict resolution. By adopting a JSON composite field decomposition algorithm and a unique aggregation node mechanism to transform complex data structures, it builds a multi-level relationship network containing first-level core relationships, second-level attribute relationships, and third-level indirect relationships.
[0010] Knowledge Graph Optimization and Intelligent Export: This feature performs entity integrity checks, relation consistency verification, and cross-table fusion accuracy assessments on the knowledge graph. It obtains the evaluation results of the knowledge graph and automatically adjusts entity weights, relation confidence, and network structure based on these results. It generates detailed analysis reports including node statistics, edge statistics, cross-table relation statistics, and relation hierarchy distribution. A visual interface with interactive functions such as node drag-and-drop, relation filtering, hierarchy switching, and cross-table entity highlighting is created. Knowledge graph data is exported in a standardized format and supports seamless integration with other system tools.
[0011] As a preferred approach, a dynamic semantic analysis algorithm is used to perform semantic analysis of field names and data content analysis to achieve intelligent deep database analysis, as detailed below:
[0012] Multi-level field name semantic analysis: Construct a three-layer progressive recognition mechanism of exact matching → pattern matching → semantic reasoning, establish a multi-dimensional semantic dictionary including personnel, organizations, positions, contact information and time, and combine word frequency statistics and semantic weight calculation to achieve adaptive recognition of various database field naming conventions such as mixed Chinese and English, underscore separation and camelCase naming, and then use fuzzy matching algorithm and similarity scoring to handle variant naming and synonym cases, thereby realizing multi-level field name semantic analysis;
[0013] Deep semantic analysis of data content: By building an intelligent recognition system covering Chinese personal names, English personal names, organization names, contact information and dates through a content semantic mining engine based on regular expression pattern library and statistical learning, and combining multi-dimensional statistical features such as the proportion of unique values, the proportion of null values and the distribution of data length, deep semantic analysis of field data content is achieved, avoiding semantic misjudgment based solely on field names;
[0014] Intelligent entity relationship field recognition: Implement an entity relationship field classification algorithm driven by a four-dimensional evaluation system including semantic type, data uniqueness, data type, and business logic characteristics. Entity fields are identified through high uniqueness threshold judgment (unique value ratio >70%) and semantic type matching. Numerical field exclusion algorithms are used to filter non-entity fields such as count, amount, and rating. Relationship fields such as job title, contact information, time, and description are identified to build a complete entity relationship field classification system and achieve intelligent recognition of entity relationship fields.
[0015] As a preferred option, the cross-table entity intelligent merging algorithm achieves intelligent identification and conflict-free merging of cross-table entities through a three-stage processing mechanism, as follows:
[0016] Entity standardization preprocessing mechanism: Construct a multi-level character standardization entity standardization preprocessing engine. Through a four-fold processing mechanism of unified character case conversion, standardization of special characters and punctuation marks, standardized mapping of Chinese and English characters, and cleanup of redundant whitespace characters, it eliminates the problem of inconsistent representation of the same entity across tables caused by differences in data entry habits and format specifications. For Chinese data environment, it designs algorithms for unified processing of full-width and half-width characters and conversion between simplified and traditional Chinese characters, establishes a character mapping table and a regular expression rule base, and realizes the standardization of the format of different representations of the same entity.
[0017] A multi-dimensional entity similarity scoring mechanism is designed, integrating precise matching, edit distance, speech similarity, and semantic similarity algorithms. This mechanism maximizes the discovery of identical entities across tables while ensuring merging accuracy through a weighted comprehensive scoring mechanism using differentiated weight coefficients and dynamic threshold parameters. Specifically, the precise matching algorithm handles completely identical entities; the edit distance algorithm identifies entity variants with input errors or slight variations; the speech similarity algorithm identifies homophones and near-homophones in Chinese names through pinyin conversion and initial / final comparison; and the semantic similarity algorithm combines word vector models to identify semantically equivalent entities.
[0018] Intelligent Merge Decision and Conflict Resolution Mechanism: An intelligent merge decision algorithm based on a progressive merge strategy is implemented. It adopts a three-level progressive processing flow: high confidence priority (similarity > 0.9), medium confidence verification (similarity 0.7-0.9), and low confidence manual intervention. An attribute priority ranking mechanism is constructed by evaluating the authority of the data source, data integrity, and data timeliness, combined with attribute fusion rules for complementary attribute integration. A special merge strategy based on unique identifiers is designed for the special data type of JSON composite fields. Through entity uniqueness and integrity protection mechanisms, data loss and structural damage are avoided during the merge process.
[0019] As a preferred approach, a multi-level relationship network is constructed by transforming complex data structures using a JSON composite field decomposition algorithm and a unique aggregation node mechanism, specifically including first-level core relationships, second-level attribute relationships, and third-level indirect relationships, as follows:
[0020] Intelligent Recognition and Validation of JSON Composite Fields: A JSON field intelligent recognition engine based on syntax parsing and structure validation is constructed. Through a four-dimensional recognition system of JSON syntax correctness verification, array type detection, object nesting hierarchy analysis, and data integrity verification, it accurately identifies complex JSON array structures containing multiple objects. Furthermore, it distinguishes between simple core value objects and complex multi-attribute objects through content semantic analysis, establishes a JSON data pattern library to assess complexity and processing priority, and provides a technical basis for subsequent decomposition strategy selection.
[0021] Establish a virtual aggregation node mechanism based on globally unique identifiers: By constructing a multi-dimensional unique node identifier that integrates the main entity name, field name, table name, and record index, it serves as a connection carrier between JSON composite data and the main entity, solving the entity naming conflict problem caused by the same field name in different records or across tables. In addition, an entity name simplification algorithm is designed by combining semantic analysis and keyword extraction technology to improve the readability of the knowledge graph while ensuring global uniqueness.
[0022] A three-level relation network construction algorithm based on a unique aggregation node is designed: the main entity-aggregate node connection represents the composite information inclusion relationship, the aggregation node-core entity connection represents the specific instance relationship, and the core entity-attribute entity connection represents the detailed attribute relationship. It fully preserves the original structural features of JSON data, provides clear semantic path navigation for complex queries and intelligent reasoning of knowledge graphs, and supports dynamic graph filtering based on relation importance through differentiated weights and confidence scores.
[0023] Intelligent Relationship Type Inference and Naming: Design a relationship type inference engine based on semantic feature analysis, establish a relationship type dictionary covering professional terms in multiple fields such as medical health, enterprise management, education and scientific research, and realize intelligent automatic generation of relationship names by combining JSON key-value pair semantic feature mining algorithm; design a vocabulary combination and grammar rule optimization mechanism for Chinese context to generate relationship names that conform to Chinese semantic expression habits, and support adaptive adjustment of relationship classification system through relationship type inheritance and dynamic expansion mechanism.
[0024] As a preferred option, the multi-strategy relationship building engine dynamically selects the optimal relationship building strategy through an intelligent selection mechanism, as follows:
[0025] Core Entity Radiation Model: This model employs a multi-level radiation-type relationship network construction strategy based on a central entity. Specifically, after identifying the query keyword as the core entity using a query keyword role intelligent recognition algorithm, a comprehensive relationship ecosystem is built around the core entity as the central node of the network. A three-level progressive construction mechanism—prioritizing strong relationships, expanding related relationships, and supplementing with indirect relationships—is used to form a complete relationship ecosystem centered on the core entity. The three-level progressive construction mechanism specifically involves: establishing a Level 1 strong relationship (basic information, organizational affiliation, job role) between the core entity and its direct attributes; constructing a Level 2 related relationship (colleagues, superiors and subordinates, collaboration) with relevant entities; and mining a Level 3 indirect relationship through intermediate entities.
[0026] Attribute Value Association Pattern: A strategy for constructing entity association networks based on common attribute features is designed. Specifically, after identifying query keywords as attribute values, a three-step process of entity discovery → association analysis → clustering construction is adopted to achieve accurate entity association network construction in application scenarios such as organizational structure analysis, skill matching, and project team building. The three-step process of entity discovery → association analysis → clustering construction specifically involves: identifying all candidate entity sets containing the corresponding attribute values; and using attribute similarity analysis, co-occurrence frequency statistics, and semantic association reasoning techniques to deeply mine entity clustering patterns and potential association relationships based on common attributes.
[0027] Hybrid Trade-off Mode: This mode employs a hybrid trade-off relationship construction strategy based on probability distribution and dynamic weight adjustment. Specifically, for complex situations where the role characteristics of query keywords are unclear or exhibit mixed characteristics, the probability distribution of keywords as core entities and attribute values is calculated. A probability weight-driven resource allocation mechanism is used to allocate more computing resources and higher relationship weights to high-probability role types, while moderately exploring low-probability role types. Furthermore, an adaptive weight adjustment algorithm and a multi-role parallel processing mechanism are combined to ensure high robustness and comprehensiveness when facing fuzzy queries and complex semantic environments.
[0028] Even better, the query keyword role intelligent recognition algorithm intelligently determines the role type of the keyword by comprehensively analyzing the occurrence pattern, field characteristics, and semantic environment of the query keyword in the database, as follows:
[0029] A four-dimensional feature extraction algorithm based on frequency of occurrence, field type, context, and statistical features is constructed to achieve multi-dimensional feature extraction and analysis: comprehensively statistically analyze the occurrence patterns of keywords in various data tables and fields, focus on analyzing the distribution weight of keywords in entity fields and relation fields, and combine content features such as text length, character type, language features, and format patterns to achieve a preliminary quantitative judgment on the tendency of keywords as core entities or attribute values, providing multi-dimensional evidence support for subsequent role recognition decisions;
[0030] The design incorporates a weighted scoring mechanism that integrates field semantic authority, data statistical credibility, and consistency of occurrence patterns to achieve a comprehensive assessment of the semantic environment: entity roles are determined by evaluating the dominant occurrence patterns of keywords in highly unique entity fields, entity semantic features, and cross-table consistency behavior; attribute value roles are evaluated by evaluating the descriptive and categorical features of keywords in relation fields and the performance of common attributes across entities; and finally, comprehensive weight calculation is used to achieve a precise quantitative assessment and credibility analysis of keyword role tendencies.
[0031] An adaptive weight adjustment mechanism based on data quality, table structure complexity, and business domain characteristics is adopted. By dynamically optimizing the weights of each evaluation indicator, the accuracy of role identification is improved, thereby achieving dynamic weight adjustment and decision-making. At the same time, a fusion decision algorithm combining threshold comparison and confidence assessment is used to ensure high accuracy and strong adaptability of role identification in query scenarios with different complexities. Specifically, the fusion decision algorithm is as follows: when the entity role score ratio is greater than 1.2, it is determined to be a core entity; when the attribute value role score ratio is greater than 0.8, it is determined to be an attribute value; when the entity role score and the attribute value role score are close, it is determined to be a mixed role.
[0032] More specifically, word frequency statistics refer to the frequency of semantic keyword matching. Specifically, this involves: establishing a semantic dictionary database containing over two hundred semantic keywords across six major categories, including people, organizations, positions, contact information, identifiers, and time; for the database field names to be analyzed, traversing the predefined semantic keywords in the semantic dictionary database, checking whether the field names contain the corresponding semantic keywords, and statistically analyzing the keyword hit rate under each semantic category to obtain the proportion of the corresponding keywords in the field names;
[0033] Semantic weight calculation adopts a character length ratio algorithm, specifically: when any semantic keyword matches a field name, the corresponding semantic category obtains a weight score, which is equal to the character length of the semantic keyword divided by the total length of the field name; for compound field names, if a compound field name matches multiple keywords of the same category, the weight scores are accumulated, thus supporting compound semantic recognition; for field name patterns that occur frequently in the database and have clear semantics, a direct mapping dictionary is established; when a field name matches the direct mapping dictionary, the semantic type of the corresponding field name is directly determined and the highest weight score is assigned, without the need for weight calculation.
[0034] Fuzzy matching, in descending order of priority, includes exact matching, inclusion matching, and pattern matching. Exact matching specifically determines the semantic type directly when the field name is exactly equal to any predefined semantic keyword in the semantic dictionary. Inclusion matching first converts the field name to lowercase to eliminate the impact of case differences; then iterates through all keywords in the semantic dictionary, checking whether each keyword appears as a substring in the field name, achieving accurate identification of keywords at any position in the field name. For each detected keyword, the ratio of the keyword length to the field name length is calculated as the fuzzy matching score. If multiple keywords of the same semantic category match the field name, the fuzzy matching scores are accumulated. Finally, the semantic category with the highest fuzzy matching score is selected as the field name's determination result.
[0035] Similarity is calculated using two dimensions: field name similarity and data content similarity. A threshold segmentation strategy distinguishes between variant naming and synonym cases. Field name similarity is calculated based on semantic coverage: all semantic keywords in the field name are extracted, and the ratio of the sum of the lengths of all semantic keywords in the field name to the total length of the field name is calculated. When the overlap of the semantic keyword sets of two field names exceeds a set overlap threshold, the two field names are considered to have high similarity. Data content similarity is calculated using the cosine similarity of feature vectors: for each field name, five dimensions of features are extracted, including the proportion of unique values, the proportion of null values, the average length, the proportion of numerical values, and the pattern matching score. These five dimensions form a feature vector, and the content similarity between two field names is the cosine similarity between these feature vectors. Normalization is then performed to ensure the comparability of features with different dimensions. The proportion of unique values reflects the degree of repetition of field values. The similarity score is calculated as follows: The proportion of null values reflects data integrity; the average length reflects the complexity of the field content; the proportion of numerical values reflects whether the field is a numerical type; the pattern matching score reflects the degree to which the field content conforms to a specific pattern; for variant naming and synonyms, a two-dimensional decision matrix is used, specifically: when the similarity of two field names is higher than 0.7 and the similarity of data content is higher than 0.8, it is determined to be a variant naming, indicating that the two field names are different expressions of the same concept; when the similarity of field names is lower than 0.7 but the similarity of data content is higher than 0.8 and the semantic type is the same, it is determined to be a synonym, indicating that the two field names use different words to express the same semantics; when the similarity of field names is higher than 0.7 but the similarity of data content is lower than 0.8, it is determined to be a partial variant, indicating that the field names are similar but the data features are significantly different; for the comprehensive similarity score, a weighted fusion method is used, with field name similarity accounting for 40% of the weight, data content similarity accounting for 40% of the weight, and semantic type consistency accounting for 20% of the weight.
[0036] More preferably, the regular expression pattern library adopts a layered design architecture. The first layer is entity recognition patterns, including Chinese personal name patterns, English personal name patterns, organization name patterns, and identification number patterns; the second layer is attribute recognition patterns, including contact information patterns such as telephone and email, time and date patterns, and address patterns; the third layer is data type patterns, including numeric patterns, text patterns, and enumeration patterns.
[0037] Among them, the Chinese name pattern matches two to four consecutive Chinese characters, covering various cases from two-character names to compound surnames; in practical applications, when more than 60% of the field sample data matches the Chinese name recognition pattern, the corresponding field is determined to be a name field.
[0038] The English personal name recognition pattern requires at least two words separated by spaces, with each word consisting of letters; the organization name pattern uses keyword inclusion for recognition, that is, predefined Chinese keywords for departments, divisions, groups, institutes, and companies, and English keywords for "department". When more than 40% of the samples in the field data contain the predefined Chinese keywords for departments, divisions, groups, institutes, and companies, it is determined to be an organization name field.
[0039] Contact information pattern recognition is designed for different types, specifically: mobile phone number pattern requires eleven pure numbers, landline pattern requires three to four area codes plus seven to eight numbers with optional hyphens, and email pattern requires a complete structure of username, @ symbol, and domain name; identifier number recognition combines data type and content pattern; fields of integer type or fields where all sample data are pure numbers are identified as identifiers.
[0040] The integration of regular expression pattern library and statistical features constitutes a complete intelligent recognition system. The recognition process is as follows: first, semantic inference is performed based on field names; second, regular expression pattern matching is performed based on data content; third, statistical feature analysis is performed; and finally, a fusion decision is made. The decision logic adopts the confidence priority principle.
[0041] An electronic device includes: a memory and at least one processor;
[0042] The memory contains computer programs;
[0043] The at least one processor executes the computer program stored in the memory, causing the at least one processor to perform the zero-configuration knowledge graph construction method as described above.
[0044] A computer-readable storage medium storing a computer program that can be executed by a processor to implement the zero-configuration knowledge graph construction method described above.
[0045] The zero-configuration knowledge graph construction method, device, and medium of the present invention have the following advantages:
[0046] (i) This invention achieves adaptive knowledge graph construction for any database table structure through dynamic semantic analysis algorithm and cross-table entity intelligent merging algorithm. Through dynamic field semantic recognition algorithm, cross-table entity intelligent merging algorithm, JSON composite field decomposition algorithm and multi-strategy relationship construction engine, it realizes dual semantic analysis based on field name and data content, automatically identifies and merges the same entities in multiple tables, resolves naming conflicts through unique aggregation nodes, and adaptively selects the optimal construction strategy based on query keyword roles. It solves the hard-coding problem in traditional knowledge graph construction, realizes true general application, and achieves a more flexible and easier construction method. It also supports multi-source heterogeneous data input, not limited to a single table, and can realize cross-data source entity association and semantic fusion.
[0047] (II) This invention achieves adaptive processing of any database table structure through innovative dynamic table structure analysis and intelligent semantic recognition technology, eliminating the technical bottleneck of hard-coded configuration in traditional methods. It also adopts cross-table entity recognition algorithm and intelligent merging mechanism to automatically discover and integrate the same entities distributed in multiple data tables, constructing a complete and unified knowledge graph. At the same time, the dual semantic analysis algorithm based on field name and data content significantly improves the intelligent processing capability of complex business fields, especially JSON composite fields. In addition, through a multi-strategy relationship building engine and intelligent query role recognition mechanism, it can adaptively select the optimal relationship building strategy according to specific application scenarios. Furthermore, through innovative JSON field decomposition algorithm and unique aggregation node mechanism, it effectively solves key technical problems such as naming conflicts and relationship ambiguity in the processing of composite data structures, thereby realizing high-quality, fully automated knowledge graph construction and providing reliable technical support for data intelligence applications.
[0048] (iii) This invention completely eliminates the need for hard-coded configuration through dynamic semantic analysis technology, and can quickly adapt to any database table structure, significantly reducing maintenance costs and technical barriers.
[0049] (iv) This invention employs an innovative cross-table entity recognition algorithm to automatically discover and merge identical entities in multiple tables, significantly improving the integrity and accuracy of the knowledge graph;
[0050] (v) Based on dual semantic analysis of field name and data content, this invention improves the accuracy of field semantic recognition and effectively solves the problem of processing complex data structures such as JSON composite fields;
[0051] (vi) This invention uses a multi-strategy relationship building engine to adaptively select the optimal strategy. The three-level relationship network construction can accurately distinguish between core relationships, attribute relationships and indirect relationships, thereby improving the quality of the knowledge graph.
[0052] (vi) The present invention uses a JSON field decomposition algorithm and a unique aggregation node mechanism to effectively solve the naming conflict problem in the processing of composite data structures, ensuring the clarity and readability of the graph;
[0053] (vii) This invention supports large-scale data processing, significantly improves processing efficiency, has high-performance features for enterprise-level applications, and its zero-hard-coding design lowers the barrier to entry. Even non-technical personnel can easily build knowledge graphs. The intuitive visual interface makes operation simple and easy to use. Through cross-table relationship discovery and multi-level network construction, it can discover more valuable relationships and improve the data value mining capability.
[0054] (viii) This invention automatically constructs a knowledge graph by intelligently analyzing the database structure and content, without the need for manual code writing and configuration. It automatically identifies and merges the same entities distributed in multiple data tables through entity name standardization and similarity algorithms, and provides an interactive graph interface that supports functions such as node drag and drop, relationship filtering, and multi-level display, and generates statistical analysis reports in real time. Attached Figure Description
[0055] The invention will be further described below with reference to the accompanying drawings.
[0056] Appendix Figure 1 Flowchart of a zero-configuration knowledge graph construction method;
[0057] Appendix Figure 2 This is a flowchart of the dynamic semantic analysis algorithm;
[0058] Appendix Figure 3 The flowchart for the cross-table entity merging algorithm;
[0059] Appendix Figure 4 Flowchart for decomposing and processing JSON fields;
[0060] Appendix Figure 5 A diagram illustrating the engine for building multi-strategy relationships;
[0061] Appendix Figure 6 This is an example diagram of a three-level relational network in a knowledge graph. Detailed Implementation
[0062] The zero-configuration knowledge graph construction method, device, and medium of the present invention will be described in detail below with reference to the accompanying drawings and specific embodiments.
[0063] Example 1: As shown in the attached document Figure 1 As shown in the figure, this embodiment provides a zero-configuration knowledge graph construction method, which is as follows:
[0064] S1. Perform field name semantic analysis and data content analysis through dynamic semantic analysis algorithm to achieve intelligent database deep analysis: acquire all data table resources, and perform deep structural analysis of the data table resources, including field type analysis, data distribution statistics and constraint relationship identification. Combine the dynamic semantic analysis algorithm to achieve field name semantic analysis and data content analysis, and generate a comprehensive analysis report including table overview, field semantic mapping, entity field identifier and relationship field identifier.
[0065] S2. Automatically identify and merge identical entities in multiple tables through a cross-table entity intelligent merging algorithm to achieve multi-table collaborative intelligent search: Design a multi-table collaborative search strategy based on field semantic features and data quality assessment. By assigning differentiated search weights and priorities to different tables, and employing parallel search techniques that fuse fuzzy matching, exact matching, and semantic reasoning, maximize the discovery of data records related to query keywords. In addition, collect multi-dimensional occurrence patterns of keywords in different tables and fields in real time, including frequency of occurrence, context, and related data characteristics. Dynamically determine the semantic role of query keywords through a query keyword role intelligent identification algorithm.
[0066] S3. Constructing an intelligent knowledge graph: Based on keyword role characteristics, the system automatically selects the optimal construction strategy (core entity, attribute value, or hybrid mode) through a multi-strategy relationship construction engine. It independently constructs a local knowledge graph for each data table to ensure internal consistency. Through intelligent cross-table entity merging, it realizes entity similarity calculation and conflict resolution. By adopting a JSON composite field decomposition algorithm and a unique aggregation node mechanism to transform complex data structures, it constructs a multi-level relationship network containing first-level core relationships, second-level attribute relationships, and third-level indirect relationships.
[0067] S4. Knowledge Graph Optimization and Intelligent Export: Performs entity integrity checks, relation consistency verification, and cross-table fusion accuracy assessments on the knowledge graph. Obtains the evaluation results of the knowledge graph and automatically adjusts entity weights, relation confidence, and network structure based on the evaluation results. Generates a detailed analysis report including node statistics, edge statistics, cross-table relation statistics, and relation hierarchy distribution. Creates a visual interface with interactive functions such as node drag-and-drop, relation filtering, hierarchy switching, and cross-table entity highlighting. Exports knowledge graph data in a standardized format and supports seamless integration with other system tools.
[0068] As attached Figure 2 As shown, in step S1 of this embodiment, the field name semantic analysis and data content analysis are performed using a dynamic semantic analysis algorithm to achieve intelligent database deep analysis, as follows:
[0069] S101, Multi-level field name semantic analysis: Construct a three-layer progressive recognition mechanism of exact matching → pattern matching → semantic reasoning, establish a multi-dimensional semantic dictionary including personnel, organizations, positions, contact information and time, and combine word frequency statistics and semantic weight calculation to achieve adaptive recognition of various database field naming conventions such as mixed Chinese and English, underscore separation and camelCase naming, and then use fuzzy matching algorithm and similarity scoring to handle variant naming and synonym cases, thereby realizing multi-level field name semantic analysis;
[0070] S102. Deep semantic analysis of data content: By constructing an intelligent recognition system covering Chinese personal names, English personal names, organization names, contact information, and dates and times through a content semantic mining engine based on the fusion of regular expression pattern library and statistical learning, and combining multi-dimensional statistical features such as the proportion of unique values, the proportion of null values, and the distribution of data length, deep semantic analysis of field data content is achieved, avoiding semantic misjudgment based solely on field names.
[0071] S103. Intelligent Entity Relationship Field Recognition: Implement an entity relationship field classification algorithm driven by a four-dimensional evaluation system including semantic type, data uniqueness, data type, and business logic characteristics. Entity fields are identified through high uniqueness threshold judgment (unique value ratio >70%) and semantic type matching. Numerical field exclusion algorithms are used to filter non-entity fields such as counts, amounts, and ratings. Relationship fields such as job title, contact information, time, and description are identified to build a complete entity relationship field classification system and achieve intelligent recognition of entity relationship fields.
[0072] The dynamic semantic analysis algorithm in this embodiment employs a dual-path parallel processing mechanism of field name analysis and sample data analysis. In the field name analysis path, direct mapping matching is first attempted, that is, the field name is precisely matched with a pre-set multidimensional semantic dictionary; if direct mapping fails, the process enters the pattern matching analysis stage, which uses fuzzy matching algorithms and regular expression pattern recognition to handle variant naming and synonym cases. In the sample data analysis path, content pattern detection is performed on the sample data of the field, using a regular expression pattern library to identify feature patterns such as Chinese personal names, English personal names, organizations, contact information, dates, and times; if a clear content pattern is detected, the content type is determined; if no pattern is detected, only the field name analysis result is relied upon. The analysis results of the two paths are fused and integrated at the semantic type inference node, with priority given to the field name analysis result, but when the semantics of the field name are ambiguous (confidence < 0.5), the content type analysis result is used for correction. After inference, field classification is performed based on a four-dimensional evaluation system: first, it is determined whether the field is an entity type (unique value ratio >70% and semantic type is person or organization); if so, it is marked as an entity field. Otherwise, it is further determined whether the field is a relation type (semantic type is position, contact, time, description); if so, it is marked as a relation field. If neither condition is met, it is marked as a regular field. This dual-path parallel analysis mechanism ensures that it can comprehensively utilize the dual semantic information of field names and data content, accurately identifying field semantics even when field naming is not standardized or data content features are not obvious, thus achieving true adaptive semantic analysis.
[0073] As attached Figure 3 As shown, the cross-table entity intelligent merging algorithm in step S2 of this embodiment achieves intelligent identification and conflict-free merging of cross-table entities through a three-stage processing mechanism, as detailed below:
[0074] S201. Entity Standardization Preprocessing Mechanism: Construct a multi-level character standardization entity standardization preprocessing engine. Through a four-fold processing mechanism—unified conversion of uppercase and lowercase characters, standardization of special characters and punctuation marks, standardized mapping of Chinese and English characters, and cleanup of redundant whitespace characters—it eliminates the problem of inconsistent representation of the same entity across tables caused by differences in data entry habits and format specifications. For the Chinese data environment, it designs algorithms for unified processing of full-width and half-width characters and conversion between simplified and traditional Chinese characters, establishes a character mapping table and a regular expression rule base, and realizes the standardization of the format of different representations of the same entity.
[0075] S202. Multi-dimensional Entity Similarity Scoring Mechanism: A four-dimensional comprehensive similarity scoring mechanism is designed, integrating exact matching, edit distance, speech similarity, and semantic similarity algorithms. This mechanism maximizes the discovery of identical entities across tables while ensuring merging accuracy through a weighted comprehensive scoring mechanism using differentiated weight coefficients and dynamic threshold parameters. Specifically, the exact matching algorithm handles completely identical entities; the edit distance algorithm identifies entity variants with input errors or slight variations; the speech similarity algorithm identifies homophones and near-homophones in Chinese names through pinyin conversion and initial / final comparison; and the semantic similarity algorithm combines word vector models to identify semantically equivalent entities.
[0076] S203. Intelligent Merging Decision and Conflict Resolution Mechanism: Implement an intelligent merging decision algorithm based on a progressive merging strategy. This involves a three-tiered progressive processing flow: high confidence priority (similarity > 0.9), medium confidence verification (similarity 0.7-0.9), and low confidence manual intervention. An attribute priority ranking mechanism is constructed through assessments of data source authority, data integrity, and data timeliness, combined with attribute fusion rules for complementary attribute integration. A special merging strategy based on unique identifiers is designed for the special data type of JSON composite fields. Through entity uniqueness and integrity protection mechanisms, data loss and structural damage during the merging process are avoided.
[0077] This embodiment employs a categorized merging strategy. Specifically, when traversing multiple table entities, it first determines whether the entity is a special JSON entity (such as an aggregation node or core entity). If so, it is added directly and its uniqueness is maintained to avoid disrupting the hierarchical structure of JSON. If the entity is a regular entity, it undergoes entity standardization processing to generate a merge key (standardized name + entity type). The merge key is used to check if the same entity already exists. If it does, it is merged into the existing entity, and the source table list is updated to mark it as a cross-table entity. During the relationship merging phase, the entity ID of the relationship is updated using the entity_merge_map mapping table. JSON relationships use unique relationship IDs to maintain independence, while regular relationships calculate standard relationship IDs for deduplication and merging. Simultaneously, it checks whether the source and target entities of the relationship come from different tables to mark cross-table relationships. This categorized merging strategy ensures that cross-table deduplication of regular entities and the integrity of the complex JSON structure are maintained in parallel.
[0078] As attached Figure 4 As shown, in step S3 of this embodiment, the complex data structure is transformed by using a JSON composite field decomposition algorithm and a unique aggregation node mechanism to construct a multi-level relationship network containing first-level core relationships, second-level attribute relationships, and third-level indirect relationships, as follows:
[0079] S301, Intelligent Recognition and Validation of JSON Composite Fields: Constructing an intelligent JSON field recognition engine based on syntax parsing and structure validation. Through a four-dimensional recognition system of JSON syntax correctness verification, array type detection, object nesting hierarchy analysis, and data integrity verification, it accurately identifies complex JSON array structures containing multiple objects; and through content semantic analysis, it distinguishes between simple core value objects and complex multi-attribute objects, establishes a JSON data pattern library to assess complexity and processing priority, and provides a technical basis for subsequent decomposition strategy selection.
[0080] S302. Establish a virtual aggregation node mechanism based on globally unique identifiers: By constructing a multi-dimensional unique node identifier that integrates the main entity name, field name, table name, and record index, it serves as a connection carrier between JSON composite data and the main entity, solving the entity naming conflict problem caused by the same field name in different records or across tables. Combined with semantic analysis and keyword extraction technology, an entity name simplification algorithm is designed to improve the readability of the knowledge graph while ensuring global uniqueness.
[0081] S303, a three-level relation network construction algorithm based on a unique aggregation node: the main entity-aggregate node connection represents the composite information inclusion relationship, the aggregation node-core entity connection represents the specific instance relationship, and the core entity-attribute entity connection represents the detailed attribute relationship. It fully maintains the original structural features of JSON data, provides clear semantic path navigation for complex queries and intelligent reasoning of knowledge graphs, and supports dynamic graph filtering based on relation importance through differentiated weights and confidence scores.
[0082] S304, Intelligent Relationship Type Inference and Naming: Design a relationship type inference engine based on semantic feature analysis, establish a relationship type dictionary covering professional terms in multiple fields such as medical health, enterprise management, education and scientific research, and realize intelligent automatic generation of relationship names by combining JSON key-value pair semantic feature mining algorithm; design a vocabulary combination and grammar rule optimization mechanism for Chinese context to generate relationship names that conform to Chinese semantic expression habits, and support adaptive adjustment of relationship classification system through relationship type inheritance and dynamic expansion mechanism.
[0083] This embodiment employs a layered processing strategy. First, it checks if a field is a JSON array; otherwise, it treats it as a regular field. If it is, it parses the JSON content and processes it according to its complexity: simple single-core key-value pairs are directly extracted to create entity relationships, while complex multi-object arrays are processed by creating a unique aggregation node as an intermediate layer. The unique aggregation node is named using the format: simplified field name of the main entity#table name#record index, ensuring global uniqueness and avoiding naming conflicts between JSON fields of different records. Then, it iterates through each object in the JSON array, creating a uniquely named core entity for the core key value (format: core value#main entity#index), establishing an inclusion relationship from the aggregation node to the core entity. Next, it processes other key-value pairs in the object to create attribute entities (format: attribute value#main entity#core value#attribute key) and establishes a three-level relationship. This layered processing strategy transforms the complex nested JSON structure into a clear three-layer relationship network (main entity → aggregation node → core entity → attribute entity), maintaining the original data's hierarchical structure while avoiding cross-record entity conflicts, ensuring the queryability and visualization clarity of the knowledge graph.
[0084] As attached Figure 5 As shown, in step S4 of this embodiment, the multi-strategy relationship building engine dynamically selects the optimal relationship building strategy through an intelligent selection mechanism, as detailed below:
[0085] S401, Core Entity Radiation Model: This model employs a multi-level radiation-type relationship network construction strategy based on a central entity. Specifically, after identifying the query keyword as the core entity using a query keyword role intelligent identification algorithm, a comprehensive relationship ecosystem is built around the core entity as the central node of the network. A three-level progressive construction mechanism—strong relationship priority → related relationship expansion → indirect relationship supplementation—is used to form a complete relationship ecosystem centered on the core entity. The three-level progressive construction mechanism specifically involves: establishing a Level 1 strong relationship (basic information, organizational affiliation, job role) between the core entity and its direct attributes; constructing a Level 2 related relationship (colleague, superior / subordinate, collaboration) with relevant entities; and mining a Level 3 indirect relationship through intermediate entity connections.
[0086] S402, Attribute Value Association Pattern: Design an entity association network construction strategy based on common attribute features. Specifically, after identifying the query keyword as an attribute value, a three-step processing flow of entity discovery → association analysis → clustering construction is adopted to achieve accurate entity association network construction in application scenarios such as organizational structure analysis, skill matching, and project team building. The three-step processing flow of entity discovery → association analysis → clustering construction is as follows: Identify all candidate entity sets containing the corresponding attribute values, and use attribute similarity analysis, co-occurrence frequency statistics, and semantic association reasoning techniques to deeply mine entity clustering patterns and potential association relationships based on common attributes.
[0087] S403, Hybrid Trade-off Mode: This mode employs a hybrid trade-off relationship construction strategy based on probability distribution and dynamic weight adjustment. Specifically, for complex situations where the role characteristics of query keywords are unclear or exhibit mixed characteristics, the probability distribution of keywords as core entities and attribute values is calculated. A probability weight-driven resource allocation mechanism is used to allocate more computing resources and higher relationship weights to high-probability role types, while moderately exploring low-probability role types. Combined with an adaptive weight adjustment algorithm and a multi-role parallel processing mechanism, this ensures high robustness and comprehensiveness when facing fuzzy queries and complex semantic environments.
[0088] This embodiment dynamically selects a construction strategy based on keyword roles: after determining whether a keyword is a core entity, attribute value, or a hybrid scenario through four-dimensional analysis using a keyword role intelligent recognition algorithm, a core entity strategy (building a radial relationship network centered on the keyword, focusing on 1-2 level relationships), an attribute value strategy (discovering entity groups sharing the attribute and building aggregate relationships, focusing on 2-3 level relationships), or a hybrid strategy (allocating resources according to probability weights to build full-level relationships) is activated. Based on the entity association network construction strategy with common attribute features, multi-level relationship construction, cross-table entity recognition, and JSON composite processing are uniformly executed. After confidence calculation, relationship strength evaluation, cross-table consistency verification, and graph structure optimization by the quality assessment module, a knowledge graph is output. The quality feedback optimization closed loop dynamically adjusts the construction parameters to ensure optimal performance and accuracy in different application scenarios.
[0089] As attached Figure 6The image shows a visualization example of the constructed knowledge graph. This example fully demonstrates the core achievements of the multi-strategy relationship network construction algorithm: when the query keyword "Zhang Mou" is identified as a core entity by the role recognition algorithm, a three-layer relationship network is constructed using the core entity-centric model—Level 1 core relationship (red solid line) connects "Zhang Mou" with strongly related entities such as "R&D Department" and "Knowledge Graph Project", representing direct ownership or responsibility relationships; Level 2 attribute relationship (blue solid line) describes the attribute characteristics of the entity, such as "Position → Senior Engineer", "Contact Information → 38****123", "R&D Department → Department Manager → Manager Li", etc., enriching the dimensions of entity information; Level 3 indirect relationship (orange dashed line) discovers potential connections through intermediate entities, such as "R&D Department → Colleague → Colleague Wang", "Zhang Mou → Company → A certain technology company → Office Location → Building A", expanding the breadth of the knowledge network. The color coding of node types (purple query entity, red core entity, green attribute entity, orange related entity) and the variation in line thickness in the figure intuitively demonstrate the differentiated presentation of entity importance and relationship strength. This hierarchical organizational structure not only ensures the prominent display of core information but also maintains the integrity of knowledge, verifying the effectiveness of the dynamic hierarchical allocation algorithm, intelligent relationship classification mechanism, and cross-table entity recognition capability of this embodiment in real-world scenarios.
[0090] The query keyword role intelligent identification algorithm in this embodiment intelligently determines the role type of the keyword by comprehensively analyzing the occurrence pattern, field features, and semantic environment of the query keyword in the database, as follows:
[0091] (1) Construct a four-dimensional feature extraction algorithm based on frequency of occurrence, field type, context and statistical features to realize multi-dimensional feature extraction and analysis: comprehensively count the occurrence patterns of keywords in each data table and field, focus on analyzing the distribution weight of keywords in entity fields and relation fields, and combine the content features of text length, character type, language features and format patterns to realize the preliminary quantitative judgment of the tendency of keywords as core entities or attribute values, and provide multi-dimensional evidence support for subsequent role recognition decisions;
[0092] (2) Design a weighted scoring mechanism that integrates the semantic authority of fields, the credibility of data statistics and the consistency of occurrence patterns to achieve a comprehensive evaluation of the semantic environment: determine the entity role by evaluating the dominant occurrence pattern of keywords in highly unique entity fields, entity semantic features and cross-table consistency behavior; evaluate the attribute value role by evaluating the descriptive classification features of keywords in relation fields and the performance of common attributes across entities, and then use comprehensive weight calculation to achieve accurate quantitative evaluation and credibility analysis of keyword role tendency;
[0093] (3) An adaptive weight adjustment mechanism based on data quality, table structure complexity and business domain characteristics is adopted. By dynamically optimizing the weight of each evaluation index, the accuracy of role identification is improved, thereby realizing dynamic weight adjustment and decision-making. At the same time, the fusion decision algorithm combining threshold comparison and confidence assessment ensures high accuracy and strong adaptability of role identification in query scenarios with different complexity. Specifically, the fusion decision algorithm is as follows: when the entity role score ratio is greater than 1.2, it is determined to be a core entity; when the attribute value role score ratio is greater than 0.8, it is determined to be an attribute value; when the entity role score and the attribute value role score are close, it is determined to be a mixed role.
[0094] In this embodiment, the word frequency statistics in step S101 refer to the frequency of semantic keyword matching. Specifically, it involves: establishing a semantic dictionary database covering more than 200 semantic keywords in six major categories, including people, organizations, positions, contact information, identifiers, and time; for the database field names to be analyzed, iterating through the predefined semantic keywords in the semantic dictionary database, detecting whether the field names contain the corresponding semantic keywords, and statistically analyzing the keyword hit rate under each semantic category, thereby obtaining the proportion of the corresponding keywords in the field names.
[0095] In this embodiment, the semantic weight calculation in step S101 uses a character length ratio algorithm. Specifically, when any semantic keyword matches a field name, the corresponding semantic category receives a weight score, which is equal to the character length of the semantic keyword divided by the total length of the field name. The reason for using a length ratio instead of simple counting is that longer keywords usually reflect the true semantics of the field more accurately. For example, a field name containing a long keyword like "department" is more likely to determine its semantic type than a short keyword like "id." For composite field names, if a composite field name matches multiple keywords of the same category, the weight scores are accumulated to support composite semantic recognition. Normalization by dividing by the total length of the field name avoids biased judgments on long field names. The calculation process is illustrated using the field name "employee_department_name" as an example. The field name has a total length of 24 characters. During analysis, three keywords will be matched: first, "employee" (8 characters long), belonging to the personnel category, contributing 0.33 weight to the personnel category; second, "department" (10 characters long), belonging to the organization category, contributing 0.42 weight to the organization category; and finally, "name" (4 characters long), also belonging to the personnel category, contributing an additional 0.17 weight to the personnel category. After summing, the total score for the personnel category is 0.50, and the score for the organization category is 0.42. The system will select the personnel category with the highest score as the semantic type of this field.
[0096] For frequently occurring and semantically clear field name patterns in the database, a direct mapping dictionary is established; when a field name matches the direct mapping dictionary, the semantic type of the corresponding field name is directly determined and assigned the highest weight score, without the need for weight calculation.
[0097] In step S101 of this embodiment, the fuzzy matching, in descending order of priority, includes exact matching, inclusion matching, and pattern matching. Exact matching specifically involves directly determining the semantic type when the field name is exactly equal to any predefined semantic keyword in the semantic dictionary; for example, if the field name is exactly "name", it will be directly identified as a personnel category. This method has extremely high accuracy but limited coverage. Inclusion matching specifically involves first converting the field names to lowercase to eliminate the influence of case differences; then traversing all keywords in the semantic dictionary and detecting whether each keyword appears as a substring in the field name, achieving accurate identification of keywords at any position in the field name; for each detected keyword, the ratio of the keyword length to the field name length is calculated as the fuzzy matching score; if multiple keywords of the same semantic category match the field name, the fuzzy matching scores are accumulated; finally, the semantic category with the highest fuzzy matching score is selected as the determination result for the field name. Taking the field name `employee_department_code` as an example to illustrate the matching process, this field name is 24 characters long. Three keywords were detected: `employee` (length 8, contributing 0.33 points to the personnel category), `department` (length 10, contributing 0.42 points to the organization category), and `code` (length 4, contributing 0.17 points to the identifier category). After comprehensive comparison, the organization category scored the highest, therefore this field was determined to be an organization-related field. Pattern matching is a third-level strategy, mainly used to handle more complex naming variations, and identifies specific naming patterns through regular expressions and semantic combination rules.
[0098] A key feature of fuzzy matching is its ability to handle naming variations. Database field names exhibit a variety of variations, including case variations, separator variations, synonym variations, abbreviation variations, prefix / suffix variations, and compound variations. By uniformly converting to lowercase, the case variation issue is automatically resolved. The inclusion matching mechanism naturally supports separator variations; regardless of whether the field uses underscores, camelCase, or hyphens, it does not affect keyword recognition. For synonym and abbreviation variations, multiple expressions are included in the semantic dictionary simultaneously, such as "dept" and "department," or "emp" and "employee." Prefix / suffix variations are naturally covered by inclusion matching. Compound variations are correctly handled through a multi-keyword cumulative scoring mechanism. Unlike traditional edit distance algorithms that provide binary results of match or non-match, this embodiment quantitatively evaluates fuzzy matching. The fuzzy matching score reflects the matching quality between the field name and the semantic category. This continuous confidence score provides an important basis for subsequent semantic fusion and conflict resolution.
[0099] The similarity in step S101 of this embodiment includes two dimensions: field name similarity and data content similarity. A threshold segmentation strategy is used to distinguish variant naming and synonym cases. Specifically, the field name similarity calculation is based on semantic coverage. This involves extracting all semantic keywords contained in the field name and calculating the ratio of the sum of the lengths of all semantic keywords in the field name to the total length of the field name. When the overlap of the semantic keyword sets of two field names exceeds a set overlap threshold, it indicates that the two field names have high similarity. For example, the fields employee_name and staff_name both contain keywords representing personnel and the keyword name, thus having high similarity. This calculation method does not rely on character-level edit distance but focuses on semantic similarity.
[0100] Data content similarity is calculated using the cosine similarity of feature vectors. Specifically, for each field name, five dimensions of features are extracted: the proportion of unique values, the proportion of null values, the average length, the proportion of numerical values, and the pattern matching score. These five dimensions form a feature vector. The content similarity between two field names is the cosine similarity between these feature vectors, and normalization is performed to ensure the comparability of features with different dimensions. Among these, the proportion of unique values reflects the degree of repetition of field values; the proportion of null values reflects data integrity; the average length reflects the complexity of the field content; the proportion of numerical values reflects whether the field is a numeric type; and the pattern matching score reflects the degree to which the field content conforms to a specific pattern.
[0101] For variant naming and synonyms, a two-dimensional decision matrix is used. Specifically: when the similarity of the field names of two fields is higher than 0.7 and the similarity of the data content is higher than 0.8, it is judged as a variant naming, indicating that the two field names are different expressions of the same concept, such as abbreviation variants of employee_name and emp_name; when the similarity of the field names is lower than 0.7 but the similarity of the data content is higher than 0.8 and the semantic type is the same, it is judged as a synonym, indicating that the two field names use different words to express the same meaning, such as employee and staff being synonyms for employee; when the similarity of the field names is higher than 0.7 but the similarity of the data content is lower than 0.8, it is judged as a partial variant, indicating that the field names are similar but the data features are significantly different; for the comprehensive similarity score, a weighted fusion method is used, with field name similarity accounting for 40% of the weight, data content similarity accounting for 40% of the weight, and semantic type consistency accounting for 20% of the weight. On test datasets covering multiple fields such as human resources, e-commerce, and healthcare, the threshold combination of 0.7 and 0.8 achieved the highest overall scores in both variant recognition and synonym recognition tasks, striking an optimal balance between precision and recall. For special cases such as mixed Chinese and English fields, the equivalence relationships can be identified through a Chinese-English mapping dictionary. For partial inclusion relationships in composite fields, they are determined as partial variants rather than complete equivalences.
[0102] In this embodiment, the regular expression pattern library in step S102 adopts a layered architecture. The first layer is entity recognition patterns, including Chinese personal name patterns, English personal name patterns, organization name patterns, and identification number patterns. The second layer is attribute recognition patterns, including contact information patterns such as telephone and email, date and time patterns, and address patterns. The third layer is data type patterns, including numeric patterns, text patterns, and enumeration patterns. Among them, the Chinese personal name pattern matches two to four consecutive Chinese characters, covering various cases from two-character names to compound surnames. In practical applications, when more than 60% of the field sample data matches the Chinese personal name recognition pattern, the corresponding field is determined to be a personal name field. The English personal name recognition pattern requires at least two words separated by spaces, each word consisting of letters. The organization name pattern is identified using a keyword inclusion method, which uses predefined Chinese keywords for departments, sections, groups, institutes, and bureaus, and English keywords for "department." If more than 40% of the samples in a field contain these predefined keywords, it is identified as an organization name field. Contact information pattern recognition is designed for different types: mobile phone numbers require eleven digits; landline numbers require a three- to four-digit area code followed by a seven- to eight-digit number (hyphens are optional); email addresses require a complete structure including the username, the @ symbol, and the domain name. Identifier number recognition combines data type and content pattern; fields of integer type or fields where all sample data are purely numeric are identified as identifiers.
[0103] In this embodiment, the fusion of regular expression pattern library and statistical features constitutes a complete intelligent recognition system. The recognition process is as follows: first, semantic inference is performed based on field names; second, regular pattern matching is performed based on data content; third, statistical feature analysis is performed; and finally, fusion decision is made. The decision logic adopts the confidence priority principle.
[0104] The complete intelligent recognition system in this embodiment comprises four levels: The first level is field name semantic analysis, including an exact mapping dictionary, fuzzy matching algorithms, and semantic weight calculation. The second level is data content semantic analysis, including a regular expression pattern library, statistical feature analysis, and data type inference; the regular expression pattern library plays a crucial role at this level. The third level is comprehensive semantic decision-making, including multi-source evidence fusion, confidence scoring, and conflict resolution mechanisms. The fourth level is entity relationship classification, including entity field identification, relationship field identification, and attribute field identification. Compared to pure regular expression methods, the complete intelligent recognition system in this embodiment has significant advantages. Pure regular expression methods have moderate accuracy but a high false positive rate; this embodiment significantly improves accuracy through a multi-verification mechanism.
[0105] The entity-relationship field classification algorithm in step S103 of this embodiment is responsible for classifying all fields in the database table into entity fields, relationship fields, or ordinary attribute fields, providing an accurate metadata foundation for knowledge graph construction. The entity-relationship field classification algorithm makes classification decisions by comprehensively evaluating and weighting four dimensions. The first dimension of the four-dimensional evaluation system is semantic type evaluation, with different semantic types having different priority scores. Names score 100, organizations score 120 (higher because organizations are usually the core dimension of the data), job titles score 50, contact information scores 40, time scores 30, identifiers score -30 (meaning they should be excluded), descriptions score 20, and unknowns score 0. The second dimension is data uniqueness evaluation. The proportion of unique values reflects the degree of repetition of field values; high uniqueness usually means that the field may be an entity identifier. The scoring uses a piecewise function: when the proportion of unique values is greater than 0.7, a full score of 30 is given; when the proportion is less than or equal to 0.7, the score decreases linearly. The third dimension is data type evaluation; different database data types indicate the role of a field. Character types like VARCHAR and CHAR receive 20 points, long text types TEXT receive 15 points, integer types INT and BIGINT receive -10 points, decimal types DECIMAL and FLOAT receive -20 points, and date / time types receive 10 points. The fourth dimension is business logic feature evaluation, which examines the business meaning indicators contained in the field names. If the field name contains obvious entity keywords such as "name," add 50 points. If the field name contains numerical index keywords such as "count," subtract 80 points for strong exclusion. If the data content inspection finds that more than 80% is purely numerical, also subtract 80 points. The four-dimensional scores are combined using a simple addition method to obtain the total score. Classification decisions based on the total score and semantic type follow several rules: If the semantic type is clearly "person" or "organization," it is directly determined as an entity field. If the total score exceeds 100, it is determined as an entity field. If the semantic type is clearly "job title," "contact information," "time," or "description," it is determined as a relational field. If the total score is between 50 and 100, it is determined as a relational field. If the semantic type is an identifier or the field name ends with an underscore "id," it is determined as an attribute field. If the total score is below 50, it is determined as an attribute field. Numerical field exclusion algorithms are a key technology for solving core problems. They completely resolve the issue of misjudgment of numerical fields through three steps: First, if the semantic type is clearly personnel or organization, it is directly determined as an entity field without checking for numerical values; Second, it checks whether the field name contains numerical indicator keywords, and if so, it is directly excluded; Third, it checks the first twenty samples of data content, and if more than 80% can be successfully converted into numerical values, it is determined as a numerical field and excluded.
[0106] The 70% high uniqueness threshold in step S103 of this embodiment was determined through a combination of experimental verification and theoretical analysis, and was not arbitrarily set. The threshold acquisition employed a three-step method: the first step was theoretical analysis, analyzing the theoretical uniqueness distribution patterns of different field types; the second step was experimental verification, testing the classification effect of different thresholds on real datasets; and the third step was parameter optimization, using a systematic search method to find the optimal threshold. The theoretical analysis phase studied the uniqueness characteristics of different field types. The uniqueness of primary key identifier fields is typically between 95% and 100%. The uniqueness of name fields in large enterprises is between 70% and 95%, with a duplicate name rate of approximately 10% to 20% considering name duplication. The uniqueness of department name fields is only 10% to 40%. The uniqueness of job title fields is between 5% and 30%. A key observation revealed that the uniqueness of entity fields typically exceeds 70%, while the uniqueness of attribute fields is typically below 50%, with 70% being precisely the theoretical dividing line between the two types of fields.
[0107] The entity standardization preprocessing engine in step S201 of this embodiment is the first step of the cross-table entity fusion module. Its core function is to eliminate the problem of inconsistent representation of the same entity in different tables caused by differences in data entry habits and format specifications, thus creating a standardized data foundation for subsequent entity matching and fusion. The entity standardization preprocessing engine constructs a multi-level character standardization processing mechanism, achieving comprehensive standardization through four processing mechanisms: The first is unified conversion of character case, converting all text to lowercase or uppercase to eliminate matching failures caused by inconsistent case; the second is the standardization of special characters and punctuation marks, removing or uniformly processing various punctuation marks; by removing or standardizing these punctuation marks, field names with different delimiters can be unified into a standard format; the third is the standardization mapping of Chinese and English characters, with the engine establishing a full-width and half-width character mapping table to automatically convert full-width characters to their corresponding half-width characters; the fourth is the cleanup of redundant whitespace characters, removing redundant spaces, tabs, newlines, and other whitespace characters at the beginning, end, and middle of the string.
[0108] To address the unique characteristics of Chinese data environments, the entity standardization preprocessing engine also incorporates a simplified / traditional Chinese character conversion algorithm. The same entity may use different simplified / traditional representations in different data sources. The engine establishes a complete simplified / traditional character mapping table, covering the correspondence between commonly used Chinese characters, automatically converting traditional characters to simplified characters or vice versa, ensuring that mixed simplified / traditional representations do not affect entity recognition. The engine employs a combination of character mapping tables and regular expression rule bases, and the effectiveness of entity standardization is reflected in the success rate of cross-table entity fusion. Without standardization, even the same entity may fail to match due to format differences. Standardization preprocessing eliminates these superficial differences, allowing subsequent similarity calculations to be based on true semantic differences rather than format differences, significantly improving the accuracy of cross-table entity recognition and fusion.
[0109] Example 2: This example also provides an electronic device, including: a memory and a processor;
[0110] The memory stores the instructions executed by the computer.
[0111] The processor executes computer execution instructions stored in the memory, causing the processor to execute the zero-configuration knowledge graph construction method in any embodiment of the present invention.
[0112] The processor can be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), off-the-shelf programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The processor can be a microprocessor or any conventional processor.
[0113] Memory is used to store computer programs and / or modules. The processor implements various functions of the electronic device by running or executing the computer programs and / or modules stored in the memory, and by accessing data stored in the memory. Memory can mainly include a program storage area and a data storage area. The program storage area can store the operating system, at least one application program required for a function, etc.; the data storage area can store data created based on the use of the terminal, etc. In addition, memory can also include high-speed random access memory, and can also include non-volatile memory, such as hard disks, RAM, plug-in hard disks, smart memory cards (SMC), secure digital cards (SD cards), flash memory cards, at least one disk storage device, flash memory devices, or other volatile solid-state storage devices.
[0114] Example 3: This example also provides a computer-readable storage medium storing multiple instructions, which are loaded by a processor to cause the processor to execute the zero-configuration knowledge graph construction method in any embodiment of the present invention. Specifically, a system or apparatus equipped with a storage medium may be provided, on which software program code implementing the functions of any of the above embodiments is stored, and the computer (or CPU or MPU) of the system or apparatus can read and execute the program code stored in the storage medium.
[0115] In this case, the program code read from the storage medium can itself implement the function of any of the above embodiments, and therefore the program code and the storage medium storing the program code constitute part of the present invention.
[0116] Examples of storage media used to provide program code include floppy disks, hard disks, magneto-optical disks, optical disks (such as CD-ROM, CD-R, CD-RW, DVD-ROM, DVD-RYM, DVD-RW, DVD+RW), magnetic tapes, non-volatile memory cards, and ROMs. Alternatively, program code can be downloaded from a server computer via a communication network.
[0117] Furthermore, it should be clear that not only can the program code read by the computer be executed, but also the operating system or other components operating on the computer can be instructed based on the program code to perform some or all of the actual operations, thereby realizing the function of any of the embodiments described above.
[0118] Furthermore, it is understood that the program code read from the storage medium is written to the memory set in the expansion board inserted into the computer or to the memory set in the expansion unit connected to the computer. Then, based on the instructions of the program code, the CPU or other components installed on the expansion board or expansion unit execute some and all of the actual operations, thereby realizing the function of any of the embodiments described above.
[0119] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.
Claims
1. A zero-configuration knowledge graph construction method, characterized in that, The method is as follows: Intelligent database deep analysis is achieved by performing field name semantic analysis and data content analysis through dynamic semantic analysis algorithms: all data table resources are acquired, and deep structural analysis of the data table resources is performed on field type analysis, data distribution statistics and constraint relationship identification. Combined with dynamic semantic analysis algorithms, field name semantic analysis and data content analysis are achieved to generate a comprehensive analysis report that includes table overview, field semantic mapping, entity field identification and relationship field identification. By automatically identifying and merging identical entities across multiple tables using a cross-table entity intelligent merging algorithm, multi-table collaborative intelligent search is achieved. A multi-table collaborative search strategy based on field semantic features and data quality assessment is designed. By assigning differentiated search weights and priorities to different tables, and employing parallel search techniques that fuse fuzzy matching, exact matching, and semantic reasoning, the strategy maximizes the discovery of data records related to query keywords. Furthermore, the strategy collects multi-dimensional occurrence patterns of keywords in different tables and fields in real time, including frequency of occurrence, contextual environment, and associated data characteristics. A query keyword role intelligent identification algorithm dynamically determines the semantic role of the query keywords. Building an intelligent knowledge graph: Based on keyword role characteristics, the optimal construction strategy is automatically selected through a multi-strategy relationship building engine to independently build a local knowledge graph for each data table, ensuring internal consistency. Entity similarity calculation and conflict resolution are achieved through intelligent cross-table entity merging. Complex data structures are transformed by using a JSON composite field decomposition algorithm and a unique aggregation node mechanism to build a multi-level relationship network containing first-level core relationships, second-level attribute relationships, and third-level indirect relationships. Knowledge Graph Optimization and Intelligent Export: The system performs entity integrity checks, relation consistency verification, and cross-table fusion accuracy assessments on the knowledge graph. It obtains the evaluation results of the knowledge graph and automatically adjusts entity weights, relation confidence, and network structure based on these results. It generates a detailed analysis report that includes node statistics, edge statistics, cross-table relation statistics, and relation hierarchy distribution. It also creates a visual interface with interactive functions such as node drag-and-drop, relation filtering, hierarchy switching, and cross-table entity highlighting. The system exports the knowledge graph data in a standardized format.
2. The zero-configuration knowledge graph construction method according to claim 1, characterized in that, Intelligent database deep analysis is achieved through dynamic semantic analysis algorithms for field name semantic analysis and data content analysis, as detailed below: Multi-level field name semantic analysis: Construct a three-layer progressive recognition mechanism of exact matching → pattern matching → semantic reasoning, establish a multi-dimensional semantic dictionary including personnel, organizations, positions, contact information and time, and combine word frequency statistics and semantic weight calculation to achieve adaptive recognition of various database field naming conventions such as mixed Chinese and English, underscore separation and camelCase naming, and then use fuzzy matching algorithm and similarity scoring to handle variant naming and synonym cases, thereby realizing multi-level field name semantic analysis; Deep semantic analysis of data content: By constructing an intelligent recognition system covering Chinese personal names, English personal names, organization names, contact information, and dates and times through a content semantic mining engine based on the fusion of regular expression pattern library and statistical learning, and combining multi-dimensional statistical features such as the proportion of unique values, the proportion of null values, and the distribution of data length, deep semantic analysis of field data content is achieved; Intelligent entity relationship field recognition: Implement an entity relationship field classification algorithm driven by a four-dimensional evaluation system including semantic type, data uniqueness, data type and business logic characteristics. Identify entity fields through high uniqueness threshold judgment and semantic type matching, filter non-entity fields such as count, amount and rating using numerical field exclusion algorithm, identify relationship fields such as job title, contact information, time and description, build a complete entity relationship field classification system, and realize intelligent recognition of entity relationship fields.
3. The zero-configuration knowledge graph construction method according to claim 1, characterized in that, The cross-table entity intelligent merging algorithm achieves intelligent identification and conflict-free merging of cross-table entities through a three-stage processing mechanism, as follows: Entity standardization preprocessing mechanism: Construct a multi-level character standardization entity standardization preprocessing engine. Through a four-fold processing mechanism of unified character case conversion, standardization of special characters and punctuation marks, standardized mapping of Chinese and English characters, and cleanup of redundant whitespace characters, it eliminates the problem of inconsistent representation of the same entity across tables caused by differences in data entry habits and format specifications. For Chinese data environment, it designs algorithms for unified processing of full-width and half-width characters and conversion between simplified and traditional Chinese characters, establishes a character mapping table and a regular expression rule base, and realizes the standardization of the format of different representations of the same entity. A multi-dimensional entity similarity scoring mechanism is designed, integrating precise matching, edit distance, speech similarity, and semantic similarity algorithms. This mechanism maximizes the discovery of identical entities across tables while ensuring merging accuracy through a weighted comprehensive scoring mechanism using differentiated weight coefficients and dynamic threshold parameters. Specifically, the precise matching algorithm handles completely identical entities; the edit distance algorithm identifies entity variants with input errors or slight variations; the speech similarity algorithm identifies homophones and near-homophones in Chinese names through pinyin conversion and initial / final comparison; and the semantic similarity algorithm combines word vector models to identify semantically equivalent entities. Intelligent merging decision-making and conflict resolution mechanism: Implement an intelligent merging decision-making algorithm based on a progressive merging strategy. It adopts a three-level progressive processing flow of high confidence priority, medium confidence verification, and low confidence manual intervention. It also constructs an attribute priority ranking mechanism by evaluating the authority of the data source, data integrity, and data timeliness, and combines attribute fusion rules for complementary attribute integration.
4. The zero-configuration knowledge graph construction method according to claim 1, characterized in that, By employing a JSON composite field decomposition algorithm and a unique aggregation node mechanism to transform complex data structures, a multi-level relationship network is constructed, comprising first-level core relationships, second-level attribute relationships, and third-level indirect relationships, as detailed below: Intelligent Recognition and Validation of JSON Composite Fields: This system constructs an intelligent JSON field recognition engine based on syntax parsing and structure validation. Through a four-dimensional recognition system that includes JSON syntax correctness verification, array type detection, object nesting hierarchy analysis, and data integrity verification, it accurately identifies complex JSON array structures containing multiple objects. Furthermore, it distinguishes between simple core value objects and complex multi-attribute objects through content semantic analysis and establishes a JSON data pattern library to assess complexity and processing priority. Establish a virtual aggregation node mechanism based on globally unique identifiers: By constructing a multi-dimensional unique node identifier that integrates the main entity name, field name, table name, and record index, it serves as a connection carrier between JSON composite data and the main entity, solving the entity naming conflict problem caused by the same field name in different records or across tables. In addition, an entity name simplification algorithm is designed by combining semantic analysis and keyword extraction technology to improve the readability of the knowledge graph while ensuring global uniqueness. A three-level relation network construction algorithm based on a unique aggregation node is designed: the main entity-aggregate node connection represents the composite information inclusion relationship, the aggregation node-core entity connection represents the specific instance relationship, and the core entity-attribute entity connection represents the detailed attribute relationship. It fully preserves the original structural features of JSON data, provides clear semantic path navigation for complex queries and intelligent reasoning of knowledge graphs, and supports dynamic graph filtering based on relation importance through differentiated weights and confidence scores. Intelligent Relationship Type Inference and Naming: Design a relationship type inference engine based on semantic feature analysis, establish a relationship type dictionary covering professional terms in multiple fields such as medical health, enterprise management, education and scientific research, and realize intelligent automatic generation of relationship names by combining JSON key-value pair semantic feature mining algorithm; design a vocabulary combination and grammar rule optimization mechanism for Chinese context to generate relationship names that conform to Chinese semantic expression habits, and support adaptive adjustment of relationship classification system through relationship type inheritance and dynamic expansion mechanism.
5. The zero-configuration knowledge graph construction method according to claim 1, characterized in that, The multi-strategy relationship building engine dynamically selects the optimal relationship building strategy through an intelligent selection mechanism, as follows: Core Entity Radiation Model: A multi-level radiation-type relationship network construction strategy based on a central entity is adopted. Specifically, after determining the query keyword as the core entity through a query keyword role intelligent identification algorithm, a comprehensive relationship ecosystem is built with the core entity as the central node of the network. A three-level progressive construction mechanism of strong relationship priority → association relationship expansion → indirect relationship supplementation is used to form a complete relationship ecosystem centered on the core entity. The three-level progressive construction mechanism is as follows: establish a level 1 strong relationship between the core entity and its direct attributes, build a level 2 association relationship with related entities, and mine a level 3 indirect relationship through intermediate entity connections. Attribute Value Association Pattern: A strategy for constructing entity association networks based on common attribute features is designed. Specifically, after identifying query keywords as attribute values, a three-step process of entity discovery → association analysis → clustering construction is adopted to achieve accurate entity association network construction in application scenarios such as organizational structure analysis, skill matching, and project team building. The three-step process of entity discovery → association analysis → clustering construction specifically involves: identifying all candidate entity sets containing the corresponding attribute values; and using attribute similarity analysis, co-occurrence frequency statistics, and semantic association reasoning techniques to deeply mine entity clustering patterns and potential association relationships based on common attributes. Hybrid Trade-off Mode: This mode employs a hybrid trade-off relationship construction strategy based on probability distribution and dynamic weight adjustment. Specifically, for complex situations where the role characteristics of query keywords are unclear or exhibit mixed characteristics, the probability distribution of keywords as core entities and attribute values is calculated. A probability weight-driven resource allocation mechanism is used to allocate more computing resources and higher relationship weights to high-probability role types, while moderately exploring low-probability role types. Furthermore, an adaptive weight adjustment algorithm and a multi-role parallel processing mechanism are combined to ensure high robustness and comprehensiveness when facing fuzzy queries and complex semantic environments.
6. The zero-configuration knowledge graph construction method according to claim 5, characterized in that, The query keyword role intelligent identification algorithm intelligently determines the role type of a keyword by comprehensively analyzing the occurrence pattern, field characteristics, and semantic environment of the query keyword in the database, as follows: A four-dimensional feature extraction algorithm based on frequency of occurrence, field type, context, and statistical features is constructed to achieve multi-dimensional feature extraction and analysis: comprehensively statistically analyze the occurrence patterns of keywords in various data tables and fields, focus on analyzing the distribution weight of keywords in entity fields and relation fields, and combine content features such as text length, character type, language features, and format patterns to achieve a preliminary quantitative judgment on the tendency of keywords to be core entities or attribute values; The design incorporates a weighted scoring mechanism that integrates field semantic authority, data statistical credibility, and consistency of occurrence patterns to achieve a comprehensive assessment of the semantic environment: entity roles are determined by evaluating the dominant occurrence patterns of keywords in highly unique entity fields, entity semantic features, and cross-table consistency behavior; attribute value roles are evaluated by evaluating the descriptive and categorical features of keywords in relation fields and the performance of common attributes across entities; and finally, comprehensive weight calculation is used to achieve a precise quantitative assessment and credibility analysis of keyword role tendencies. An adaptive weight adjustment mechanism based on data quality, table structure complexity, and business domain characteristics is adopted. By dynamically optimizing the weights of each evaluation indicator, the accuracy of role identification is improved, thereby achieving dynamic weight adjustment and decision-making. At the same time, a fusion decision algorithm combining threshold comparison and confidence assessment is used to ensure high accuracy and strong adaptability of role identification in query scenarios with different complexities. Specifically, the fusion decision algorithm is as follows: when the entity role score ratio is greater than 1.2, it is determined to be a core entity; when the attribute value role score ratio is greater than 0.8, it is determined to be an attribute value; when the entity role score and the attribute value role score are close, it is determined to be a mixed role.
7. The zero-configuration knowledge graph construction method according to claim 2, characterized in that, Word frequency statistics refer to the frequency of semantic keyword matching. Specifically, this involves: establishing a semantic dictionary database containing more than 200 semantic keywords across six major categories, including people, organizations, positions, contact information, identifiers, and time; for the database field names to be analyzed, iterating through the predefined semantic keywords in the semantic dictionary database, checking whether the field names contain the corresponding semantic keywords, and statistically analyzing the keyword hit rate under each semantic category to obtain the proportion of the corresponding keywords in the field names; Semantic weight calculation adopts a character length ratio algorithm, specifically: when any semantic keyword matches a field name, the corresponding semantic category obtains a weight score, which is equal to the character length of the semantic keyword divided by the total length of the field name; for compound field names, if the compound field name matches multiple keywords of the same category at the same time, the weight scores are accumulated to support compound semantic recognition; for field name patterns that occur frequently in the database and have clear semantics, a direct mapping dictionary is established. When a field name matches a direct mapping dictionary, the semantic type of the corresponding field name is directly determined and assigned the highest weight score, without the need for weight calculation. Fuzzy matching, in descending order of priority, includes exact matching, inclusion matching, and pattern matching. Exact matching specifically determines the semantic type directly when the field name is exactly equal to any predefined semantic keyword in the semantic dictionary. Inclusion matching first converts the field name to lowercase to eliminate the impact of case differences; then iterates through all keywords in the semantic dictionary, checking whether each keyword appears as a substring in the field name, achieving accurate identification of keywords at any position in the field name. For each detected keyword, the ratio of the keyword length to the field name length is calculated as the fuzzy matching score. If multiple keywords of the same semantic category match the field name, the fuzzy matching scores are accumulated. Finally, the semantic category with the highest fuzzy matching score is selected as the field name's determination result. Similarity is calculated using two dimensions: field name similarity and data content similarity. A threshold segmentation strategy distinguishes between variant naming and synonym cases. Field name similarity is calculated based on semantic coverage: all semantic keywords in the field name are extracted, and the ratio of the sum of the lengths of all semantic keywords in the field name to the total length of the field name is calculated. When the overlap of the semantic keyword sets of two field names exceeds a set overlap threshold, the two field names are considered to have high similarity. Data content similarity is calculated using the cosine similarity of feature vectors: for each field name, five dimensions of features are extracted, including the proportion of unique values, the proportion of null values, the average length, the proportion of numerical values, and the pattern matching score. These five dimensions form a feature vector, and the content similarity between two field names is the cosine similarity between these feature vectors. Normalization is then performed to ensure the comparability of features with different dimensions. The proportion of unique values reflects the degree of repetition of field values. The similarity score is calculated as follows: The proportion of null values reflects data integrity; the average length reflects the complexity of the field content; the proportion of numerical values reflects whether the field is a numerical type; the pattern matching score reflects the degree to which the field content conforms to a specific pattern; for variant naming and synonyms, a two-dimensional decision matrix is used, specifically: when the similarity of two field names is higher than 0.7 and the similarity of data content is higher than 0.8, it is determined to be a variant naming, indicating that the two field names are different expressions of the same concept; when the similarity of field names is lower than 0.7 but the similarity of data content is higher than 0.8 and the semantic type is the same, it is determined to be a synonym, indicating that the two field names use different words to express the same semantics; when the similarity of field names is higher than 0.7 but the similarity of data content is lower than 0.8, it is determined to be a partial variant, indicating that the field names are similar but the data features are significantly different; for the comprehensive similarity score, a weighted fusion method is used, with field name similarity accounting for 40% of the weight, data content similarity accounting for 40% of the weight, and semantic type consistency accounting for 20% of the weight.
8. The zero-configuration knowledge graph construction method according to claim 2, characterized in that, The regular expression pattern library adopts a layered architecture. The first layer is entity recognition patterns, including Chinese personal name patterns, English personal name patterns, organization name patterns, and identification number patterns. The second layer is attribute recognition patterns, including contact information patterns, date and time patterns, and address patterns; the third layer is data type patterns, including numeric patterns, text patterns, and enumeration patterns. Among them, the Chinese name pattern matches two to four consecutive Chinese characters, covering various cases from two-character names to compound surnames; in practical applications, when more than 60% of the field sample data is checked, the corresponding field is determined to be a name field. The English personal name recognition pattern requires at least two words separated by spaces, with each word consisting of letters; the organization name pattern uses keyword inclusion for recognition, that is, predefined Chinese keywords for departments, divisions, groups, institutes, and companies, and English keywords for "department". When more than 40% of the samples in the field data contain the predefined Chinese keywords for departments, divisions, groups, institutes, and companies, it is determined to be an organization name field. Contact information pattern recognition is designed for different types, specifically: mobile phone number pattern requires eleven pure numbers, landline pattern requires three to four area codes plus seven to eight numbers with optional hyphens, and email pattern requires a complete structure of username, @ symbol, and domain name; identifier number recognition combines data type and content pattern; fields of integer type or fields where all sample data are pure numbers are identified as identifiers. The integration of regular expression pattern library and statistical features constitutes a complete intelligent recognition system. The recognition process is as follows: first, semantic inference is performed based on field names; second, regular expression pattern matching is performed based on data content; third, statistical feature analysis is performed; and finally, a fusion decision is made. The decision logic adopts the confidence priority principle.
9. An electronic device, characterized in that, include: Memory and at least one processor; The memory contains computer programs; The at least one processor executes the computer program stored in the memory, causing the at least one processor to perform the zero-configuration knowledge graph construction method as described in any one of claims 1 to 8.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that can be executed by a processor to implement the zero-configuration knowledge graph construction method as described in any one of claims 1 to 8.
Citation Information
Patent Citations
Metadata-based data governance knowledge graph construction method
CN120181206A
Intelligent question and answer method based on knowledge graph
CN120297415A