Method, apparatus, device, and medium for continuously expanding knowledge structure

By finding parent and child nodes in the existing knowledge system and using a pre-trained language model for scoring, the problem of difficulty in expanding intermediate nodes in existing technologies is solved, achieving efficient and accurate knowledge structure expansion.

CN114925164BActive Publication Date: 2025-11-21INST OF AUTOMATION CHINESE ACAD OF SCI
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202210476432.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-04-29
Publication Date
2025-11-21
Estimated Expiration
2042-04-29

AI Technical Summary

Technical Problem

Existing knowledge structure expansion methods mainly focus on leaf nodes, making it difficult to efficiently and accurately expand intermediate nodes.

Method used

By finding the parent node of the knowledge node to be expanded in the existing knowledge system, using a multi-node labeling method to find child nodes, and based on the scoring of a pre-trained language model, the node to be expanded is inserted into the existing system.

Benefits of technology

It enables the efficient and accurate insertion of knowledge nodes to be expanded into the existing knowledge system, improving the efficiency and accuracy of expanding intermediate nodes.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114925164B_ABST
    Figure CN114925164B_ABST
Patent Text Reader

Abstract

The application provides a knowledge structure continuous expansion method, device, equipment and medium, the method comprises the following steps: finding out the parent node of the knowledge node to be expanded in the existing knowledge system; in the case that the parent node is a non-leaf node, all child nodes of the knowledge node to be expanded are found out in the existing knowledge system based on a multi-node marking method; and the knowledge node to be expanded is inserted into the existing knowledge system based on the parent node and all child nodes, so that when the knowledge node to be expanded is a non-leaf node, the knowledge node to be expanded is efficiently and accurately inserted into the existing knowledge system by finding the parent node and the child nodes.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of natural language processing technology, and in particular to a method, apparatus, device, and medium for the continuous expansion of knowledge structures. Background Technology

[0002] Knowledge is structured information used to explain things and solve problems. To enhance our understanding of knowledge relationships and patterns, researchers, based on certain principles and methods, categorize and classify knowledge with common characteristics according to different approaches and standards, thus forming an ordered knowledge system. For example, in the environmental field, knowledge is first divided according to environmental attributes into natural environment, artificial environment, and social environment. The natural environment can then be further divided into atmospheric environment, water environment, etc., based on environmental elements. This hierarchical division forms an ordered environmental knowledge system, facilitating subsequent environmental-related research.

[0003] However, with continuous societal progress and development, and based on more detailed research into knowledge, existing knowledge systems will constantly incorporate new concepts. Therefore, the continuous expansion of existing knowledge systems is crucial. The main task of this continuous expansion is to insert all concepts from the new set of concepts to be expanded into the existing knowledge system and update the hierarchical relationships between related concepts. However, traditional knowledge structure expansion methods mostly focus on expanding leaf nodes. To date, no efficient and accurate expansion method has been proposed for non-leaf nodes, making it difficult for traditional knowledge structure expansion methods to expand intermediate nodes. Summary of the Invention

[0004] This invention provides a method, apparatus, device, and medium for continuous knowledge structure expansion, which addresses the shortcomings of traditional knowledge structure expansion methods in the prior art, which mostly focus on expanding leaf nodes, making it difficult to expand intermediate nodes, and achieves more efficient and accurate expansion of intermediate nodes.

[0005] This invention provides a method for continuous expansion of knowledge structures, comprising:

[0006] Find the parent node of the knowledge node to be expanded in the existing knowledge system;

[0007] When the parent node is a non-leaf node, all child nodes of the knowledge node to be expanded are found in the existing knowledge system based on the multi-node labeling method.

[0008] Based on the parent node and all the child nodes, the knowledge node to be expanded is inserted into the existing knowledge system.

[0009] According to the knowledge structure continuous expansion method provided by the present invention, finding the parent node of the knowledge node to be expanded in the existing knowledge system specifically includes:

[0010] Find at least one local information node in the existing knowledge system that needs to be verified for the node to be expanded.

[0011] Construct the classification paths between the nodes to be expanded and the local information nodes to be verified;

[0012] The scores of each classification path are obtained based on the pre-trained language model, and the parent node is found from the classification path with the highest score.

[0013] According to the knowledge structure continuous expansion method provided by the present invention, the step of obtaining the scores of each classification path based on the pre-trained language model specifically includes:

[0014] The natural language for each classification path is generated based on the natural language generation model;

[0015] The natural language is input into a pre-trained language model to obtain the scores of each classification path output by the pre-trained language model.

[0016] According to a knowledge structure continuous expansion method provided by the present invention, the multi-node tagging method finds all child nodes of the knowledge node to be expanded in the existing knowledge system, specifically including:

[0017] Mark all unverified child nodes and all unverified grandchild nodes of the knowledge node to be expanded in the existing knowledge system;

[0018] Based on a natural language generation model, the node relationships between the knowledge nodes to be expanded, the child nodes to be verified, and the grandchild nodes to be verified are converted into natural language to be verified.

[0019] Each of the natural languages ​​to be verified is input into a pre-trained language model to obtain a score for each of the natural languages ​​to be verified output by the pre-trained language model.

[0020] Based on the score, child nodes are found from all the child nodes to be verified.

[0021] According to a method for continuous expansion of a knowledge structure provided by the present invention, the step of marking all unverified child nodes and all unverified grandchild nodes of the knowledge node to be expanded in the existing knowledge system specifically includes:

[0022] Based on the local information nodes of the knowledge nodes to be expanded, find and mark all the child nodes to be verified and all the grandchild nodes to be verified in the existing knowledge system.

[0023] According to a method for continuous expansion of knowledge structure provided by the present invention, before finding the parent node of the knowledge node to be expanded in the existing knowledge system, the method further includes:

[0024] Construct training paths for positive and negative example classification;

[0025] The initial language model is trained based on the positive example classification training path and the negative example classification training path to obtain a pre-trained language model.

[0026] According to the knowledge structure continuous expansion method provided by the present invention, the construction of positive example classification training path and negative example classification training path specifically includes:

[0027] Construct a positive example classification training path;

[0028] By changing some nodes in the positive example classification training path to sibling nodes of those nodes, a negative example classification training path is obtained.

[0029] The present invention also provides a knowledge structure continuous expansion device, comprising:

[0030] The first search unit is used to find the parent node of the knowledge node to be expanded in the existing knowledge system.

[0031] The second search unit is used to find all child nodes of the knowledge node to be expanded in the existing knowledge system based on the multi-node labeling method when the parent node is a non-leaf node.

[0032] An insertion unit is used to insert the knowledge node to be expanded into the existing knowledge system based on the parent node and all the child nodes.

[0033] The present invention also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the knowledge structure continuous expansion method as described above.

[0034] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the knowledge structure continuous expansion method as described above.

[0035] The present invention also provides a computer program product, including a computer program that, when executed by a processor, implements the knowledge structure continuous expansion method as described above.

[0036] This invention provides a method, apparatus, device, and medium for continuous expansion of knowledge structures. The method involves: identifying the parent node of the knowledge node to be expanded within an existing knowledge system; if the parent node is a non-leaf node, finding at least one child node of the knowledge node to be expanded within the existing knowledge system using a multi-node labeling method; and inserting the knowledge node to be expanded into the existing knowledge system based on the parent node and at least one child node. Thus, when the knowledge node to be expanded is a non-leaf node, efficient and accurate insertion into the existing knowledge system is achieved by searching for the parent and child nodes. Attached Figure Description

[0037] To more clearly illustrate the technical solutions in this invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.

[0038] Figure 1 This is one of the flowcharts illustrating the knowledge structure continuous expansion method provided by this invention;

[0039] Figure 2 This is a schematic diagram illustrating a scenario for updating the knowledge structure of an existing subject knowledge system, as provided by this invention.

[0040] Figure 3 This is the second flowchart of the knowledge structure continuous expansion method provided by the present invention;

[0041] Figure 4 The third flowchart illustrating the knowledge structure continuous expansion method provided by this invention;

[0042] Figure 5 This is the fourth flowchart of the knowledge structure continuous expansion method provided by the present invention;

[0043] Figure 6 This is a schematic diagram of the knowledge structure continuous expansion device provided by the present invention;

[0044] Figure 7 This is a schematic diagram of the structure of the electronic device provided by the present invention. Detailed Implementation

[0045] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this invention. All other embodiments obtained by those skilled in the art based on the embodiments of this invention without creative effort are within the scope of protection of this invention.

[0046] The following is combined Figures 1-5 The invention describes a method for continuously expanding the knowledge structure.

[0047] Figure 1 This is one of the flowcharts illustrating the knowledge structure continuous expansion method provided by the present invention, such as... Figure 1 As shown, the method includes:

[0048] Step S1: Find the parent node of the knowledge node to be expanded in the existing knowledge system;

[0049] Specifically, the existing knowledge system in this invention refers to a knowledge architecture that aggregates and categorizes knowledge with common attributes, and links several knowledge nodes of different classes based on clear superordinate-hyperordinate attribute relationships. Examples include knowledge architectures based on environmental attributes in the environmental domain, knowledge architectures based on food attributes (food source, food components, etc.) in the food domain, and knowledge architectures based on knowledge categories in the subject knowledge domain.

[0050] A knowledge node to be expanded refers to a knowledge node that does not exist in the existing knowledge system and needs to be added. The parent node refers to the knowledge node that is the closest superordinate term to the knowledge node to be expanded. For ease of understanding, let's illustrate this with an example. For the knowledge architecture of the environmental domain, the environment is first divided into natural environment, artificial environment, and social environment according to its attributes. The natural environment, simply put, refers to the environment that exists naturally without human intervention. Therefore, the natural environment can be further divided into atmospheric environment, water environment, etc., according to environmental elements. The social environment, simply put, refers to the environment formed by various social relationships between people. Therefore, the social environment can be divided into political system, economic system, cultural tradition, neighborhood relations, etc., according to social relationships. Therefore, for the knowledge node "atmospheric environment," its parent node is the knowledge node "natural environment," and the knowledge node "water environment" is the sibling node of the knowledge node "atmospheric environment," which is the grandchild node of the knowledge node "environment."

[0051] In another embodiment, within the subject knowledge domain of teaching, the entire subject's knowledge system links various knowledge nodes (subjects) according to a clear superordinate-subordinate attribute relationship. As researchers delve deeper into the knowledge, several new knowledge nodes to be expanded will be continuously added to the knowledge system, so that the knowledge can be better learned and accepted by scholars. This invention is explained here using the subject knowledge domain as an example.

[0052] like Figure 2 As shown, the current knowledge structure of the existing knowledge system has a root node of "Science," and its subtrees are Natural Sciences—Chemistry, Natural Sciences—Physics—Mechanics, Anthropology—Archaeology, and Civics. There is now a new concept, "Social Sciences," to be expanded. Because there are clear superordinate-hyperordinate attribute relationships between the various knowledge nodes in the knowledge structure, in order to ensure that Social Sciences can be accurately inserted into the existing knowledge system, it is necessary to first find the parent node of Social Sciences, "Science."

[0053] In practical applications, semantic information can be extracted from existing knowledge nodes and knowledge nodes to be expanded. By parsing this semantic information, the hypernym-hyponym attribute relationships between knowledge nodes can be obtained, and the parent node can be found. For example, the context encoder in the Taxonomy Expansion with Dynamic Margin Loss through Taxonomy-Paths (TEMP) model can be used to capture the relationships between knowledge nodes.

[0054] Specifically, TEMP is first used to generate a classification path for each knowledge node in the existing knowledge system. Then, the knowledge nodes to be expanded are added to the end of the path of each node, forming a new classification path P. Wherein, classification path P = [ROOT, N1, N2, ..., N...]. D The subscript D refers to N. D The depth, ROOT refers to the root node in the classification path, N i-1 It refers to N i The parent node.

[0055] After obtaining several classification paths P, each classification path P is scored using TEMP, and finally the parent node is found from the classification path with the highest score.

[0056] Step S2: If the parent node is a non-leaf node, find all the child nodes of the knowledge node to be expanded in the existing knowledge system based on the multi-node labeling method.

[0057] In practical applications, it's easy to understand that the parent node of the knowledge node to be expanded may be a leaf node or a non-leaf node, such as... Figure 2 The parent node "Science" in the social sciences section is a non-leaf node. In this case, it is also necessary to find the child nodes "Anthropology" and "Civics" of the social sciences to ensure the completeness of the expanded knowledge system.

[0058] Specifically, the Multiple Nodes Labeling (MNL) method is used to label all first knowledge nodes that could be children of the knowledge node to be expanded, and all second knowledge nodes that could be grandchild nodes. Then, the BERT (Bidirectional Encoder Representations from Transformer) model is used to identify the contextual semantic relationships between the knowledge node to be expanded and each first and second knowledge node. By analyzing these contextual semantic relationships, the correct child nodes are inferred from the first knowledge nodes.

[0059] Step S3: Based on the parent node and all the child nodes, insert the knowledge node to be expanded into the existing knowledge system.

[0060] Specifically, the knowledge node to be expanded is inserted into the corresponding position between the parent node and the child node, thus creating a new subtree. For example... Figure 2 By inserting social sciences between the parent node "science" and its two child nodes "anthropology" and "citizenship", new subtrees "science-social science-anthropology" and "science-social science-citizenship" are constructed, thereby completing the expansion of the knowledge system.

[0061] The knowledge structure continuous expansion method provided by this invention finds the parent node of the knowledge node to be expanded in the existing knowledge system; when the parent node is a non-leaf node, it finds at least one child node of the knowledge node to be expanded in the existing knowledge system based on a multi-node labeling method; and based on the parent node and at least one child node, it inserts the knowledge node to be expanded into the existing knowledge system. Thus, when the knowledge node to be expanded is a non-leaf node, by finding the parent node and child nodes, it achieves efficient and accurate insertion of the knowledge node to be expanded into the existing knowledge system.

[0062] Alternatively, in another embodiment of the present invention, reference is made to... Figure 3 , Figure 3 The second flowchart illustrating the knowledge structure continuous expansion method provided by this invention is as follows: Figure 3 As shown: Finding the parent node of the knowledge node to be expanded in the existing knowledge system specifically includes:

[0063] Step S11: Locate at least one local information node to be verified in the existing knowledge system for the node to be expanded;

[0064] It should be noted that while TEMP can narrow the search scope of the entire knowledge system in some application scenarios, the search classification path may still be too long, resulting in slow search efficiency for parent nodes. Furthermore, excessively long classification paths can interfere with the judgment of leaf nodes, thus affecting the search of subsequent child nodes. Therefore, this invention uses local information nodes to solve the above problems, thereby achieving efficient and accurate insertion of knowledge nodes to be expanded into the existing knowledge system.

[0065] Specifically, a local information node refers to a knowledge node whose path distance to the node to be expanded is less than a set local path distance. For example, a knowledge node that belongs to the hypernym relationship of the node to be expanded and its parent or sibling nodes, or a knowledge node that belongs to the hyponym relationship of the node to be expanded and its parent or sibling nodes, etc., are not restricted in this regard.

[0066] In this step, the semantic information of each knowledge node can be used to obtain the attribute relationships between hypernyms and hyponyms, thereby finding all possible local information nodes to be verified. Furthermore, TEMP can be used to generate classification paths for each knowledge node in the existing knowledge system. After inserting the nodes to be expanded into each classification path based on semantic recognition, the local information nodes to be verified can be extracted from each classification path.

[0067] Step S12: Construct each classification path between the node to be expanded and each of the local information nodes to be verified;

[0068] In this step, classification paths can be constructed based on the attribute relationships between hypernyms and hyponyms between the inferred knowledge nodes. Alternatively, the nodes to be expanded can be directly inserted after, before, or between local information nodes to construct at least three classification paths corresponding to a set of local information nodes, without any restrictions.

[0069] Step S13: Based on the pre-trained language model, obtain the score of each classification path, and find the parent node from the classification path with the highest score.

[0070] Specifically, a pre-trained language model refers to a model with language representation function, and preferably, a pre-trained language representation model (Bidirectional Encoder Representation from Transformers, BERT) is used.

[0071] Because BERT needs to adapt to a wide variety of natural language tasks, its input parameters must consist of text parameters containing one or more natural language sentences. Therefore, to obtain scores for each classification path, a specific approach is to first generate the natural language for each classification path using a natural language generation model; then, input the natural language into a pre-trained language model to obtain the scores for each classification path output by the pre-trained language model. For example, a set of classification paths P = (Anthropology-Archaeology-Natural Sciences) can be transformed into the appropriate natural language "Anthropology includes Archaeology, and Archaeology includes Social Sciences".

[0072] The knowledge structure continuous expansion method provided by this invention finds at least one verifiable local information node in the existing knowledge system for the node to be expanded; then constructs classification paths between the node to be expanded and each verifiable local information node; finally, it obtains the score of each classification path based on a pre-trained language model and finds the parent node from the classification path with the highest score. This improves the efficiency of finding the parent node and reduces the interference of classification paths on the judgment of leaf nodes, thereby achieving efficient and accurate insertion of the knowledge node to be expanded into the existing knowledge system.

[0073] Alternatively, in another embodiment of the present invention, reference is made to... Figure 4 , Figure 4 The third flowchart illustrating the knowledge structure continuous expansion method provided by this invention is as follows: Figure 4 As shown: The multi-node tagging method retrieves all child nodes of the knowledge node to be expanded within the existing knowledge system, specifically including:

[0074] Step S21: Mark all the unverified child nodes and all the unverified grandchild nodes of the knowledge node to be expanded in the existing knowledge system;

[0075] In this step, after finding the parent node, all child nodes and grandchild nodes to be verified are found and marked from all branch paths passing through the parent node. For example, all child nodes and grandchild nodes of the parent node are set as child nodes and grandchild nodes to be verified.

[0076] In addition, in another embodiment, when the number of child nodes and grandchild nodes of the parent node is too large, in order to improve the search speed of child nodes, all child nodes to be verified and all grandchild nodes to be verified can be searched and marked in the existing knowledge system based on the local information nodes of the knowledge nodes to be expanded.

[0077] Specifically, the local information node is the local information node to be verified corresponding to the classification path with the highest score among all the local information nodes to be verified found in this invention. In this step, after obtaining the local information node, all the child nodes to be verified and all the grandchild nodes to be verified can be found and marked among the knowledge nodes within a certain range from the local information node. This precisely narrows the search range through the local information node, thereby improving the search speed of child nodes.

[0078] Step S22: Based on the natural language generation model, the node relationships between the knowledge nodes to be expanded and each of the child nodes and grandchild nodes to be verified are converted into natural language to be verified.

[0079] Specifically, the grandchild node to be verified is the child node of the child node to be verified. In this step, the knowledge node to be expanded is first connected to a child node to be verified, and then the child node to be verified is connected to the child node to be verified, forming at least one set of classification paths to be verified.

[0080] After obtaining all the classification paths to be verified using the above method, we can first use a natural language generation model to convert the child nodes to be verified of the knowledge nodes to be expanded, and the child nodes of the child nodes to be verified (grandchild nodes to be verified) into natural language. Then, based on the contextual relationship between the knowledge nodes to be expanded and the child nodes to be verified, we can combine the knowledge nodes to be expanded with the natural language and convert them into the natural language to be verified. Figure 2 As shown, first, “Natural Sciences – Chemistry – Physics” is transformed into “Natural Sciences, including Chemistry and Physics”. Then, the knowledge node to be expanded, “Social Sciences”, is combined with the natural language “Natural Sciences, including Chemistry and Physics” to be transformed into the natural language to be verified, “Social Sciences include Natural Sciences, and Natural Sciences include Chemistry and Physics”.

[0081] Step S23: Input each of the natural languages ​​to be verified into the pre-trained language model to obtain the scores of each of the natural languages ​​to be verified output by the pre-trained language model;

[0082] Specifically, TEMP or BERT can be used to obtain scores for each natural language to be verified, and there are no restrictions on which one is used.

[0083] Step S24: Based on the score, find the child nodes from all the child nodes to be verified.

[0084] In this step, you can select the child node with the highest score as the child node, or you can select the child node with the highest score ranking in the preset order as the child node.

[0085] It should also be noted that since there may be more than one child node, this invention can also use a reverse expansion method to verify the accuracy of the child node search, in order to ensure the accuracy of the child node search. For example, the child node can be changed to a sibling node, and the modified classification path can be converted into natural language and input into the pre-trained language model. When the score output by the pre-trained language model is lower than the original score, it is determined that the child node search is correct.

[0086] Alternatively, in another embodiment of the present invention, reference is made to... Figure 5 , Figure 5 The fourth flowchart illustrating the knowledge structure continuous expansion method provided by this invention is as follows: Figure 5 As shown: Before finding the parent node of the knowledge node to be expanded in the existing knowledge system, the process also includes:

[0087] Step S101: Construct positive example classification training path and negative example classification training path;

[0088] In this context, a positive example classification training path refers to a path consisting of nodes with correct hypernym-hyponym attribute relationships; a negative example classification training path refers to a path containing nodes with incorrect hypernym-hyponym attribute relationships.

[0089] Furthermore, in another embodiment, to avoid poor training results due to insufficient training samples, the present invention can construct the positive example classification training path first, and then change some nodes in the positive example classification training path to their sibling nodes to obtain the negative example classification training path. For example, refer to... Figure 2 By changing "Anthropology" to its sibling node "Natural Sciences", a new negative example "Natural Sciences-Archaeology-Social Sciences" is obtained, thereby enhancing the robustness of the model and alleviating the problem of few samples.

[0090] Step S102: Train the initial language model based on the positive example classification training path and the negative example classification training path to obtain a pre-trained language model.

[0091] Specifically, during model training, the context encoder in the initial language model is trained.

[0092] In this step, during training, both the positive and negative example classification training paths are first converted into their corresponding natural language. Then, the natural language corresponding to the positive and negative example classification training paths is input into the initial language model. The parameters of the context encoder are updated by comparing the predicted labels output by the initial language model with the true labels of the training paths until a pre-trained language model is obtained.

[0093] The knowledge structure continuous expansion device provided by the present invention is described below. The knowledge structure continuous expansion device described below and the knowledge structure continuous expansion method described above can be referred to in correspondence.

[0094] refer to Figure 6 , Figure 6 This is a schematic diagram of the knowledge structure continuous expansion device provided by the present invention, as shown below. Figure 6 As shown, the knowledge structure continuous expansion device includes: a first search unit 610, used to find the parent node of the knowledge node to be expanded in the existing knowledge system; a second search unit 620, used to find all child nodes of the knowledge node to be expanded in the existing knowledge system based on a multi-node labeling method when the parent node is a non-leaf node; and an insertion unit 630, used to insert the knowledge node to be expanded into the existing knowledge system based on the parent node and all the child nodes.

[0095] Furthermore, the first search unit 610 is also used to find at least one unverified local information node of the node to be expanded in the existing knowledge system; construct each classification path between the node to be expanded and each of the unverified local information nodes; obtain the score of each classification path based on the pre-trained language model, and find the parent node from the classification path with the highest score. The first search unit 610 is also used to generate natural language for each classification path based on a natural language generation model; input the natural language into the pre-trained language model to obtain the score of each classification path output by the pre-trained language model.

[0096] Furthermore, the second search unit 620 is also used to mark all unverified child nodes and all unverified grandchild nodes of the knowledge node to be expanded in the existing knowledge system; convert the node relationship between the knowledge node to be expanded and each of the unverified child nodes and each of the unverified grandchild nodes into unverified natural language based on a natural language generation model; input each of the unverified natural languages ​​into a pre-trained language model to obtain a score of each of the unverified natural languages ​​output by the pre-trained language model; and find child nodes from all the unverified child nodes based on the scores.

[0097] Furthermore, the second search unit 620 is also used to search for and mark all unverified child nodes and all unverified grandchild nodes in the existing knowledge system based on the local information nodes of the knowledge nodes to be expanded.

[0098] Furthermore, the first search unit 610 is also used to construct a positive example classification training path and a negative example classification training path; and to train the initial language model based on the positive example classification training path and the negative example classification training path to obtain a pre-trained language model. The first search unit 610 is also used to construct a positive example classification training path; and to change some nodes in the positive example classification training path to sibling nodes of those nodes to obtain a negative example classification training path.

[0099] The knowledge structure continuous expansion device proposed in this invention finds the parent node of the knowledge node to be expanded in the existing knowledge system; when the parent node is a non-leaf node, it finds all child nodes of the knowledge node to be expanded in the existing knowledge system based on a multi-node labeling method; and based on the parent node and all child nodes, it inserts the knowledge node to be expanded into the existing knowledge system. Thus, when the knowledge node to be expanded is a non-leaf node, by finding the parent node and child nodes, it achieves efficient and accurate insertion of the knowledge node to be expanded into the existing knowledge system.

[0100] Figure 7 An example is a schematic diagram of the physical structure of an electronic device, such as... Figure 7 As shown, the electronic device may include a processor 710, a communications interface 720, a memory 730, and a communication bus 740, wherein the processor 710, communications interface 720, and memory 730 communicate with each other via the communication bus 740. The processor 710 can call logical instructions in the memory 730 to execute a knowledge structure continuous expansion method. This method includes: finding the parent node of the knowledge node to be expanded in the existing knowledge system; if the parent node is a non-leaf node, finding all child nodes of the knowledge node to be expanded in the existing knowledge system based on a multi-node tagging method; and inserting the knowledge node to be expanded into the existing knowledge system based on the parent node and all the child nodes.

[0101] Furthermore, the logical instructions in the aforementioned memory 730 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, essentially, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0102] On the other hand, the present invention also provides a computer program product, which includes a computer program that can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the knowledge structure continuous expansion method provided by the above methods. The method includes: finding the parent node of the knowledge node to be expanded in the existing knowledge system; if the parent node is a non-leaf node, finding all child nodes of the knowledge node to be expanded in the existing knowledge system based on a multi-node labeling method; and inserting the knowledge node to be expanded into the existing knowledge system based on the parent node and all the child nodes.

[0103] In another aspect, the present invention also provides a non-transitory computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements a method for continuously expanding a knowledge structure provided by the methods described above. This method includes: finding the parent node of the knowledge node to be expanded in an existing knowledge system; if the parent node is a non-leaf node, finding all child nodes of the knowledge node to be expanded in the existing knowledge system based on a multi-node tagging method; and inserting the knowledge node to be expanded into the existing knowledge system based on the parent node and all the child nodes.

[0104] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.

[0105] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.

[0106] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for continuous expansion of knowledge structure, characterized in that, include: Find the parent node of the knowledge node to be expanded in the existing knowledge system; When the parent node is a non-leaf node, all child nodes of the knowledge node to be expanded are found in the existing knowledge system based on the multi-node labeling method. Based on the parent node and all the child nodes, the knowledge node to be expanded is inserted into the existing knowledge system; Finding the parent node of the knowledge node to be expanded in the existing knowledge system specifically includes: Find at least one local information node in the existing knowledge system that needs to be verified for the node to be expanded. Construct the classification paths between the nodes to be expanded and the local information nodes to be verified; The scores of each classification path are obtained based on the pre-trained language model, and the parent node is found from the classification path with the highest score.

2. The knowledge structure continuous expansion method according to claim 1, characterized in that, The scoring of each classification path based on the pre-trained language model specifically includes: The natural language for each classification path is generated based on the natural language generation model; The natural language is input into a pre-trained language model to obtain the scores of each classification path output by the pre-trained language model.

3. The knowledge structure continuous expansion method according to claim 1, characterized in that, The multi-node tagging method identifies all child nodes of the knowledge node to be expanded within the existing knowledge system, specifically including: Mark all unverified child nodes and all unverified grandchild nodes of the knowledge node to be expanded in the existing knowledge system; Based on a natural language generation model, the node relationships between the knowledge nodes to be expanded, the child nodes to be verified, and the grandchild nodes to be verified are converted into natural language to be verified. Each of the natural languages ​​to be verified is input into a pre-trained language model to obtain a score for each of the natural languages ​​to be verified output by the pre-trained language model. Based on the score, child nodes are found from all the child nodes to be verified.

4. The knowledge structure continuous expansion method according to claim 3, characterized in that, The step of marking all unverified child nodes and all unverified grandchild nodes of the knowledge node to be expanded in the existing knowledge system specifically includes: Based on the local information nodes of the knowledge nodes to be expanded, find and mark all the child nodes to be verified and all the grandchild nodes to be verified in the existing knowledge system.

5. The knowledge structure continuous expansion method according to any one of claims 1 to 4, characterized in that, Before finding the parent node of the knowledge node to be expanded in the existing knowledge system, the process also includes: Construct training paths for positive and negative example classification; The initial language model is trained based on the positive example classification training path and the negative example classification training path to obtain a pre-trained language model.

6. The knowledge structure continuous expansion method according to claim 5, characterized in that, The construction of positive example classification training paths and negative example classification training paths specifically includes: Construct a positive example classification training path; By changing some nodes in the positive example classification training path to sibling nodes of those nodes, a negative example classification training path is obtained.

7. A knowledge structure continuous expansion device, characterized in that, include: The first search unit is used to find the parent node of the knowledge node to be expanded in the existing knowledge system. The second search unit is used to find all child nodes of the knowledge node to be expanded in the existing knowledge system based on the multi-node labeling method when the parent node is a non-leaf node. An insertion unit is used to insert the knowledge node to be expanded into the existing knowledge system based on the parent node and all the child nodes; Finding the parent node of the knowledge node to be expanded in the existing knowledge system specifically includes: Find at least one local information node in the existing knowledge system that needs to be verified for the node to be expanded. Construct the classification paths between the nodes to be expanded and the local information nodes to be verified; The scores of each classification path are obtained based on the pre-trained language model, and the parent node is found from the classification path with the highest score.

8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the knowledge structure continuous expansion method as described in any one of claims 1 to 6.

9. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the knowledge structure continuous expansion method as described in any one of claims 1 to 6.

Citation Information

Patent Citations

  • Semantic query expansion method based on domain knowledge

    CN101630314A