Knowledge graph updating method and device, storage medium and electronic equipment

Data filtering by using the preset keyword set and data screening rules in the knowledge map update method, and combined with the target data extraction mode for data extraction and update, solve the problem of inaccurate updates in existing technologies, realize the knowledge map of the knowledge map, and realize the knowledge map. Automated incremental update.

CN119377417AInactive Publication Date: 2025-01-28NUCLEAR POWER INSTITUTE OF CHINA

Patent Information

Application Number
CN202411313299.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-20
Publication Date
2025-01-28
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

Existing knowledge graph update methods rely on manual operations or simple automated scripts, making it difficult to ensure the accuracy and comprehensiveness of content updates.

Method used

The database data is extracted based on the preset keyword set and data screening rules, and the ternary group data suitable for incremental update is screened, and data extraction and update are used to use the target data extraction mode.

Benefits of technology

The automatic increase of the knowledge map has been achieved, which improves the accuracy and comprehensiveness of the update, and is suitable for the knowledge map update in multi -field.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119377417A_ABST
    Figure CN119377417A_ABST
Patent Text Reader

Abstract

The invention discloses a knowledge graph updating method and device, a storage medium and electronic equipment. Relates to the technical field of information processing, and the method comprises the following steps: based on a preset keyword set corresponding to a to-be-updated knowledge graph, adopting a preset data screening rule corresponding to a graph category of the to-be-updated knowledge graph to extract data in a preset database, and obtaining business text data corresponding to the to-be-updated knowledge graph; screening each preset data extraction mode based on the graph category of the to-be-updated knowledge graph to obtain a target data extraction mode for incremental data extraction; performing data extraction on the business text data by adopting a target data extraction mode to obtain triple incremental data for incrementally updating the knowledge graph to be updated; and updating the knowledge graph to be updated based on the triple incremental data to obtain a target knowledge graph. According to the method, the updating efficiency and accuracy of the knowledge graph can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of information processing technology, and in particular to a knowledge graph updating method, device, storage medium and electronic device. Background Art

[0002] With the development of the Internet and big data technology, the amount of information has exploded, and it is difficult for people to quickly obtain effective information from a large amount of data. Knowledge graph technology can effectively solve this problem. By constructing a graph structure between entities and relationships, knowledge graphs organize complex information into an easy-to-understand and easy-to-retrieve form to help people better understand and solve problems. They have been widely used in many fields such as search question and answer, recommendation systems, and intelligent customer service. However, enterprises have high requirements for the integrity, accuracy, and timeliness of data. As data continues to increase, how to automatically and incrementally update knowledge graphs has become an important issue. The update of knowledge graphs usually relies on manual operations or simple automated scripts, which makes it difficult to ensure the accuracy and comprehensiveness of content updates. Summary of the invention

[0003] In view of this, the present invention provides a knowledge graph updating method, device, storage medium and electronic device, the main purpose of which is to solve the problem that the update of existing knowledge graphs usually relies on manual operations or simple automated scripts, and it is difficult to ensure the accuracy and comprehensiveness of content updates.

[0004] To solve the above problems, this application provides a knowledge graph updating method, including:

[0005] Based on a preset keyword set corresponding to the knowledge graph to be updated, a preset data identification rule corresponding to the graph category of the knowledge graph to be updated is used to extract data from a preset database to obtain business text data corresponding to the knowledge graph to be updated;

[0006] Screening each preset data extraction mode based on the graph category of the knowledge graph to be updated to obtain a target data extraction mode for incremental data extraction;

[0007] The target data extraction mode is used to extract data from the business text data to obtain triple incremental data for incrementally updating the knowledge graph to be updated;

[0008] The knowledge graph to be updated is updated based on the triple incremental data to obtain a target knowledge graph.

[0009] Optionally, before extracting data from a preset database based on a preset keyword set corresponding to the knowledge graph to be updated and using a preset data identification rule corresponding to the graph category of the knowledge graph to be updated, the method further includes: constructing a preset data identification rule;

[0010] The construction of preset data identification rules specifically includes:

[0011] Based on the graph category to which each knowledge graph belongs, determine the professional feature keywords corresponding to each knowledge graph and the file type keywords corresponding to each knowledge graph;

[0012] A mapping relationship between the graph category, the professional feature keywords and the file type keywords of the same knowledge graph is constructed to obtain preset data identification rules corresponding to the same knowledge graph.

[0013] Optionally, based on a preset keyword set corresponding to the knowledge graph to be updated, a preset data identification rule corresponding to the graph category of the knowledge graph to be updated is used to extract data from a preset database to obtain business text data corresponding to the knowledge graph to be updated, specifically including:

[0014] Based on the graph category of the knowledge graph to be updated, query each preset data identification rule to obtain a target data identification rule corresponding to the knowledge graph to be updated;

[0015] Based on the professional feature keywords and file type keywords carried by the target data identification rule and corresponding to the knowledge graph to be updated, the preset database is queried to obtain original business text data for updating the knowledge graph to be updated;

[0016] The original business text data is formatted to obtain the business text data corresponding to the knowledge graph to be updated and meeting preset format requirements.

[0017] Optionally, the method of screening each preset data extraction mode based on the graph category of the knowledge graph to be updated to obtain a target data extraction mode for incremental data extraction specifically includes:

[0018] Based on the atlas category, query the mapping relationship between each atlas category and each data extraction mode in the preset database to obtain the target mapping relationship corresponding to the atlas category;

[0019] The data extraction mode corresponding to the target mapping relationship is determined as the target data extraction mode.

[0020] Optionally, the extracting the business text data using the target data extraction mode to obtain triple incremental data for incrementally updating the preset knowledge graph specifically includes:

[0021] When the target data extraction mode is to extract data using a target data extraction model, based on the business text data, an embedding network of the target data extraction model is used to extract features to obtain a number of word vectors corresponding to the business text data;

[0022] Based on the same word vector, a preset bidirectional long short-term memory network of the target data extraction model is used to perform prediction to obtain emission scores of each preset label category corresponding to the same word vector;

[0023] Using a preset conditional random field network of the target data extraction model to decode each of the emission scores of the same word vector, to obtain a label category probability set corresponding to the same word vector;

[0024] Based on the label category probability set, determining the entity category corresponding to the same word vector;

[0025] Filter each of the word vectors based on the entity category corresponding to each of the word vectors and the graph category corresponding to the preset knowledge graph to obtain each first entity keyword;

[0026] Based on each of the first entity keywords, a preset neural network of the target data extraction model is used to extract relationship attributes to obtain each of the first relationship attribute keywords;

[0027] An array is constructed based on each of the first entity keywords and each of the first relationship attribute keywords to obtain triple incremental data for incrementally updating the preset knowledge graph.

[0028] Optionally, the method of extracting data from the business text data using the target data extraction mode to obtain triple incremental data for incrementally updating the preset knowledge graph further includes:

[0029] When the target data extraction mode is to extract data by using a target preset rule extraction method, each of the preset second relationship attribute keywords in the business text data is located based on a preset regular expression and each of the preset second relationship attribute keywords to obtain a first position corresponding to each of the preset second relationship attribute keywords;

[0030] Perform neighborhood keyword positioning based on each of the preset second relationship attribute keywords to obtain a second entity keyword corresponding to each of the preset second relationship attribute keywords and a second position corresponding to each of the second entity keywords;

[0031] An array is constructed based on each of the second entity keywords and each of the preset second relationship attribute keywords to obtain triple incremental data for incrementally updating the preset knowledge graph.

[0032] Optionally, the updating of the to-be-updated knowledge graph based on the triple incremental data to obtain a target knowledge graph specifically includes:

[0033] Based on each historical entity keyword in the knowledge graph to be updated, the entity keywords in each triple incremental data are screened to obtain each entity keyword to be merged and each entity keyword to be added;

[0034] The knowledge graph to be updated is updated based on each entity keyword to be fused and the triplet incremental data corresponding to each entity keyword to be fused to obtain a current knowledge graph;

[0035] The current knowledge graph is updated based on each of the entity keywords to be added and the triplet incremental data corresponding to each of the entity keywords to be added to obtain a target knowledge graph.

[0036] To solve the above problems, this application provides a knowledge graph updating device, including:

[0037] A first data extraction module is used to extract data from a preset database using a preset data identification rule based on a preset keyword set corresponding to the knowledge graph to be updated, so as to obtain business text data corresponding to the knowledge graph to be updated;

[0038] A pattern matching module, used to screen each data extraction pattern based on the graph category of the knowledge graph to be updated, and obtain a target data extraction pattern for incremental data extraction;

[0039] A second data extraction module, used to extract data from the business text data using the target data extraction mode to obtain triple incremental data for incrementally updating the preset knowledge graph;

[0040] An updating module is used to update the knowledge graph to be updated based on the triple incremental data to obtain a target knowledge graph.

[0041] In order to solve the above problems, the present application provides a storage medium, characterized in that the storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the above-mentioned knowledge graph updating method are implemented.

[0042] In order to solve the above problems, the present application provides an electronic device, characterized in that it includes at least a memory and a processor, and a computer program is stored in the memory. When the processor executes the computer program on the memory, it implements the steps of the above-mentioned knowledge graph updating method.

[0043] Beneficial effects of the present application: The present application uses preset data identification rules corresponding to the graph fields of the knowledge graphs to be updated to quickly screen out business text data suitable for incremental updates of the knowledge graphs to be updated from a large amount of business data; and based on the graph categories of the knowledge graphs to be updated, screen each preset data extraction mode to obtain a target data extraction mode for incremental data extraction, which has good adaptability; use the target data extraction mode to extract data from the business text data to obtain triple incremental data for incremental updates of the preset knowledge graphs; update the knowledge graphs to be updated based on the triple incremental data to obtain the target knowledge graph. The present application realizes automatic incremental updates of knowledge graphs in multiple fields with high efficiency.

[0044] The above description is only an overview of the technical solution of the present invention. In order to more clearly understand the technical means of the present invention, it can be implemented according to the contents of the specification. In order to make the above and other purposes, features and advantages of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are listed below. BRIEF DESCRIPTION OF THE DRAWINGS

[0045] Various other advantages and benefits will become apparent to those of ordinary skill in the art by reading the detailed description of the preferred embodiments below. The accompanying drawings are only for the purpose of illustrating the preferred embodiments and are not to be considered as limiting the present invention. Moreover, the same reference symbols are used throughout the accompanying drawings to represent the same components. In the accompanying drawings:

[0046] Figure 1 A schematic diagram of a process of updating a knowledge graph provided in an embodiment of the present application is shown;

[0047] Figure 2 A schematic diagram of a process of updating a knowledge graph provided by another embodiment of the present application is shown;

[0048] Figure 3 A structural block diagram of a knowledge graph updating device provided in another embodiment of the present application is shown. DETAILED DESCRIPTION

[0049] Various aspects and features of the present application are described herein with reference to the accompanying drawings.

[0050] It should be understood that various modifications may be made to the embodiments of the present application. Therefore, the above description should not be considered as limiting, but only as an example of an embodiment. Other modifications within the scope and spirit of the present application will occur to those skilled in the art.

[0051] The accompanying drawings, which are incorporated in and constitute a part of the specification, illustrate embodiments of the present application and, together with the general description of the present application given above and the detailed description of the embodiments given below, serve to explain the principles of the present application.

[0052] These and other characteristics of the present application will become apparent from the following description of a preferred form of embodiment given as a non-limiting example with reference to the accompanying drawings.

[0053] It should also be understood that although the present application has been described with reference to some specific examples, those skilled in the art will be able to readily implement many other equivalent forms of the present application.

[0054] The above and other aspects, features and advantages of the present application will become more apparent in view of the following detailed description when taken in conjunction with the accompanying drawings.

[0055] Specific embodiments of the present application are described hereinafter with reference to the accompanying drawings; however, it should be understood that the embodiments applied for are merely examples of the present application, which may be implemented in a variety of ways. Well-known and / or repeated functions and structures are not described in detail to avoid unnecessary or redundant details that obscure the present application. Therefore, the specific structural and functional details applied for herein are not intended to be limiting, but merely serve as a basis and representative basis for the claims to teach those skilled in the art to use the present application in a variety of ways with substantially any suitable detailed structure.

[0056] This specification may use the phrases "in one embodiment," "in another embodiment," "in yet another embodiment," or "in other embodiments," all of which may refer to one or more of the same or different embodiments according to the present application.

[0057] This application embodiment provides a knowledge graph updating method, such as Figure 1 As shown, including:

[0058] Step S101: extracting data from a preset database using a preset data identification rule based on a preset keyword set corresponding to the knowledge graph to be updated, and obtaining business text data corresponding to the knowledge graph to be updated;

[0059] In the specific implementation of this step, the knowledge graph to be updated can be knowledge graphs in different fields such as theoretical professional knowledge graphs, structural professional knowledge graphs and software development knowledge graphs. Specifically, based on the graph category corresponding to the knowledge graph to be updated, each preset data identification rule is queried to obtain the target data identification rule corresponding to the knowledge graph to be updated; based on the professional feature keywords and file type keywords corresponding to the knowledge graph to be updated carried by the target data identification rule, the preset database is queried to obtain the first business text data for updating the knowledge graph to be updated; the first business text data is formatted to obtain the business text data corresponding to the knowledge graph to be updated.

[0060] Step S102: Screening each preset data extraction mode based on the graph category of the knowledge graph to be updated to obtain a target data extraction mode for incremental data extraction;

[0061] In the specific implementation process of this step, the data extraction mode includes model extraction or rule extraction. For each graph category, a mapping relationship between each graph category and each data extraction mode is pre-established; specifically, when the amount of data is large, the model extraction method corresponding to each knowledge graph category is used for incremental data extraction; when the amount of data is small, the rule extraction method corresponding to each knowledge graph category is used for targeted extraction of incremental data.

[0062] Step S103: extracting the business text data using the target data extraction mode to obtain triple incremental data for incrementally updating the preset knowledge graph;

[0063] During the specific implementation of this step, the target data extraction mode is used to extract entity keywords and relationship attribute keywords from the business text data to obtain each entity keyword and each relationship attribute keyword; an array is constructed based on each entity keyword and each relationship attribute keyword to obtain triple incremental data for incrementally updating the preset knowledge graph.

[0064] Step S104: Update the knowledge graph to be updated based on the triple incremental data to obtain a target knowledge graph.

[0065] During the specific implementation of this step, the entity keywords in each triple incremental data are screened based on each historical entity keyword in the knowledge graph to be updated to obtain each entity keyword to be merged and each entity keyword to be added; the knowledge graph to be updated is updated based on each entity keyword to be merged and the triple incremental data corresponding to each entity keyword to be merged to obtain the current knowledge graph; the current knowledge graph is updated based on each entity keyword to be added and the triple incremental data corresponding to each entity keyword to be added to obtain the target knowledge graph.

[0066] This application uses preset data identification rules corresponding to the graph fields of the knowledge graphs to be updated to quickly screen out business text data suitable for incremental updating of the knowledge graphs to be updated from a large amount of business data; and based on the graph categories of the knowledge graphs to be updated, screen each preset data extraction mode to obtain a target data extraction mode for incremental data extraction, which has good adaptability; use the target data extraction mode to extract data from the business text data to obtain triple incremental data for incremental updating of the preset knowledge graph; update the knowledge graph to be updated based on the triple incremental data to obtain a target knowledge graph. This application realizes automatic incremental updating of knowledge graphs in multiple fields with high efficiency.

[0067] Another embodiment of the present application provides another knowledge graph updating method, such as Figure 2 As shown, including:

[0068] Step S201: constructing preset data identification rules for knowledge graphs to be updated of different graph categories;

[0069] In the specific implementation process of this step, based on the graph category to which each knowledge graph belongs, the professional feature keywords corresponding to each knowledge graph and the file type keywords corresponding to each knowledge graph are determined; the graph category can be a knowledge graph field, and the graph category of the knowledge graph to be updated can be a knowledge graph in different fields such as a theoretical professional knowledge graph, a structural professional knowledge graph, and a software development knowledge graph. The professional feature keywords include: physical design, control rod drive mechanism, safety analysis, structural software, and other keywords; the file type keywords include: report, instruction, specification, and manual, and other keywords; for example: the professional feature keyword corresponding to the graph field of the theoretical professional knowledge graph is physical design, and the file type keyword corresponding to the theoretical professional knowledge graph is report; the professional feature keyword corresponding to the graph category of the structural professional knowledge graph is control rod drive mechanism, and the file type keyword corresponding to the structural professional knowledge graph is instruction, etc. A mapping relationship between the graph category of the same knowledge graph and the professional feature keywords and the file type keywords is constructed to obtain the preset data identification rules corresponding to the same knowledge graph.

[0070] Step S202: querying each preset data identification rule based on the graph category of the knowledge graph to be updated to obtain a target data identification rule corresponding to the knowledge graph to be updated;

[0071] During the specific implementation of this step, the preset data identification rules corresponding to each mapping relationship are queried based on the graph category of the knowledge graph to be updated, and the target data identification rules corresponding to the knowledge graph to be updated are obtained.

[0072] Step S203: querying the preset database based on the professional feature keywords and file type keywords corresponding to the knowledge graph to be updated carried by the target data identification rule to obtain original business text data for updating the knowledge graph to be updated;

[0073] During the specific implementation of this step, the preset database is queried based on the professional feature keywords and file type keywords corresponding to the knowledge graph to be updated carried by the target data identification rules, and the historical business data texts in the database are filtered to obtain the historical business text data containing the professional feature keywords and file type keywords, and the original business text data used to update the knowledge graph to be updated is obtained.

[0074] Step S204: converting the format of the original business text data to obtain the business text data corresponding to the knowledge graph to be updated;

[0075] During the specific implementation of this step, each of the business text data is identified to obtain a text type corresponding to each of the business text data; screening is performed based on each of the text types to obtain each of the first business text data that meets the preset format requirements and each of the heterogeneous business text data that does not meet the preset format requirements; format conversion is performed on each of the heterogeneous business text data to obtain second business text data that meets the preset format requirements corresponding to each of the heterogeneous business text data; the first business text data and the second business text data are determined as the business text data corresponding to the knowledge graph to be updated.

[0076] Step S205: Based on the graph category, query the mapping relationship between each graph category and each data extraction mode in the preset database to obtain a target mapping relationship corresponding to the graph category;

[0077] In the specific implementation process of this step, the data extraction mode includes model extraction or rule extraction. For each graph category, the mapping relationship between each graph category and each data extraction mode is pre-established; specifically, when the data volume is greater than or equal to the preset threshold, the model extraction method is used for incremental data extraction; when the data volume is less than the preset threshold, the rule extraction method corresponding to each knowledge graph category is used for directional extraction of incremental data. The preset threshold can be set according to actual needs. For example: the graph category is theoretical professional knowledge graph, because the data volume of the business text data corresponding to the theoretical professional knowledge graph is large, the data extraction mode of the graph category of theoretical professional knowledge graph is determined to be the theoretical professional automatic extraction model as the data extraction mode; the graph category is structural professional knowledge graph, because the data volume of the business text data corresponding to the structural professional knowledge graph is small, the data extraction mode of the graph category of structural professional knowledge graph is determined to be the structural professional rule extraction as the data extraction mode, and so on. The mapping relationship between each of the graph categories and each of the data extraction models is stored in the preset database. By querying the preset database through the graph category, the mapping relationship corresponding to the graph category can be queried, laying the foundation for subsequently determining the target extraction mode based on the mapping relationship.

[0078] Step S206: determining the data extraction mode corresponding to the target mapping relationship as the target data extraction mode;

[0079] In the specific implementation of this step, the target mapping relationship is the correspondence between the atlas category and the data extraction mode corresponding to the atlas category, and then the data extraction mode corresponding to the target mapping relationship is determined as the target data extraction mode.

[0080] Step S207: extracting data from the business text data using the target data extraction mode to obtain triple incremental data for incrementally updating the preset knowledge graph;

[0081] In the specific implementation process of this step, when the target data extraction mode is to extract data using the target data extraction model, based on the business text data, the embedding network of the target data extraction model is used to perform feature extraction to obtain a number of word vectors corresponding to the business text data; based on the same word vector, the preset bidirectional long short-term memory network of the target data extraction model is used to perform prediction to obtain the emission scores of each preset label category corresponding to the same word vector; the preset conditional random field network of the target data extraction model is used to decode each of the emission scores of the same word vector to obtain a label category probability set corresponding to the same word vector; based on the label category probability set, the entity category corresponding to the same word vector is determined; specifically, the category corresponding to the category label with the largest probability value in the label category probability set corresponding to the same word vector is determined as the entity category corresponding to the same word vector. Based on the entity category corresponding to each of the word vectors and the graph category corresponding to the preset knowledge graph, each of the word vectors is screened to obtain each first entity keyword; based on each of the first entity keywords, the preset neural network of the target data extraction model is used to extract relationship attributes to obtain each first relationship attribute keyword; the preset neural network can be a natural language processing technology based on the Transformer model, and this application does not limit the preset neural network. An array is constructed based on each of the first entity keywords and each of the first relationship attribute keywords to obtain triple incremental data for incrementally updating the preset knowledge graph.

[0082] When the target data extraction mode is to extract data by using the target preset rule extraction method, each preset second relationship attribute keyword in the business text data is located based on the preset regular expression and each preset second relationship attribute keyword to obtain the first position corresponding to each preset second relationship attribute keyword; the neighborhood keyword is located based on each preset second relationship attribute keyword to obtain the second entity keyword corresponding to each preset second relationship attribute keyword and the second position corresponding to each second entity keyword; an array is constructed based on each second entity keyword and each preset second relationship attribute keyword to obtain triple incremental data for incrementally updating the preset knowledge graph. The triple incremental data can be represented by SPO triples. For example: the obtained triple incremental data is (control rod drive mechanism, including, pressure shell) and so on.

[0083] Step S208: Update the knowledge graph to be updated based on the triple incremental data to obtain the target knowledge graph.

[0084] During the specific implementation of this step, the entity keywords in each triple incremental data are screened based on each historical entity keyword in the knowledge graph to be updated to obtain each entity keyword to be merged and each entity keyword to be added; the knowledge graph to be updated is updated based on each entity keyword to be merged and the triple incremental data corresponding to each entity keyword to be merged to obtain the current knowledge graph; the current knowledge graph is updated based on each entity keyword to be added and the triple incremental data corresponding to each entity keyword to be added to obtain the target knowledge graph.

[0085] This application pre-constructs data identification rules corresponding to the graph categories of each knowledge graph to be updated, automatically and quickly screens out a large amount of business data corresponding to the graph categories of the knowledge graph to be updated from the preset database, thereby improving data identification efficiency and data acquisition accuracy. And based on the graph category of the knowledge graph to be updated, each preset data extraction mode is screened to obtain a target data extraction mode for incremental data extraction, which has good adaptability; and based on the triple incremental data obtained by incremental data extraction, the entity fusion and entity addition of the knowledge graph to be updated are automatically performed, so as to realize the automatic update of the knowledge graph to be updated, thereby improving the update efficiency and accuracy of the knowledge graph.

[0086] Another embodiment of the present application provides a knowledge graph updating device, such as Figure 3 As shown, including:

[0087] The first data extraction module 1 is used to extract data from a preset database based on a preset keyword set corresponding to the knowledge graph to be updated, using a preset data identification rule corresponding to the graph category of the knowledge graph to be updated, to obtain business text data corresponding to the knowledge graph to be updated;

[0088] Pattern matching module 2, screening each preset data extraction pattern based on the graph category of the knowledge graph to be updated, and obtaining a target data extraction pattern for incremental data extraction;

[0089] A second data extraction module 3 is used to extract data from the business text data using the target data extraction mode to obtain triple incremental data for incrementally updating the knowledge graph to be updated;

[0090] The updating module 4 is used to update the knowledge graph to be updated based on the triple incremental data to obtain a target knowledge graph.

[0091] During the specific implementation process, the knowledge graph updating device also includes: a preset data identification rule construction module, which is specifically used to: determine the professional feature keywords corresponding to each knowledge graph and the file type keywords corresponding to each knowledge graph based on the graph category to which each knowledge graph belongs; construct a mapping relationship between the graph category, the professional feature keywords and the file type keywords of the same knowledge graph, and obtain the preset data identification rules corresponding to the same knowledge graph.

[0092] During the specific implementation process, the first data extraction module 1 is specifically used to: query each preset data identification rule based on the graph category of the knowledge graph to be updated, and obtain the target data identification rule corresponding to the knowledge graph to be updated; query the preset database based on the professional feature keywords and file type keywords corresponding to the knowledge graph to be updated carried by the target data identification rule, and obtain the original business text data used to update the knowledge graph to be updated; perform format conversion on the original business text data to obtain the business text data corresponding to the knowledge graph to be updated that meets the preset format requirements.

[0093] In the specific implementation process, the pattern matching module 2 is specifically used to: query the mapping relationship between each graph category and each data extraction pattern in the preset database based on the graph category, and obtain the target mapping relationship corresponding to the graph category; determine the data extraction pattern corresponding to the target mapping relationship as the target data extraction pattern.

[0094] In the specific implementation process, the second data extraction module 3 is specifically used for: when the target data extraction mode is to extract data using the target data extraction model, based on the business text data, the embedding network of the target data extraction model is used to perform feature extraction to obtain a number of word vectors corresponding to the business text data; based on the same word vector, the preset bidirectional long short-term memory network of the target data extraction model is used to perform prediction to obtain the emission scores of each preset label category corresponding to the same word vector; the preset conditional random field network of the target data extraction model is used to decode each emission score of the same word vector to obtain to a label category probability set corresponding to the same word vector; based on the label category probability set, determine the entity category corresponding to the same word vector; based on the entity category corresponding to each word vector and the graph category corresponding to the preset knowledge graph, screen each word vector to obtain each first entity keyword; based on each first entity keyword, use the preset neural network of the target data extraction model to extract relationship attributes to obtain each first relationship attribute keyword; based on each first entity keyword and each first relationship attribute keyword, construct an array to obtain triple incremental data for incrementally updating the preset knowledge graph.

[0095] In the specific implementation process, the second data extraction module 3 is also used for: when the target data extraction mode is to extract data by using the target preset rule extraction method, each preset second relationship attribute keyword in the business text data is located based on the preset regular expression and each preset second relationship attribute keyword to obtain the first position corresponding to each preset second relationship attribute keyword; based on each preset second relationship attribute keyword, the neighborhood keyword is located to obtain the second entity keyword corresponding to each preset second relationship attribute keyword and the second position corresponding to each second entity keyword; based on each second entity keyword and each preset second relationship attribute keyword, an array is constructed to obtain triple incremental data for incrementally updating the preset knowledge graph.

[0096] In the specific implementation process, the update module 4 is specifically used to: screen the entity keywords in each triple incremental data based on each historical entity keyword in the knowledge graph to be updated, and obtain each entity keyword to be merged and each entity keyword to be added; update the knowledge graph to be updated based on each entity keyword to be merged and the triple incremental data corresponding to each entity keyword to be merged, and obtain the current knowledge graph; update the current knowledge graph based on each entity keyword to be added and the triple incremental data corresponding to each entity keyword to be added, and obtain the target knowledge graph.

[0097] This application pre-constructs data identification rules corresponding to the graph categories of each knowledge graph to be updated, automatically and quickly screens out a large amount of business data corresponding to the graph categories of the knowledge graph to be updated from the preset database, thereby improving data identification efficiency and data acquisition accuracy. And based on the graph category of the knowledge graph to be updated, each preset data extraction mode is screened to obtain a target data extraction mode for incremental data extraction, which has good adaptability; and based on the triple incremental data obtained by incremental data extraction, the entity fusion and entity addition of the knowledge graph to be updated are automatically performed, so as to realize the automatic update of the knowledge graph to be updated, thereby improving the update efficiency and accuracy of the knowledge graph.

[0098] Another embodiment of the present application provides a storage medium, wherein the storage medium stores a computer program, and when the computer program is executed by a processor, the following method steps are implemented:

[0099] Step 1: Based on a preset keyword set corresponding to the knowledge graph to be updated, a preset data identification rule corresponding to the graph category of the knowledge graph to be updated is used to extract data from a preset database to obtain business text data corresponding to the knowledge graph to be updated;

[0100] Step 2: Screen each preset data extraction mode based on the graph category of the knowledge graph to be updated to obtain a target data extraction mode for incremental data extraction;

[0101] Step 3: extract data from the business text data using the target data extraction mode to obtain triple incremental data for incrementally updating the knowledge graph to be updated;

[0102] Step 4: Update the knowledge graph to be updated based on the triple incremental data to obtain the target knowledge graph.

[0103] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).

[0104] Those skilled in the art can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example. In actual applications, the above-mentioned functions can be distributed and completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above.

[0105] The specific implementation process of the above method steps can be found in the embodiments of any of the above-mentioned knowledge graph updating methods, and this embodiment will not be repeated here.

[0106] This application pre-constructs data identification rules corresponding to the graph categories of each knowledge graph to be updated, automatically and quickly screens out a large amount of business data corresponding to the graph categories of the knowledge graph to be updated from the preset database, thereby improving data identification efficiency and data acquisition accuracy. And based on the graph category of the knowledge graph to be updated, each preset data extraction mode is screened to obtain a target data extraction mode for incremental data extraction, which has good adaptability; and based on the triple incremental data obtained by incremental data extraction, the entity fusion and entity addition of the knowledge graph to be updated are automatically performed, so as to realize the automatic update of the knowledge graph to be updated, thereby improving the update efficiency and accuracy of the knowledge graph.

[0107] Another embodiment of the present application provides an electronic device, which may be a server, and the electronic device includes a processor, a memory, a network interface, and a database connected via a system bus. The processor of the electronic device is used to provide computing and control capabilities. The memory of the electronic device includes a non-volatile and / or volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of the operating system and computer program in the non-volatile storage medium. The network interface of the electronic device is used to communicate with an external client via a network connection. When the electronic device program is executed by the processor, it implements the functions or steps of a knowledge graph update method server side.

[0108] In one embodiment, an electronic device is provided, which may be a client. The electronic device includes a processor, a memory, a network interface, a display screen, and an input device connected via a system bus. The processor of the electronic device is used to provide computing and control capabilities. The memory of the electronic device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface of the electronic device is used to communicate with an external server via a network connection. When the electronic device program is executed by the processor, it implements the functions or steps on the client side of a knowledge graph update method.

[0109] Another embodiment of the present application provides an electronic device, comprising at least a memory and a processor, wherein the memory stores a computer program, and the processor implements the following method steps when executing the computer program in the memory:

[0110] Step 1: Based on a preset keyword set corresponding to the knowledge graph to be updated, a preset data identification rule corresponding to the graph category of the knowledge graph to be updated is used to extract data from a preset database to obtain business text data corresponding to the knowledge graph to be updated;

[0111] Step 2: Screen each preset data extraction mode based on the graph category of the knowledge graph to be updated to obtain a target data extraction mode for incremental data extraction;

[0112] Step 3: extract data from the business text data using the target data extraction mode to obtain triple incremental data for incrementally updating the knowledge graph to be updated;

[0113] Step 4: Update the knowledge graph to be updated based on the triple incremental data to obtain the target knowledge graph.

[0114] The specific implementation process of the above method steps can be found in the embodiments of any of the above-mentioned knowledge graph updating methods, and this embodiment will not be repeated here.

[0115] This application pre-constructs data identification rules corresponding to the graph categories of each knowledge graph to be updated, automatically and quickly screens out a large amount of business data corresponding to the graph categories of the knowledge graph to be updated from the preset database, thereby improving data identification efficiency and data acquisition accuracy. And based on the graph category of the knowledge graph to be updated, each preset data extraction mode is screened to obtain a target data extraction mode for incremental data extraction, which has good adaptability; and based on the triple incremental data obtained by incremental data extraction, the entity fusion and entity addition of the knowledge graph to be updated are automatically performed, so as to realize the automatic update of the knowledge graph to be updated, thereby improving the update efficiency and accuracy of the knowledge graph.

[0116] The above embodiments are only exemplary embodiments of the present application and are not intended to limit the present application. The protection scope of the present application is defined by the claims. Those skilled in the art may make various modifications or equivalent substitutions to the present application within the essence and protection scope of the present application, and such modifications or equivalent substitutions shall also be deemed to fall within the protection scope of the present application.

Claims

1. A knowledge graph updating method, characterized in that: include: Based on a preset keyword set corresponding to the knowledge graph to be updated, a preset data identification rule corresponding to the graph category of the knowledge graph to be updated is used to extract data from a preset database to obtain business text data corresponding to the knowledge graph to be updated; Screening each preset data extraction mode based on the graph category of the knowledge graph to be updated to obtain a target data extraction mode for incremental data extraction; The target data extraction mode is used to extract data from the business text data to obtain triple incremental data for incrementally updating the knowledge graph to be updated; The knowledge graph to be updated is updated based on the triple incremental data to obtain a target knowledge graph.

2. The method according to claim 1, characterized in that Before extracting data from a preset database using a preset data identification rule corresponding to a graph category of the knowledge graph to be updated based on a preset keyword set corresponding to the knowledge graph to be updated, the method further includes: constructing a preset data identification rule; The construction of preset data identification rules specifically includes: Based on the graph category to which each knowledge graph belongs, determine the professional feature keywords corresponding to each knowledge graph and the file type keywords corresponding to each knowledge graph; A mapping relationship between the graph category, the professional feature keywords and the file type keywords of the same knowledge graph is constructed to obtain preset data identification rules corresponding to the same knowledge graph.

3. The method according to claim 2, characterized in that The method extracts data from a preset database based on a preset keyword set corresponding to the knowledge graph to be updated and adopts a preset data identification rule corresponding to the graph category of the knowledge graph to be updated to obtain business text data corresponding to the knowledge graph to be updated, specifically including: Based on the graph category of the knowledge graph to be updated, query each preset data identification rule to obtain a target data identification rule corresponding to the knowledge graph to be updated; Based on the professional feature keywords and file type keywords carried by the target data identification rule and corresponding to the knowledge graph to be updated, the preset database is queried to obtain original business text data for updating the knowledge graph to be updated; The original business text data is formatted to obtain the business text data corresponding to the knowledge graph to be updated and meeting preset format requirements.

4. The method according to claim 1, characterized in that The method of screening each preset data extraction mode based on the graph category of the knowledge graph to be updated to obtain a target data extraction mode for incremental data extraction specifically includes: Based on the atlas category, query the mapping relationship between each atlas category and each data extraction mode in the preset database to obtain the target mapping relationship corresponding to the atlas category; The data extraction mode corresponding to the target mapping relationship is determined as the target data extraction mode.

5. The method according to claim 4, characterized in that The extracting the business text data using the target data extraction mode to obtain triple incremental data for incrementally updating the preset knowledge graph specifically includes: When the target data extraction mode is to extract data using a target data extraction model, based on the business text data, an embedding network of the target data extraction model is used to extract features to obtain a number of word vectors corresponding to the business text data; Based on the same word vector, a preset bidirectional long short-term memory network of the target data extraction model is used to perform prediction to obtain emission scores of each preset label category corresponding to the same word vector; Using a preset conditional random field network of the target data extraction model to decode each of the emission scores of the same word vector, to obtain a label category probability set corresponding to the same word vector; Based on the label category probability set, determining the entity category corresponding to the same word vector; Filter each of the word vectors based on the entity category corresponding to each of the word vectors and the graph category corresponding to the preset knowledge graph to obtain each first entity keyword; Based on each of the first entity keywords, a preset neural network of the target data extraction model is used to extract relationship attributes to obtain each of the first relationship attribute keywords; An array is constructed based on each of the first entity keywords and each of the first relationship attribute keywords to obtain triple incremental data for incrementally updating the preset knowledge graph.

6. The method according to claim 4, characterized in that The method of extracting data from the business text data using the target data extraction mode to obtain triple incremental data for incrementally updating the preset knowledge graph also includes: When the target data extraction mode is to extract data by using a target preset rule extraction method, each of the preset second relationship attribute keywords in the business text data is located based on a preset regular expression and each of the preset second relationship attribute keywords to obtain a first position corresponding to each of the preset second relationship attribute keywords; Perform neighborhood keyword positioning based on each of the preset second relationship attribute keywords to obtain a second entity keyword corresponding to each of the preset second relationship attribute keywords and a second position corresponding to each of the second entity keywords; An array is constructed based on each of the second entity keywords and each of the preset second relationship attribute keywords to obtain triple incremental data for incrementally updating the preset knowledge graph.

7. The method according to claim 1, characterized in that The updating of the to-be-updated knowledge graph based on the triple incremental data to obtain a target knowledge graph specifically includes: Based on each historical entity keyword in the knowledge graph to be updated, the entity keywords in each triple incremental data are screened to obtain each entity keyword to be merged and each entity keyword to be added; The knowledge graph to be updated is updated based on each entity keyword to be fused and the triplet incremental data corresponding to each entity keyword to be fused to obtain a current knowledge graph; The current knowledge graph is updated based on each of the entity keywords to be added and the triplet incremental data corresponding to each of the entity keywords to be added to obtain a target knowledge graph.

8. A knowledge graph updating device, characterized in that: include: A first data extraction module is used to extract data from a preset database based on a preset keyword set corresponding to the knowledge graph to be updated and using a preset data identification rule corresponding to the graph category of the knowledge graph to be updated to obtain business text data corresponding to the knowledge graph to be updated; A pattern matching module, used to screen each data extraction pattern based on the graph category of the knowledge graph to be updated, and obtain a target data extraction pattern for incremental data extraction; A second data extraction module is used to extract data from the business text data using the target data extraction mode to obtain triple incremental data for incrementally updating the knowledge graph to be updated; An updating module is used to update the knowledge graph to be updated based on the triple incremental data to obtain a target knowledge graph.

9. A storage medium, characterized in that: The storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the knowledge graph updating method described in any one of claims 1 to 7 are implemented.

10. An electronic device, characterized in that: The method at least comprises a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the knowledge graph updating method according to any one of claims 1 to 7 when executing the computer program on the memory.

Citation Information

Patent Citations

  • Method for constructing knowledge map of traditional Chinese medicine (TCM) theoretical books and records

    CN109190113A

  • Subdivided field public opinion monitoring method and device, computer equipment and storage medium

    CN110134844A

  • Knowledge graph updating method and device, electronic equipment and storage medium

    CN110275894A

Cited By

  • Atlas construction method and device, electronic equipment and computer readable medium

    CN120218219A

  • Updating method and device of photovoltaic energy storage knowledge graph, equipment and storage medium

    CN121436124A

  • Dynamic updating method and system for industrial production

    CN121614619A