Knowledge graph construction method based on neo4j graph database and deep learning
By building a knowledge graph based on neo4j graph database and deep learning, the ease of use, analytics and credibility of the material supply chain question-and-answer system is solved, and more efficient handling of complex problems and digital transformation of the supply chain is achieved.
Patent Information
- Application Number
- CN202510256262.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-05
- Publication Date
- 2025-07-18
AI Technical Summary
The existing material supply chain question and answer system has shortcomings in terms of ease of use, analytics and credibility, it is difficult to effectively deal with complex natural language problems, and it lacks flexibility and fuzzy processing capabilities.
The knowledge graph is constructed using neo4j graph database and deep learning method. By integrating supply chain data, designing the ontology model of the material supply chain knowledge graph, using convolutional neural networks for data annotation and prediction, completing missing labels, and achieving the improvement of the knowledge graph.
It improves the ease of use and credibility of the Q&A system, can more accurately understand user intentions and provide professional answers, and realizes the digital transformation of the supply chain.
Smart Images

Figure CN120338080A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to knowledge graph construction, and in particular to a method for constructing a knowledge graph based on a neo4j graph database and deep learning. Background Art
[0002] At present, the physical resources of the power limited company are diverse and involve many links, making it difficult to achieve supply chain data governance and integrated application. Due to the limitations of the model, traditional databases are not suitable for the storage, query, and calculation requirements of complex association relationships in contemporary intelligent supply chains. Based on the database, a question-and-answer system in the field of material supply chain is proposed. Incorporating a knowledge graph into the question-and-answer system enables the question-and-answer system to automatically answer natural language questions raised by users, which is an interdisciplinary research direction of information retrieval and natural language processing. However, the current question-and-answer systems in the field of material supply chain generally have the following characteristics and problems: weak usability, supporting question-and-answer for specific entities, but ignoring problems such as difficult memorization and input of specific entities, resulting in reduced usability of the question-and-answer system and increased difficulty in using the system; weak analysis ability, the current question-and-answer system is difficult to solve relatively complex text question inputs, unable to correctly understand the user's intention and provide question answers according to the user's input; insufficient credibility, for complex questions, the current question-and-answer system is difficult to infer the answers to complex questions from the existing supply chain material database, with weak credibility and unable to solve complexity. Although knowledge graph question-and-answer can analyze and understand questions and finally obtain answers, in the face of the flexibility and ambiguity of natural language, how to process the voice information of complex questions is a pain point in the research of question-and-answer systems. Summary of the Invention
[0003] Object of the Invention: The object of the present invention is to provide a method for constructing a knowledge graph based on a neo4j graph database and deep learning.
[0004] Technical Solution: A method for constructing a knowledge graph based on a neo4j graph database and deep learning includes the following steps:
[0005] S1. Construct a knowledge graph for supply chain materials:
[0006] Collect internal data in the bidding and procurement and contract performance links distributed in the supply chain system to complete the integration of material supply chain business data; then design an ontology model for the material supply chain knowledge graph, and define relevant concepts, concept attributes, and relationships between concepts in the material supply chain business.
[0007] S2. Assist in constructing the supply chain knowledge graph:
[0008] Based on the material supply chain knowledge graph constructed in step S1, according to the basic attribute characteristics of electric power materials, construct characteristic tags of electric power materials as data annotations, and convert the above data annotations into the input format of a convolutional neural network; then use the trained neural network model to predict the materials with missing tags, so as to obtain material tags, and complete the complement of the material knowledge graph in the case of missing material characteristic tags such as material subcategories.
[0009] Preferably, the specific steps for integrating the material supply chain business data are as follows: According to the data fields in the material supply chain full-process query table, integrate the important fields of the full process of materials in the supply chain material dataset, analyze the structure and data of the aggregated data, formulate preprocessing rules for data cleaning and field sorting, and complete knowledge extraction through knowledge mapping, and extract entity, entity attribute, and entity relationship knowledge.
[0010] Preferably, in step S1, select Neo4J as the graph database for knowledge storage, and use the Cypher query language to execute graph queries to simplify the query and operation of graph data, which can be used to process large-scale graph data.
[0011] Preferably, in step S1, adopt a top-down approach to design the ontology model of the material supply chain knowledge graph.
[0012] Preferably, in step S1, the ontology model of the material supply chain knowledge graph is a top-down hierarchical structure. Adjust the original structure of the graph according to business requirements, and then construct a knowledge graph based on the existing material data, with the material unique code as the center and the information in the material supply chain process as each node.
[0013] Preferably, in step S2, the data annotation provides data support for the deep learning model.
[0014] Preferably, in step S2, the process of obtaining the basic attribute characteristics of electric power materials is as follows:
[0015] A1. Data collection and data sorting: Condense the material attribute content in the electric power material data, and retain the data in the material that describes the material in detail;
[0016] A2. Data classification: Merge and classify the duplicate items in the data and classification entries, and divide the data set into a test set and a training set;
[0017] A3. Determination of basic attribute characteristics of electric power materials: According to the knowledge graph constructed from the electric power material data, determine the specific relationships of the triples in the knowledge graph, so as to establish triple relationships; and convert the knowledge graph into a representation vector, and use it as input to obtain the basic attribute characteristics of electric power materials through convolutional neural network classification.
[0018] Beneficial effects: The present invention integrates the internal data of the material supply chain and uses a deep learning network model to construct and improve a knowledge graph. Extract professional structured knowledge from the answer text, perform knowledge matching with the existing knowledge graph of the power material supply chain, obtain relevant node data in the knowledge graph, convert the structured knowledge in the knowledge graph into easy-to-read natural language using a large model, and finally obtain a more professional answer, realizing the digital and intelligent transformation of the supply chain. Description of the Drawings
[0019] Figure 1 It is a schematic diagram of the construction of the knowledge graph of the present invention;
[0020] Figure 2 It is a schematic diagram of assisting in constructing the knowledge graph of the present invention;
[0021] Figure 3 It is a schematic diagram of an example of the full-attribute knowledge graph of a single material of the present invention;
[0022] Figure 4 It is a schematic diagram of the full-connection knowledge graph of multiple materials of the present invention; Detailed Embodiment
[0023] To make the technical solution of the present invention clearer, the following further describes the present invention in detail with reference to the accompanying drawings and specific embodiments.
[0024] Embodiment
[0025] Based on the data of the power material supply chain, the present invention combines data in professional fields such as power material professional forums, Q&A platforms, and professional education materials to build a knowledge graph for supply chain materials. Specifically as follows:
[0026] (1) Construct a knowledge graph for the supply chain, as shown in Figure 1 、 2 .
[0027] ① Supply chain material data processing
[0028] Data processing mainly includes data field integration. According to the data field data in the full-process query table of the material supply chain, the important fields of the full process of materials in the supply chain material data set are integrated, the structure and data of the aggregated data are analyzed, preprocessing rules for data cleaning and field sorting are formulated, and through knowledge mapping, knowledge extraction is completed, including knowledge such as entities, entity attributes, and entity relationships.
[0029] ② Construction of the ontology of the supply chain material knowledge graph
[0030] The knowledge graph of the material supply chain mainly adopts a top-down approach to model and organize the concept hierarchy. During use, the original structure of the graph can be appropriately adjusted according to business needs. A knowledge graph is constructed based on existing material data, with the unique material code as the center. In this knowledge graph, key attention is paid to each link in the material supply chain process, including material attributes (such as name, specification, model, etc.), planning period (referring to the time range for planning to purchase materials), procurement period (referring to the time range for actually purchasing materials), contract period (referring to the time range for signing contracts with suppliers), and performance period (referring to the time range for suppliers to deliver materials according to the contract). By constructing such a knowledge graph, it is possible to better manage and understand the flow of materials and related information in the supply chain.
[0031] ③ Assist in constructing the knowledge graph of supply chain materials
[0032] The following steps are proposed to solve the problem of missing labels such as material middle categories, material major categories, and material minor categories:
[0033] First, establish material feature labels: Based on the knowledge graph of the material professional field, identify the basic feature information of materials. By constructing feature labels such as material attribute features and procurement cycles, it helps users further understand the details of materials and ensures that the labels accurately reflect the characteristics of the data. Second, construct material labels based on the knowledge graph and convolutional neural network: Based on the advantages of deep learning, it can solve the problems of incompleteness and sparsity caused by the lack of relationships between entities in the knowledge graph. Represent single material data in the dataset in the form of a knowledge graph. Since the convolutional neural network requires the input data to be a tensor, the knowledge graph words are preprocessed into the format required for the input of the convolutional neural network. Pass through the convolutional neural network model, and finally the output is the feature label reflecting the data.
[0034] When constructing material attribute features, it is achieved through the following methods:
[0035] a. Data collection and data collation: Concisely summarize the material attribute content in the power material data, and retain the data in the data that describes the materials in detail;
[0036] b. Data classification: Merge and classify the duplicate items in the data and classification entries, and divide the dataset into a test set and a training set;
[0037] c. Determination of basic attributes of power materials: According to the knowledge graph constructed from power material data, determine the specific relationships of the triples in the knowledge graph, so as to establish triple relationships; and convert the knowledge graph into a representation vector, which is used as the input to obtain the basic attribute features of power materials through convolutional neural network classification.
[0038] (2) Construct the knowledge graph of the full attributes of a single material, such asFigure 3 as shown
[0039] The single - material full - attribute knowledge graph is a way to integrate and display the detailed information of a single material. When constructing the single - material full - attribute knowledge graph, first, relevant information about the material needs to be extracted from the supply - chain material dataset, including but not limited to material name, specification, model, planning period, procurement period, contract period, performance period, etc. Then, this information is organized in the form of nodes and relationships to form a complete knowledge graph. For example, the material name can be used as a node, and its attributes (such as specification, model, etc.) can be used as nodes connected to it. In addition, corresponding nodes and relationships can be established according to the procurement, contract, and performance links of the material to more comprehensively display the attributes and relevant information of the material.
[0040] (3) Construct a fully - connected knowledge graph of multiple materials, as Figure 4 shown
[0041] The fully - connected knowledge graph of multiple materials is a way to integrate and display the association relationships between multiple materials. When constructing the fully - connected knowledge graph of multiple materials, relevant information about multiple materials needs to be extracted from the supply - chain material dataset, and their association relationships are analyzed. For example, material A and material B may have association relationships such as the same supplier and similar procurement cycles. These association relationships are organized in the form of nodes and relationships to form a complete knowledge graph. For example, material A and material B can be used as nodes, and their association relationships (such as the same supplier, similar procurement cycles, etc.) can be used as nodes connected to them. By constructing the fully - connected knowledge graph of multiple materials, the association relationships between materials can be better understood, providing more comprehensive information support for supply - chain management.
[0042] (4) Storage of the supply - chain material knowledge graph.
[0043] Currently, there are mainly two storage methods for knowledge graphs. One is RDF - based storage, and the other is graph - database - based storage. RDF stores data in the form of triples and does not contain attribute information, consisting of a subject, a predicate, and an object. However, graph databases generally use property graphs as the basic representation form and provide graph query languages and graph algorithms for analyzing and querying graph data. Graph databases are more suitable for storing knowledge graphs because knowledge graphs are usually a graph structure composed of entities and the relationships between them. Therefore, in the power - material intelligent question - answering system based on large - language models and knowledge graphs in the vertical domain of this invention, the Neo4J graph database is used for storing the knowledge graph, and the Cypher query language is used to execute graph queries.
[0044] The above-described embodiments merely represent several implementation manners of the present invention. Their descriptions are relatively specific and detailed, but they should not be construed as limiting the scope of the patent for the present invention. It should be noted that for those of ordinary skill in the art, without departing from the concept of the present invention, several modifications and improvements can still be made, and these all fall within the protection scope of the present invention. Therefore, the protection scope of the patent for the present invention shall be subject to the appended claims.
Claims
1. A method for constructing a knowledge graph based on the neo4j graph database and deep learning, characterized in that Including the following steps: S1. Construct a knowledge graph for supply chain materials: Collect internal data in the tender procurement and contract performance links distributed in the supply chain system to complete the integration of material supply chain business data; then design an ontology model for the material supply chain knowledge graph, define relevant concepts, concept attributes and relationships between concepts in the material supply chain business; select Neo4J as the graph database for knowledge storage and use the Cypher query language to execute graph queries to simplify the query and operation of graph data; S2. Assist in constructing the supply chain knowledge graph: Based on the material supply chain knowledge graph constructed in step S1, construct feature labels for electric power materials as data annotations according to the basic attribute characteristics of electric power materials, and convert the above data annotations into the input format of a convolutional neural network; then use the trained neural network model to predict materials with missing labels, so as to obtain material labels and complete the complement of the material knowledge graph in the case of missing material feature labels such as material subcategories.
2. The method according to claim 1, characterized in that In step S1, the specific steps for the integration of material supply chain business data are as follows: According to the data fields in the full-process query table of the material supply chain, integrate the important fields of the full process of materials in the material supply chain dataset, analyze the structure and data of the aggregated data, formulate preprocessing rules for data cleaning and field arrangement, and complete knowledge extraction through knowledge mapping to extract entity, entity attribute and entity relationship knowledge.
3. The method according to claim 1, characterized in that, In step S1, a top-down approach is adopted to design the ontology model of the material supply chain knowledge graph.
4. The method according to claim 1, wherein In step S1, the ontology model of the material supply chain knowledge graph is a top-down hierarchical structure. Adjust the original structure of the graph according to business requirements, and then construct a knowledge graph based on the existing material data, with the material unique code as the center and the information in the material supply chain process as each node.
5. The method according to claim 1, wherein In step S2, data annotation provides data support for the deep learning model.
6. The method according to claim 1, wherein In step S2, the process of obtaining the basic attribute characteristics of electric power materials is as follows: A1. Data collection and data collation: Condense the material attribute content in the electric power material data and retain the data in the material that describes the material in detail; A2. Data classification: Merge and classify the duplicate items in the data and classification entries, and divide the data set into a test set and a training set; A3. Determination of basic attribute characteristics of electric power materials: According to the knowledge graph constructed from the electric power material data, determine the specific relationships of the triples in the knowledge graph, so as to establish triple relationships; and convert the knowledge graph into a representation vector, which is used as input to obtain the basic attribute characteristics of electric power materials through convolutional neural network classification.