A Knowledge-Aware Sequence-to-Tree Solving System for Mathematical Word Problems
By constructing a solid graph in a mathematical application problem solving system and using graph attention and graph convolution network, the problem of ignoring semantic relationships and common sense information in the prior art is solved, and more accurate mathematical expression generation is achieved.
Patent Information
- Application Number
- CN202110016787.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-01-07
- Publication Date
- 2025-07-11
- Estimated Expiration
- 2041-01-07
AI Technical Summary
Existing mathematical application problem solvers are difficult to effectively utilize the semantic relationships and common sense information in the questions, resulting in ignoring structural features when generating expressions and unable to accurately answer complex questions.
A mathematical application problem solving system using a knowledge-aware sequence-to-tree problem, searches entity triplets in the external knowledge base through the entity graph construction module, constructs node groups based on category information, and uses graph attention networks and graph convolution networks to generate mathematical expression trees, integrating local and global features.
It improves the accuracy of solving mathematical application problems, and can effectively utilize common sense information and structural features to generate more accurate mathematical expressions.
Smart Images

Figure CN113946696B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of automated solution of mathematical application problems, and particularly relates to a knowledge-aware sequence-to-tree mathematical application problem solving system. Background Art
[0002] The task objective of automatically solving mathematical application problems is to infer an expression and calculate the correct answer by understanding the text description of the problem, which requires the solver to have strong natural language understanding and reasoning capabilities. A typical mathematical application problem is a short story that describes relevant facts in words, reflects a certain quantitative relationship, and poses a problem with one or more unknowns. To solve this problem, it is necessary to identify relevant operands and operators from the text and determine the calculation order of these quantities.
[0003] Traditional application problem solvers rely on manual feature extraction and template annotation, which require a large amount of manpower and professional knowledge. Deep learning provides a new method for automated solution of application problems. There is a method that directly trains a sequence-to-sequence solver to learn the mapping relationship from the problem to the equation. Although this method has achieved encouraging results, it simply treats the problem of solving mathematical application problems as a sequence understanding and annotation problem, without mining and utilizing the semantic relationships in the problem to assist in the construction of the operation expression, ignoring the background common sense knowledge not provided in the problem, and only focusing on local features, thus ignoring the structural information in the generation process. For example: in the mathematical application problem "Allen bought 2 green apples, 3 red apples and 4 oranges, and spent a total of $50. Each apple weighs 0.4 kg and is worth $6. The weight of each orange is half of that of each apple. How much is each orange worth?", green apples and red apples are both apples. When the application problem involves calculating the average price of apples, the solver will only use the data corresponding to green apples or red apples and cannot combine the data of green apples and red apples to obtain the correct expression for calculating the average price of apples. In contrast, humans naturally have common sense information such as "green apples and red apples are both apples", but it is difficult for the solver to learn this only from the problem text. Secondly, when generating an expression, the solver tends to focus on local features rather than the overall structural features of the expression. For example, for the expression sequence { / , -, 50, *, +, 2, 3, 6, 4} generated according to the above mathematical application problem, for the node "4", the solver will adopt the state of the previous node "6" when obtaining features. In fact, the node " / " is directly related to the node "4" and can provide more features. The solver ignores the overall structural features because the node " / " is far from the node "4" and thus cannot obtain the correct expression. Summary of the Invention
[0004] To solve the above problems, a mathematical word problem solving system is provided that combines common sense information to more comprehensively understand mathematical word problems and generate expression trees that pay more attention to the overall structural characteristics. The present invention adopts the following technical solutions:
[0005] The present invention provides a knowledge-aware sequence-to-tree mathematical word problem solving system for processing and reasoning on the word problem text to be analyzed to obtain the corresponding mathematical expression tree. It is characterized in that it includes: a problem encoding module that encodes the word problem text to be analyzed using a predetermined first neural network to obtain an encoded problem vector; an entity graph construction module that retrieves the word problem text to be analyzed in a predetermined external knowledge base containing common sense information to obtain the corresponding entity triples, and constructs an entity graph based on the entity triples; a knowledge representation generation module that obtains a knowledge representation that recognizes knowledge using a predetermined second neural network based on the encoded problem vector and the entity graph; a tree-shaped decoding module that generates a mathematical expression tree using a predetermined third neural network based on the encoded problem vector and the knowledge representation. Among them, the working process of the entity graph construction module includes the following steps: Step S1, retrieve each word in the word problem text to be analyzed in a predetermined external knowledge base containing common sense information to obtain entity triples; Step S2, sequentially determine whether the words belong to the same category in the external knowledge base according to the entity triples. When the determination is yes, set the words as similar words; Step S3, construct a category phrase based on the similar words and their corresponding categories, and use the category phrase as a new node, so as to form a node group with the words as nodes and the category; Step S4, use a predetermined node-related method to construct an adjacent matrix for the node group based on the entity triples to obtain all relationships in the node group; Step S5, obtain the entity graph according to the node group and all relationships.
[0006] According to the knowledge-aware sequence-to-tree mathematical word problem solving system provided by the present invention, it may also have the following technical characteristics. Among them, the node-related method includes the following steps: Step P1, set the node to be related to itself; Step P2, set the node to be related to its adjacent nodes according to the position information of the node; Step P3, relate the node to the category to which it belongs according to the entity triples; Step P4, set the new node to be related to its corresponding similar words.
[0007] A knowledge-aware sequence-to-tree mathematical word problem solving system provided by the present invention may further have the following technical features. Among them, the second neural network is a graph attention network. The working process of the knowledge representation generation module includes the following steps: Step T1, initializing nodes with the encoded problem vector to obtain node vectors; Step T2, setting the nodes adjacent to the category as adjacent nodes according to the entity graph, calculating the mean of the node vectors corresponding to the adjacent nodes, and initializing the category with the mean to obtain a node vector group corresponding to the node group; Step T3, obtaining multiple latent vectors based on the node vector group by using the graph attention network; Step T4, selecting the corresponding latent vector from all latent vectors according to the number of words as the knowledge representation.
[0008] A knowledge-aware sequence-to-tree mathematical word problem solving system provided by the present invention may further have the following technical features. Among them, the first neural network is a bidirectional LSTM network.
[0009] A knowledge-aware sequence-to-tree mathematical word problem solving system provided by the present invention may further have the following technical features. Among them, the third neural network is a tree-structured graph convolutional network decoder. The working process of the tree-shaped decoding module includes the following steps: Step E1, determining the root node according to the problem in the application problem text to be analyzed and the node group, and pushing the root node into the stack of nodes to be generated; Step E2, after an interval of one time step, the stack of nodes to be generated generates a node to be generated, and using a predetermined node selection rule to push the node into the stack of nodes to be generated as the generated node to obtain the generated node; Step E3, using GCN to recursively aggregate the generated node and the root node, so as to obtain the context states of the generated node and the root node as the current context state; Step E4, according to the encoding of the generated node generated in the previous time step, the corresponding encoded problem vector, and the current context state, using the attention mechanism to update the state of the graph convolutional network decoder, obtaining the state of the graph convolutional network decoder at the current time step and using it as the current decoder state; Step E5, according to the knowledge representation, the current decoder state, the encoded problem vector, and the current context state, the graph convolutional network decoder generates node content; Step E6, repeating steps E2 to E5 until the stack of nodes to be generated is empty to obtain the mathematical expression tree.
[0010] Functions and effects of the invention
[0011] A knowledge-aware sequence-to-tree mathematical application problem solving system according to the present invention. Since the entity graph construction module first retrieves each word in the application problem text to be analyzed in a predetermined external knowledge base containing common sense information to obtain entity triples; then, it sequentially determines whether the words belong to the same category in the external knowledge base according to the entity triples. When the determination is yes, the words are set as similar words; subsequently, a category phrase is constructed based on the similar words and their corresponding categories, and the category phrase is used as a new node, so as to form a node group with the words as nodes and the category; then, an adjacent matrix is constructed for the node group by using a predetermined node correlation method based on the entity triples to obtain all the relationships in the node group; finally, an entity graph is obtained according to the node group and all the relationships. Therefore, it can be compatible with the common sense information not provided in the application problem text to be analyzed, so that the mathematical application problem solving system can not only focus on local features, but also obtain structural information. BRIEF DESCRIPTION OF THE DRAWINGS
[0012] Figure 1 is a structural block diagram of a knowledge-aware sequence-to-tree mathematical application problem solving system according to an embodiment of the present invention;
[0013] Figure 2 is a schematic flow chart of the working process of a knowledge-aware sequence-to-tree mathematical application problem solving system according to an embodiment of the present invention;
[0014] Figure 3 is an example diagram of the mathematical application problem solving process according to an embodiment of the present invention;
[0015] Figure 4 is a flow chart of the working process of the entity graph construction module according to an embodiment of the present invention;
[0016] Figure 5 is an example diagram of the entity graph according to an embodiment of the present invention;
[0017] Figure 6 is a flow chart of the working process of a knowledge-aware sequence-to-tree mathematical application problem solving system according to an embodiment of the present invention; and
[0018] Figure 7 is a schematic diagram of the experimental result comparison according to an embodiment of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0019] In order to make the technical means, creative features, achieved purposes and effects of the present invention easy to understand, the following specifically describes a knowledge-aware sequence-to-tree mathematical application problem solving system of the present invention in conjunction with embodiments and drawings.
[0020] <Embodiment>
[0021] The text of the application problem to be analyzed in the embodiments of the present invention is a mathematical application problem, denoted as X = {x1, x2,..., xn}, where xn is a word.
[0022] To better understand the content of the present invention, the application text to be analyzed takes "Allen bought 2 green apples, 3 red apples and 4 oranges, spending a total of $50. Each apple weighs 0.4 kg and is worth $6. The weight of each orange is half that of each apple. How much is each orange worth?" as an example (as Figure 3 shown), hereinafter referred to as Allen buying fruits.
[0023] Figure 1 It is a structural block diagram of a knowledge-aware sequence-to-tree mathematical application problem solving system according to an embodiment of the present invention.
[0024] As Figure 1 shown, a knowledge-aware sequence-to-tree mathematical application problem solving system includes a problem encoding module 11, an entity graph construction module 12, a knowledge representation generation module 13, and a tree-shaped decoding module 14.
[0025] The problem encoding module 11 encodes the text of the application problem to be analyzed using a predetermined first neural network to obtain an encoded problem vector.
[0026] Among them, the first neural network is a bidirectional LSTM network.
[0027] In this embodiment, the text of the application problem to be analyzed is in a natural language state and consists of multiple words. The problem encoding module 11 uses a bidirectional LSTM network to encode each word into an encoded problem vector (i.e., the problem representation h i seq ).
[0028] The entity graph construction module 12 retrieves the text of the application problem to be analyzed in a predetermined external knowledge base containing common sense information to obtain corresponding entity triples, and constructs an entity graph based on the entity triples.
[0029] Figure 4 It is a flowchart of the working process of the entity graph construction module according to an embodiment of the present invention.
[0030] As Figure 4 shown, the working process of the entity graph construction module 12 includes the following steps:
[0031] Step S1, retrieve each word in the text of the application problem to be analyzed in a predetermined external knowledge base containing common sense information to obtain entity triples.
[0032] Among them, the external knowledge base contains common sense information, such as Cilin, hownet, etc.
[0033] Taking Alan buying fruits as an example, the common sense information involved (that is, Figure 3 the knowledge part in) includes that apples, oranges, and fruits all belong to food, apples and oranges both belong to fruits, and green and red both belong to colors.
[0034] In addition, an entity triple includes at least an entity and a relationship. Among them, the entity is an abstraction of common sense information, and the relationship is an abstraction of the relationship between common sense information and common sense information, such as apple → fruit.
[0035] Step S2: According to the entity triple, sequentially determine whether the words belong to the same category in the external knowledge base. When the judgment is yes, set the words as the same category words; when the judgment is no, judge the next word until all words are judged.
[0036] When there are words in the text X of the application problem to be analyzed that belong to the same category c, set the words of the same category as the same category words. Taking Alan buying fruits as an example, the categories of green and red are both the category of colors, and green and red are used as the same category words.
[0037] Step S3: Construct a category phrase based on the same category words and their corresponding categories, and use this category phrase as a new node, so as to form a node group with the words and categories as nodes.
[0038] Specifically, construct a category phrase according to the position information of the same category words and the category corresponding to the same category words. For example, in the example of Alan buying fruits, the words following the same category words green and red are both apples. Therefore, construct a category phrase c' of "color + apple" based on the two phrases green apple and red apple and use it as a new node. There are no same words before and after the same category words apple and orange, so a category phrase cannot be constructed.
[0039] In addition, all words in the text X of the application problem to be analyzed are nodes, and the categories corresponding to the words are also nodes.
[0040] Step S4: Based on the entity triple, use a predetermined node-related method to construct an adjacent matrix for the node group to obtain all relationships in the node group.
[0041] Specifically, first construct an initial adjacent matrix according to the total number of nodes and new nodes in the node group. For example: the text X of the application problem to be analyzed = {Xiaoming, buy, red, apple, and, green, apple, and, wine - filled, chocolate}, the categories are fruits, colors, food, items, and c' is color + apple. Then the initial adjacent matrix A is 15 * 15 - dimensional, and the values of all positions are 0. Then use the node - related method to set the values of the corresponding positions to 1, and finally obtain the adjacent matrix A' of all nodes and new nodes, so as to obtain all relationships in the node group.
[0042] Among them, the node - related method includes the following steps:
[0043] Step P1, set the node to be related to itself.
[0044] In this embodiment, set the values at positions A 1,1 , A 2,2 ,..., A 15,15 in the initial adjacent matrix A to 1.
[0045] Step P2, set the node to be related to its adjacent nodes according to the position information of the node.
[0046] Specifically, the nodes adjacent to the second node "buy" are the first node "Xiaoming" and the third node "red" respectively. At this time, set the values at positions A 2,1 , A 1,2 , A 2,3 , and A 3,2 to 1.
[0047] Step P3, set the node to be related to the category to which it belongs according to the entity triple.
[0048] Specifically, the third node "red" and the sixth node "green" both belong to the category of the twelfth node "color". At this time, set the values at positions A 3,12 , A 12,3 , A 6,12 , and A 12,6 to 1.
[0049] Step P4, set the newly added node to be related to its corresponding synonymous words.
[0050] Specifically, the newly added nodes corresponding to the third node "red" and the fourth node "apple" are the fifteenth node "color + apple". At this time, set the values at positions A 3,15 , A 15,3 , A 4,15 , and A 15,4 to 1. Similarly, the values of A 6,15 , A 15,6 , A 7,15 , and A 15,7 corresponding to the other sixth node "green" and the seventh node "apple" of this newly added node are set to 1.
[0051] Step S5, obtain the entity graph according to the node group and all relationships.
[0052] Taking Alan buying fruits as an example, the entity graph G = (V; A') generated according to the node group V and the adjacent matrix A' is as Figure 5 shown, where N1, N2, and N3 are the first, second, and third numbers that appear respectively.
[0053] The knowledge representation generation module 13 uses a predetermined second neural network based on the problem characteristics and the entity graph to obtain the knowledge representation that recognizes the knowledge.
[0054] Among them, the second neural network is a graph attention network.
[0055] The working process of the knowledge representation generation module 13 includes the following steps:
[0056] Step T1: Initialize the nodes using the encoded problem vector to obtain node vectors.
[0057] Step T2: According to the entity graph, set the nodes adjacent to the category as adjacent nodes, calculate the mean of the node vectors corresponding to the adjacent nodes, and use the mean to initialize the category to obtain a node vector group corresponding to the node group.
[0058] Taking the example of Alan buying fruits, the two nodes adjacent to the category "color" are "green" and "red" respectively. The node vectors of these two adjacent nodes are set as h1 and h2 respectively. Then the node vector c1 of the category "color" c1 is avg(h1, h2).
[0059] Step T3: Based on the node vector group, use the graph attention network (GAT) to obtain multiple latent vectors (i.e., knowledge graph vectors h i know ).
[0060] Step T4: Select the corresponding latent vector from all the latent vectors as the knowledge representation according to the number of words (i.e., the problem representation h that introduces knowledge i ka ).
[0061] Specifically: Suppose there are k words in total, and the number of latent vectors obtained by using GAT is m (m > k). Then select the first k latent vectors from the m latent vectors as the knowledge representation of the k words in the problem text X to be analyzed that recognizes the knowledge. If there are q (q < k) numbers in X, then extract the latent vectors of the numbers according to the positions of these numbers.
[0062] The tree-shaped decoding module 14 uses a predetermined third neural network based on the encoded problem vector and the knowledge representation to generate a mathematical expression tree.
[0063] Among them, the third neural network is a tree-structured graph convolutional network decoder.
[0064] The specific working process of the tree-shaped decoding module 14 includes the following steps:
[0065] Step E1: Determine the root node according to the problem and the node group in the problem text to be analyzed, and push the root node into the node stack to be generated.
[0066] Taking Alan buying fruits as an example, using " / " as the root node y_0 according to the question "How much does each orange cost", and pushing it into the stack of nodes to be generated.
[0067] Step E2, with an interval of one time step, the stack of nodes to be generated generates a node to be generated. Using a predetermined node selection rule, the node is pushed into the stack of nodes to be generated as a node to be generated, thus obtaining the generated nodes.
[0068] Taking Alan buying fruits as an example, with an interval of one time step, the stack of nodes to be generated generates a node to be generated. For node yt, if yt is a number, it is a leaf node; if yt is an arithmetic operator, it is an internal node, and the left sub-term yt;l and the right sub-term yt;r of this internal node have not been generated yet. Push yl and yr into the stack of nodes to be generated, thus obtaining the generated nodes.
[0069] Step E3, using GCN to perform recursive aggregation on the generated nodes and the root node (the state aggregation mechanism is as Figure 2 shown), thus obtaining the context states of the generated nodes and the root node as the current context state.
[0070] Taking Alan buying fruits as an example, after two GCN calculations, the final context states (i.e., global information) of all nodes in the expression tree at the current time step are obtained. As shown in the expression tree and the expression sequence part of the figure, when about to generate node 6, the tree-shaped decoding module 14 hesitates between node 6 and node 0.4, whether to generate the apple price represented by (2 + 3) * 6 or the apple weight represented by (2 + 3) * 0.4. And at this time, it is necessary to obtain node 50 representing the price. However, node 50 is far from node 6. GCN can aggregate the adjacent node information of each node in the currently generated { / , -, 50, *, +, 2, 3} to obtain the currently generated partial expression tree (i.e., the partial expression tree state), thus accurately generating node 6, and being closer to the target: the expression sequence { / , -, 50, *, +, 2, 3, 6, 4}.
[0071] Step E4, according to the encoding of the generated nodes generated in the previous time step, the corresponding encoded question vector, and the current context state, use the attention mechanism to update the state of the graph convolutional network decoder, obtain the state of the graph convolutional network decoder at the current time step, and use it as the current decoder state.
[0072] Step E5, according to the knowledge representation, the current decoder state, the encoded question vector, and the current context state, the graph convolutional network decoder generates the node content.
[0073] Specifically, the graph convolutional network decoder generates a word from the vocabulary Vocab or copies a number from the mathematical word problem based on the current decoder state, the encoded question vector, and the current context state.
[0074] Step E6, repeat steps E2 to E5 until the stack of nodes to be generated is empty, thereby obtaining the mathematical expression tree.
[0075] Figure 6 It is a flowchart of the working process of a knowledge-aware sequence-to-tree mathematical word problem solving system according to an embodiment of the present invention.
[0076] As Figure 6 shown, the working process of a knowledge-aware sequence-to-tree mathematical word problem solving system includes the following steps:
[0077] Step A1, the question encoding module 11 encodes the text of the word problem to be analyzed using the first neural network to obtain an encoded question vector, and then proceeds to step A2;
[0078] Step A2, the entity graph construction module 12 retrieves the text of the word problem to be analyzed in a predetermined external knowledge base containing common sense information, obtains the corresponding entity triples, and constructs an entity graph based on the entity triples, and then proceeds to step A3;
[0079] Step A3, the knowledge representation generation module 13 uses the second neural network to obtain the knowledge representation that recognizes knowledge based on the encoded question vector and the entity graph, and then proceeds to step A4;
[0080] Step A4, the tree-shaped decoding module 14 uses the third neural network to generate a mathematical expression tree based on the encoded question vector and the knowledge representation, and then enters the end state.
[0081] Figure 7 It is a schematic diagram of the experimental result comparison according to an embodiment of the present invention.
[0082] To verify the effect of the knowledge-aware sequence-to-tree mathematical word problem solving system 1 (abbreviated as KA-S2T) of the present invention, on the Math23K dataset, experimental comparisons are made with DNS, DNS+Retrieval, Bi-LSTM, ConvS2S, Transformer, Ensemble, RecursiveNN, Tree-Decoder, and GTS. As Figure 7 shown, the highest accuracy of KA-S2T is 76.3%, which is better than all the above systems.
[0083] Functions and effects of the embodiment
[0084] According to the knowledge-aware sequence-to-tree mathematical word problem solving system 1 provided in this embodiment, since the entity graph construction module 12 first retrieves each word in the word problem text to be analyzed in a pre-determined external knowledge base containing common sense information to obtain entity triples; then, according to the entity triples, it sequentially determines whether the words belong to the same category in the external knowledge base. When the determination is yes, the words are set as similar words; subsequently, a category phrase is constructed based on the similar words and their corresponding categories, and the category phrase is used as a new node, thus forming a node group with the words as nodes and the category; then, based on the entity triples, a predetermined node correlation method is used to construct an adjacency matrix for the node group to obtain all the relationships in the node group; finally, an entity graph is obtained according to the node group and all the relationships. Therefore, it can be compatible with the common sense information not provided in the word problem text to be analyzed, so that the mathematical word problem solving system 1 can not only focus on local features, but also obtain structural information.
[0085] In addition, in the embodiment, since the third neural network in the tree-shaped decoding module 14 is a graph convolutional network decoder with a tree structure, the graph convolutional network decoder can recursively aggregate the context states of all the generated nodes generated in the previous time step to obtain the current context state. Therefore, the finally generated mathematical expression tree combines global information and is more accurate.
[0086] The above embodiments are only used to illustrate the specific implementation manners of the present invention, and the present invention is not limited to the description scope of the above embodiments.
Claims
1. A knowledge-aware sequence-to-tree mathematical word problem solving system for processing and reasoning on the word problem text to be analyzed to obtain a corresponding mathematical expression tree, characterized in that Including: A problem encoding module that encodes the text of the application problem to be analyzed using a predetermined first neural network to obtain an encoded problem vector; An entity graph construction module that retrieves the text of the application problem to be analyzed in a predetermined external knowledge base containing common sense information to obtain corresponding entity triples, and constructs an entity graph based on the entity triples; A knowledge representation generation module that uses a predetermined second neural network to obtain a knowledge representation of the recognized knowledge based on the encoded problem vector and the entity graph; A tree-shaped decoding module that uses a predetermined third neural network to generate the mathematical expression tree based on the encoded problem vector and the knowledge representation, wherein the working process of the entity graph construction module includes the following steps: Step S1, retrieve each word in the text of the application problem to be analyzed in the predetermined external knowledge base containing common sense information to obtain the entity triples; Step S2, sequentially determine whether the words belong to the same category in the external knowledge base according to the entity triples, and when the judgment is yes, set the words as similar words; Step S3, construct a category phrase based on the similar words and their corresponding categories, and use the category phrase as a new node, so as to form a node group with the words and the categories as nodes; Step S4, use a predetermined node correlation method based on the entity triples to construct an adjacent matrix for the node group to obtain all relationships in the node group; Step S5, obtain the entity graph according to the node group and all the relationships, The node correlation method includes the following steps: Step P1, set the node to be related to itself; Step P2, set the node to be related to its adjacent nodes according to the position information of the node; Step P3, relate the node to the category to which it belongs according to the entity triples; Step P4, set the new node to be related to its corresponding similar words, The second neural network is a graph attention network, The working process of the knowledge representation generation module includes the following steps: Step T1, initialize the node using the encoded problem vector to obtain a node vector; Step T2, set the nodes adjacent to the category as adjacent nodes according to the entity graph, calculate the mean value of the node vectors corresponding to the adjacent nodes, and use the mean value to initialize the category to obtain a node vector group corresponding to the node group; Step T3, use the graph attention network to obtain multiple latent vectors based on the node vector group; Step T4, select the corresponding latent vectors from all the latent vectors as the knowledge representation according to the number of the words, The first neural network is a bidirectional LSTM network, The third neural network is a tree-structured graph convolutional network decoder, The working process of the tree-shaped decoding module includes the following steps: Step E1, determine the root node according to the problem in the text of the application problem to be analyzed and the node group, and push the root node into the node stack to be generated; Step E2, with a time step interval, the stack of nodes to be generated generates a node to be generated, and the node is pushed into the stack of nodes to be generated as the node to be generated by using a predetermined node selection rule, thereby obtaining the generated nodes; Step E3, using GCN to recursively aggregate the generated nodes and the root node, thereby obtaining the context states of the generated nodes and the root node as the current context state; Step E4, according to the encoding of the generated nodes generated in the previous time step, the corresponding encoded question vector, and the current context state, using the attention mechanism to update the state of the graph convolutional network decoder, obtaining the state of the graph convolutional network decoder at the current time step and using it as the current decoder state; Step E5, according to the knowledge representation, the current decoder state, the encoded question vector, and the current context state, the graph convolutional network decoder generates node content; Step E6, repeat Step E2 to Step E5 until the stack of nodes to be generated is empty, thereby obtaining the mathematical expression tree.
Citation Information
Patent Citations
Multi-source network encyclopedia-oriented knowledge base construction method
CN107239481A
Event atlas construction system and method based on multi-dimensional feature fusion and dependency syntax
CN111581396A