End-to-end concept system construction method and system
Through the end-to-end method, the pre-trained language model and reinforcement learning model are used to gradually build a concept system based on the probability distribution of the upper and lower relationships of word pairs, which solves the problem that the construction of a concept system in the existing technology cannot accurately express semantic features, and improves the construction Accuracy and reduce maintenance costs.
Patent Information
- Application Number
- CN202311094760.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-08-28
- Publication Date
- 2024-11-12
- Estimated Expiration
- 2043-08-28
AI Technical Summary
In the prior art, the construction of concept systems using pre-trained language models cannot accurately express the semantic characteristics between words, resulting in the construction of concept systems that have errors and high maintenance costs.
Using an end-to-end method, the semantic features of words are obtained through pre-training language models, and the reinforcement learning model is used to gradually build a conceptual system based on the probability distribution of the upper and lower relationships between word pairs, and select the word pair with the greatest probability to add it to the system. Until the build is complete.
It realizes the semantic characteristics between words more accurately, reduces the accumulated errors and maintenance costs, and improves the accuracy of the construction of the concept system.
Smart Images

Figure CN117313738B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of natural language processing, and in particular to an end-to-end concept system construction method and system. Background Art
[0002] Concept systems use hierarchical structures to describe the semantic relationships between concepts. They are an important type of knowledge system and are widely used in question-answering systems, information retrieval and other tasks. For example, medical concept systems are used to organize and manage diseases in the medical field. At the same time, a large number of neural network models often use knowledge content such as concept systems to enhance their semantic expression capabilities. However, the concept systems in various application systems are currently mainly completed manually. For example, language concept systems and common sense concept bodies are completely constructed manually. The concept system in DBpedia is summarized by engineers after observing the organization and naming of tag system information in Wikipedia. The definitions and specifications of types, attributes and relationships in Schema.org are negotiated by many technology companies. This method is not only time-consuming and labor-intensive, but the constructed concept system often has a large number of missing concepts, making the update and maintenance costs high.
[0003] In the prior art, the task of constructing a concept system is usually decomposed into two independent subtasks: judging the semantic relationship between concepts and constructing a conceptual hierarchy. The two subtasks lack information feedback, which can easily lead to problems such as error accumulation. In recent years, more and more tasks use pre-trained language models to obtain the semantic features of words and judge the semantic relationship between words. Although this has achieved certain results in the construction of concept systems, this approach can only model the first subtask, and there are still problems such as error accumulation, which leads to the constructed concept system being unable to accurately express the semantic features between words. Summary of the invention
[0004] The end-to-end concept system construction method and system provided by the present invention are used to solve the problem in the prior art that the concept system constructed using the existing pre-trained language model cannot accurately express the semantic features between words.
[0005] The present invention provides an end-to-end concept system construction method, comprising:
[0006] Adding any word in the first word pair included in the set of concepts to be constructed to the initial concept system, wherein the first word pair is a word pair with the highest probability obtained from a first probability distribution corresponding to the hyponymy relationship between the word pairs included in the set of concepts to be constructed;
[0007] Performing the first processing process at least once until the set of concepts to be constructed is empty, and obtaining a concept system corresponding to the set of concepts to be constructed according to the updated initial concept system;
[0008] The first processing step includes:
[0009] Deleting the words included in the initial concept system from the set of concepts to be constructed, so as to update the set of concepts to be constructed;
[0010] The first word in the second word pair is added to the initial concept system to update the initial concept system, the second word pair is the word pair with the highest probability obtained from the second probability distribution corresponding to the hierarchical relationship between the third word pairs, the first word is the word in the second word pair that is not in the initial concept system, and the third word pair is a word pair consisting of the words included in the updated concept set to be constructed and the words included in the updated initial concept system.
[0011] According to an end-to-end concept system construction method provided by the present invention, the first word pair is obtained in a manner including:
[0012] Inputting the word pairs included in the concept set to be constructed into the target strategy network as action vectors to obtain a first action feature vector;
[0013] Inputting the first action feature vector into the target strategy network to obtain a first probability distribution corresponding to the hyponymous relationship between the word pairs included in the concept set to be constructed;
[0014] According to the first probability distribution, obtaining the first word pair;
[0015] The target policy network is obtained in the following way:
[0016] The second processing process is executed at least once until the policy network meets the convergence condition to obtain the target policy network, wherein the convergence condition is that the accuracy of the first concept system corresponding to the concept set updated in the last second processing process reaches a preset value;
[0017] The second processing step includes:
[0018] Inputting the word pairs included in the concept set of the initial sample as action vectors into the pre-trained language model in the strategy network, and obtaining a second action feature vector corresponding to the word pairs included in the concept set based on the pre-trained language model;
[0019] Inputting the second action feature vector into a two-layer forward neural network in a strategy network to obtain a third probability distribution corresponding to the hyponymous relationship between the word pairs included in the concept set;
[0020] randomly selecting a fourth word pair from the word pairs included in the concept set corresponding to the third probability distribution;
[0021] adding any word included in the fourth word pair to the second concept system;
[0022] Performing at least one third processing process to update the concept set until the updated concept set is empty, and obtaining the first concept system according to the updated second concept system obtained in the last third processing process;
[0023] Wherein, the third processing process includes:
[0024] Deleting the words included in the second concept system from the concept set to update the concept set;
[0025] Inputting a fifth word pair as an action vector into the pre-trained language model to obtain a third action feature vector corresponding to the fifth word pair, wherein the fifth word pair is a word pair consisting of the words included in the updated concept set and the words included in the updated second concept system;
[0026] Inputting the second concept system and the visual matrix corresponding to the second concept system into the pre-trained language model to obtain a first feature vector corresponding to the second concept system;
[0027] Inputting the first feature vector into a single-layer forward neural network in a policy network, compressing the dimension of the first feature vector, and obtaining a second feature vector;
[0028] splicing the second feature vector and the third action feature vector and inputting the concatenated vectors into the double-layer feedforward neural network to obtain a fourth probability distribution corresponding to the hyponymous relationship between the fifth word pair;
[0029] Randomly select a sixth word pair from the fifth word pairs corresponding to the fourth probability distribution;
[0030] The second word in the sixth word pair is added to the second concept system to update the second concept system, where the second word is the word in the sixth word pair that is not in the second concept system.
[0031] According to an end-to-end concept system construction method provided by the present invention, the second word pair is obtained in the following manner:
[0032] Inputting the word pairs included in the updated concept set to be constructed into the pre-trained language model as action vectors to obtain a second action feature vector;
[0033] Inputting an initial concept system and a visual matrix corresponding to the initial concept system into the pre-trained language model to obtain a third eigenvector of the initial concept system;
[0034] Inputting the third eigenvector into a single-layer feed-forward neural network in a target policy network, compressing the dimension of the third eigenvector, and obtaining a fourth eigenvector;
[0035] The fourth feature vector and the second action feature vector are concatenated and input into a two-layer feed-forward neural network in the target strategy network to obtain a second probability distribution corresponding to the hyponymous relationship between the third word pairs;
[0036] The second word pair is obtained according to the second probability distribution.
[0037] According to an end-to-end concept system construction method provided by the present invention, a method for acquiring a visual matrix of the second concept system includes:
[0038] The visual matrix is obtained according to the hierarchical relationship between the words included in the second concept system.
[0039] The present invention also provides an end-to-end concept system construction system, comprising:
[0040] A data acquisition module, used to add any word in the first word pair included in the concept set to be constructed to the initial concept system, wherein the first word pair is the word pair with the highest probability obtained from the first probability distribution corresponding to the hyponymy relationship between the word pairs included in the concept set to be constructed;
[0041] A system construction module, configured to execute the first processing process at least once until the set of concepts to be constructed is empty, and to obtain a concept system corresponding to the set of concepts to be constructed according to the updated initial concept system;
[0042] The first processing step includes:
[0043] Deleting the words included in the initial concept system from the set of concepts to be constructed, so as to update the set of concepts to be constructed;
[0044] The first word in the second word pair is added to the initial concept system to update the initial concept system, the second word pair is the word pair with the highest probability obtained from the second probability distribution corresponding to the hierarchical relationship between the third word pairs, the first word is the word in the second word pair that is not in the initial concept system, and the third word pair is a word pair consisting of the words included in the updated concept set to be constructed and the words included in the updated initial concept system.
[0045] According to the end-to-end concept system construction system provided by the present invention, the data acquisition module is also used for:
[0046] The method for obtaining the first word pair includes:
[0047] Inputting the word pairs included in the concept set to be constructed into the target strategy network as action vectors to obtain a first action feature vector;
[0048] Inputting the first action feature vector into the target strategy network to obtain a first probability distribution corresponding to the hyponymous relationship between the word pairs included in the concept set to be constructed;
[0049] According to the first probability distribution, obtaining the first word pair;
[0050] The target policy network is obtained in the following way:
[0051] The second processing process is executed at least once until the policy network meets the convergence condition to obtain the target policy network, wherein the convergence condition is that the accuracy of the first concept system corresponding to the concept set updated in the last second processing process reaches a preset value;
[0052] The second processing step includes:
[0053] Inputting the word pairs included in the concept set of the initial sample as action vectors into the pre-trained language model in the strategy network, and obtaining a second action feature vector corresponding to the word pairs included in the concept set based on the pre-trained language model;
[0054] Inputting the second action feature vector into a two-layer forward neural network in a strategy network to obtain a third probability distribution corresponding to the hyponymous relationship between the word pairs included in the concept set;
[0055] randomly selecting a fourth word pair from the word pairs included in the concept set corresponding to the third probability distribution;
[0056] adding any word included in the fourth word pair to the second concept system;
[0057] Performing at least one third processing process to update the concept set until the updated concept set is empty, and obtaining the first concept system according to the updated second concept system obtained in the last third processing process;
[0058] Wherein, the third processing process includes:
[0059] Deleting the words included in the second concept system from the concept set to update the concept set;
[0060] Inputting a fifth word pair as an action vector into the pre-trained language model to obtain a third action feature vector corresponding to the fifth word pair, wherein the fifth word pair is a word pair consisting of the words included in the updated concept set and the words included in the updated second concept system;
[0061] Inputting the second concept system and the visual matrix corresponding to the second concept system into the pre-trained language model to obtain a first feature vector corresponding to the second concept system;
[0062] Inputting the first feature vector into a single-layer forward neural network in a policy network, compressing the dimension of the first feature vector, and obtaining a second feature vector;
[0063] splicing the second feature vector and the third action feature vector and inputting the concatenated vectors into the double-layer feedforward neural network to obtain a fourth probability distribution corresponding to the hyponymous relationship between the fifth word pair;
[0064] Randomly select a sixth word pair from the fifth word pairs corresponding to the fourth probability distribution;
[0065] The second word in the sixth word pair is added to the second concept system to update the second concept system, where the second word is the word in the sixth word pair that is not in the second concept system.
[0066] According to the end-to-end concept system construction system provided by the present invention, the system construction module is also used for:
[0067] Inputting the word pairs included in the updated concept set to be constructed into the pre-trained language model as action vectors to obtain a second action feature vector;
[0068] Inputting an initial concept system and a visual matrix corresponding to the initial concept system into the pre-trained language model to obtain a third eigenvector of the initial concept system;
[0069] Inputting the feature vector into a single-layer forward neural network in a target policy network, compressing the dimension of the first feature vector, and obtaining a fourth feature vector;
[0070] The fourth feature vector and the second action feature vector are concatenated and input into a two-layer feed-forward neural network in the target strategy network to obtain a second probability distribution corresponding to the hyponymous relationship between the third word pairs;
[0071] The second word pair is obtained according to the second probability distribution.
[0072] The present invention also provides an electronic device, comprising a processor and a memory storing a computer program, wherein when the processor executes the program, the end-to-end concept system construction method as described in any one of the above is implemented.
[0073] 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 any of the above-described end-to-end concept system construction methods.
[0074] The present invention also provides a computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the end-to-end concept system construction method as described in any one of the above is implemented.
[0075] The end-to-end concept system construction method and system provided by the present invention are based on the probability distribution of the hierarchical relationship between word pairs, and each time a specific word pair with the highest probability is selected to be added to the concept system to construct the concept system of the concept set to be constructed, which can more accurately characterize the semantic features between the words in the concept set to be constructed. BRIEF DESCRIPTION OF THE DRAWINGS
[0076] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0077] Figure 1 It is a flow chart of the end-to-end concept system construction method provided by the present invention;
[0078] Figure 2 It is a schematic diagram of the overall structure of the target strategy network provided by the present invention;
[0079] Figure 3 It is a schematic diagram of the action and state design provided by the present invention;
[0080] Figure 4 It is a schematic diagram of the conversion from the probability system to the concept system provided by the present invention;
[0081] Figure 5 It is a schematic diagram of an example of a construction concept system provided by the present invention;
[0082] Figure 6 It is a structural diagram of the end-to-end concept system construction system provided by the present invention;
[0083] Figure 7 It is a schematic diagram of the physical structure of the electronic device provided by the present invention. DETAILED DESCRIPTION
[0084] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0085] In order to solve the error accumulation problem of the step-by-step method and effectively obtain the semantic features of words and their relationships, the present invention proposes an end-to-end concept system construction method. On the one hand, a pre-trained language model is used to obtain the semantic information of concepts and their upper and lower relationships and the structural information of part of the concept system structure. On the other hand, reinforcement learning is used to model the concept relationship judgment and the generation of the complete system structure end-to-end. The specific implementation is as follows:
[0086] Figure 1 is a flow chart of the end-to-end concept system construction method provided by the present invention, such as Figure 1 As shown, the method includes:
[0087] Step 110, adding any word in the first word pair included in the concept set to be constructed to the initial concept system, wherein the first word pair is the word pair with the highest probability obtained from the first probability distribution corresponding to the hyponymy relationship between the word pairs included in the concept set to be constructed;
[0088] Step 120, executing the first processing process at least once until the set of concepts to be constructed is empty, and obtaining a concept system corresponding to the set of concepts to be constructed according to the updated initial concept system;
[0089] The first processing step includes:
[0090] Deleting the words included in the initial concept system from the set of concepts to be constructed, so as to update the set of concepts to be constructed;
[0091] The first word in the second word pair is added to the initial concept system to update the initial concept system, the second word pair is the word pair with the highest probability obtained from the second probability distribution corresponding to the hierarchical relationship between the third word pairs, the first word is the word in the second word pair that is not in the initial concept system, and the third word pair is a word pair consisting of the words included in the updated concept set to be constructed and the words included in the updated initial concept system.
[0092] It should be noted that the execution subject of the above method may be a computer device.
[0093] Optionally, the concept set to be constructed may specifically consist of words covering various fields, such as animals, food, daily necessities, etc. The first word pair may specifically be a word pair with the highest probability in the probability distribution (i.e., the first probability distribution) corresponding to the upper and lower relationship between any two words in the concept set to be constructed. Generally speaking, the more accurate the upper and lower relationship between the word pairs is, the greater the corresponding probability value is.
[0094] Among them, the hyponym relationship can be specifically used to represent the hierarchical relationship between a pair of words. If the concept of one word is more specific than the other, then the former is the hyponym of the latter. For example, "cat" is the hyponym of "feline", and conversely, "feline" is the hypernym of "cat".
[0095] Optionally, the probability system can specifically adopt a tree structure, such as a classification tree, a binary tree, etc., and each node in the concept system is composed of each word included in the concept system to be constructed. The initial concept system can be formed by adding words to the concept system in advance, or the initial concept system can be formed without adding any words to the concept system. The present invention does not make specific limitations on this.
[0096] The present invention selects a word pair with the highest probability from the first probability distribution corresponding to the hyponymous relationship between the word pairs included in the concept set to be constructed, and adds any word therein to the initial concept system.
[0097] The first processing process is executed at least once until all words in the concept set to be constructed are added to the initial concept system. At this time, the concept set to be constructed is empty, and the initial concept system updated in the last first processing process is used as the concept system corresponding to the concept set to be constructed.
[0098] The first processing may specifically include:
[0099] Each time the words in the set to be constructed are added to the initial concept system, the words included in the initial concept system need to be deleted from the set of concepts to be constructed, so as to update the set of concepts to be constructed;
[0100] And the first word in the second word pair is added to the initial concept system to update the initial concept system.
[0101] Among them, the second word pair can be specifically the word pair with the highest probability obtained from the probability distribution corresponding to the hyponymous relationship between the third word pairs (i.e., the second probability distribution), the first word can be specifically the word in the second word pair that has not yet been added to the initial concept system, and the third word pair can be specifically the word pair composed of the words included in the updated concept set to be constructed and the words included in the updated initial concept system.
[0102] The end-to-end concept system construction method provided by the present invention is based on the probability distribution of the hyponymous and hyponymous relationships between word pairs. Each time, a specific word pair with the highest probability is selected to be added to the concept system to construct the concept system of the concept set to be constructed, which can more accurately characterize the semantic features between the words in the concept set to be constructed.
[0103] Furthermore, in one embodiment, the method for obtaining the first word pair may specifically include:
[0104] Inputting the word pairs included in the concept set to be constructed into the target strategy network as action vectors to obtain a first action feature vector;
[0105] Inputting the first action feature vector into the target strategy network to obtain a first probability distribution corresponding to the hyponymous relationship between the word pairs included in the concept set to be constructed;
[0106] According to the first probability distribution, obtaining the first word pair;
[0107] The target policy network is obtained in the following way:
[0108] The second processing process is executed at least once until the policy network meets the convergence condition to obtain the target policy network, wherein the convergence condition is that the accuracy of the first concept system corresponding to the concept set updated in the last second processing process reaches a preset value;
[0109] The second processing step includes:
[0110] Inputting the word pairs included in the concept set of the initial sample as action vectors into the pre-trained language model in the strategy network, and obtaining a second action feature vector corresponding to the word pairs included in the concept set based on the pre-trained language model;
[0111] Inputting the second action feature vector into a two-layer forward neural network in a strategy network to obtain a third probability distribution corresponding to the hyponymous relationship between the word pairs included in the concept set;
[0112] randomly selecting a fourth word pair from the word pairs included in the concept set corresponding to the third probability distribution;
[0113] adding any word included in the fourth word pair to the second concept system;
[0114] Performing at least one third processing process to update the concept set until the updated concept set is empty, and obtaining the first concept system according to the updated second concept system obtained in the last third processing process;
[0115] Wherein, the third processing process includes:
[0116] Deleting the words included in the second concept system from the concept set to update the concept set;
[0117] Inputting a fifth word pair as an action vector into the pre-trained language model to obtain a third action feature vector corresponding to the fifth word pair, wherein the fifth word pair is a word pair consisting of the words included in the updated concept set and the words included in the updated second concept system;
[0118] Inputting the second concept system and the visual matrix corresponding to the second concept system into the pre-trained language model to obtain a first feature vector corresponding to the second concept system;
[0119] Inputting the first feature vector into a single-layer forward neural network in a policy network, compressing the dimension of the first feature vector, and obtaining a second feature vector;
[0120] splicing the second feature vector and the third action feature vector and inputting the concatenated vectors into the double-layer feedforward neural network to obtain a fourth probability distribution corresponding to the hyponymous relationship between the fifth word pair;
[0121] Randomly select a sixth word pair from the fifth word pairs corresponding to the fourth probability distribution;
[0122] The second word in the sixth word pair is added to the second concept system to update the second concept system, where the second word is the word in the sixth word pair that is not in the second concept system.
[0123] Optionally, the present invention designs corresponding action, state and feature modules based on the idea of reinforcement learning, and defines the overall characteristics of the initial concept system to determine the probability of the hyponymous relationship between word pairs.
[0124] Through the probability of the hyponymy relationship between word pairs, specific words are selected and added to the concept tree. Finally, all the words in the concept set to be constructed are constructed into a concept tree, and the probability tree is used as the concept system of the concept set to be constructed.
[0125] The existing pre-trained language model (PLM) is fine-tuned to obtain feature representations (or action feature vectors, such as action feature matrices) of words suitable for the words included in the concept set to be constructed in the present invention.
[0126] Optionally, the word pairs included in the concept set to be constructed are input into the PLM in the target policy network as action vectors (eg, action matrices), and the action feature matrix of the word pairs, ie, the first action feature vector, is output based on the PLM.
[0127] The obtained first action feature vector is input into a double-layer feedforward neural network in a target strategy network, and based on the double-layer feedforward neural network, a probability distribution corresponding to the hyponymous relationship between the word pairs included in the concept set to be constructed is obtained, i.e., a first probability distribution.
[0128] From the first probability distribution corresponding to the hyponymous and hyponymous relationships between the word pairs included in the concept set to be constructed, a word pair with the highest probability is selected as the first word pair.
[0129] It should be noted that PLM refers to a model trained on large-scale unlabeled data. In the field of natural language processing, the goal of pre-training is to capture rich language knowledge and semantic representation by learning a language model of large-scale text data.
[0130] PLM fine-tuning: It refers to the supervised training of PLM using a small amount of labeled data based on the pre-trained language model. Through fine-tuning, PLM can adapt to the data and objectives of a specific task and improve the performance of the model on that task.
[0131] The "pre-training-fine-tuning" method refers to the process of first training a model with strong generalization ability on a large dataset and then fine-tuning it on downstream tasks.
[0132] Figure 2 is a schematic diagram of the overall structure of the target strategy network provided by the present invention, referring to Figure 2 , the method for obtaining the target policy network may specifically include: executing the second processing process at least once until the policy network meets the convergence condition, and using the policy network obtained at the time of convergence as the target policy network, and the convergence condition may specifically be that the accuracy of the first concept system corresponding to the concept set updated in the last second processing process reaches a preset value;
[0133] The second processing may specifically include:
[0134] The concept set of the initial sample (such as Figure 3 The word pairs included in the concept set in the concept set are input into the PLM in the strategy network as action vectors (i.e., action matrix), and the action feature matrix corresponding to the word pairs included in the concept set is output based on the PLM, i.e., the second action feature vector;
[0135] Inputting the obtained second action feature vector into a double-layer forward neural network in the strategy network, and outputting a probability distribution corresponding to the hyponymous relationship between the word pairs included in the concept set based on the double-layer forward neural network, i.e., a third probability distribution;
[0136] Randomly select a word pair from the word pairs included in the concept set corresponding to the obtained third probability distribution and use it as the fourth word pair;
[0137] Adding any word included in the fourth word pair to the second concept system can be specifically done by taking the initial concept system corresponding to the concept set of the initial sample as the second concept system;
[0138] Perform the third processing process at least once to update the concept set until all words included in the updated concept set are added to the second concept system, at which point the updated concept set is empty, and the updated second concept system obtained in the last third processing process is used as the first concept system of the concept set;
[0139] The third processing step may specifically include:
[0140] Each time a word in the concept set is added to the second concept system, the word included in the second concept system needs to be deleted from the concept set to update the concept set;
[0141] Inputting the fifth word pair as an action vector (i.e., an action matrix) into the PLM, and outputting an action feature matrix corresponding to the fifth word pair, i.e., a third action feature vector, based on the PLM, wherein the fifth word pair may specifically be a word pair consisting of words included in the updated concept set and words included in the updated second concept system;
[0142] The second concept system and the visual matrix corresponding to the second concept system are input into the PLM, and the visual matrix is used to replace the mask matrix in the PLM, so as to convert the two-dimensional second concept system into a one-dimensional sequence and input it into the PLM to obtain the characteristic matrix of the concept tree, that is, the first characteristic vector;
[0143] The obtained first feature vector is input into a single-layer feedforward neural network in the policy network, and the dimension of the first feature vector is compressed based on the single-layer feedforward neural network, and the compressed first feature vector is used as the second feature vector;
[0144] The second feature vector is sequentially concatenated with the third action feature vector, and the concatenation is input into a double-layer forward neural network, and a probability distribution corresponding to the hyponymous relationship between the fifth word pair is obtained based on the double-layer forward neural network, that is, a fourth probability distribution;
[0145] Randomly select any word pair from the fifth word pairs corresponding to the fourth probability distribution, and use it as the sixth word pair;
[0146] The second word in the sixth word pair is added to the second concept system to update the second concept system, wherein the second word may specifically be the word in the sixth word pair added to the second concept system.
[0147] For example, Figure 3 It is a schematic diagram of the action and state design provided by the present invention, referring to Figure 3 , the words in the concept set that have not been added to the partial concept system (i.e., the second concept system) include black tea, nutrients, vitamin C, green tea, tea, and coffee. There are a total of N word pairs consisting of all the words in the concept set that have not been added to the second concept system and the words included in the second concept system. There are 6 words in the concept set, and each word has 3 positions in the partial concept system, N=18. The N word pairs are input into the PLM, and an action feature matrix is output based on the PLM. The dimension of the action feature matrix output in the present invention is N*768. The second concept system and its corresponding visual matrix are input into the PLM, and the mask matrix in the PLM is replaced by the visual matrix. The second concept system is converted into a one-dimensional first eigenvector (1*768), and the first eigenvector is compressed by a unidirectional neural network and spliced with the action feature matrix, and then input into a double-layer forward neural network, and the probability distribution corresponding to the upper and lower relationships between the word pairs is output, and the word pair with the largest probability (coffee, beverage) is selected, coffee is deleted from the concept set, and added to the partial concept system.
[0148] It should be noted that the part consisting of a single-layer feedforward neural network and a double-layer feedforward neural network is denoted as π(a|S,U), and its specific calculation process is:
[0149] S t =Relu(M s +b s )
[0150]
[0151] a t ~π(a|S,U)
[0152] Among them, M s 、M U (include and ), b s and b U (include and ) represent the parameters of the feedforward neural network, U represents the parameters of the policy network, and a tRepresents the probability distribution P at time t t The word pair (or action) obtained by sampling the corresponding word pair, A t represents the action feature matrix at time t, S t It represents the characteristic matrix of the concept system constructed at time t, a represents an action, which can be specifically used to represent the word pairs selected from the probability distribution corresponding to the hierarchical relationship between word pairs, and S represents the characteristic matrix of the concept system.
[0153] In order to try all possible combinations, we randomly select word pairs to form a concept tree to adjust the model parameters. In order to guide the model to better select actions, it is necessary to set a reward value to provide feedback on the model's selection results. We set the F1 value of the concept system before and after the action is executed as a reward. in, represents the F1 value of the current time step, represents the F1 value of the previous time step. The process of adding words from the concept set to the concept system is called a time step. If the F1 value of the current time step is better than the F1 value of the previous time step, the reward value r t is positive, otherwise it is negative. The specific calculation process of F1 value is:
[0154]
[0155]
[0156] Can get Where P e and R e represent the precision and recall respectively,
[0157] IS-A prediction and IS-A gold They respectively represent the hierarchical relationship between words in the constructed concept system and the hierarchical relationship between words in the correct concept system.
[0158] Each time an action is completed, that is, a word pair is selected, the reward value of the concept system will be calculated to guide the subsequent word pair selection.
[0159] Furthermore, in one embodiment, the method for acquiring the visual matrix of the second concept system may specifically include:
[0160] The visual matrix is obtained according to the hierarchical relationship between the words included in the second concept system.
[0161] Optionally, the visual matrix corresponding to the second concept system can be obtained according to the hierarchical relationship between the words included in the second concept system.
[0162] Figure 4 This is a schematic diagram of the conversion from the probability system to the concept system provided by the present invention, referring to Figure 4 , assuming that the second concept system includes food, beverages, nutrients, vitamins, tea, and coffee. According to the hierarchical relationship between the above words, food is the hypernym of all other words, beverages are the hypernym of coffee and tea, and nutrients are the hypernym of vitamins. Words with hierarchical relationships can interact and influence each other.
[0163] The horizontal and vertical axes of the visual matrix are all the nodes of the concept system. The gray part in the figure means that the two words are visible, which means that they can interact and influence each other.
[0164] For example, for the word beverage in the figure, the words that are considered to have mutual influence with it are the superordinate word food of beverage, and the subordinate words coffee and tea of beverage.
[0165] The blank part of the visible matrix indicates that it is invisible. It is believed that the invisible words have little influence on each other, that is, there is no hierarchical relationship between invisible word pairs, so they are made invisible when extracting features.
[0166] Furthermore, in one embodiment, the second word pair is obtained in a manner including:
[0167] Inputting the word pairs included in the updated concept set to be constructed into the pre-trained language model as action vectors to obtain a second action feature vector;
[0168] Inputting an initial concept system and a visual matrix corresponding to the initial concept system into the pre-trained language model to obtain a third eigenvector of the initial concept system;
[0169] Inputting the third eigenvector into a single-layer feed-forward neural network in a target policy network, compressing the dimension of the third eigenvector, and obtaining a fourth eigenvector;
[0170] The fourth feature vector and the second action feature vector are concatenated and input into a two-layer feed-forward neural network in the target strategy network to obtain a second probability distribution corresponding to the hyponymous relationship between the third word pairs;
[0171] The second word pair is obtained according to the second probability distribution.
[0172] Optionally, the second word pair can be obtained by:
[0173] Input the word pairs included in the updated concept set to be constructed into the PLM in the target policy network as an action matrix (i.e., action vector), and output the action feature matrix corresponding to the word pairs included in the updated concept set to be constructed based on the PLM, i.e., the second action feature vector;
[0174] Input the initial concept system and the visual matrix corresponding to the initial concept system into the PLM in the target strategy network, and output the characteristic matrix of the initial concept system, i.e., the third characteristic vector, based on the PLM;
[0175] Input the third eigenvector into a single-layer feed-forward neural network in the target policy network, compress the dimension of the third eigenvector, and use the compressed third eigenvector as the fourth eigenvector;
[0176] The fourth feature vector obtained is concatenated with the second action feature vector and then input into a double-layer forward neural network in the target strategy network, and the probability distribution corresponding to the hyponymy relationship between the third word pair is output based on the double-layer forward neural network, that is, the second probability distribution;
[0177] A word pair with the largest probability is selected from the third word pairs corresponding to the second probability distribution, and is used as the second word pair.
[0178] We are Figure 5 The specific word selection process is shown in Figure 5 As shown, the numbers in the figure are the order of selecting words in each step. The incorrectly connected word pairs in the figure include (beverage, green tea), (food, vitamins), and the correctly connected word pairs include (nutrients, vitamins), (tea, green tea).
[0179] In order to illustrate the effectiveness of the system, the present invention conducted experiments on the WordNet dataset, which covers various fields, such as animals, food, daily necessities, etc., all of which are composed of medium-sized subtrees with a height of 4 (the height of the root node is recorded as 1, and the longest path from the root node to the leaf node is 4), and the subtree size (the number of all nodes owned by the subtree) is between 10 and 50, and there is no overlap between the subtrees. The dataset contains 761 trees, which are divided into 533 / 114 / 114 sizes according to the training set, validation set and test set.
[0180] Overall performance comparison: Table 1 compares the present invention with other methods. It can be seen that, when the accuracy, recall and F1 are used as evaluation criteria, the end-to-end concept system construction method provided by the present invention exceeds other models in recall and F1 values, and achieves the best results. This proves the effectiveness of the present method.
[0181] Table 1
[0182] Model P Re F1 TaxoRL 41.3 49.2 44.9 CTP (Bert-base) 57.9 51.8 53.4 The present invention 56.6 58.0 57.3
[0183] Ablation experiment: Table 2 shows the ablation experiment of the present invention, comparing the role of the main module PLM and the defined concept tree features. Glove+RL (reinforcement learning) uses Glove to extract the feature vector of the word pair. When we use PLM as the network to extract the feature vector, the evaluation result has a great improvement of 10.9%, proving that the pre-trained language model provided by the present invention is more reasonable in expressing word features.
[0184] Compared with using only the pre-trained language model, the evaluation results improved by 2.4% after combining it with the end-to-end approach, proving that the end-to-end approach can better fine-tune the feature representation of words in the pre-trained language model. When the features of the concept system are used, the results are improved by another 1.5%, indicating that the concept system features defined in the present invention contain structural information that is beneficial to classification.
[0185] Table 2
[0186] Model P Re F1 Glove+RL 41.3 49.2 44.9 PLM(CTP) 57.9 51.8 53.4 PLM+RL 58.7 53.2 55.8 PLM+RL+State 56.6 58.0 57.3
[0187] The action feature matrix extracted from the concept tree using BERT as the pre-trained language model is 768-dimensional. Before fusing the feature vector of the concept tree and the action feature matrix, it is first passed through a nonlinear single-layer forward neural network. In order to explore the effect of this step, a comparative experiment as shown in Table 3 is conducted. The list on the left side of Table 3 refers to the dimension of the forward neural network output. 0 means that the feature matrix of the concept tree is not used, and 768 means that it is directly combined with the action feature matrix without passing through a single-layer forward neural network.
[0188] It can be seen that as the network output dimension increases, it first increases and then decreases. The results of directly combining the action feature matrix with the feature matrix of the concept tree are shown in Table 3.
[0189] Table 3
[0190] State P Re F1 0 58.7 53.2 55.8 50 54.9 57.1 56.0 100 56.6 58.0 57.3 500 54.6 57.3 55.9 768 51.8 54.7 53.2
[0191] The main reference for policy network decision-making is the action feature matrix, and the feature matrix of the concept tree only plays a supplementary role. When the dimension is too large, it will seriously affect the representation of the action feature matrix. Therefore, when its dimension is 768, it reduces the effect of the model. When the dimension is moderate, it can not only play a role in supplementing information, but also will not affect the original characteristics of the action feature matrix, so it can effectively improve the effect.
[0192] The end-to-end concept system construction method provided by the present invention uses a pre-trained language model to obtain the feature representation of the words included in the concept set to be constructed, and uses the idea of end-to-end reinforcement learning to judge the probability of selecting each word pair, and each time selects the word pair with the largest probability to construct a concept tree, and finally obtains a concept tree structure composed of all words, thereby improving the accuracy of the constructed concept system.
[0193] The end-to-end concept system construction system provided by the present invention is described below. The end-to-end concept system construction system described below and the end-to-end concept system construction method described above can be referenced to each other.
[0194] Figure 6 is a schematic diagram of the structure of the end-to-end concept system construction system provided by the present invention, such as Figure 6 As shown, including:
[0195] A data acquisition module 610 is used to add any word in a first word pair included in the set of concepts to be constructed to the initial concept system, wherein the first word pair is a word pair with the highest probability obtained from a first probability distribution corresponding to the hyponymy relationship between the word pairs included in the set of concepts to be constructed;
[0196] A system construction module 611 is used to execute the first processing process at least once until the set of concepts to be constructed is empty, and to obtain a concept system corresponding to the set of concepts to be constructed according to the updated initial concept system;
[0197] The first processing step includes:
[0198] Deleting the words included in the initial concept system from the set of concepts to be constructed, so as to update the set of concepts to be constructed;
[0199] The first word in the second word pair is added to the initial concept system to update the initial concept system, the second word pair is the word pair with the highest probability obtained from the second probability distribution corresponding to the hierarchical relationship between the third word pairs, the first word is the word in the second word pair that is not in the initial concept system, and the third word pair is a word pair consisting of the words included in the updated concept set to be constructed and the words included in the updated initial concept system.
[0200] Furthermore, in one embodiment, the data acquisition module 610 may also be used to:
[0201] The method for obtaining the first word pair includes:
[0202] Inputting the word pairs included in the concept set to be constructed into the target strategy network as action vectors to obtain a first action feature vector;
[0203] Inputting the first action feature vector into the target strategy network to obtain a first probability distribution corresponding to the hyponymous relationship between the word pairs included in the concept set to be constructed;
[0204] According to the first probability distribution, obtaining the first word pair;
[0205] The target policy network is obtained in the following way:
[0206] The second processing process is executed at least once until the policy network meets the convergence condition to obtain the target policy network, wherein the convergence condition is that the accuracy of the first concept system corresponding to the concept set updated in the last second processing process reaches a preset value;
[0207] The second processing step includes:
[0208] Inputting the word pairs included in the concept set of the initial sample as action vectors into the pre-trained language model in the strategy network, and obtaining a second action feature vector corresponding to the word pairs included in the concept set based on the pre-trained language model;
[0209] Inputting the second action feature vector into a two-layer forward neural network in a strategy network to obtain a third probability distribution corresponding to the hyponymous relationship between the word pairs included in the concept set;
[0210] randomly selecting a fourth word pair from the word pairs included in the concept set corresponding to the third probability distribution;
[0211] adding any word included in the fourth word pair to the second concept system;
[0212] Performing at least one third processing process to update the concept set until the updated concept set is empty, and obtaining the first concept system according to the updated second concept system obtained in the last third processing process;
[0213] Wherein, the third processing process includes:
[0214] Deleting the words included in the second concept system from the concept set to update the concept set;
[0215] Inputting a fifth word pair as an action vector into the pre-trained language model to obtain a third action feature vector corresponding to the fifth word pair, wherein the fifth word pair is a word pair consisting of the words included in the updated concept set and the words included in the updated second concept system;
[0216] Inputting the second concept system and the visual matrix corresponding to the second concept system into the pre-trained language model to obtain a first feature vector corresponding to the second concept system;
[0217] Inputting the first feature vector into a single-layer forward neural network in a policy network, compressing the dimension of the first feature vector, and obtaining a second feature vector;
[0218] splicing the second feature vector and the third action feature vector and inputting the concatenated vectors into the double-layer feedforward neural network to obtain a fourth probability distribution corresponding to the hyponymous relationship between the fifth word pair;
[0219] Randomly select a sixth word pair from the fifth word pairs corresponding to the fourth probability distribution;
[0220] The second word in the sixth word pair is added to the second concept system to update the second concept system, where the second word is the word in the sixth word pair that is not in the second concept system.
[0221] Furthermore, in one embodiment, the system construction module 612 may also be used to:
[0222] Inputting the word pairs included in the updated concept set to be constructed into the pre-trained language model as action vectors to obtain a second action feature vector;
[0223] Inputting an initial concept system and a visual matrix corresponding to the initial concept system into the pre-trained language model to obtain a third eigenvector of the initial concept system;
[0224] Inputting the third eigenvector into a single-layer feed-forward neural network in a target policy network, compressing the dimension of the third eigenvector, and obtaining a fourth eigenvector;
[0225] The fourth feature vector and the second action feature vector are concatenated and input into a two-layer feed-forward neural network in the target strategy network to obtain a second probability distribution corresponding to the hyponymous relationship between the third word pairs;
[0226] The second word pair is obtained according to the second probability distribution.
[0227] The end-to-end concept system construction system provided by the present invention is based on the probability distribution of the hierarchical relationship between word pairs. Each time, a specific word pair with the highest probability is selected to be added to the concept system to construct the concept system of the concept set to be constructed, which can more accurately represent the semantic features between the words in the concept set to be constructed.
[0228] Figure 7is a schematic diagram of the physical structure of an electronic device provided by the present invention, such as Figure 7 As shown, the electronic device may include: a processor 710, a communication interface 711, a memory 712 and a bus 713, wherein the processor 710, the communication interface 711 and the memory 712 communicate with each other through the bus 713. The processor 710 may call the logic instructions in the memory 712 to execute the following method:
[0229] Adding any word in the first word pair included in the set of concepts to be constructed to the initial concept system, wherein the first word pair is a word pair with the highest probability obtained from a first probability distribution corresponding to the hyponymy relationship between the word pairs included in the set of concepts to be constructed;
[0230] Performing the first processing process at least once until the set of concepts to be constructed is empty, and obtaining a concept system corresponding to the set of concepts to be constructed according to the updated initial concept system;
[0231] The first processing step includes:
[0232] Deleting the words included in the initial concept system from the set of concepts to be constructed, so as to update the set of concepts to be constructed;
[0233] The first word in the second word pair is added to the initial concept system to update the initial concept system, the second word pair is the word pair with the highest probability obtained from the second probability distribution corresponding to the hierarchical relationship between the third word pairs, the first word is the word in the second word pair that is not in the initial concept system, and the third word pair is a word pair consisting of the words included in the updated concept set to be constructed and the words included in the updated initial concept system.
[0234] In addition, the logic instructions in the above-mentioned memory can be implemented in the form of software functional units and can be stored in a computer-readable storage medium when sold or used as an independent product. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for enabling a computer power screen (which can be a personal computer, a server, or a network power screen, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: various media that can store program codes, such as a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a disk or an optical disk.
[0235] Furthermore, the present invention discloses a computer program product, the computer program product comprising a computer program stored on a non-transitory computer-readable storage medium, the computer program comprising program instructions, and when the program instructions are executed by a computer, the computer can execute the end-to-end concept system construction method provided by the above-mentioned method embodiments, for example, comprising:
[0236] Adding any word in the first word pair included in the set of concepts to be constructed to the initial concept system, wherein the first word pair is a word pair with the highest probability obtained from a first probability distribution corresponding to the hyponymy relationship between the word pairs included in the set of concepts to be constructed;
[0237] Performing the first processing process at least once until the set of concepts to be constructed is empty, and obtaining a concept system corresponding to the set of concepts to be constructed according to the updated initial concept system;
[0238] The first processing step includes:
[0239] Deleting the words included in the initial concept system from the set of concepts to be constructed, so as to update the set of concepts to be constructed;
[0240] The first word in the second word pair is added to the initial concept system to update the initial concept system, the second word pair is the word pair with the highest probability obtained from the second probability distribution corresponding to the hierarchical relationship between the third word pairs, the first word is the word in the second word pair that is not in the initial concept system, and the third word pair is a word pair consisting of the words included in the updated concept set to be constructed and the words included in the updated initial concept system.
[0241] On the other hand, the present invention further provides a non-transitory computer-readable storage medium having a computer program stored thereon, which is implemented when the computer program is executed by a processor to execute the end-to-end concept system construction method provided in the above embodiments, for example, including:
[0242] Adding any word in the first word pair included in the set of concepts to be constructed to the initial concept system, wherein the first word pair is a word pair with the highest probability obtained from a first probability distribution corresponding to the hyponymy relationship between the word pairs included in the set of concepts to be constructed;
[0243] Performing the first processing process at least once until the set of concepts to be constructed is empty, and obtaining a concept system corresponding to the set of concepts to be constructed according to the updated initial concept system;
[0244] The first processing step includes:
[0245] Deleting the words included in the initial concept system from the set of concepts to be constructed, so as to update the set of concepts to be constructed;
[0246] The first word in the second word pair is added to the initial concept system to update the initial concept system, the second word pair is the word pair with the highest probability obtained from the second probability distribution corresponding to the hierarchical relationship between the third word pairs, the first word is the word in the second word pair that is not in the initial concept system, and the third word pair is a word pair consisting of the words included in the updated concept set to be constructed and the words included in the updated initial concept system.
[0247] The system embodiment described above is merely illustrative, wherein 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 they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment. Those of ordinary skill in the art may understand and implement it without creative work.
[0248] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer power screen (which can be a personal computer, a server, or a network power screen, etc.) to execute the methods described in each embodiment or some parts of the embodiments.
[0249] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for constructing an end-to-end concept system, characterized in that: include: Adding any word in the first word pair included in the set of concepts to be constructed to the initial concept system, wherein the first word pair is a word pair with the highest probability obtained from a first probability distribution corresponding to the hyponymy relationship between the word pairs included in the set of concepts to be constructed; Performing the first processing process at least once until the set of concepts to be constructed is empty, and obtaining a concept system corresponding to the set of concepts to be constructed according to the updated initial concept system; The first processing step includes: Deleting the words included in the initial concept system from the set of concepts to be constructed, so as to update the set of concepts to be constructed; Adding the first word in the second word pair to the initial concept system to update the initial concept system, the second word pair is a word pair with the highest probability obtained from the second probability distribution corresponding to the hyponymy relationship between the third word pairs, the first word is a word in the second word pair that is not in the initial concept system, and the third word pair is a word pair consisting of the words included in the updated concept set to be constructed and the words included in the updated initial concept system; The method for obtaining the first word pair includes: Inputting the word pairs included in the concept set to be constructed into the target strategy network as action vectors to obtain a first action feature vector; Inputting the first action feature vector into the target strategy network to obtain a first probability distribution corresponding to the hyponymous relationship between the word pairs included in the concept set to be constructed; According to the first probability distribution, obtaining the first word pair; The target policy network is obtained in the following way: The second processing process is executed at least once until the policy network meets the convergence condition to obtain the target policy network, wherein the convergence condition is that the accuracy of the first concept system corresponding to the concept set updated in the last second processing process reaches a preset value; Wherein, the second processing process includes: Inputting the word pairs included in the concept set of the initial sample as action vectors into the pre-trained language model in the strategy network, and obtaining a second action feature vector corresponding to the word pairs included in the concept set based on the pre-trained language model; Inputting the second action feature vector into a two-layer forward neural network in a strategy network to obtain a third probability distribution corresponding to the hyponymous relationship between the word pairs included in the concept set; randomly selecting a fourth word pair from the word pairs included in the concept set corresponding to the third probability distribution; adding any word included in the fourth word pair to the second concept system; Performing at least one third processing process to update the concept set until the updated concept set is empty, and obtaining the first concept system according to the updated second concept system obtained in the last third processing process; Wherein, the third processing process includes: Deleting the words included in the second concept system from the concept set to update the concept set; Inputting a fifth word pair as an action vector into the pre-trained language model to obtain a third action feature vector corresponding to the fifth word pair, wherein the fifth word pair is a word pair consisting of the words included in the updated concept set and the words included in the updated second concept system; Inputting the second concept system and the visual matrix corresponding to the second concept system into the pre-trained language model to obtain a first feature vector corresponding to the second concept system; Inputting the first feature vector into a single-layer forward neural network in a policy network, compressing the dimension of the first feature vector, and obtaining a second feature vector; splicing the second feature vector and the third action feature vector and inputting the concatenated vectors into the double-layer feedforward neural network to obtain a fourth probability distribution corresponding to the hyponymous relationship between the fifth word pair; Randomly select a sixth word pair from the fifth word pairs corresponding to the fourth probability distribution; The second word in the sixth word pair is added to the second concept system to update the second concept system, where the second word is the word in the sixth word pair that is not in the second concept system.
2. The end-to-end concept system construction method according to claim 1, characterized in that: The method for obtaining the second word pair includes: Inputting the word pairs included in the updated concept set to be constructed into the pre-trained language model as action vectors to obtain a second action feature vector; Inputting an initial concept system and a visual matrix corresponding to the initial concept system into the pre-trained language model to obtain a third eigenvector of the initial concept system; Inputting the third eigenvector into a single-layer feed-forward neural network in a target policy network, compressing the dimension of the third eigenvector, and obtaining a fourth eigenvector; The fourth feature vector and the second action feature vector are concatenated and input into a two-layer feed-forward neural network in the target strategy network to obtain a second probability distribution corresponding to the hyponymous relationship between the third word pairs; The second word pair is obtained according to the second probability distribution.
3. The end-to-end concept system construction method according to claim 1, characterized in that: The method for obtaining the visual matrix of the second concept system includes: The visual matrix is obtained according to the hierarchical relationship between the words included in the second concept system.
4. An end-to-end concept system construction system, characterized in that: include: A data acquisition module, used to add any word in the first word pair included in the concept set to be constructed to the initial concept system, wherein the first word pair is the word pair with the highest probability obtained from the first probability distribution corresponding to the hyponymy relationship between the word pairs included in the concept set to be constructed; A system construction module, configured to execute the first processing process at least once until the set of concepts to be constructed is empty, and to obtain a concept system corresponding to the set of concepts to be constructed according to the updated initial concept system; The first processing step includes: Deleting the words included in the initial concept system from the set of concepts to be constructed, so as to update the set of concepts to be constructed; Adding the first word in the second word pair to the initial concept system to update the initial concept system, the second word pair is a word pair with the highest probability obtained from the second probability distribution corresponding to the hyponymy relationship between the third word pairs, the first word is a word in the second word pair that is not in the initial concept system, and the third word pair is a word pair consisting of the words included in the updated concept set to be constructed and the words included in the updated initial concept system; Wherein, the data acquisition module is also used for: The method for obtaining the first word pair includes: Inputting the word pairs included in the concept set to be constructed into the target strategy network as action vectors to obtain a first action feature vector; Inputting the first action feature vector into the target strategy network to obtain a first probability distribution corresponding to the hyponymous relationship between the word pairs included in the concept set to be constructed; According to the first probability distribution, obtaining the first word pair; The target policy network is obtained in the following way: The second processing process is executed at least once until the policy network meets the convergence condition to obtain the target policy network, wherein the convergence condition is that the accuracy of the first concept system corresponding to the concept set updated in the last second processing process reaches a preset value; Wherein, the second processing process includes: Inputting the word pairs included in the concept set of the initial sample as action vectors into the pre-trained language model in the strategy network, and obtaining a second action feature vector corresponding to the word pairs included in the concept set based on the pre-trained language model; Inputting the second action feature vector into a two-layer forward neural network in a strategy network to obtain a third probability distribution corresponding to the hyponymous relationship between the word pairs included in the concept set; randomly selecting a fourth word pair from the word pairs included in the concept set corresponding to the third probability distribution; adding any word included in the fourth word pair to the second concept system; Performing at least one third processing process to update the concept set until the updated concept set is empty, and obtaining the first concept system according to the updated second concept system obtained in the last third processing process; Wherein, the third processing process includes: Deleting the words included in the second concept system from the concept set to update the concept set; Inputting a fifth word pair as an action vector into the pre-trained language model to obtain a third action feature vector corresponding to the fifth word pair, wherein the fifth word pair is a word pair consisting of the words included in the updated concept set and the words included in the updated second concept system; Inputting the second concept system and the visual matrix corresponding to the second concept system into the pre-trained language model to obtain a first feature vector corresponding to the second concept system; Inputting the first feature vector into a single-layer forward neural network in a policy network, compressing the dimension of the first feature vector, and obtaining a second feature vector; splicing the second feature vector and the third action feature vector and inputting the concatenated vectors into the double-layer feedforward neural network to obtain a fourth probability distribution corresponding to the hyponymous relationship between the fifth word pair; Randomly select a sixth word pair from the fifth word pairs corresponding to the fourth probability distribution; The second word in the sixth word pair is added to the second concept system to update the second concept system, where the second word is the word in the sixth word pair that is not in the second concept system.
5. The end-to-end concept system construction system according to claim 4, characterized in that: The system building module is also used for: Inputting the word pairs included in the updated concept set to be constructed into the pre-trained language model as action vectors to obtain a second action feature vector; Inputting an initial concept system and a visual matrix corresponding to the initial concept system into the pre-trained language model to obtain a third eigenvector of the initial concept system; Inputting the third eigenvector into a single-layer feed-forward neural network in a target policy network, compressing the dimension of the third eigenvector, and obtaining a fourth eigenvector; The fourth feature vector and the second action feature vector are concatenated and input into a two-layer feed-forward neural network in the target strategy network to obtain a second probability distribution corresponding to the hyponymous relationship between the third word pairs; The second word pair is obtained according to the second probability distribution.
6. An electronic device comprising a processor and a memory storing a computer program, characterized in that: When the processor executes the computer program, the end-to-end concept system construction method described in any one of claims 1 to 3 is implemented.
7. 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, the end-to-end concept system construction method as described in any one of claims 1 to 3 is implemented.
8. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, it implements the end-to-end concept system construction method as described in any one of claims 1 to 3.
Citation Information
Patent Citations
Ontology concept and hierarchical relation generation method
CN103207856A
Method and device for outputting information
CN110457325A
Concept-based method and system for dynamically analyzing results from search engines
US8589413B1
