A knowledge graph-based data modeling method
By employing a knowledge graph-based data modeling method and utilizing the ERNIE model and graph neural network technology to process natural language data, the high computational complexity of existing technologies is resolved, achieving efficient natural language data processing.
Patent Information
- Application Number
- CN202310300416.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-24
- Publication Date
- 2025-12-30
- Estimated Expiration
- 2043-03-24
AI Technical Summary
Existing natural language processing methods require a large amount of computation, are complex, and demand high computing power.
We employ a knowledge graph-based data modeling approach, utilizing the ERNIE model and graph neural network technology to encode and interpret natural language data. We then use an NLP database for real-time updates and data accumulation to construct a natural language data model.
It reduces the computational load of natural language processing, improves computational efficiency and response speed, and forms a complete natural language knowledge graph.
Smart Images

Figure CN116644186B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of data modeling technology, specifically a data modeling method based on knowledge graphs. Background Technology
[0002] In recent years, artificial intelligence (AI) has been rapidly changing people's lives, and various technology companies have launched AI products or systems. The emergence of these AI products relies on the rapid advancements in various fields, including machine learning, computer vision, speech recognition, and natural language processing. AI is fundamentally based on deep learning and knowledge graphs.
[0003] The key to the operation of artificial intelligence lies in the processing of natural language data. However, due to the complexity of natural language, existing natural language processing methods require a large amount of computation in the process of processing natural language, which places high demands on the computing power of computers and makes the calculation methods relatively complex.
[0004] To address the aforementioned issues, a knowledge graph-based data modeling method is proposed to model and process natural language, thereby improving the computational efficiency of natural language processing. Summary of the Invention
[0005] (a) Technical problems to be solved
[0006] To address the shortcomings of existing technologies, this invention provides a data modeling method based on knowledge graphs, which has advantages such as reducing computational load and improving computational efficiency, and solves the problems of requiring a large amount of computation and having a relatively complex calculation method.
[0007] (II) Technical Solution
[0008] To achieve the above objectives, the present invention provides the following technical solution: a data modeling method based on knowledge graphs, comprising the following steps:
[0009] S1. Using the Natural Language Processing (NLP) database as the core of the knowledge graph extension, using the algorithms in the NLP algorithm library as the data extension operation method, using the Chinese language model ERNIE as the natural language data translation model, and using graph neural network technology to construct the natural language data model.
[0010] S2. Connect the NLP database to the cloud server, update the NLP database in real time, expand the content of the NLP database, and give new interpretations to natural language.
[0011] S3. Natural language data is pre-visualized using graph neural network technology. During the pre-visualization process, the natural language data is encoded and interpreted using the Chinese language model ERNIE.
[0012] S4. Import the pre-rendered data parameters into the NLP algorithm library, use NLP algorithms to perform operations on the natural language data, and map the operation results to the corresponding results in the NLP database;
[0013] S5. Based on the NLP data that maps to the data results of the operation, store the corresponding data, operation algorithms and encoding and decoding processes to form a data processing model for a specific natural language.
[0014] S6, and S3-S5, construct different natural language data models and continuously deposit natural language models to form a knowledge graph of natural language data models.
[0015] Preferably, in step S1, the NLP database is a comprehensive Python basic NLP library, the NLP algorithm library is a commonly used NLP algorithm library, and the Chinese language model ERNIE uses Chinese NLP tools during the translation and interpretation process.
[0016] Specifically, ERNIE is a language model trained on Chinese corpus. ERNIE is a knowledge-enhanced semantic representation model.
[0017] Preferably, in step S1, the core of the Chinese language model ERNIE is composed of a Transformer model. The model structure mainly includes two modules: the lower-level module, the text encoder (T-Encoder), is mainly responsible for capturing basic vocabulary and syntactic information from the input tags, and the upper-level module, the knowledge encoder (KEncoder), is responsible for integrating the knowledge information obtained from the lower level into the text information.
[0018] Specifically, the ERNIE model is used to represent the heterogeneous information of tags and entities in a unified feature space.
[0019] Preferably, the neural network inference process in step S3 can be represented by sub-processes such as graph node pre-representation, graph node sampling, subgraph extraction, subgraph feature fusion, graph neural network generation, and training. The specific steps are as follows:
[0020] 1) Graph node pre-representation: Each data node in the graph is embedded using the graph embedding method;
[0021] 2) Graph node sampling: Sampling positive and negative samples for each data node or existing data node pair in the graph;
[0022] 3) Subgraph extraction: Extract the neighboring nodes of each data node in the graph to construct an n-order subgraph, where n represents the neighboring nodes at the nth level, thus forming a general data subgraph structure for front-to-back data analysis;
[0023] 4) Subgraph feature fusion: Local or global feature extraction is performed on each data subgraph input to the neural network;
[0024] 5) Generate and train the graph neural network: Define the number of layers and input / output parameters of the network, and train the network on graph data.
[0025] Preferably, in step S4, the NLP algorithm performs operations on each natural language data, maps the operation results to different data in the NLP database, labels the mapped NLP data, and performs modeling and classification based on the labeled data.
[0026] Preferably, in step S5, NLP data is used as the basis for model building to construct a model of natural language data, and the modeled natural language data is set as a target for rapid response.
[0027] Preferably, in step S6, a natural language knowledge graph for daily use is formed through the accumulation and sedimentation of a large amount of natural language data and the construction of data models.
[0028] (III) Beneficial Effects
[0029] Compared with existing technologies, this invention provides a data modeling method based on knowledge graphs, which has the following beneficial effects:
[0030] This knowledge graph-based data modeling method interprets natural language data at multiple levels and performs deep learning on top of an NLP database. It expands and consolidates data based on various regular data within the NLP database, constructs a data model for each data point, and uses neural networks to perform multi-dimensional analysis of the constructed models, forming a complete natural language knowledge graph. Through the knowledge graph, it can quickly respond to diverse natural language data, reduce the computational load of natural language processing, improve data processing and response speed, and greatly improve computational efficiency. Attached Figure Description
[0031] Figure 1 This is a schematic diagram of the method flow proposed in this invention. Detailed Implementation
[0032] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0033] Please see Figure 1 A knowledge graph-based data modeling method includes the following steps:
[0034] S1. Using the Natural Language Processing (NLP) database as the core of the knowledge graph extension, using the algorithms in the NLP algorithm library as the data extension operation method, using the Chinese language model ERNIE as the natural language data translation model, and using graph neural network technology to construct the natural language data model.
[0035] S2. Connect the NLP database to the cloud server, update the NLP database in real time, expand the content of the NLP database, and give new interpretations to natural language.
[0036] S3. Natural language data is pre-visualized using graph neural network technology. During the pre-visualization process, the natural language data is encoded and interpreted using the Chinese language model ERNIE.
[0037] S4. Import the pre-rendered data parameters into the NLP algorithm library, use NLP algorithms to perform operations on the natural language data, and map the operation results to the corresponding results in the NLP database;
[0038] S5. Based on the NLP data that maps to the data results of the operation, store the corresponding data, operation algorithms and encoding and decoding processes to form a data processing model for a specific natural language.
[0039] S6, and S3-S5, construct different natural language data models and continuously deposit natural language models to form a knowledge graph of natural language data models.
[0040] In step S1, the NLP database is a comprehensive Python basic NLP library, the NLP algorithm library is a commonly used NLP algorithm library, and the Chinese language model ERNIE uses Chinese NLP tools in the process of translation and interpretation.
[0041] Specifically, ERNIE is a language model trained on Chinese corpus. ERNIE is a knowledge-enhanced semantic representation model.
[0042] In step S1, the core of the Chinese language model ERNIE is composed of a Transformer model. The model structure mainly includes two modules: the lower-level module, the text encoder (T-Encoder), is mainly responsible for capturing basic vocabulary and syntactic information from the input tags, and the upper-level module, the knowledge encoder (K-Encoder), is responsible for integrating the knowledge information obtained from the lower level into the text information.
[0043] Specifically, the ERNIE model is used to represent the heterogeneous information of tags and entities in a unified feature space.
[0044] The neural network inference process in step S3 can be represented by sub-processes such as graph node pre-representation, graph node sampling, subgraph extraction, subgraph feature fusion, graph neural network generation, and training. The specific steps are as follows:
[0045] 1) Graph node pre-representation: Each data node in the graph is embedded using the graph embedding method;
[0046] 2) Graph node sampling: Sampling positive and negative samples for each data node or existing data node pair in the graph;
[0047] 3) Subgraph extraction: Extract the neighboring nodes of each data node in the graph to construct an n-order subgraph, where n represents the neighboring nodes at the nth level, thus forming a general data subgraph structure for front-to-back data analysis;
[0048] 4) Subgraph feature fusion: Local or global feature extraction is performed on each data subgraph input to the neural network;
[0049] 5) Generate and train the graph neural network: Define the number of layers and input / output parameters of the network, and train the network on graph data.
[0050] In step S4, the NLP algorithm performs operations on each natural language data, maps the operation results to different data in the NLP database, labels the mapped NLP data, and performs modeling and classification based on the labeled data.
[0051] In step S5, NLP data is used as the basis for model building to construct a model of natural language data, and the modeled natural language data is set as the target for rapid response.
[0052] In step S6, a natural language knowledge graph for daily use is formed through the accumulation and sedimentation of a large amount of natural language data and the construction of data models.
[0053] In summary, this knowledge graph-based data modeling method interprets natural language data at multiple levels and performs deep learning on top of an NLP database. It expands and consolidates data based on various conventional data within the NLP database, constructs data models for each data point, and uses neural networks to perform multi-dimensional analysis of the constructed models, forming a comprehensive natural language knowledge graph. This knowledge graph enables rapid responses to diverse natural language data, reduces the computational load of natural language processing, improves data processing and response speed, and significantly enhances computational efficiency.
[0054] It should be noted that, in this document, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one" does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0055] Although embodiments of the invention have been shown and described, it will be understood by those skilled in the art that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the appended claims and their equivalents.
Claims
1. A data modeling method based on knowledge graphs, characterized in that: Comprise the following steps: S1, the natural language processing database is the extension core of the knowledge graph, the algorithm in the NLP algorithm library is the data expansion operation mode, the Chinese language model ERNIE is used as the natural language data translation model, and the natural language data model is constructed by using the graph neural network technology; S2, the NLP database and the cloud server are connected, the NLP database is updated in real time, the content of the NLP database is expanded, and the natural language is given new interpretation; S3, the natural language data is preformed by the graph neural network technology, and the natural language data is encoded and interpreted by the Chinese language model ERNIE in the preforming process; S4, the data parameters of the preforming are imported into the NLP algorithm library, the natural language data is operated by the NLP algorithm, and the operation result is mapped with the corresponding result in the NLP database; S5, the NLP data mapped with the operation data result is used as the basis to store the corresponding data, operation algorithm and coding and interpretation process, so that the data processing model of specific natural language is formed; S6, the different natural language data models are constructed by circulating S3-S5, and the natural language model is deposited continuously to form the knowledge graph of the natural language data model; The internal core of the Chinese language model ERNIE model in the step S1 is composed of the Transformer model, the model structure includes 2 modules, the text encoder of the lower module is responsible for capturing the basic vocabulary and syntax information from the input mark, and the knowledge encoder of the upper module is responsible for integrating the knowledge information obtained from the lower layer into the text information; The neural network inference process in the step S3 can be represented by the graph node pre-representation, graph node sampling, subgraph extraction, subgraph feature fusion, generation and training of the graph neural network, and the specific steps are as follows: 1), graph node pre-representation: each data node in the graph is embedded and represented by the graph embedding method; 2), graph node sampling: the positive and negative samples of each data node or the existing data node pair in the graph are sampled; 3), subgraph extraction: the adjacent nodes of each data node in the graph are extracted to construct n-order subgraph, wherein n represents the adjacent nodes of the nth layer, thereby forming a general data subgraph structure, and the data is analyzed before and after; 4), subgraph feature fusion: the local or global feature of each input neural network data subgraph is extracted; 5), generation of graph neural network and training: the number of network layers and input and output parameters are defined, and the network training is performed on the graph data. 2.The knowledge graph-based data modeling method of claim 1, wherein: The NLP database in the step S1 is a comprehensive python basic NLP library, the NLP algorithm library is a common NLP algorithm library, and the Chinese language model ERNIE uses Chinese NLP tools in the translation and interpretation process. 3.The knowledge graph-based data modeling method of claim 1, wherein: In the step S4, the NLP algorithm operates on each natural language data, the operation result is mapped with different data in the NLP database, the mapped NLP data is marked, and the modeling classification is performed according to the marked data. 4.The knowledge graph-based data modeling method of claim 1, wherein: In the step S5, the natural language data is modeled based on the NLP data, and the modeling of the natural language data is used as a target for rapid response. 5.The knowledge graph-based data modeling method of claim 1, wherein: In the step S6, the natural language knowledge graph for daily use is formed through accumulation and precipitation of a large amount of natural language data and modeling of the data.
Citation Information
Patent Citations
Cross-language multi-source vertical domain knowledge graph construction method
CN112199511A
Knowledge graph-based entity linking method and apparatus, device, and storage medium
WO2021073254A1