Method and device for automatically building graph entity associations in a knowledge base system

Through NLP-based entity and attribute extraction technology, graph entities are automatically constructed, which solves the problem of low graph construction efficiency, and realizes efficient integration of graphs and intelligent management of knowledge bases.

CN119294488BActive Publication Date: 2025-08-08CCTEG COAL MINING RES INST
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202411310963.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-09-19
Publication Date
2025-08-08
Estimated Expiration
2044-09-19

AI Technical Summary

Technical Problem

In the existing technology, the mapping construction efficiency is low, making it difficult to effectively integrate partially scattered data within coal mine enterprises, resulting in insufficient performance of knowledge base management and application system.

Method used

Using NLP-based entity and attribute extraction technology, new entities and new attributes are extracted from structured business data, combined with the existing attributes and associated object information of the knowledge graph, graph entities are automatically constructed, and automatic association of the graph is achieved through data acquisition, standardization processing, attribute matching and target object information acquisition.

Benefits of technology

Improves the efficiency and accuracy of graph construction, and improves the performance of knowledge base management and application systems.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119294488B_ABST
    Figure CN119294488B_ABST
Patent Text Reader

Abstract

The present application proposes a method and device for automatically building graph entities for a knowledge base system, wherein the method includes: obtaining original business data from a data center or a knowledge base collection system; standardizing the original business data to obtain structured business data; the knowledge base system includes a knowledge graph for storing business knowledge; extracting new entities and new attributes of the new entities from the structured business data; obtaining candidate attributes that match the new attributes based on a first information table; the first information table is used to store the current existing attributes of the knowledge graph and the attribute column information of the existing attributes; querying the second information table to obtain target object information associated with the candidate attributes; and adding new knowledge nodes to the knowledge graph based on the target object information, the new entity, and the new attribute. This achieves automatic association construction of graph entities and improves the efficiency of graph construction.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of graph construction technology, and in particular to a method, device, electronic device and storage medium for automatically building graph associations for a knowledge base system. Background Art

[0002] With the rapid development of information technology, knowledge base applications and management systems have become important tools for academic research and technological development. These systems store a large number of research reports, technical documents, and data, providing researchers with a convenient resource sharing and knowledge management platform.

[0003] Coal knowledge graphs, as an emerging data representation and organization method, have been successfully applied in various fields, such as internet search, recommendation systems, and question-answering systems. The development of graph databases has made the storage and querying of large-scale graph data more efficient and convenient. Mining involves a large number of entities and relationships, including mines, equipment, workers, safety regulations, and environmental monitoring. The information between these entities and relationships is complex and diverse, making it difficult to effectively process and utilize this information through traditional manual management and recording methods.

[0004] Coal mining companies often have large amounts of data scattered across different systems and departments. Knowledge graphs can be used to integrate this data into a unified knowledge base. This knowledge base can support applications such as intelligent search and automatic recommendations, improving information utilization efficiency.

[0005] Therefore, it is necessary to provide a technical solution that can realize the automatic construction of graphs, improve the efficiency and accuracy of graph construction, and improve the performance of knowledge base management and application system graphs. Summary of the Invention

[0006] The present application aims to solve one of the technical problems in the related art at least to a certain extent.

[0007] To this end, the first purpose of this application is to propose a method for automatically associating graph entities in a knowledge base system to achieve automated graph construction and solve the problem of low graph construction efficiency in related technologies.

[0008] The second purpose of this application is to propose a device for automatically constructing graph entity associations in a knowledge base system.

[0009] The third objective of this application is to provide an electronic device.

[0010] The fourth object of this application is to provide a computer-readable storage medium.

[0011] A fifth object of this application is to provide a computer program product.

[0012] To achieve the above objectives, the first embodiment of the present application proposes a method for automatically constructing graph entity associations for a knowledge base system, comprising:

[0013] Obtaining raw business data from a data center or knowledge base collection system; and standardizing the raw business data to obtain structured business data; wherein the knowledge base system includes a knowledge graph for storing business knowledge, the knowledge graph includes multiple interrelated knowledge nodes, each of which corresponds to an entity, each entity includes at least one attribute, and the entities are related through relationships;

[0014] Using NLP-based entity and attribute extraction technology to extract new entities and new attributes of the new entities from the structured business data;

[0015] Based on the first information table, a candidate attribute that matches the new attribute is obtained; wherein the first information table is used to store the current existing attributes of the knowledge graph and the attribute column information of the existing attributes, and the attribute column information is used to evaluate the matching hit value of the attribute;

[0016] Querying a second information table, and when the candidate attribute exists in the second information table, obtaining target object information associated with the candidate attribute; wherein the second information table is used to store associated object information of existing attributes of the knowledge graph;

[0017] Based on the target object information, the new entity and the new attribute, a new knowledge node is added to the knowledge graph.

[0018] To achieve the above-mentioned purpose, the second embodiment of the present application proposes a device for automatically building graph entity associations in a knowledge base system, comprising:

[0019] A data acquisition module is used to acquire raw business data from a data center or knowledge base collection system; and to standardize the raw business data to obtain structured business data; wherein the knowledge base system includes a knowledge graph for storing business knowledge, and the knowledge graph includes multiple interrelated knowledge nodes, each of which corresponds to an entity, each entity includes at least one attribute, and entities are related through relationships;

[0020] The data acquisition module is further configured to extract new entities and new attributes of the new entities from the structured business data using entity and attribute extraction technology based on NLP;

[0021] An attribute matching module is configured to obtain a candidate attribute that matches the new attribute based on a first information table; wherein the first information table is configured to store the current existing attributes of the knowledge graph and attribute column information of the existing attributes, wherein the attribute column information is configured to evaluate the matching hit value of the attribute;

[0022] An object acquisition module is configured to acquire target object information associated with the candidate attribute based on a second information table when the candidate attribute exists in the second information table; wherein the second information table is used to store associated object information of existing attributes of the knowledge graph;

[0023] A graph construction module is used to add new knowledge nodes to the knowledge graph based on the target object information, the new entity and the new attribute.

[0024] To achieve the above-mentioned purpose, the third aspect embodiment of the present application proposes an electronic device, comprising: a processor, and a memory communicatively connected to the processor; the memory stores computer-executable instructions; the processor executes the computer-executable instructions stored in the memory to implement the method described in the first aspect.

[0025] To achieve the above-mentioned purpose, the fourth embodiment of the present application proposes a computer-readable storage medium, in which computer-executable instructions are stored. When the computer-executable instructions are executed by a processor, they are used to implement the method described in the first aspect.

[0026] To achieve the above-mentioned purpose, the fifth embodiment of the present application proposes a computer program product, including a computer program, which implements the method described in the first aspect when executed by a processor.

[0027] The present application provides a method, device, electronic device and storage medium for automatically building graph entities in a knowledge base system. The knowledge base system collects and preprocesses data, and then obtains new entities and new attributes through entity attribute extraction technology, and obtains candidate attributes that match the new attributes from the existing attributes of the knowledge graph; then obtains object information that matches the candidate attributes and adds new graph relationships; thereby realizing automatic association construction of graph entities and improving the efficiency of graph construction.

[0028] Additional aspects and advantages of the present application will be given in part in the description below, and in part will become apparent from the description below, or will be learned through practice of the present application. BRIEF DESCRIPTION OF THE DRAWINGS

[0029] The above and / or additional aspects and advantages of the present application will become apparent and easily understood from the following description of the embodiments in conjunction with the accompanying drawings, in which:

[0030] Figure 1A flowchart of a method for automatically building graph entity associations in a knowledge base system provided in an embodiment of the present application;

[0031] Figure 2 A flowchart of another method for automatically building graph entity associations in a knowledge base system provided by an embodiment of the present application;

[0032] Figure 3 A block diagram of an apparatus for automatically building graph entity associations in a knowledge base system provided by an embodiment of the present application;

[0033] Figure 4 A block diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0034] The following describes in detail embodiments of the present application, examples of which are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are intended to be used to explain the present application, and should not be construed as limiting the present application.

[0035] Explanation of terms:

[0036] Entities in the graph: refers to things in the real world, such as people, places, companies, organizations, concepts, objects, etc.

[0037] Relationships in a graph refer to some kind of connection between entities, such as: person-"born in"-Shanghai, Zhang San and Li Si are "spouses", etc.

[0038] Attributes in the graph: Entities and relationships will have their own attributes, for example: a person can have "ethnicity" and "age", a spousal relationship can have "marriage date", and so on.

[0039] The following describes the method, device and equipment for automatically building graph entity associations in a knowledge base system according to an embodiment of the present application with reference to the accompanying drawings.

[0040] Figure 1 A flowchart of a method for automatically constructing graph entity associations in a knowledge base system provided in an embodiment of the present application.

[0041] It should be noted that the executor of the method for automatically building graph entities in a knowledge base system according to an embodiment of the present application is the device for automatically building graph entities in a knowledge base system according to an embodiment of the present application. The device for automatically building graph entities in a knowledge base system can be configured in an electronic device so that the electronic device can perform the function of automatically building graph entities in a knowledge base system.

[0042] like Figure 1 As shown, the method for automatically building graph entity associations for a knowledge base system includes the following steps:

[0043] Step 101: obtain original business data from the data center or knowledge base collection system; and standardize the original business data to obtain structured business data; wherein, the knowledge base system includes a knowledge graph for storing business knowledge, and the knowledge graph includes multiple interrelated knowledge nodes, each knowledge node corresponds to an entity, each entity includes at least one attribute, and the entities are related through relationships.

[0044] In some embodiments, the knowledge base system collects raw unstructured data from the data lake of the data middle platform and the knowledge base collection system, processes the noise and errors in the data, such as removing duplicates, processing missing values, etc., and converts data in different formats into structured data in a unified format according to certain data standards.

[0045] It's important to note that the knowledge base system includes a knowledge graph for storing business knowledge. This refers to the knowledge nodes collected and stored by the knowledge base system through the knowledge graph. Therefore, after the knowledge base system collects data, it needs to update the knowledge graph. This means that as data increases, the knowledge graph structure is continuously constructed. After acquiring new data, it is necessary to extract the entities and attributes that can be used to construct the knowledge graph.

[0046] Step 102: Use NLP-based entity and attribute extraction technology to extract new entities and new attributes of the new entities from the structured business data.

[0047] As an implementation method, after completing data collection, the knowledge base system performs entity recognition and extraction, entity disambiguation and fusion steps to obtain new entities and corresponding new attributes.

[0048] In some embodiments, entity recognition and extraction involves using natural language processing (NLP) techniques to identify entities (such as names of people, places, and organizations) from text and extracting related attributes and relationships from the text. For example, extracting a person's name and the company they belong to from a sentence uses NLP entity and attribute recognition and extraction algorithms, which are currently available and will not be described in detail.

[0049] In some embodiments, entity disambiguation and fusion can be implemented by addressing entity homonyms, ensuring that entities with the same name in different contexts are correctly distinguished, and merging identical entities. For example, merging the same person in different documents into a single entity.

[0050] Example 1: The new entity formed by the knowledge base system after data collection, entity recognition and extraction, entity disambiguation and fusion is E1, in which one of the new attributes is A1.

[0051] Step 103: Based on the first information table, obtain the candidate attributes that match the new attribute; wherein the first information table is used to store the current existing attributes of the knowledge graph and the attribute column information of the existing attributes, and the attribute column information is used to evaluate the matching hit value of the attribute.

[0052] It can be understood that, based on the current existing attributes of the knowledge graph and the attribute column information of the existing attributes, the candidate attribute with the highest matching degree with the new attribute is determined from the existing attributes.

[0053] Based on the attribute column information of all existing attributes, the matching value between each existing attribute and the new attribute can be determined, and the candidate attribute can be determined based on the matching value. To save computing resources and improve computing efficiency, a distance similarity algorithm can be used to preliminarily screen multiple similar attributes from the existing attributes. Then, based on the attribute column information of multiple similar attributes, the matching value between each similar attribute and the new attribute can be determined, and the candidate attribute can be determined based on the matching value.

[0054] Step 104: query the second information table, and when there is a candidate attribute in the second information table, obtain the target object information associated with the candidate attribute; wherein the second information table is used to store the associated object information of the existing attributes of the knowledge graph.

[0055] As an implementation manner, the value of the candidate attribute is used as the value of the first attribute to query the second information table to determine whether the candidate attribute exists in the second information table;

[0056] When it is determined that the attribute to be selected exists in the second information table, the target object entity, the target object attribute and the target relationship are acquired.

[0057] It can be understood that attributes already existing in the first information table may not have already been mapped and stored in the second information table. After determining the candidate attribute, it is necessary to query the second information table to determine whether the candidate attribute exists in the second information table. If the candidate attribute exists in the second information table, the object information matching the candidate attribute is obtained from the second information table.

[0058] In some embodiments, the second information table includes:

[0059] The first entity (entity1) is used to record the value of the current entity;

[0060] The first attribute (attribute1) is used to record the value of the current attribute in the entity;

[0061] Creation time (time), used to record the creation time of the relationship;

[0062] Relationship: used to record the relationship type between the first entity and the object entity, such as contains, belongs to, etc.

[0063] Object entity (entity2), used to record the value of the entity that establishes a relationship with entity1;

[0064] Object attribute (attribute2), used to record the value of the attribute that establishes a relationship with attribute1.

[0065] Obtaining object information matching the selected attribute from the second information table; including: using the value of the selected attribute as the value of the first attribute to query the second information table, and obtaining the target object entity, target object attribute and target relationship.

[0066] The second information table is queried through the candidate attribute value. If the candidate attribute is hit, the corresponding object entity entity2 and object attribute attribute2 are queried, and the relationship relationship is used.

[0067] Step 105: Add new knowledge nodes to the knowledge graph based on the target object information, new entities and new attributes.

[0068] As an implementation method, a graph relationship is established between the new entity and the new attribute and the object entity and the object attribute through a relationship, that is, a graph triple consisting of the new entity, the relationship and the object entity; and the second information table is updated.

[0069] For example, after querying and obtaining the object entity entity2 and object attribute attribute2 of the selected attribute, a new graph relationship can be added with the relationship relationship; and the corresponding information of the new entity E1 and the new attribute A1 can be stored in the first information table and the second information table.

[0070] It should be noted that when errors are found in the newly established graph relationship through manual inspection, the graph relationship is corrected and the corresponding values of the first information table and the second information table are modified, especially the two field information of manual correction amount and manual correction time in the first information table.

[0071] The method for automatically associating and constructing graph entities in a knowledge base system in an embodiment of the present application collects and preprocesses data through a knowledge base system, then obtains new entities and new attributes through entity attribute extraction technology, obtains candidate attributes that match the new attributes from existing attributes of the knowledge graph; then obtains object information that matches the candidate attributes and adds new graph relationships; thereby realizing automatic associative construction of graph entities and improving graph construction efficiency.

[0072] Based on the above embodiment, the specific implementation of step 103 of acquiring the candidate attribute matching the new attribute based on the first information table is described in detail below.

[0073] Figure 2 This is a flow chart of another method for automatically building graph entity associations in a knowledge base system provided by an embodiment of the present application. Figure 2 As shown, the method for automatically building graph entity associations for a knowledge base system includes the following steps:

[0074] Step 201: Acquire multiple similar attributes from existing attributes in the first information table, the similarities of which with the new attribute satisfy a similarity threshold.

[0075] As an implementation method, the similarity between the new attribute and each of the existing attributes in the first information table is calculated using a distance similarity algorithm to obtain multiple similar attributes whose similarity to the new attribute meets the similarity threshold; and the distance value L between each of the multiple similar attributes and the new attribute is obtained.

[0076] It can be understood that a similarity threshold threshold is set. If the distance is less than or equal to the similarity threshold, the current attribute is considered similar to the new attribute, and the distance value L is recorded.

[0077] Continuing with Example 1, the Levenshtein distance similarity algorithm is used to calculate the similarity between the new attribute A1 and each attribute in the existing attributes of the knowledge base system.

[0078] Step 202 : For each similar attribute among the multiple similar attributes, multiple construction parameter values are calculated based on the attribute column information of the similar attribute.

[0079] It can be understood that based on the attribute column information of similar attributes, multiple construction parameter values of each similar attribute are obtained, and then according to the multiple construction parameter values and the preset thresholds corresponding to each construction parameter value, a matching value for evaluating the matching degree between the similar attribute and the new attribute is obtained.

[0080] In some embodiments, the first information table is used to store the current existing attributes of the knowledge graph and the attribute column information of the existing attributes. The attribute column information may include but is not limited to: entity value, attribute value, extraction time, construction amount, construction time, manual correction amount, manual correction time and whether it is a high-value segment. Each item in the attribute column information corresponds to a column in the first information table. When any data is updated, the first information table is updated accordingly.

[0081] Among them, entity value is used to record the value of the entity in the graph;

[0082] Attribute value (attribute), used to record the value of an attribute in the entity;

[0083] Extraction time (time), used to record the time when the attribute was extracted.

[0084] The build amount (build_number) is used to record the number of times the attribute builds the graph. The default value is 0. Each time it is built, the build amount is +1. If a build relationship disappears, the build amount is -1. It is used to obtain the build amount parameter y1 among multiple build parameter values.

[0085] Build time (build_time) is used to record the time when the attribute was last built; it is used to calculate the build time parameter t1 in multiple build parameter values in combination with the extraction time.

[0086] The manual error correction amount (correct_number) is used to record the number of manual interventions on the field when the attribute construction map is wrong; the default value is 0, and the value is +1 for each modification, and the value can only increase and not decrease; it is used to calculate the manual error correction amount parameter y2 among multiple construction parameter values.

[0087] Manual correction time (correct_time) is used to record the indicator modification time when the manual correction amount was last changed; it is used to calculate the manual correction time parameter t2 in multiple construction parameter values in combination with the extraction time.

[0088] The is_high segment is used to identify whether the attribute is high-value data. For example, 0 represents low-value data, 1 represents high-value data, and the default value is 0. It is used to obtain the high-value parameter m among multiple construction parameter values.

[0089] It should be noted that after obtaining the attribute column information of each similar attribute, multiple construction parameter values of each similar attribute may be calculated, so as to evaluate the matching degree between each similar attribute and the new attribute through the multiple construction parameter values.

[0090] In some embodiments, the multiple construction parameter values include a construction amount parameter y1, a manual error correction amount parameter y2, a construction time parameter t1, a manual error correction time parameter t2, a high value parameter m, and a distance parameter s. The calculation formulas for each construction parameter value are as follows:

[0091] y1=2arccot(build_number(x)) / π;

[0092] y2=2arctan(correct_number(x)) / π;

[0093] t1=2arccot(build_time(x)-time(x)) / π;

[0094] t2=2arctan(correct_time(x)-time(x)) / π;

[0095] m=is_high;

[0096] s=(threshold-L) / threshold;

[0097] Here, x represents the similarity attribute.

[0098] Through the above formula, multiple construction parameter values of each similar attribute can be obtained.

[0099] After obtaining multiple construction parameter values, matching values of similar attributes can be obtained in subsequent steps based on the multiple construction parameter values.

[0100] Step 203 : obtaining a matching value of the similar attribute based on a plurality of construction parameter values and a preset threshold value corresponding to each construction parameter value.

[0101] As an implementation method: a weighted average value of multiple construction parameter values and preset thresholds corresponding to each construction parameter value is obtained; and the weighted average value is used as the matching value of the similar attribute.

[0102] For example, the preset thresholds of y1, y2, t1, t2, m, and s are p1, p2, p3, p4, p5, and p6, respectively. The calculation formula of the matching value V of the similarity attribute is as follows:

[0103] V=(p1*y1+p2*y2+p3*t1+p4*t2+p5*m+p6*s) / (p1+p2+p3+p4+p5+p6)

[0104] It should be noted that V is a value between (0, 1]. The larger the V value of several similar attributes, the higher the matching hit value. By default, the similar attribute with the largest V value is taken as the candidate attribute value for subsequent steps.

[0105] Step 204 : Based on the respective matching values of the multiple similar attributes, determine a candidate attribute whose matching value meets a preset condition from the multiple similar attributes.

[0106] In some embodiments, the method for obtaining a candidate attribute includes: determining a similar attribute with the largest matching value among multiple similar attributes as the candidate attribute, that is, the preset condition is that the matching value is the largest.

[0107] The method for automatically associating graph entities in a knowledge base system according to an embodiment of the present application obtains multiple similar attributes that are similar to a new attribute from existing attributes; then calculates multiple construction parameter values through the attribute column information of each similar attribute; thereby obtaining matching values between each similar attribute and the new attribute based on the multiple construction parameter values; and determines the attributes to be selected based on the matching values, thereby improving the matching accuracy and matching efficiency of the attributes, improving the success rate of graph construction, and thus improving the efficiency of graph construction.

[0108] In order to implement the above embodiment, the present application also proposes a device for automatically constructing graph entity associations in a knowledge base system. Figure 3 This is a block diagram of a device for automatically building graph entities in a knowledge base system provided in an embodiment of the present application. Figure 3 As shown, the device for automatically constructing graph entity associations in a knowledge base system may include: a data acquisition module 301, an attribute matching module 302, an object acquisition module 303 and a graph construction module 304.

[0109] The data acquisition module 301 is used to acquire raw business data from a data center or knowledge base collection system; and standardize the raw business data to obtain structured business data; wherein the knowledge base system includes a knowledge graph for storing business knowledge, and the knowledge graph includes multiple interrelated knowledge nodes, each of which corresponds to an entity, each entity includes at least one attribute, and the entities are related through relationships;

[0110] The data acquisition module 301 is further configured to extract new entities and new attributes of the new entities from the structured business data using entity and attribute extraction technology based on NLP;

[0111] An attribute matching module 302 is configured to obtain candidate attributes that match the new attribute based on a first information table; wherein the first information table is configured to store the current existing attributes of the knowledge graph and attribute column information of the existing attributes, wherein the attribute column information is configured to evaluate the matching hit value of the attribute;

[0112] The object acquisition module 303 is configured to acquire target object information associated with the candidate attribute based on a second information table when the candidate attribute exists in the second information table; wherein the second information table is used to store associated object information of existing attributes of the knowledge graph;

[0113] The graph construction module 304 is used to add new knowledge nodes to the knowledge graph based on the target object information, the new entity and the new attribute.

[0114] Furthermore, in a possible implementation of the embodiment of the present application, the attribute matching module 302 is specifically configured to:

[0115] Acquire, from existing attributes in the first information table, a plurality of similar attributes whose similarity to the new attribute satisfies a similarity threshold;

[0116] For each similar attribute among the plurality of similar attributes, calculating a plurality of construction parameter values based on attribute column information of the similar attribute;

[0117] Obtaining a matching value of the similar attribute based on the plurality of construction parameter values and a preset threshold value corresponding to each construction parameter value;

[0118] Based on the respective matching values of the multiple similar attributes, a candidate attribute whose matching value meets a preset condition is determined from the multiple similar attributes.

[0119] Furthermore, in a possible implementation of the embodiment of the present application, when the attribute matching module 302 obtains multiple similar attributes whose similarity with the new attribute satisfies a similarity threshold from the existing attributes in the first information table, it is specifically configured to:

[0120] Calculate the similarity between the new attribute and each of the existing attributes in the first information table using a distance similarity algorithm, and obtain multiple similar attributes whose similarity to the new attribute meets a similarity threshold;

[0121] Obtain a distance value L between each similar attribute in the multiple similar attributes and the new attribute.

[0122] Furthermore, in a possible implementation of an embodiment of the present application, the attribute column information includes entity value, attribute value, extraction time, construction amount, construction time, manual error correction amount, manual error correction time and whether it is a high-value segment, wherein the entity value is used to record the value of the entity in the graph, and the attribute value is used to record the value of a certain attribute in the entity; the extraction time is used to record the time when the attribute is extracted, the construction amount is used to record the number of times the attribute constructs the graph, and the construction time is used to record the time when the attribute was last constructed; the manual error correction amount is used to record the number of times the field is manually intervened when the attribute constructs an error in the graph; the manual error correction time is used to record the indicator modification time when the manual error correction amount was last changed; the whether it is a high-value segment is used to identify whether the attribute is high-value data.

[0123] Furthermore, in a possible implementation of the embodiment of the present application, when the attribute matching module 302 calculates multiple construction parameter values based on the attribute column information of the similar attribute, it is specifically configured to:

[0124] Based on the construction time, the construction amount parameter y1 is obtained by the first formula; the first formula is expressed as follows:

[0125] y1=2arccot(build_number(x)) / π

[0126] Among them, build_number represents the build amount, and x represents the similarity attribute;

[0127] Based on the manual error correction amount, the manual error correction amount parameter y2 is obtained by the second formula; the second formula is expressed as follows:

[0128] y2=2arctan(correct_number(x)) / π

[0129] Among them, correct_number represents the amount of manual correction, and x represents the similarity attribute;

[0130] Based on the construction time and extraction time, the construction time parameter t1 is obtained by the third formula; the third formula is expressed as follows:

[0131] t1=2arccot(build_time(x)-time(x)) / π

[0132] Among them, build_time represents the build time, time represents the extraction time, and x represents the similarity attribute;

[0133] Based on the manual correction time and the extraction time, the manual correction time parameter t2 is obtained by the fourth formula; the fourth formula is expressed as follows:

[0134] t2=2arctan(correct_time(x)-time(x)) / π

[0135] Among them, correct_time represents the manual correction time, time represents the extraction time, and x represents the similarity attribute;

[0136] Based on whether it is a high-value segment, the high-value parameter m is obtained by the fifth formula; the fifth formula is expressed as follows:

[0137] m=is_high

[0138] Among them, is_high indicates whether it is a high value segment;

[0139] Based on the distance value L, the distance parameter s is obtained by the sixth formula; the sixth formula is expressed as follows:

[0140] s=(threshold-L) / threshold

[0141] Here, threshold represents the similarity threshold.

[0142] Furthermore, in a possible implementation of the embodiment of the present application, the second information table includes a first entity, a first attribute, a creation time, a relationship, an object entity, and an object attribute. The creation time is used to record the creation time of the relationship, and the relationship is used to record the relationship type between the first entity and the object entity. The object acquisition module 303 is specifically used to:

[0143] Using the value of the candidate attribute as the value of the first attribute to query the second information table, and determining whether the candidate attribute exists in the second information table;

[0144] When it is determined that the attribute to be selected exists in the second information table, the target object entity, the target object attribute and the target relationship are acquired.

[0145] Furthermore, in a possible implementation of the embodiment of the present application, the graph construction module 304 is specifically configured to:

[0146] The new entity and the new attribute are associated with the object entity and the object attribute through the relationship.

[0147] It should be noted that the above explanation of the method embodiment for automatically building graph entities in a knowledge base system is also applicable to the device for automatically building graph entities in a knowledge base system in this embodiment, and will not be repeated here.

[0148] In order to implement the above embodiment, the present application also proposes an electronic device. Figure 4 , Figure 4is a block diagram of an electronic device provided in an embodiment of the present application. Figure 4 As shown, the electronic device 400 includes: a processor 401, and a memory 402 communicatively connected to the processor 401; the memory 402 stores computer-executable instructions; the processor 401 executes the computer-executable instructions stored in the memory to implement the method provided in the aforementioned embodiment.

[0149] In order to implement the above embodiments, the present application also proposes a computer-readable storage medium, in which computer-executable instructions are stored. When the computer-executable instructions are executed by a processor, they are used to implement the methods provided by the above embodiments.

[0150] In order to implement the above embodiments, the present application also proposes a computer program product, including a computer program, which implements the methods provided by the above embodiments when executed by a processor.

[0151] The collection, storage, use, processing, transmission, provision and disclosure of user personal information involved in this application are in compliance with relevant laws and regulations and do not violate public order and good morals.

[0152] It is important to note that personal information collected from users should be used for legitimate and reasonable purposes and should not be shared or sold beyond these legitimate uses. Furthermore, such collection / sharing should be conducted only after receiving the user's informed consent, including but not limited to notifying the user to read the user agreement / user notice and sign an agreement / authorization that includes the relevant user information before using the feature. Furthermore, any necessary steps must be taken to safeguard and secure access to such personal information and ensure that others with access to personal information comply with its privacy policy and procedures.

[0153] This application contemplates providing implementations that allow users to selectively block the use or access of personal information data. Specifically, this disclosure contemplates providing hardware and / or software to prevent or block access to such personal information data. Risks can be minimized by limiting data collection and deleting data once it is no longer needed. Furthermore, where applicable, such personal information can be de-identified to protect user privacy.

[0154] In the descriptions of the foregoing embodiments, the reference terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" mean that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present application. In this specification, the schematic expressions of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art may combine and combine different embodiments or examples described in this specification and features of different embodiments or examples, unless they are mutually inconsistent.

[0155] 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 the technical features being referred to. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of such features. Throughout the description of this application, "plurality" means at least two, for example, two, three, etc., unless otherwise specifically defined.

[0156] Any process or method description in a flowchart or otherwise described herein may be understood to represent a module, segment or portion of code comprising one or more executable instructions for implementing the steps of a custom logical function or process, and the scope of the preferred embodiments of the present application includes alternative implementations in which functions may be performed out of the order shown or discussed, including performing functions in a substantially simultaneous manner or in the reverse order depending on the functions involved, which should be understood by those skilled in the art to which the embodiments of the present application belong.

[0157] The logic and / or steps represented in a flowchart or otherwise described herein, for example, can be considered a sequenced list of executable instructions for implementing the 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 (e.g., a computer-based system, a system including a processor, or other system that can fetch and execute instructions from an instruction execution system, apparatus, or device). For purposes of this specification, a "computer-readable medium" is any device that can contain, store, communicate, propagate, or transport a program for use by, or in conjunction with, an instruction execution system, apparatus, or device. More specific examples (not exhaustive) of computer-readable media include: an electrical connection with one or more wires (electronic devices), a portable computer disk cartridge (magnetic device), random access memory (RAM), read-only memory (ROM), erasable and programmable read-only memory (EPROM or flash memory), fiber optic devices, and a portable compact disc read-only memory (CDROM). Furthermore, the computer-readable medium may even be paper or other suitable medium on which the program is printed, since the program may be obtained electronically, for example, by optically scanning the paper or other medium and then editing, interpreting or processing it in another suitable manner if necessary, and then storing it in a computer memory.

[0158] It should be understood that various parts of this application can be implemented using hardware, software, firmware, or a combination thereof. In the above-described embodiments, multiple steps or methods can be implemented using software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented using hardware, as in another embodiment, any one of the following technologies known in the art or a combination thereof can be used: a discrete logic circuit having logic gate circuits for implementing logical functions on data signals, an application-specific integrated circuit having suitable combinational logic gate circuits, a programmable gate array (PGA), a field-programmable gate array (FPGA), etc.

[0159] Those skilled in the art will understand that all or part of the steps in the method of the above embodiment can be completed by instructing related hardware through a program, and the program can be stored in a computer-readable storage medium. When the program is executed, it includes one or a combination of the steps of the method embodiment.

[0160] In addition, the functional units in the various embodiments of the present application may be integrated into a processing module, or each unit may exist physically separately, or two or more units may be integrated into a module. The above-mentioned integrated module may be implemented in the form of hardware or in the form of a software functional module. If the integrated module is implemented in the form of a software functional module and sold or used as an independent product, it may also be stored in a computer-readable storage medium.

[0161] The storage medium mentioned above may be a read-only memory, a magnetic disk, or an optical disk, etc. Although the embodiments of the present application have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting the present application. Persons skilled in the art may make changes, modifications, substitutions, and variations to the above embodiments within the scope of the present application.

Claims

1. A method for automatically building graph entity associations for a knowledge base system, characterized in that: The following steps are involved: Obtaining raw business data from a data center or knowledge base collection system; and standardizing the raw business data to obtain structured business data; wherein the knowledge base system includes a knowledge graph for storing business knowledge, the knowledge graph includes multiple interrelated knowledge nodes, each of which corresponds to an entity, each entity includes at least one attribute, and the entities are related through relationships; Using NLP-based entity and attribute extraction technology to extract new entities and new attributes of the new entities from the structured business data; Based on the first information table, a candidate attribute that matches the new attribute is obtained, including: obtaining a plurality of similar attributes whose similarity with the new attribute satisfies a similarity threshold from the existing attributes in the first information table, and for each similar attribute in the plurality of similar attributes, calculating a plurality of construction parameter values based on the attribute column information of the similar attribute, and obtaining a matching value of the similar attribute based on the plurality of construction parameter values and a preset threshold value corresponding to each construction parameter value, and determining a candidate attribute whose matching value satisfies a preset condition from the plurality of similar attributes based on the respective matching values of the plurality of similar attributes; wherein the first information table is used to store the current existing attributes of the knowledge graph and the attribute column information of the existing attributes, and the attribute column information is used to evaluate the matching hit value of the attribute; Querying a second information table, and when the candidate attribute exists in the second information table, obtaining target object information associated with the candidate attribute; wherein the second information table is used to store associated object information of existing attributes of the knowledge graph; Based on the target object information, the new entity and the new attribute, a new knowledge node is added to the knowledge graph.

2. The method according to claim 1, characterized in that The step of acquiring, from existing attributes in the first information table, a plurality of similar attributes whose similarity to the new attribute satisfies a similarity threshold, includes: Calculate the similarity between the new attribute and each of the existing attributes in the first information table using a distance similarity algorithm, and obtain multiple similar attributes whose similarity to the new attribute meets a similarity threshold; Obtain a distance value L between each similar attribute in the multiple similar attributes and the new attribute.

3. The method according to claim 2, characterized in that The attribute column information includes entity value, attribute value, extraction time, construction amount, construction time, manual error correction amount, manual error correction time and whether it is a high-value segment, wherein the entity value is used to record the value of the entity in the graph, and the attribute value is used to record the value of a certain attribute in the entity; the extraction time is used to record the time when the attribute is extracted, the construction amount is used to record the number of times the attribute constructs the graph, and the construction time is used to record the time when the attribute was last constructed; the manual error correction amount is used to record the number of times the field is manually intervened when the attribute constructs an error in the graph; the manual error correction time is used to record the indicator modification time when the manual error correction amount was last changed; the whether it is a high-value segment is used to identify whether the attribute is high-value data.

4. The method according to claim 3, characterized in that The step of calculating multiple construction parameter values based on the attribute column information of the similar attributes includes: Based on the construction time, the construction amount parameter y1 is obtained by a first formula; the first formula is expressed as follows: y1=2arccot(build_number(x)) / π Among them, build_number represents the build amount, and x represents the similarity attribute; Based on the manual error correction amount, the manual error correction amount parameter y2 is obtained by a second formula; the second formula is expressed as follows: y2=2arctan(correct_number(x)) / π Among them, correct_number represents the amount of manual correction, and x represents the similarity attribute; Based on the construction time and the extraction time, the construction time parameter t1 is obtained by a third formula; the third formula is expressed as follows: t1=2arccot(build_time(x)-time(x)) / π Among them, build_time represents the build time, time represents the extraction time, and x represents the similarity attribute; Based on the manual error correction time and the extraction time, the manual error correction time parameter t2 is obtained by the fourth formula; the fourth formula is expressed as follows: t2=2arctan(correct_time(x)-time(x)) / π Among them, correct_time represents the manual correction time, time represents the extraction time, and x represents the similarity attribute; Based on whether the segment is high-value, the high-value parameter m is obtained by the fifth formula; the fifth formula is expressed as follows: m=is_high Among them, is_high indicates whether it is a high value segment; Based on the distance value L, the distance parameter s is obtained by the sixth formula; the sixth formula is expressed as follows: s=(threshold-L) / threshold Here, threshold represents the similarity threshold.

5. The method according to claim 1, wherein The second information table includes a first entity, a first attribute, a creation time, a relationship, an object entity, and an object attribute, wherein the creation time is used to record the creation time of the relationship, and the relationship is used to record the relationship type between the first entity and the object entity; The querying of the second information table and obtaining target object information associated with the attribute to be selected when the attribute to be selected exists in the second information table includes: Using the value of the candidate attribute as the value of the first attribute to query the second information table, and determining whether the candidate attribute exists in the second information table; When it is determined that the attribute to be selected exists in the second information table, the target object entity, the target object attribute and the target relationship are acquired.

6. The method according to claim 5, characterized in that The adding of a new knowledge node to the knowledge graph based on the target object information, the new entity and the new attribute comprises: The new entity and the new attribute are associated with the object entity and the object attribute through the relationship.

7. A device for automatically building graph entities in a knowledge base system, characterized in that: include: A data acquisition module is used to acquire raw business data from a data center or knowledge base collection system; and to standardize the raw business data to obtain structured business data; wherein the knowledge base system includes a knowledge graph for storing business knowledge, and the knowledge graph includes multiple interrelated knowledge nodes, each of which corresponds to an entity, each entity includes at least one attribute, and entities are related through relationships; The data acquisition module is further configured to extract new entities and new attributes of the new entities from the structured business data using entity and attribute extraction technology based on NLP; An attribute matching module is configured to obtain a candidate attribute that matches the new attribute based on a first information table; wherein the first information table is configured to store the current existing attributes of the knowledge graph and attribute column information of the existing attributes, wherein the attribute column information is configured to evaluate the matching hit value of the attribute; An object acquisition module is configured to acquire target object information associated with the candidate attribute based on a second information table when the candidate attribute exists in the second information table; wherein the second information table is used to store associated object information of existing attributes of the knowledge graph; A graph construction module, configured to add a new knowledge node to the knowledge graph based on the target object information, the new entity, and the new attribute; Among them, the attribute matching module is used to: obtain multiple similar attributes whose similarity with the new attribute meets the similarity threshold from the existing attributes in the first information table, and for each similar attribute among the multiple similar attributes, calculate multiple construction parameter values based on the attribute column information of the similar attribute, and obtain the matching value of the similar attribute based on the multiple construction parameter values and the preset threshold corresponding to each construction parameter value, and determine the candidate attribute whose matching value meets the preset conditions from the multiple similar attributes based on the respective matching values of the multiple similar attributes.

8. An electronic device, characterized in that: include: a processor, and a memory communicatively connected to the processor; The memory stores computer-executable instructions; The processor executes the computer-executable instructions stored in the memory to implement the method according to any one of claims 1 to 6.

9. A computer-readable storage medium, characterized in that The computer-readable storage medium stores computer-executable instructions, which are used to implement the method according to any one of claims 1 to 6 when executed by a processor.

Citation Information

Patent Citations

  • Industrial knowledge base automatic construction method and device and storage medium

    CN112307153A