Knowledge graph fusion method and device, and electronic device
By retrieving and sending the knowledge graph of the target entity from multiple knowledge graph databases, and combining a synonym entity database and an entity recognition model, the problem of low efficiency in knowledge graph generation in the energy field is solved, and efficient and accurate knowledge graph generation is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- STATE POWER INVESTMENT GRP XIONGAN ENERGY CO LTD
- Filing Date
- 2022-03-31
- Publication Date
- 2026-06-16
AI Technical Summary
When building knowledge graphs in the energy sector, existing technologies require searching for specific entity names within a massive overall knowledge graph, resulting in low generation efficiency.
By receiving knowledge graph retrieval requests from clients, the system retrieves the knowledge graphs corresponding to the target entities from multiple knowledge graph libraries, sends them to the client for processing, generates the target knowledge graph, updates associated entities using a synonym entity library, and improves accuracy using an entity recognition model.
This reduces the amount of data to be processed, saves time, and improves the efficiency and accuracy of knowledge graph generation.
Smart Images

Figure CN116932768B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of computer technology, and more particularly to a method, apparatus, and electronic device for knowledge graph fusion. Background Technology
[0002] Typically, there are many specialized terms in the energy field, and different systems may have different understandings of the same term. Therefore, when constructing a knowledge graph in the energy field, a large amount of energy corpus is usually collected first, and then analyzed and organized to obtain the overall knowledge graph.
[0003] In related technologies, if you want to find the knowledge graph corresponding to a certain entity name, you need to search in the total knowledge graph with a huge amount of data, which takes a long time and makes the generation efficiency of knowledge graphs low.
[0004] Therefore, improving the efficiency of knowledge graph generation has become an urgent problem to be solved. Summary of the Invention
[0005] This disclosure provides a method, apparatus, and electronic device for knowledge graph fusion.
[0006] According to one aspect of this disclosure, a knowledge graph fusion method is provided, comprising:
[0007] Receive a knowledge graph retrieval request sent by a client, wherein the request contains the target entity to be queried;
[0008] Based on the target entity, a search is performed in each knowledge graph database to obtain the knowledge graph corresponding to the target entity in each knowledge graph database;
[0009] Each of the knowledge graphs is sent to the client so that the client processes each knowledge graph to generate a target knowledge graph.
[0010] Optionally, the step of searching in each knowledge graph database based on the target entity to obtain the knowledge graph corresponding to the target entity in each knowledge graph database includes:
[0011] Determine the location of each target entity in the knowledge graph database;
[0012] The target entity, its adjacent associated entities, and the attribute information between each target entity and each associated entity in each knowledge graph library are extracted to generate a knowledge graph corresponding to the target entity in each knowledge graph library.
[0013] Optionally, before sending each of the knowledge graphs to the client, the method further includes:
[0014] Based on each of the associated entities, a search is performed in a preset synonym entity library to determine whether there are synonymous associated entities in the knowledge graph;
[0015] If there are synonymous related entities in the knowledge graph, the multiple related entities are replaced with the corresponding reference entities.
[0016] Optional, also includes:
[0017] Using a trained entity recognition model, information from each knowledge source is processed to determine the first entity in each knowledge source;
[0018] Determine the first matching degree between any entity and each of the first entities;
[0019] Based on the first matching degree, determine the synonym entity corresponding to any entity;
[0020] Each entity and its corresponding synonym are associated and stored in a preset synonym library.
[0021] Optionally, before processing the information in each knowledge source using the trained entity recognition model to determine the first entity in each knowledge source, the method further includes:
[0022] Obtain an energy-related dataset, wherein the dataset includes multiple reference texts and multiple reference entities corresponding to each reference text;
[0023] Each of the reference texts is input into the initial model to determine the predicted entity corresponding to each of the reference texts;
[0024] The loss value is determined based on the second matching degree between the predicted entity and the reference entity;
[0025] Based on the loss value, the initial model is modified to generate the entity recognition model.
[0026] According to another aspect of this disclosure, a knowledge graph fusion method is provided, comprising:
[0027] Send a knowledge graph retrieval request to the server, wherein the request contains the target entity to be queried;
[0028] Receive the knowledge graphs corresponding to the target entities in each knowledge graph database;
[0029] Based on the associated entities in each of the knowledge graphs and the target entity, the knowledge graphs are fused to generate a target knowledge graph;
[0030] Display the target knowledge graph on the display interface.
[0031] Optionally, the step of fusing the knowledge graphs based on the associated entities in each knowledge graph and the target entity to generate a target knowledge graph includes:
[0032] Identify the associated entities in each of the knowledge graphs;
[0033] If any associated entity appears multiple times, the associated entity and its corresponding attribute information will be recorded once in the target knowledge graph.
[0034] Optional, also includes:
[0035] In response to the selected operation for any entity in the target knowledge graph, the information of that entity is enlarged and displayed.
[0036] Optional, also includes:
[0037] In response to a click operation on the delete control associated with any entity in the target knowledge graph, a pop-up window displays a delete confirmation message;
[0038] In response to a click operation on any control of the pop-up window, the target knowledge graph is processed according to the processing method corresponding to the control.
[0039] According to another aspect of this disclosure, a knowledge graph fusion method is provided, comprising:
[0040] The receiving module is used to receive a knowledge graph retrieval request sent by the client, wherein the request contains the target entity to be queried;
[0041] The processing module is used to perform a search in each knowledge graph library based on the target entity to obtain the knowledge graph corresponding to the target entity in each knowledge graph library;
[0042] The sending module is used to send each of the knowledge graphs to the client, so that the client can process each of the knowledge graphs to generate a target knowledge graph.
[0043] Optionally, the processing module is specifically used for:
[0044] Determine the location of each target entity in the knowledge graph database;
[0045] The target entity, its adjacent associated entities, and the attribute information between each target entity and each associated entity in each knowledge graph library are extracted to generate a knowledge graph corresponding to the target entity in each knowledge graph library.
[0046] Optionally, the processing module is further configured to:
[0047] Based on each of the associated entities, a search is performed in a preset synonym entity library to determine whether there are synonymous associated entities in the knowledge graph;
[0048] If there are synonymous related entities in the knowledge graph, the multiple related entities are replaced with the corresponding reference entities.
[0049] Optionally, the processing module is further configured to:
[0050] Using a trained entity recognition model, information from each knowledge source is processed to determine the first entity in each knowledge source;
[0051] Determine the first matching degree between any entity and each of the first entities;
[0052] Based on the first matching degree, determine the synonym entity corresponding to any entity;
[0053] Each entity and its corresponding synonym are associated and stored in a preset synonym library.
[0054] Optionally, the processing module is further configured to:
[0055] Obtain an energy-related dataset, wherein the dataset includes multiple reference texts and multiple reference entities corresponding to each reference text;
[0056] Each of the reference texts is input into the initial model to determine the predicted entity corresponding to each of the reference texts;
[0057] The loss value is determined based on the second matching degree between the predicted entity and the reference entity;
[0058] Based on the loss value, the initial model is modified to generate the entity recognition model.
[0059] According to another aspect of this disclosure, a knowledge graph fusion method is provided, comprising:
[0060] The sending module is used to send a knowledge graph retrieval request to the server, wherein the request contains the target entity to be queried;
[0061] The receiving module is used to receive the knowledge graphs corresponding to the target entities in each knowledge graph database;
[0062] A generation module is used to fuse the knowledge graphs based on the associated entities in each knowledge graph and the target entity to generate a target knowledge graph.
[0063] The display module is used to show the target knowledge graph on the display interface.
[0064] Optionally, the generation module is specifically used for:
[0065] Identify the associated entities in each of the knowledge graphs;
[0066] If any associated entity appears multiple times, the associated entity and its corresponding attribute information will be recorded once in the target knowledge graph.
[0067] Optionally, the display module is further used for:
[0068] In response to the selected operation for any entity in the target knowledge graph, the information of that entity is enlarged and displayed.
[0069] Optionally, the display module is further used for:
[0070] In response to a click operation on the delete control associated with any entity in the target knowledge graph, a pop-up window displays a delete confirmation message;
[0071] In response to a click operation on any control of the pop-up window, the target knowledge graph is processed according to the processing method corresponding to the control.
[0072] According to another aspect of this disclosure, an electronic device is provided, comprising:
[0073] processor;
[0074] Memory used to store the processor's executable instructions;
[0075] The processor is configured to execute the instructions to implement the method as described in the first aspect embodiment.
[0076] According to another aspect of this disclosure, a computer-readable storage medium is provided that, when instructions in the computer-readable storage medium are executed by a processor of an electronic device, enables the electronic device to perform the method described in one aspect of the above-described embodiment.
[0077] According to another aspect of this disclosure, a computer program product is provided, including a computer program that, when executed by a processor, implements the method described in one of the above embodiments.
[0078] The knowledge graph fusion method, apparatus, and electronic device provided in the embodiments of this disclosure can first receive a knowledge graph acquisition request sent by a client, wherein the request contains a target entity to be queried. Then, based on the target entity, a search is performed in each knowledge graph database to obtain the knowledge graph corresponding to the target entity in each database. Each knowledge graph can then be sent to the client so that the client can process each knowledge graph to generate a target knowledge graph. Therefore, by searching in multiple knowledge graph databases to obtain the knowledge graphs corresponding to the target entity respectively, and then sending multiple knowledge graphs to the client to generate the target knowledge graph, there is no need to fuse multiple knowledge graph databases, reducing the amount of data to be processed, thereby improving the efficiency of knowledge graph acquisition and saving time.
[0079] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit this disclosure. Attached Figure Description
[0080] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this disclosure and, together with the description, serve to explain the principles of this disclosure, and are not intended to unduly limit this disclosure.
[0081] Figure 1 A flowchart illustrating a knowledge graph fusion method provided in one embodiment of this disclosure;
[0082] Figure 1A A schematic diagram of a knowledge graph provided in one embodiment of this disclosure;
[0083] Figure 2 A flowchart illustrating a knowledge graph fusion method provided in one embodiment of this disclosure;
[0084] Figure 2A A schematic diagram of a knowledge graph database provided in one embodiment of this disclosure;
[0085] Figure 2B A schematic diagram of a knowledge graph provided in one embodiment of this disclosure;
[0086] Figure 2C A schematic diagram of a knowledge graph provided in one embodiment of this disclosure;
[0087] Figure 3 A flowchart illustrating a knowledge graph fusion method provided in one embodiment of this disclosure;
[0088] Figure 4 A flowchart illustrating a knowledge graph fusion method provided in one embodiment of this disclosure;
[0089] Figure 4AThis is a schematic diagram illustrating a knowledge graph fusion process according to an embodiment of this disclosure;
[0090] Figure 5 A flowchart illustrating a knowledge graph fusion method provided in one embodiment of this disclosure;
[0091] Figure 6 A schematic diagram of the structure of a knowledge graph fusion device provided in an embodiment of this disclosure;
[0092] Figure 7 A schematic diagram of the structure of a knowledge graph fusion device provided in an embodiment of this disclosure;
[0093] Figure 8 A block diagram of an exemplary electronic device suitable for implementing embodiments of the present disclosure is shown. Detailed Implementation
[0094] To enable those skilled in the art to better understand the technical solutions of this disclosure, the technical solutions in the embodiments of this disclosure will be clearly and completely described below with reference to the accompanying drawings.
[0095] It should be noted that the terms "first," "second," etc., used in the specification, claims, and accompanying drawings of this disclosure are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this disclosure described herein can be implemented in orders other than those illustrated or described herein. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this disclosure. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this disclosure as detailed in the appended claims.
[0096] Figure 1 This is a flowchart of a knowledge graph fusion method provided in one embodiment of the present disclosure.
[0097] The knowledge graph fusion method of this disclosure can be executed by the knowledge graph fusion apparatus of this disclosure, which can be configured in an electronic device.
[0098] like Figure 1 As shown, the knowledge graph fusion method includes the following steps:
[0099] Step 101: Receive a knowledge graph retrieval request sent by the client, wherein the retrieval request contains the target entity to be queried.
[0100] The knowledge graph acquisition request can be any form of request information, such as voice or command, etc., and this disclosure does not limit it.
[0101] In addition, the target entity can represent the entity information to be queried. It can be included in the knowledge graph retrieval request, or the knowledge graph retrieval request can be sent first, and then the target entity to be queried can be sent, etc. This disclosure does not limit this.
[0102] For example, by analyzing and processing the received knowledge graph retrieval request and determining that it contains "gas turbine", the target entity to be queried can be determined to be "gas boiler". This disclosure does not limit this.
[0103] Step 102: Based on the target entity, perform a search in each knowledge graph database to obtain the knowledge graph corresponding to the target entity in each knowledge graph database.
[0104] In this context, the knowledge graph base is the counterpart to the knowledge source, which refers to the knowledge databases corresponding to different systems and frameworks.
[0105] Typically, the energy field contains numerous specialized terms, and different systems may interpret the same term differently. Therefore, when constructing an energy knowledge graph, a large amount of energy-related corpus is usually collected first, and then analyzed and organized to obtain a comprehensive knowledge graph. If you want to find the knowledge graph corresponding to a specific entity term, you need to search through the entire massive knowledge graph from beginning to end, which is time-consuming and results in low efficiency in knowledge graph generation.
[0106] In this embodiment of the disclosure, the content corresponding to different knowledge sources can be analyzed and processed to determine the knowledge graph library corresponding to each knowledge source. Thus, when querying a target entity, it is possible to search in multiple different knowledge graph libraries at the same time to obtain the knowledge graph corresponding to the target entity in each knowledge graph library, thereby saving time and improving efficiency.
[0107] Step 103: Send each knowledge graph to the client so that the client can process each knowledge graph to generate the target knowledge graph.
[0108] For example, by processing the received knowledge graph retrieval request, the target entity to be queried is determined to be: gas turbine. Then, searches can be performed in various knowledge graph databases to retrieve the knowledge graph corresponding to "gas turbine" from each database. For instance, knowledge graph 1 retrieved from knowledge graph database 1 and knowledge graph 2 retrieved from knowledge graph database 2 are... Figure 1A As shown, knowledge graph 1 and knowledge graph 2 can be sent to the client so that the client can merge the two to generate the target knowledge graph.
[0109] It should be noted that the above examples are merely illustrative and should not be construed as limiting the target entities, knowledge graph bases, knowledge graphs, etc., in the embodiments of this disclosure.
[0110] Therefore, in this embodiment of the disclosure, multiple knowledge graph libraries can be searched separately to obtain the knowledge graph corresponding to the target entity. Then, the multiple knowledge graphs are sent to the client to generate the target knowledge graph. This eliminates the need to merge multiple knowledge graph libraries, thereby saving time on complex fusion of multiple knowledge graph libraries, as well as saving on the investment of computing and storage resources. This reduces the amount of data to be processed and improves the efficiency of knowledge graph acquisition.
[0111] In this embodiment, a knowledge graph retrieval request is first received from a client. This request includes a target entity to be queried. Then, based on the target entity, a search is performed in each knowledge graph database to obtain the knowledge graph corresponding to the target entity in each database. Each knowledge graph is then sent to the client for processing to generate the target knowledge graph. Therefore, by retrieving knowledge graphs from multiple databases to obtain the target entity's corresponding knowledge graph, and then sending these multiple knowledge graphs to the client to generate the target knowledge graph, the need for merging multiple knowledge graph databases is eliminated, reducing the amount of data to be processed and thus improving the efficiency of knowledge graph retrieval and saving time.
[0112] Figure 2 This is a flowchart of a knowledge graph fusion method provided in one embodiment of the present disclosure.
[0113] like Figure 2 As shown, the knowledge graph fusion method includes the following steps:
[0114] Step 201: Receive a knowledge graph retrieval request sent by the client, wherein the request contains the target entity to be queried.
[0115] Step 202: Determine the location of the target entity in each knowledge graph.
[0116] It is understood that there may be a knowledge graph corresponding to the target entity in the knowledge graph database, or there may be no knowledge graph corresponding to the target entity. Therefore, in this embodiment of the disclosure, the position of the target entity in each knowledge graph database can be determined first.
[0117] For example, by processing the knowledge graph retrieval request and determining that the target entity to be queried is "gas turbine", it can be searched in each knowledge graph database to determine the position of "gas turbine" in each knowledge graph.
[0118] Alternatively, by processing the knowledge graph retrieval request and determining that the target entity to be queried is "wind turbine generator set", a search can be performed in each knowledge graph database to determine the position of "wind turbine generator set" in each knowledge graph.
[0119] It should be noted that the above examples are merely illustrative and should not be construed as limiting the target entities, etc., in the embodiments of this disclosure.
[0120] Step 203: Extract the target entity, the adjacent related entities of the target entity, and the attribute information between each target entity and each related entity in each knowledge graph library to generate the knowledge graph corresponding to the target entity in each knowledge graph library.
[0121] Among them, the associated entity can be an entity related to the target entity, that is, a "node" associated with the target entity; the target entity and the associated entity are connected by attribute information, that is, "edge" attributes. This disclosure does not limit this.
[0122] Understandably, after determining the location of the target entity in each knowledge graph repository, the content related to the target entity in each knowledge graph repository can be extracted. For example, after determining the location of the target entity in knowledge graph repository 1, the associated entities adjacent to the target entity and the attribute information between the target entity and its associated entities can be extracted, thereby generating a knowledge graph of the target entity in knowledge graph repository 1.
[0123] For example, in such Figure 2A In the knowledge graph database shown, the target entity is A. After determining the location of the target entity A, the associated entities B, C, and D adjacent to the target entity A, as well as the attribute information between A and B, A and C, and A and D, can be extracted to generate the knowledge graph corresponding to the target entity A. This knowledge graph can be used as follows: Figure 2B As shown.
[0124] It should be noted that the above examples are merely illustrative and should not be construed as limiting the knowledge graph library, target entity, associated entity, and knowledge graph in the embodiments of this disclosure.
[0125] Step 204: Based on each associated entity, search in the preset synonym entity library to determine whether there are synonymous associated entities in the knowledge graph.
[0126] Among them, the synonym entity library can be a pre-defined database that stores a large number of synonyms and synonym entities. It can be an entity library corresponding to terms in the energy field, or it can be an entity library corresponding to terms in other fields, etc. This disclosure does not limit it.
[0127] Understandably, after obtaining the knowledge graph corresponding to the target entity in each knowledge graph library, synonym lookup can be performed on the related entities in each knowledge graph to determine whether there are synonymous related entities with different expressions in multiple knowledge graphs corresponding to the target entity.
[0128] Step 205: If there are synonymous related entities in the knowledge graph, replace multiple related entities with the corresponding reference entities.
[0129] It is understandable that if we search for related entities in the knowledge graph corresponding to the target entity and find that there are synonymous related entities, we can replace these different related entities with the corresponding reference entities, so that the same entity with different expressions can have a consistent expression.
[0130] In cases where synonymous related entities exist in the knowledge graph, multiple related entities can be replaced with corresponding reference entities, thereby updating the knowledge graph and improving its accuracy and consistency.
[0131] For example, if the target entity "gas turbine" corresponds to two knowledge graphs, such as Figure 2C As shown, the related entities "combustion chamber," "thermal power," "compressor," and "turbine" in Knowledge Graph 1, and "gas turbine," "thermal power generation," "continuous flow," and "thermal engine" in Knowledge Graph 2, can be searched in the thesaurus. For example, if the search finds that "thermal power" in Knowledge Graph 1 and "thermal power generation" in Knowledge Graph 2 are different expressions of the same meaning, they can be updated to make the expressions consistent. For example, "thermal power" in Knowledge Graph 1 can be updated to "thermal power generation," or "thermal power generation" in Knowledge Graph 2 can be updated to "thermal power," and so on.
[0132] It should be noted that the above examples are merely illustrative and should not be construed as limiting the target entities, associated entities, and knowledge graphs in the embodiments of this disclosure.
[0133] Step 206: Send each knowledge graph to the client so that the client can process each knowledge graph to generate the target knowledge graph.
[0134] Understandably, when synonymous entities exist within a knowledge graph, these related entities can be replaced with a unified entity. For example, they could be replaced with a reference entity, or any one of the related entities, thus updating the knowledge graph. The updated knowledge graph, along with other knowledge graphs that do not involve synonymous entities, can then be sent to the client, allowing the client to process each knowledge graph and generate the target knowledge graph.
[0135] For example, the target entity may correspond to multiple knowledge graphs, namely Knowledge Graph 1, Knowledge Graph 2, and Knowledge Graph 3. The term "firepower" in Knowledge Graph 1 and "thermal power generation" in Knowledge Graph 2 are synonymous entities. Therefore, "firepower" in Knowledge Graph 1 can be replaced with "thermal power generation," and the updated Knowledge Graphs 1, 2, and 3 can be sent to the client, etc. This disclosure does not limit the scope of the work.
[0136] In this embodiment, a knowledge graph retrieval request is first received from a client. The request includes the target entity to be queried. Then, the location of the target entity in each knowledge graph library is determined. The target entity, its adjacent related entities, and the attribute information between each target entity and its related entities are extracted to generate a knowledge graph corresponding to the target entity in each knowledge graph library. Next, based on each related entity, a pre-defined synonym entity library is searched to determine if synonymous related entities exist in the knowledge graph. If synonymous related entities exist, multiple related entities are replaced with corresponding reference entities. Each knowledge graph is then sent to the client for processing to generate the target knowledge graph. Therefore, after obtaining the corresponding knowledge graph from multiple knowledge graph libraries based on the target entity, the related entities in each knowledge graph can be compared using the synonym entity library to update each knowledge graph, ensuring consistency and reliability. This not only improves the accuracy of the knowledge graph but also increases the efficiency of knowledge graph retrieval, saving time.
[0137] Figure 3 This is a flowchart of a knowledge graph fusion method provided in one embodiment of the present disclosure.
[0138] like Figure 3 As shown, the knowledge graph fusion method includes the following steps:
[0139] Step 301: Using the trained entity recognition model, process the information in each knowledge source to determine the first entity in each knowledge source.
[0140] The entity recognition model can be a pre-trained model. By inputting information from the knowledge source into the entity recognition model, the first entity in the knowledge source can be determined. This disclosure does not limit this aspect.
[0141] Understandably, the initial model can be trained based on the acquired energy domain dataset to generate an entity recognition model.
[0142] Optionally, an energy-related dataset can be acquired first. This dataset includes multiple reference texts and multiple reference entities corresponding to each reference text. Each reference text is then input into an initial model to determine the predicted entity for each reference text. Subsequently, a loss value can be determined based on the second matching degree between the predicted entity and the reference entities. Based on this loss value, the initial model is then refined to generate an entity recognition model.
[0143] In the energy domain dataset, reference texts and the corresponding reference entities for each reference text can be included.
[0144] In addition, reference texts can be generated by processing equipment manufacturer data, video images, operating procedures, production management system data, books, electronic documents, etc., and this disclosure does not limit this.
[0145] It is understandable that the reference texts in the energy domain dataset can be manually annotated first to obtain the reference entities corresponding to each reference text. This disclosure does not limit this.
[0146] In addition, the initial model can be a pre-set model. By inputting reference text into the initial model, the predicted entities contained in the reference text can be determined.
[0147] The entity prediction involves inputting reference text into an initial model, processing it, and then determining the entity information contained in the reference text. This disclosure does not limit this aspect.
[0148] In addition, the predicted entity corresponding to the reference text can be matched with the reference entity to determine the second matching degree between them. Then, the loss value of the initial model can be determined based on the second matching degree between them.
[0149] Understandably, the greater the second degree of matching between the predicted entity corresponding to the reference text and the reference entity, the greater the loss value; the smaller the second degree of matching between the two, the smaller the loss value.
[0150] In addition, there are several ways to determine the matching degree between the predicted entity and the reference entity. For example, it can be determined using the cosine distance formula, the Euclidean distance formula, the Manhattan distance formula, etc., and this disclosure does not limit this method.
[0151] For example, if the reference entities corresponding to reference text 1 are a1, b1, and c1, and this reference text 1 is input into the initial model, after processing by the initial model, the predicted entities corresponding to reference text 1 are determined to be a2, b2, and c2. Then, the second matching degree 1 between a1 and a2, the second matching degree 2 between b1 and b2, and the second matching degree 3 between c1 and c2 can be determined respectively. Finally, the loss value can be determined based on the second matching degree 1, second matching degree 2, and second matching degree 3.
[0152] It should be noted that the above examples are merely illustrative and should not be construed as limiting the reference entity, predicted entity, second matching degree, and predicted value in the embodiments of this disclosure.
[0153] Step 302: Determine the first matching degree between any entity and each first entity.
[0154] The first matching degree between any entity and each first entity can be determined using any acceptable method. For example, any entity can be matched with each first entity in each knowledge source separately to determine the first matching degree between them, and so on. This disclosure does not limit this.
[0155] Step 303: Based on the first matching degree, determine the synonym entity corresponding to any entity.
[0156] It is understandable that a threshold can be pre-set, and for any given entity, the first entity with a first matching degree greater than the threshold can be identified as a synonym entity. Alternatively, the top N first entities with the highest first matching degree can be identified as synonym entities corresponding to any given entity, and so on. This disclosure does not limit this.
[0157] Step 304: Store any entity and its corresponding synonym entity in a pre-defined synonym entity library.
[0158] For example, if the threshold is set to 'a', and the first matching degree between any entity and the first entity 1 is a1, the first matching degree between any entity and the first entity 2 is a2, and the first matching degree between any entity and the first entity 3 is a3, where a1 and a2 are greater than a, then any entity, the first entity 1, and the first entity 2 can be determined to be synonymous entities, and any entity, the first entity 1, and the first entity 2 can be associated and stored in the same preset entity library.
[0159] It should be noted that the above examples are merely illustrative and should not be construed as limiting any entity, synonym, or other entity in the embodiments of this disclosure.
[0160] In this embodiment, a trained entity recognition model is first used to process the information in each knowledge source to determine the first entity in each knowledge source. Then, a first matching degree between any entity and each first entity is determined. Based on the first matching degree, a synonym entity corresponding to any entity is determined. Finally, any entity and its corresponding synonym entity are associated and stored in a preset synonym entity library. Thus, by using an entity recognition model to process the information in the knowledge source, synonym entities can be determined. After obtaining the knowledge graph, the synonym entity library can be used to update the knowledge graph to ensure its accuracy and reliability.
[0161] Figure 4 This is a flowchart of a knowledge graph fusion method provided in one embodiment of the present disclosure.
[0162] like Figure 4 As shown, the knowledge graph fusion method includes the following steps:
[0163] Step 401: Send a knowledge graph retrieval request to the server, wherein the request contains the target entity to be queried.
[0164] When you want to query information about a certain entity, you can send a knowledge graph retrieval request to the server so that the server can know the target entity to be queried based on the received knowledge graph retrieval request.
[0165] Step 402: Receive the knowledge graphs corresponding to the target entities in each knowledge graph database.
[0166] It is understandable that by sending a knowledge graph retrieval request to the server, the server can search in various knowledge graph libraries based on the target entity contained in the request, so as to obtain the knowledge graph corresponding to the target entity in each knowledge graph library, and then send the knowledge graph corresponding to the target entity to the client.
[0167] The client can use any acceptable method to receive the knowledge graph corresponding to the target entity from various knowledge graph libraries. This disclosure does not impose any restrictions on this.
[0168] Step 403: Based on the associated entities and target entities in each knowledge graph, merge the knowledge graphs to generate the target knowledge graph.
[0169] This involves adding related entities from multiple knowledge graphs to any one of them, which then becomes the target knowledge graph. Alternatively, related entities from various knowledge graphs can be added to a new knowledge graph, which also becomes the target knowledge graph.
[0170] Optionally, you can first determine the associated entities in each knowledge graph, and then, if any associated entity appears multiple times, record each associated entity and its corresponding attribute information once in the target knowledge graph.
[0171] For example, if the knowledge graph 1 corresponding to the target entity contains the related entity "thermal power generation", and the knowledge graph 2 also contains the related entity "thermal power generation", and the attribute information between the related entity "thermal power generation" and the target entity is "industry", then it can be determined that "thermal power generation" appears repeatedly, so "industry: thermal power generation" can be recorded only once.
[0172] It should be noted that the above examples are merely illustrative and should not be construed as limiting the knowledge graph, associated entities, and attribute information corresponding to the target entity in the embodiments of this disclosure.
[0173] Step 404: Display the target knowledge graph on the display interface.
[0174] There are several ways to display the target knowledge graph on the display interface. For example, the background color of the target entity in the target knowledge graph can be set to a light color, the background color of the associated entity can be set to a dark color, and the font color of the attribute information between the target entity and the associated entity can be set to black or red, etc. This disclosure does not limit this.
[0175] For example, in such Figure 4A In the diagram, after receiving a knowledge graph retrieval request, the server can retrieve the corresponding knowledge graph from the knowledge graph library of each knowledge source based on the target entity to be queried. Then, it can send each knowledge graph to the client. Upon receiving the knowledge graph from the server, the client can merge the multiple knowledge graphs based on the associated entities and attribute information in each knowledge graph to generate the target knowledge graph, which is then displayed on the display page. This eliminates the need to merge multiple knowledge graph libraries, saving time on complex fusion processes and reducing computational and storage resources, thereby decreasing the amount of data to be processed and improving the efficiency of knowledge graph retrieval.
[0176] It should be noted that the above examples are merely illustrative and should not be construed as limiting the knowledge graph acquisition process or other aspects of the embodiments of this disclosure.
[0177] In this embodiment, a knowledge graph retrieval request can be sent to the server first. This request includes the target entity to be queried. Then, the knowledge graphs corresponding to the target entity from various knowledge graph libraries can be received. Based on the associated entities and the target entity in each knowledge graph, the knowledge graphs are merged to generate the target knowledge graph, which can then be displayed on the interface. Therefore, by merging the knowledge graphs from different knowledge graph libraries corresponding to the target entity, the target knowledge graph corresponding to that entity can be determined. This eliminates the need to search through a massive knowledge graph library from beginning to end, and avoids complex fusion of multiple knowledge graph libraries, thus saving time and improving efficiency.
[0178] Figure 5 This is a flowchart of a knowledge graph fusion method provided in one embodiment of the present disclosure.
[0179] like Figure 5 As shown, the knowledge graph fusion method includes the following steps:
[0180] Step 501: Send a knowledge graph retrieval request to the server, wherein the request contains the target entity to be queried.
[0181] Step 502: Receive the knowledge graphs corresponding to the target entities in each knowledge graph database.
[0182] Step 503: Based on the associated entities and target entities in each knowledge graph, merge the knowledge graphs to generate the target knowledge graph.
[0183] Step 504: Display the target knowledge graph on the display interface.
[0184] It should be noted that the specific content and implementation of steps 501 to 504 can be found in the descriptions of other embodiments of this disclosure, and will not be repeated here.
[0185] Step 505: In response to the click operation of the delete control associated with any entity in the target knowledge graph, a pop-up window displays a delete confirmation message.
[0186] Step 506: In response to the click operation of any control in the obtained pop-up window, process the target knowledge graph according to the processing method corresponding to any control.
[0187] Optionally, the display interface may also include a "delete" control, which allows users to delete entity information associated with the control by clicking it.
[0188] For example, upon detecting a click on the delete control associated with entity 1, a pop-up window can display a message asking "Are you sure you want to delete this content?" The pop-up window can also include "OK" and "Cancel" controls.
[0189] Controls. When the "OK" control on the pop-up window is selected, entity 1 can be deleted. Alternatively, if the "Cancel" control is selected, the deletion of entity 1 will be canceled. Alternatively, the pop-up window can also contain a "Close" control; when the "Close" control is selected, the user can exit the current pop-up window.
[0190] It should be noted that the above examples are merely illustrative and should not be construed as limiting the display interface, pop-up interface, prompts, and controls in the embodiments of this disclosure.
[0191] Optionally, in response to a selection operation on any entity in the target knowledge graph, the information of any entity can be enlarged and displayed.
[0192] The selection operation for any entity can be a click operation, a swipe operation, etc., and this disclosure does not limit it.
[0193] Understandably, once any entity in the target knowledge graph is selected, its information can be magnified and displayed. For example, the entity could be magnified and displayed in a floating layer. Alternatively, when an entity is selected, its corresponding background color could turn gray and its text could become brighter. This disclosure does not impose any limitations on this.
[0194] Optionally, the target knowledge graph can also be modified based on touch operations. For example, long-pressing a specific entity in the target knowledge graph on the display interface can prompt a "Delete?" message. Alternatively, tapping a specific entity selects it. Furthermore, text editing can be performed on corresponding controls within the target knowledge graph, such as modifying attribute information; this disclosure does not limit this approach.
[0195] Therefore, in this embodiment of the present disclosure, after the target knowledge graph is displayed on the display interface, the target knowledge graph can be added, deleted, or modified according to the received touch operation, which is convenient for user operation and saves time.
[0196] In this embodiment, a knowledge graph retrieval request can be sent to the server first, containing the target entity to be queried. Then, the knowledge graphs corresponding to the target entity in various knowledge graph libraries can be received. Based on the associated entities and the target entity in each knowledge graph, the knowledge graphs are merged to generate a target knowledge graph. This target knowledge graph can then be displayed on a screen. In response to a click operation on a delete control associated with any entity in the target knowledge graph, a delete confirmation message is displayed in a pop-up window. In response to a click operation on any control in the pop-up window, the target knowledge graph is processed according to the processing method corresponding to that control. Therefore, after the target knowledge graph is displayed on the screen, it can be modified based on received operations, thus facilitating user operation, saving time, and improving efficiency.
[0197] Figure 6 This is a schematic diagram of the structure of a knowledge graph fusion device provided in one embodiment of the present disclosure.
[0198] Reference Figure 6 The knowledge graph fusion device 600 includes: a receiving module 610, a processing module 620, and a sending module 630.
[0199] The receiving module 610 is used to receive a knowledge graph acquisition request sent by the client, wherein the request contains the target entity to be queried.
[0200] The processing module 620 is used to perform a search in each knowledge graph library based on the target entity to obtain the knowledge graph corresponding to the target entity in each knowledge graph library.
[0201] The sending module 630 is used to send each of the knowledge graphs to the client so that the client can process each of the knowledge graphs to generate a target knowledge graph.
[0202] Optionally, the processing module 620 is specifically used for:
[0203] Determine the location of each target entity in the knowledge graph database;
[0204] The target entity, its adjacent associated entities, and the attribute information between each target entity and each associated entity in each knowledge graph library are extracted to generate a knowledge graph corresponding to the target entity in each knowledge graph library.
[0205] Optionally, the processing module 620 is further configured to:
[0206] Based on each of the associated entities, a search is performed in a preset synonym entity library to determine whether there are synonymous associated entities in the knowledge graph;
[0207] If there are synonymous related entities in the knowledge graph, the multiple related entities are replaced with the corresponding reference entities.
[0208] Optionally, the processing module 620 is further configured to:
[0209] Using a trained entity recognition model, information from each knowledge source is processed to determine the first entity in each knowledge source;
[0210] Determine the first matching degree between any entity and each of the first entities;
[0211] Based on the first matching degree, determine the synonym entity corresponding to any entity;
[0212] Each entity and its corresponding synonym are associated and stored in a preset synonym library.
[0213] Optionally, the processing module 620 is further configured to:
[0214] Obtain an energy-related dataset, wherein the dataset includes multiple reference texts and multiple reference entities corresponding to each reference text;
[0215] Each of the reference texts is input into the initial model to determine the predicted entity corresponding to each of the reference texts;
[0216] The loss value is determined based on the second matching degree between the predicted entity and the reference entity;
[0217] Based on the loss value, the initial model is modified to generate the entity recognition model.
[0218] Regarding the apparatus in the above embodiments, the specific manner in which each module performs its operation has been described in detail in the embodiments related to the method, and will not be elaborated upon here.
[0219] The knowledge graph fusion apparatus of this disclosure first receives a knowledge graph acquisition request sent by a client, wherein the request contains a target entity to be queried. Then, based on the target entity, it searches in each knowledge graph database to obtain the knowledge graph corresponding to the target entity in each database. Each knowledge graph is then sent to the client so that the client can process each knowledge graph to generate a target knowledge graph. Therefore, by searching in multiple knowledge graph databases to obtain the knowledge graphs corresponding to the target entity respectively, and then sending multiple knowledge graphs to the client to generate the target knowledge graph, there is no need to fuse multiple knowledge graph databases, reducing the amount of data to be processed, thereby improving the efficiency of knowledge graph acquisition and saving time.
[0220] Figure 7 This is a schematic diagram of the structure of a knowledge graph fusion device provided in one embodiment of the present disclosure.
[0221] Reference Figure 7 The knowledge graph fusion device 700 includes: a sending module 710, a receiving module 720, a generating module 730, and a display module 740.
[0222] The sending module 710 is used to send a knowledge graph retrieval request to the server, wherein the request contains the target entity to be queried.
[0223] The receiving module 720 is used to receive the knowledge graphs corresponding to the target entities in each knowledge graph database.
[0224] The generation module 730 is used to merge the knowledge graphs based on the associated entities in each knowledge graph and the target entity to generate a target knowledge graph.
[0225] The display module 740 is used to display the target knowledge graph on the display interface.
[0226] Optionally, the generation module 730 is specifically used for:
[0227] Identify the associated entities in each of the knowledge graphs;
[0228] If any associated entity appears multiple times, the associated entity and its corresponding attribute information will be recorded once in the target knowledge graph.
[0229] Optionally, the display module 740 is further configured to:
[0230] In response to the selected operation for any entity in the target knowledge graph, the information of that entity is enlarged and displayed.
[0231] Optionally, the display module 740 is further configured to:
[0232] In response to a click operation on the delete control associated with any entity in the target knowledge graph, a pop-up window displays a delete confirmation message;
[0233] In response to a click operation on any control of the pop-up window, the target knowledge graph is processed according to the processing method corresponding to the control.
[0234] Regarding the apparatus in the above embodiments, the specific manner in which each module performs its operation has been described in detail in the embodiments related to the method, and will not be elaborated upon here.
[0235] The knowledge graph fusion apparatus of this disclosure first sends a knowledge graph retrieval request to a server, wherein the request includes the target entity to be queried. Then, it receives the knowledge graphs corresponding to the target entity from various knowledge graph libraries. Based on the associated entities and the target entity in each knowledge graph, the knowledge graphs are fused to generate a target knowledge graph, which can then be displayed on a display interface. Thus, by fusing the knowledge graphs from different knowledge graph libraries corresponding to the target entity, the target knowledge graph corresponding to the target entity can be determined. This eliminates the need to search through a massive knowledge graph library from beginning to end, and avoids complex fusion of multiple knowledge graph libraries, thereby improving efficiency and saving time.
[0236] To implement the above embodiments, this disclosure also proposes an electronic device, including: a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, it implements the knowledge graph fusion method proposed in the foregoing embodiments of this disclosure.
[0237] To implement the above embodiments, this disclosure also proposes a non-transitory computer-readable storage medium storing a computer program, which, when executed by a processor, implements the knowledge graph fusion method proposed in the foregoing embodiments of this disclosure.
[0238] To implement the above embodiments, this disclosure also proposes a computer program product that, when the instruction processor in the computer program product is executed, performs the knowledge graph fusion method as proposed in the foregoing embodiments of this disclosure.
[0239] Figure 8 A block diagram of an exemplary electronic device suitable for implementing embodiments of the present disclosure is shown. Figure 8 The electronic device 12 shown is merely an example and should not impose any limitation on the functionality and scope of use of the embodiments disclosed herein.
[0240] like Figure 8As shown, the electronic device 12 is represented in the form of a general-purpose computing device. The components of the electronic device 12 may include, but are not limited to: one or more processors or processing units 16, system memory 28, and bus 18 connecting different system components (including system memory 28 and processing unit 16).
[0241] Bus 18 represents one or more of several bus architectures, including a memory bus or memory controller, a peripheral bus, a graphics acceleration port, a processor, or a local bus using any of the various bus architectures. Examples of these architectures include, but are not limited to, the Industry Standard Architecture (ISA) bus, the Micro Channel Architecture (MAC) bus, the Enhanced ISA bus, the Video Electronics Standards Association (VESA) local bus, and the Peripheral Component Interconnect (PCI) bus.
[0242] Electronic device 12 typically includes a variety of computer system readable media. These media can be any available media that can be accessed by electronic device 12, including volatile and non-volatile media, removable and non-removable media.
[0243] Memory 28 may include computer system readable media in the form of volatile memory, such as Random Access Memory (RAM) 30 and / or cache memory 32. Electronic device 12 may further include other removable / non-removable, volatile / non-volatile computer system storage media. By way of example only, storage system 34 may be used to read and write non-removable, non-volatile magnetic media (… Figure 8 Not shown; usually referred to as a "hard drive"). Although Figure 8Not shown, a disk drive for reading and writing to a removable non-volatile disk (e.g., a "floppy disk") and an optical disc drive for reading and writing to a removable non-volatile optical disc (e.g., a compact disc read-only memory (CD-ROM), a digital video disc read-only memory (DVD-ROM), or other optical media) may be provided. In these cases, each drive may be connected to bus 18 via one or more data media interfaces. Memory 28 may include at least one program product having a set (e.g., at least one) of program modules configured to perform the functions of the embodiments of this disclosure.
[0244] A program / utility 40 having a set (at least one) of program modules 42 may be stored, for example, in memory 28. Such program modules 42 include, but are not limited to, an operating system, one or more application programs, other program modules, and program data. Each or some combination of these examples may include an implementation of a network environment. Program modules 42 typically perform the functions and / or methods described in the embodiments of this disclosure.
[0245] Electronic device 12 can also communicate with one or more external devices 14 (e.g., keyboard, pointing device, display 24, etc.), and with one or more devices that enable a user to interact with electronic device 12, and / or with any device that enables electronic device 12 to communicate with one or more other computing devices (e.g., network card, modem, etc.). This communication can be performed via input / output (I / O) interface 22. Furthermore, electronic device 12 can also communicate with one or more networks (e.g., local area network (LAN), wide area network (WAN), and / or public networks, such as the Internet) via network adapter 20. As shown, network adapter 20 communicates with other modules of electronic device 12 via bus 18. It should be understood that, although not shown in the figure, other hardware and / or software modules can be used in conjunction with electronic device 12, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.
[0246] The processing unit 16 executes various functional applications and data processing by running programs stored in the system memory 28, such as implementing the methods mentioned in the foregoing embodiments.
[0247] The technical solution disclosed herein can first receive a knowledge graph retrieval request sent by a client, wherein the request contains a target entity to be queried. Then, based on the target entity, a search is performed in each knowledge graph database to obtain the knowledge graph corresponding to the target entity in each database. Each knowledge graph can then be sent to the client for processing to generate the target knowledge graph. Therefore, by retrieving knowledge graphs corresponding to the target entity from multiple knowledge graph databases, and then sending multiple knowledge graphs to the client to generate the target knowledge graph, there is no need to merge multiple knowledge graph databases, reducing the amount of data to be processed, thereby improving the efficiency of knowledge graph retrieval and saving time.
[0248] In the description of this specification, the references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of this disclosure. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples. Moreover, without contradiction, those skilled in the art can combine and integrate the different embodiments or examples described in this specification, as well as the features of different embodiments or examples.
[0249] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of that feature. In the description of this disclosure, "a plurality of" means at least two, such as two, three, etc., unless otherwise explicitly specified.
[0250] Any process or method description in the flowchart or otherwise herein can be understood as representing a module, segment, or portion of code comprising one or more executable instructions for implementing custom logic functions or processes, and the scope of preferred embodiments of this disclosure includes additional implementations in which functions may be performed not in the order shown or discussed, including substantially simultaneously or in reverse order depending on the functions involved, as will be understood by those skilled in the art to which embodiments of this disclosure pertain.
[0251] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as a sequenced list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by, or in conjunction with, an instruction execution system, apparatus, or device (such as a computer-based system, a processor-including system, or other system that can fetch and execute instructions from, an instruction execution system, apparatus, or device). For the purposes of this specification, "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transmit programs for use by, or in conjunction with, an instruction execution system, apparatus, or device. More specific examples (a non-exhaustive list) of computer-readable media include: an electrical connection having one or more wires (electronic device), a portable computer disk drive (magnetic device), random access memory (RAM), read-only memory (ROM), erasable and programmable read-only memory (EPROM or flash memory), fiber optic devices, and portable optical disc read-only memory (CDROM). Alternatively, the computer-readable medium may be paper or other suitable media on which the program can be printed, since the program can be obtained electronically, for example, by optically scanning the paper or other medium, followed by editing, interpreting, or otherwise processing as necessary, and then stored in a computer memory.
[0252] It should be understood that various parts of this disclosure can be implemented using hardware, software, firmware, or a combination thereof. In the above embodiments, multiple steps or methods can be implemented using software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware as in another embodiment, it can be implemented using any one or a combination of the following techniques known in the art: discrete logic circuits having logic gates for implementing logical functions on data signals, application-specific integrated circuits (ASICs) having suitable combinational logic gates, programmable gate arrays (PGAs), field-programmable gate arrays (FPGAs), etc.
[0253] Those skilled in the art will understand that all or part of the steps of the methods in the above embodiments can be implemented by a program instructing related hardware. The program can be stored in a computer-readable storage medium, and when executed, the program includes one or a combination of the steps of the method embodiments.
[0254] Furthermore, the functional units in the various embodiments of this disclosure can be integrated into a processing module, or each unit can exist physically separately, or two or more units can be integrated into a module. The integrated module can be implemented in hardware or as a software functional module. If the integrated module is implemented as a software functional module and sold or used as an independent product, it can also be stored in a computer-readable storage medium.
[0255] The storage medium mentioned above can be a read-only memory, a disk, or an optical disk, etc. Although embodiments of the present disclosure have been shown and described above, it is to be understood that the above embodiments are exemplary and should not be construed as limiting the present disclosure. Those skilled in the art can make changes, modifications, substitutions, and variations to the above embodiments within the scope of the present disclosure.
Claims
1. A knowledge graph fusion method, characterized in that, include: Receive a knowledge graph retrieval request sent by a client, wherein the request contains the target entity to be queried; Based on the target entity, a search is performed in each knowledge graph library to obtain the knowledge graph corresponding to the target entity in each knowledge graph library. The knowledge graph library is relative to the knowledge source, and the knowledge source is the knowledge database corresponding to different systems and frameworks. Each of the knowledge graphs is sent to the client so that the client processes each knowledge graph to generate a target knowledge graph; The method further includes: Using a trained entity recognition model, information from each knowledge source is processed to determine the first entity in each knowledge source; Determine the first matching degree between any entity and each of the first entities; For any entity, the first entity with a first matching degree greater than a threshold is determined as a synonym of the entity, or the top N first entities with the largest first matching degree are determined as synonyms of the entity. Each entity and its corresponding synonym are associated and stored in a preset synonym entity library; Before sending each of the knowledge graphs to the client, the method further includes: For each associated entity, a search is performed in a pre-defined synonym entity library to determine whether there are synonymous associated entities in the knowledge graph. If there are synonymous related entities in the knowledge graph, the multiple related entities are replaced with the corresponding reference entities; The step of enabling the client to process each of the knowledge graphs to generate a target knowledge graph includes: Identify the associated entities in each of the knowledge graphs; If any associated entity appears multiple times, the associated entity and its corresponding attribute information will be recorded once in the target knowledge graph.
2. The method as described in claim 1, characterized in that, The step of retrieving the target entity in each knowledge graph database to obtain the knowledge graph corresponding to the target entity in each knowledge graph database includes: Determine the location of each target entity in the knowledge graph database; The target entity, its adjacent associated entities, and the attribute information between each target entity and each associated entity in each knowledge graph library are extracted to generate a knowledge graph corresponding to the target entity in each knowledge graph library.
3. The method as described in claim 2, characterized in that, Before processing the information in each knowledge source using the trained entity recognition model to determine the first entity in each knowledge source, the method further includes: Obtain an energy-related dataset, wherein the dataset includes multiple reference texts and multiple reference entities corresponding to each reference text; Each of the reference texts is input into the initial model to determine the predicted entity corresponding to each of the reference texts; The loss value is determined based on the second matching degree between the predicted entity and the reference entity; Based on the loss value, the initial model is modified to generate the entity recognition model.
4. A knowledge graph fusion device, characterized in that, The apparatus implements the method as described in claim 1, the apparatus comprising: The receiving module is used to receive a knowledge graph retrieval request sent by the client, wherein the request contains the target entity to be queried; The processing module is used to perform a search in each knowledge graph library based on the target entity to obtain the knowledge graph corresponding to the target entity in each knowledge graph library; The sending module is used to send each of the knowledge graphs to the client, so that the client can process each of the knowledge graphs to generate a target knowledge graph.
5. An electronic device, characterized in that, include: processor; Memory used to store the processor's executable instructions; The processor is configured to execute the instructions to implement the knowledge graph fusion method as described in any one of claims 1 to 3.