Knowledge reasoning method, system and device for multivariate relation scene and medium
Through knowledge reasoning methods oriented to multi-relationship scenarios, entities in text are identified and linked, relationships between entities are extracted and modeled, and logical reasoning is performed. This solves the problem of incomplete multi-relationships in the existing technology and achieves a more accurate and comprehensive Entity relationship construction.
Patent Information
- Application Number
- CN202411942597.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-27
- Publication Date
- 2025-01-24
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The prior art focuses on the facts of binary relationships, which leads to the incomplete relationship between entities in multiple relationship scenarios, making it difficult to maximize the value of data.
Adopt the method of knowledge reasoning for multiple relationship scenes, identify the entities in the text through the machine learning model and link to the knowledge map, use grammatical analyzer and circulating neural network to extract the relationship between entity, and use multi -relationship overropia Models and logical reasoning through the graph structure to build and determine multiple relationships.
Quickly and accurately build the type of diversity between entities and determine the types of these relationships, expand the traditional knowledge map, better represent the complex relationship between entities, and solve the problem of single and loss of a large amount of semantic information between entities.
Smart Images

Figure CN119358689A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of knowledge graph construction and multi-relation reasoning technology, and more specifically to a knowledge reasoning method, system, device and medium for multi-relation scenarios. Background Art
[0002] Knowledge graph is a semantic network used to describe the relationship between entities. It is a representation method of semi-structured data, used to describe entities, attributes, and relationships between entities. The core idea of knowledge graph is to transform information in the real world into a graph, where nodes represent entities (such as people, places, things, etc.) and edges represent the relationship between entities. The purpose of knowledge graph is to improve the performance of search engines and provide more friendly search results. Subsequently, knowledge graph has received great attention in the academic community, and its construction technology is also developing rapidly. At present, knowledge graph has been widely used in many fields such as knowledge question and answer, intelligent search, personalized recommendation, software reuse, government governance, etc.
[0003] At present, knowledge graphs mainly focus on binary relational facts. Binary relational facts are usually represented as a set of triples <subject, predicate, object>: entity, attribute, relationship, extracted as <entity 1, relationship, entity 2> and <entity 1, attribute 1, attribute value 1>. The predicate of the triple can be understood as a binary relationship, that is, a set of ordered pairs connecting the subject and the object. Although this simplified processing has improved processing efficiency to a certain extent, it has also led to the loss of a large amount of semantic information, making the relationship between entities incomplete and difficult to maximize the value of data.
[0004] In multi-relation scenarios, relations involving more than two entities are common. For example, in the open knowledge graph Freebase, more than 1 / 3 of the entities are involved in the representation of multi-relational facts. However, most existing research focuses on link prediction of binary relational facts, and relatively little research has been done on reasoning and representation learning of multi-relational facts. Summary of the invention
[0005] In response to the above problems, the purpose of the present invention is to provide a knowledge reasoning method, system, device and medium for multi-relationship scenarios, which can quickly and accurately construct multi-relationships between entities and determine the types of these relationships, and expand the traditional knowledge graph to better represent the complex relationships between entities.
[0006] In order to achieve the above object, the present invention is implemented through the following technical solutions: In a first aspect, the present invention discloses a knowledge reasoning method for a multi-relation scenario, comprising: Identify entities in text through machine learning models and link the entities to corresponding nodes in the knowledge graph; Use a parser and recurrent neural network to extract relationships between entities from text, determine relationship types, and generate multivariate relationship data; Use multi-relation hypergraph to model multi-relation data, and use embedding technology to map entities and relationships between entities in the knowledge graph into a continuous vector space to predict unknown entities and relationships between entities, and update the knowledge graph; Use graph structures for logical reasoning, learn reasoning rules from knowledge graphs, and search for specific paths to discover new relationships between entities.
[0007] Furthermore, identifying entities in the text through a machine learning model and linking the entities to corresponding nodes in the knowledge graph includes: Perform word segmentation on the text, perform feature extraction on each word, and extract text features; Use machine learning models to classify words and identify entities in text; Retrieve candidate entities matching the entity name from the knowledge graph as link candidate nodes; Combining context information, entity descriptions, and relationships in the knowledge graph, entity disambiguation is performed to select a specific entity from candidate entities as a standard node. Link entities to standard nodes in the knowledge graph and determine the start and end positions of the entities. Furthermore, the method of extracting the relationship between entities from the text using a grammar analyzer and a recurrent neural network and determining the relationship type includes: Use dependency parsing to parse the sentence structure of the text and identify entity pairs from the sentences in the text; For each entity pair, a relation extraction model based on the LSTM optimization algorithm based on the RNN is used to determine the type of relationship between them.
[0008] Furthermore, the multi-relationship hypergraph is used to model the multi-relationship data, and the entities and the relationships between entities in the knowledge graph are mapped to a continuous vector space using an embedding technique to predict unknown entities and the relationships between entities, and the knowledge graph is updated, including: Modeling multivariate relational data using multi-relational hypergraphs to represent entities and relationships; Use embedding techniques to map entities and relations into a continuous vector space, predict unknown relations between entities through vector operations, use clustering or classification methods to predict new entity types or instances, and generate multivariate relation update data; Update the knowledge graph based on the updated data of multi-relationships.
[0009] Furthermore, the use of graph structure for logical reasoning, learning reasoning rules from the knowledge graph, and searching for specific paths to discover new relationships between entities include: Graph embedding technology is used to transform the entities and relations of the knowledge graph into vector representations, i.e., h + r ≈ t, where h, r, and t represent the vector representations of the head entity, relation, and tail entity, respectively; The scoring function is defined as , the optimization goal is to minimize the scoring function ; Use a depth-first search algorithm or a breadth-first search algorithm to find specific paths connecting entities in the knowledge graph to discover new entity relationships; Apply first-order logic or descriptive logic reasoning methods to verify and deduce new entity relationships to ensure the correctness and rationality of the relationships; Output the new entity relationships in a structured manner.
[0010] Furthermore, the text features include: part-of-speech features, context features, and morphological features; The machine learning models include but are not limited to: conditional random fields, bidirectional LSTM models, and BERT models.
[0011] Furthermore, the embedding technology adopts a translation-based knowledge graph embedding model TransE, a semantic matching-based knowledge graph embedding model ComplEx, or a rotation-based knowledge graph embedding model RotatE.
[0012] In a second aspect, the present invention further discloses a knowledge reasoning system for multi-relation scenarios, including: The entity recognition and linking module is used to identify entities in text through machine learning models and link entities to corresponding nodes in the knowledge graph; The relation extraction module is used to extract the relationship between entities from the text using a grammar analyzer and a recurrent neural network, and determine the relationship type; The knowledge completion module is used to model multi-relational data using a multi-relational hypergraph, and use embedding technology to map entities and relationships between entities in the knowledge graph into a continuous vector space to predict unknown entities and relationships between entities, and update the knowledge graph; The graph reasoning module is used to perform logical reasoning using graph structures, learn reasoning rules from knowledge graphs, and search for specific paths to discover new relationships between entities.
[0013] In a third aspect, the present invention further discloses a knowledge reasoning device for a multi-relation scenario, comprising: A memory for storing knowledge reasoning programs for multi-relational scenarios; A processor is used to implement the steps of the knowledge reasoning method for a multi-relationship scenario as described in any one of the above items when executing the knowledge reasoning program for a multi-relationship scenario.
[0014] In a fourth aspect, the present invention also discloses a readable storage medium, on which is stored a knowledge reasoning program for a multi-relational scenario. When the knowledge reasoning program for a multi-relational scenario is executed by a processor, the steps of the knowledge reasoning method for a multi-relational scenario as described in any of the above items are implemented.
[0015] Compared with the prior art, the beneficial effects of the present invention are as follows: The present invention discloses a knowledge reasoning method, system, device and medium for multi-relationship scenarios. First, entity recognition and linking are performed to identify named entities in the text, and these entities are matched and linked with corresponding nodes in the knowledge graph. Then, relationship extraction is performed, and the recurrent neural network RNN optimization algorithm LSTM is used to determine the relationship type between entities, the relationship between entities and the types of these relationships. Next, knowledge completion is performed, and multi-relationship hypergraphs are used to model multi-relationship data, and entity relationships or new entities that have not yet been discovered in the graph are inferred to fill these gaps. The machine learning model will learn the patterns of known entities and relationships and predict unknown information. Finally, the graph structure is used for logical reasoning. The present invention can quickly and accurately construct multi-relationships between entities and determine the types of these relationships. It can expand the traditional knowledge graph to better represent the complex relationships between entities, solve the problem that the relationship between entities in the existing solution is relatively single and a large amount of semantic information is lost, and bring broader development prospects to the construction and application of knowledge graphs.
[0016] The present invention can construct complex relationships between multiple entities and mine more semantic information, which can be widely used in natural language processing, artificial intelligence and other fields. In natural language processing, the information in the text often involves multiple entities and concepts. Through multivariate knowledge reasoning technology, the meaning of the text can be better understood and interpreted. In the field of artificial intelligence, by using multivariate knowledge reasoning technology, it can help build a more realistic and complex artificial intelligence system, so that it can better understand and respond to practical application problems.
[0017] It can be seen that compared with the prior art, the present invention has outstanding substantive features and significant progress, and the beneficial effects of its implementation are also obvious. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.
[0019] Figure 1 It is a method flow chart of a specific implementation mode of the present invention.
[0020] Figure 2 It is a system structure diagram of a specific implementation mode of the present invention.
[0021] Figure 3 It is a device structure diagram of a specific implementation mode of the present invention.
[0022] In the figure, 1. Entity recognition and linking module; 2. Relation extraction module; 3. Knowledge completion module; 4. Graph reasoning module; 101. Processor; 102. Memory; 103. Input interface; 104. Output interface; 105. Communication unit; 106. Keyboard; 107. Display; 108. Mouse. DETAILED DESCRIPTION
[0023] In order to enable those skilled in the art to better understand the scheme of the present invention, the present invention is further described in detail below in conjunction with the accompanying drawings and specific implementation methods. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.
[0024] See also Figure 1 As shown, this embodiment provides a knowledge reasoning method for a multi-relation scenario, including the following steps: S1: Identify entities in the text through machine learning models and link the entities to corresponding nodes in the knowledge graph.
[0025] In a specific implementation, the text is first segmented, and features are extracted for each segmented word to extract text features. Text features include: part-of-speech features, context features, and morphological features. Then, a machine learning model is used to classify the segmented words and identify entities in the text. At this time, candidate entities matching the entity name are retrieved from the knowledge graph as link candidate nodes. Among them, the machine learning model includes but is not limited to: conditional random fields, bidirectional LSTM models, and BERT models.
[0026] Furthermore, we combine context information, entity descriptions, and relationships in the knowledge graph to perform entity disambiguation, select a specific entity from the candidate entities, and use it as a standard node. Finally, we link the entity to the standard node in the knowledge graph and determine the start and end positions of the entity.
[0027] As an example, the purpose of this step is to achieve entity recognition and linking, identify entities in the text, and link them to the corresponding nodes in the knowledge graph. Specifically, it includes: first, the text is segmented, and features are extracted for each segmented word, such as part of speech, context, morphology, etc., and then machine learning models (such as conditional random fields, bidirectional LSTM, BERT, etc.) are used to classify the segmented words and identify entities. Possible link candidates are generated for the identified entities, and entity disambiguation is performed based on context information, entity descriptions, and relationships in the knowledge graph, etc., the correct entity is selected, and finally the entity is normalized, the entity is linked to the standard node in the knowledge graph, and the start and end positions of the entity are determined.
[0028] S2: Use a parser and a recurrent neural network to extract relationships between entities from text, determine the relationship type, and generate multivariate relationship data.
[0029] In a specific implementation, first, dependency syntactic analysis is used to parse the sentence structure of the text and identify entity pairs from the sentences of the text; then, a relationship extraction model based on the LSTM optimization algorithm of the recurrent neural network RNN is used to determine the type of relationship between each entity pair.
[0030] As an example, the purpose of this step is to extract the relationship between entities from the text and determine the type of these relationships. Specifically, use a grammatical analyzer (such as a dependency parser) to parse the sentence structure, identify all possible entity pairs from the sentence, use the recurrent neural network RNN optimization algorithm LSTM for each entity pair to determine the type of relationship between them, use a labeled data set to train the relationship extraction model, and the model learns how to extract relationships from sentences.
[0031] It should be noted that the LSTM algorithm, which is a recurrent neural network (RNN), is used to segment text in the input layer and then input it in order. In the hidden layer, not only the current input is considered, but also all previous input information is integrated, and historical information can be used to influence future output. When processing long sequence data, it is difficult for RNN to remember input information from a long time ago. LSTM solves this problem by introducing the concept of "cell state", which is like a notepad that can always remember previous information. In response to the gradient vanishing and exploding problems faced by RNN when processing time series data, LSTM introduces a "gating mechanism", a selective memory method, to retain important information and ignore unimportant information, and generate the final prediction results in the output layer.
[0032] S3: Use multi-relational hypergraphs to model multivariate relational data, and use embedding technology to map entities and relationships between entities in the knowledge graph into a continuous vector space to predict unknown entities and relationships between entities, and update the knowledge graph.
[0033] In a specific implementation, multi-relationship hypergraphs are first used to model multi-relationship data to represent entities and relationships; then embedding techniques are used to map entities and relationships to continuous vector spaces, unknown relationships between entities are predicted through vector operations, clustering or classification methods are used to predict new entity types or instances, and multi-relationship update data is generated. At this point, the knowledge graph is updated based on the multi-relationship update data.
[0034] It should be noted that the embedding technology of this step adopts the translation-based knowledge graph embedding model TransE, the semantic matching-based knowledge graph embedding model ComplEx, or the rotation-based knowledge graph embedding model RotatE.
[0035] Among them, the translation-based knowledge graph embedding model TransE is based on the distributed vector representation of entities and relations. It regards the relation in each triple instance (h, r, t) as a translation from entity head to entity tail, that is, vector addition, and continuously adjusts the vectors of h, r and t to make (h + r) as equal to t as possible, that is, head entity vector + relation vector = tail entity vector (h + r = t).
[0036] As an example, the purpose of this step is to achieve knowledge completion and infer unknown relationships or entities in the graph based on known information. This includes: using multi-relational hypergraphs to model multivariate relational data, using embedding techniques (such as TransE, ComplEx, and RotatE) to map entities and relationships to continuous vector spaces, predicting unknown relationships between entities through vector operations, using clustering or classification methods to predict new entity types or instances, and finally evaluating the quality of completion and updating the knowledge graph based on new data and knowledge.
[0037] S4: Use graph structures for logical reasoning, learn reasoning rules from knowledge graphs, and search for specific paths to discover new relationships between entities.
[0038] In a specific implementation, the entities and relationships of the knowledge graph are first converted into vector representations using graph embedding technology; then, a depth-first search algorithm or a breadth-first search algorithm is used to find specific paths connecting entities in the knowledge graph to discover new entity relationships. At this point, first-order logic or descriptive logic reasoning methods are applied to verify and deduce new entity relationships to ensure the correctness and rationality of the relationships; finally, the new entity relationships are output in a structured manner.
[0039] In this step, Knowledge Graph Embedding (KGE) is a technique that maps entities and relations in a knowledge graph to a low-dimensional vector space, making similar entities closer in the embedding space. By learning vector representations of entities and relations, these vectors can reflect the semantic relations in the knowledge graph, so that complex semantic relations can be expressed through vector operations. It is assumed that the relationship between entities can be approximately represented by the translation of entity vectors, that is, h + r ≈ t, where h, r, and t represent the vector representations of the head entity, relation, and tail entity, respectively, and the scoring function is defined as , the optimization goal is to minimize the scoring function.
[0040] As an example, the purpose of this step is to implement graph reasoning, including: using graph structure for logical reasoning, learning reasoning rules from knowledge graphs, searching for specific paths to discover new relationships between entities, using logical reasoning (such as first-order logic, description logic) to derive new knowledge, applying graph neural networks (GNNs) for deep learning reasoning, capturing graph structure information, and inferring new relationships or entities.
[0041] It can be seen that the knowledge reasoning method for multi-relationship scenarios disclosed in the present invention uses the recurrent neural network RNN optimization algorithm LSTM to determine the relationship type between entities, which can integrate all previous inputs, has a stronger memory ability, and more accurately captures the relationship characteristics between entities that develop over time. The multi-relationship hypergraph used in the above method combines the characteristics of hypergraphs and multiple relationships, allowing for more fine-grained modeling of interactions between entities. Hyperedges can connect any number of nodes, can span different entity types, and adapt to various complex relationship patterns. This method can expand the traditional knowledge graph to better represent the complex relationships between entities.
[0042] From the above method, we can know that the basic idea of this method is: first, entity recognition and linking are performed to identify named entities (names of people, places, organization names, etc.) in the text, and these entities are matched and linked with the corresponding nodes in the knowledge graph. Then, relationship extraction is performed, and the LSTM algorithm of the recurrent neural network RNN optimization algorithm is used to determine the relationship type between entities, the relationship between entities, and the type of these relationships. For example, in the sentence "Zhang San founded Company A", relationship extraction will identify the "founding" relationship between "Zhang San" and "Company A". Next, knowledge completion is performed, and multi-relationship hypergraphs are used to model multivariate relationship data, and entity relationships or new entities that have not yet been discovered in the graph are inferred to fill these gaps. The machine learning model will learn the patterns of known entities and relationships and predict unknown information. Finally, the graph structure is used for logical reasoning, such as association rule learning, path query, and subgraph matching, to derive new relationships or entities and enhance the semantic representation ability of the graph.
[0043] It can be seen that the present invention provides a knowledge reasoning method for multi-relationship scenarios, which can quickly and accurately construct multi-relationships between entities and determine the types of these relationships. It can expand the traditional knowledge graph to better represent the complex relationships between entities, and solve the problem that the relationships between entities in existing solutions are relatively simple and a large amount of semantic information is lost, which brings broader development prospects to the construction and application of knowledge graphs.
[0044] See also Figure 2 As shown, the present invention also discloses a knowledge reasoning system for multi-relation scenarios, including: an entity recognition and linking module 1, a relationship extraction module 2, a knowledge completion module 3 and a graph reasoning module 4. The entity recognition and linking module 1 is used to identify entities in the text through a machine learning model and link the entities to corresponding nodes in the knowledge graph.
[0045] The relation extraction module 2 is used to extract the relationship between entities from the text using a grammar analyzer and a recurrent neural network, and determine the relationship type.
[0046] The knowledge completion module 3 is used to model multi-relational data using a multi-relational hypergraph, and use embedding technology to map the entities and the relationships between entities in the knowledge graph into a continuous vector space to predict unknown entities and the relationships between entities, and update the knowledge graph.
[0047] Graph reasoning module 4 is used to perform logical reasoning using graph structures, learn reasoning rules from knowledge graphs, and search for specific paths to discover new relationships between entities.
[0048] The specific implementation of the knowledge reasoning system for multi-relation scenarios in this embodiment is basically the same as the specific implementation of the knowledge reasoning method for multi-relation scenarios described above, and will not be repeated here.
[0049] See also Figure 3 As shown, the present invention also discloses a knowledge reasoning device for a multi-relational scenario, comprising a processor 101 and a memory 102; wherein, when the processor 101 executes the knowledge reasoning program for a multi-relational scenario stored in the memory, the steps of the knowledge reasoning method for a multi-relational scenario as described in any one of the above items are implemented.
[0050] The knowledge reasoning device for multi-relation scenarios provided in this embodiment may include but is not limited to a smart phone, a tablet computer, a laptop computer, or a desktop computer.
[0051] Among them, the processor 101 may include one or more processing cores, such as a 4-core processor, an 8-core processor, etc. The processor 101 can be implemented in at least one hardware form of a digital signal processor (DSP), a field-programmable gate array (FPGA), and a programmable logic array (PLA). The processor 101 may also include a main processor and a coprocessor. The main processor is a processor for processing data in an awake state, also known as a central processing unit (CPU); the coprocessor is a low-power processor for processing data in a standby state. In some embodiments, the processor 101 may be integrated with a graphics processing unit (GPU), and the GPU is responsible for rendering and drawing the content to be displayed on the display screen. In some embodiments, the processor 101 may also include an artificial intelligence (AI) processor, which is used to process computing operations related to machine learning.
[0052] The memory 102 may include one or more computer-readable storage media, which may be non-transitory. The memory 102 may also include a high-speed random access memory, and a non-volatile memory, such as one or more disk storage devices, flash memory storage devices. In this embodiment, the memory 102 is at least used to store the following computer program, wherein, after the computer program is loaded and executed by the processor 101, it can implement the relevant steps of the knowledge reasoning method for multi-relational scenarios disclosed in any of the aforementioned embodiments. In addition, the resources stored in the memory 102 may also include an operating system and data, etc., and the storage method may be temporary storage or permanent storage. Among them, the operating system may include Windows, Unix, Linux, etc. The data may include, but is not limited to, the data involved in the above-mentioned knowledge reasoning method for multi-relational scenarios, etc.
[0053] Furthermore, the knowledge reasoning device for multi-relation scenarios in this embodiment may also include: The input interface 103 is used to obtain the knowledge reasoning program for multi-relational scenarios imported from the outside, and save the obtained knowledge reasoning program for multi-relational scenarios to the memory 102. It can also be used to obtain various instructions and parameters transmitted by external terminal devices, and transmit them to the processor 101, so that the processor 101 can use the above various instructions and parameters to carry out corresponding processing. In this embodiment, the input interface 103 can specifically include but is not limited to a USB interface, a serial interface, a voice input interface, a fingerprint input interface, a hard disk reading interface, etc.
[0054] The output interface 104 is used to output various data generated by the processor 101 to a terminal device connected thereto, so that other terminal devices connected to the output interface can obtain various data generated by the processor 101. In this embodiment, the output interface 104 may specifically include but is not limited to a USB interface, a serial interface, and the like.
[0055] The communication unit 105 is used to establish a remote communication connection between the server operation service optimization configuration device and the external server, so that the knowledge reasoning device for the multi-relationship scenario can mount the image file to the external server. In this embodiment, the communication unit 105 may specifically include but is not limited to a remote communication unit based on wireless communication technology or wired communication technology.
[0056] The keyboard 106 is used to obtain various parameter data or instructions input by the user by tapping the keycaps in real time.
[0057] The display 107 is used to display in real time the relevant information of the knowledge reasoning process for the multi-relation scenario.
[0058] The mouse 108 can be used to assist the user in inputting data and simplify the user's operation.
[0059] The present invention also discloses a readable storage medium, wherein the readable storage medium includes a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a removable hard disk, a CD-ROM, or any other form of storage medium known in the technical field. The readable storage medium stores a knowledge reasoning program for a multi-relational scenario, and when the knowledge reasoning program for a multi-relational scenario is executed by a processor, the steps of the knowledge reasoning method for a multi-relational scenario described in any one of the above items are implemented.
[0060] In summary, the present invention can quickly and accurately construct multi-dimensional relationships between entities and determine the types of these relationships, and expand traditional knowledge graphs to better represent complex relationships between entities.
[0061] In this specification, each embodiment is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. As for the method disclosed in the embodiment, since it corresponds to the system disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part.
[0062] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.
[0063] In the several embodiments provided by the present invention, it should be understood that the disclosed systems, systems and methods can be implemented in other ways. For example, the system embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of systems or units, which can be electrical, mechanical or other forms.
[0064] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0065] In addition, each functional module in each embodiment of the present invention may be integrated into one processing unit, or each module may exist physically separately, or two or more modules may be integrated into one unit.
[0066] Similarly, each processing unit in each embodiment of the present invention may be integrated into one functional module, or each processing unit may exist physically, or two or more processing units may be integrated into one functional module.
[0067] The steps of the method or algorithm described in conjunction with the embodiments disclosed herein may be implemented directly using hardware, a software module executed by a processor, or a combination of the two. The software module may be placed in a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
[0068] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.
[0069] The above is a detailed introduction to the knowledge reasoning method, system, device and readable storage medium for multi-relational scenarios provided by the present invention. Specific examples are used herein to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea. It should be pointed out that for ordinary technicians in this technical field, without departing from the principles of the present invention, several improvements and modifications can be made to the present invention, and these improvements and modifications also fall within the scope of protection of the present invention.
Claims
1. A knowledge reasoning method for multi-relational scenarios, characterized in that: include: Identify entities in text through machine learning models and link the entities to corresponding nodes in the knowledge graph; Use a parser and recurrent neural network to extract relationships between entities from text, determine relationship types, and generate multivariate relationship data; Use multi-relation hypergraph to model multi-relation data, and use embedding technology to map entities and relationships between entities in the knowledge graph into a continuous vector space to predict unknown entities and relationships between entities, and update the knowledge graph; Use graph structures for logical reasoning, learn reasoning rules from knowledge graphs, and search for specific paths to discover new relationships between entities.
2. The knowledge reasoning method for multi-relation scenarios according to claim 1 is characterized in that: The method of identifying entities in text by using a machine learning model and linking the entities to corresponding nodes in the knowledge graph includes: Perform word segmentation on the text, perform feature extraction on each word, and extract text features; Use machine learning models to classify words and identify entities in text; Retrieve candidate entities matching the entity name from the knowledge graph as link candidate nodes; Combining context information, entity descriptions, and relationships in the knowledge graph, entity disambiguation is performed to select a specific entity from candidate entities as a standard node. Link entities to standard nodes in the knowledge graph and determine the start and end positions of the entities.
3. The knowledge reasoning method for multi-relation scenarios according to claim 2 is characterized in that: The method of extracting the relationship between entities from the text using a grammar analyzer and a recurrent neural network and determining the relationship type includes: Use dependency parsing to parse the sentence structure of the text and identify entity pairs from the sentences in the text; For each entity pair, a relation extraction model based on the LSTM optimization algorithm based on the RNN is used to determine the type of relationship between them.
4. The knowledge reasoning method for multi-relation scenarios according to claim 3 is characterized in that: The method uses a multi-relation hypergraph to model multi-relation data, and uses embedding technology to map entities and relationships between entities in the knowledge graph to a continuous vector space to predict unknown entities and relationships between entities, and updates the knowledge graph, including: Modeling multivariate relational data using multi-relational hypergraphs to represent entities and relationships; Use embedding techniques to map entities and relations into a continuous vector space, predict unknown relations between entities through vector operations, use clustering or classification methods to predict new entity types or instances, and generate multivariate relation update data; Update the knowledge graph based on the updated data of multi-relationships.
5. The knowledge reasoning method for multi-relation scenarios according to claim 4 is characterized in that: The method uses graph structure for logical reasoning, learns reasoning rules from knowledge graphs, and searches for specific paths to discover new relationships between entities, including: Graph embedding technology is used to transform the entities and relations of the knowledge graph into vector representations, i.e., h + r ≈ t, where h, r, and t represent the vector representations of the head entity, relation, and tail entity, respectively; The scoring function is defined as , set the optimization objective to minimize the scoring function ; Use a depth-first search algorithm or a breadth-first search algorithm to find specific paths connecting entities in the knowledge graph to discover new entity relationships; Apply first-order logic or descriptive logic reasoning methods to verify and deduce new entity relationships to ensure the correctness and rationality of the relationships; Output the new entity relationships in a structured manner.
6. The knowledge reasoning method for multi-relation scenarios according to claim 2 is characterized in that: The text features include: part-of-speech features, context features, and morphological features; The machine learning models include but are not limited to: conditional random fields, bidirectional LSTM models, and BERT models.
7. The knowledge reasoning method for multi-relation scenarios according to claim 4 is characterized in that: The embedding technology adopts the translation-based knowledge graph embedding model TransE, the semantic matching-based knowledge graph embedding model ComplEx, or the rotation-based knowledge graph embedding model RotatE.
8. A knowledge reasoning system for multi-relational scenarios, characterized in that: include: The entity recognition and linking module is used to identify entities in text through machine learning models and link entities to corresponding nodes in the knowledge graph; The relation extraction module is used to extract the relationship between entities from the text using a grammar analyzer and a recurrent neural network, and determine the relationship type; The knowledge completion module is used to model multi-relational data using a multi-relational hypergraph, and use embedding technology to map entities and relationships between entities in the knowledge graph into a continuous vector space to predict unknown entities and relationships between entities, and update the knowledge graph; The graph reasoning module is used to perform logical reasoning using graph structures, learn reasoning rules from knowledge graphs, and search for specific paths to discover new relationships between entities.
9. A knowledge reasoning device for multi-relational scenarios, characterized in that: include: A memory for storing knowledge reasoning programs for multi-relational scenarios; A processor is used to implement the steps of the knowledge reasoning method for multi-relational scenarios as described in any one of claims 1 to 7 when executing the knowledge reasoning program for multi-relational scenarios.
10. A readable storage medium, characterized in that: The readable storage medium stores a knowledge reasoning program for a multi-relation scenario, and when the knowledge reasoning program for a multi-relation scenario is executed by a processor, the steps of the knowledge reasoning method for a multi-relation scenario as described in any one of claims 1 to 7 are implemented.
Citation Information
Patent Citations
Hyperedge link prediction method based on hypergraph convolution
CN112417219A
Method for constructing knowledge graph by unstructured information, server and storage medium
CN115795056A
Small sample knowledge graph completion method based on path information
CN115964505A
Knowledge hypergraph completion method based on graph structure conversion
CN116702900A
Knowledge graph and rule constraint combined data intelligent analysis method and system
CN118606440A
Cited By
Traditional Chinese medicinal material data management system and method for data retrieval
CN120045744A
Knowledge graph construction method and device based on entity chain finger and storage medium
CN120409640A
Knowledge graph construction method and device based on entity chain and storage medium
CN120409640B