A method for answer determination in online learning system based on tree-structured parsing coding
Through tree parsing coding and twin LSTM neural networks, it solves the problem of judging the diversity of answers to mathematics and physics exercises, achieves high-accuracy and instant response answer judgment, and improves learning effects and system efficiency.
Patent Information
- Application Number
- CN202310234176.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-13
- Publication Date
- 2024-09-27
- Estimated Expiration
- 2043-03-13
AI Technical Summary
It is difficult for existing online learning systems to accurately judge the diversity of answers to math and science exercises, resulting in limited learning effects, and manual review relies on time and energy, making it impossible to achieve timely feedback.
A method based on tree parsing coding and twin LSTM neural network is used to deconstruct and encode the answer expressions of mathematics and physics subjects in a tree shape, convert them into an input data format that can be processed by the neural network, and conduct training and judgment through twin LSTM.
It achieves accurate intelligent judgment of answers to math and science exercises, improves judgment response speed and accuracy, enhances learning effects, reduces reliance on manual review, and supports online learning systems to provide timely and high-quality learning assistance services.
Smart Images

Figure CN116720503B
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of mathematical and physical subject online learning systems, and in particular to an answer determination method for an online learning system based on tree-like parsing coding. Background Art
[0002] With the rise of various online learning systems, it has become a key technology to accurately judge the answers to exercises submitted by system users. In natural language processing problems, word vectors and sentence vectors are generally obtained through unsupervised algorithms based on a large amount of corpus data, and then the semantic similarity is judged. However, the characteristics of the answer expression of mathematics and science subjects make it impossible to obtain word and sentence vectors containing semantics through corpus without supervision. At the same time, in natural language processing problems, whether in Chinese or English, a sentence can be split into the finest processing units in a single layer through word segmentation algorithms or spaces, but the answer expression of science subjects often has a more three-dimensional and complex expression structure. The difficulty lies in that the answers to exercises in mathematics and science subjects (such as fill-in-the-blank questions) are not unique. For example, one of the answers to a math problem can be described as "a(bc)", then "ab-ac" and "-ac+ab" can also be the correct answers to the question. The answer form is often difficult to enumerate, which brings great difficulty to the computer system judgment.
[0003] At present, some products (such as "Dali Smart Learning Lamp") solve this problem by sending the user's answers to manual review. The method of solving this problem by sending the user's answers to manual review requires the reviewer to have a certain ability to judge on the one hand, and on the other hand, the manual method is too dependent on the reviewer's time and energy, and cannot provide timely feedback to ensure the user's continuous learning. Other products (such as "Lexue 100") convert difficult-to-judge test questions into multiple-choice questions or use the input content-based exercises for test questions with only a unique answer. Other products (such as "iFLYTEK AI Learning Machine") pay more attention to the image recognition of the user's handwritten content, but do not make good judgments on the various expressions of the correct answer. The method of converting difficult-to-judge test questions into multiple-choice questions or using the input content-based exercises for test questions with only a unique answer will greatly weaken the user's learning effect. For example, if some exercises are in the form of multiple-choice questions, the explicit display of the answers to the test questions will prevent users from fully thinking.
[0004] Since there is currently no learning system that can make accurate intelligent judgments on the diversity of input content such as math and science exercise results, it is necessary to develop a method for determining exercise answers that can trigger users to think fully and enhance learning outcomes. Summary of the invention
[0005] In view of the deficiencies of the prior art, the present invention proposes an answer determination method for an online learning system based on tree-structured parsing coding, which can realize accurate intelligent judgment on the diversity of input content, thereby enhancing the functional effect of the online learning system.
[0006] In order to achieve the above object, the present invention provides the following technical solutions:
[0007] The present invention provides an answer determination method for an online learning system based on tree-like parsing coding, comprising the following steps:
[0008] Step 1: Collect the answers to the math subjects and form an initial data set, which is divided into a training data set and a test data set. Both the training data and the test data include comparison items and compared items. The comparison items and compared items are marked as having the same meaning, 1 if they are the same, and 0 if they are not the same.
[0009] Step 2: Deconstruct and encode the expressions of all comparison items and compared items in the data set in a tree-like manner. The tree-like deconstruction means that the tree-like path information contains the location information of the comparison item or the compared item. The encoding means that the path, node type, and the value of the terminal node of the tree-like deconstruction result are represented as a string of split encoded data, thereby converting the data to be compared into an input data format that can be processed by the neural network.
[0010] Step 3: Based on the encoding results in step 2, apply the twin LSTM neural network to the learning process of the training data;
[0011] Step 4: Randomly obtain 5% of the training data set as the validation data set, save the best parameters on the validation set during the training process, and finally predict the test data set;
[0012] Step 5: During the test user's use, if an erroneous judgment result is encountered, the data of this data type is added to the training data set and the test data set according to the annotation method of step 1;
[0013] Step 6: Use the supplemented data set to iteratively update the algorithm model according to steps 1 to 5.
[0014] Furthermore, in step 1, the amount of data in the initial data set is 5500, and the ratio of training data to test data is 10:1.
[0015] Furthermore, the path of the terminal node in step 2 is the element itself or the element formed by calculation.
[0016] Furthermore, in step three, the twin LSTM neural network uses two networks with the same structure, LSTM_a and LSTM_b, and fixes the length of the input data block to 30, and fills the insufficient part with the number 0.
[0017] Furthermore, the process of the twin LSTM neural network in step three is as follows: after encoding the sentence, first define embedding_layer as the mapping layer of the input layer and the LSTM layer, and map the input sentence encoding to a list of data block vectors as the input of the LSTM layer; the outputs of the two LSTMs are concatenated and used as the input of the fully connected layer, and after regularization by Dropout and BatchNormalization, the final output result is trained.
[0018] Furthermore, the training adopts the nAdam algorithm and the EarlyStopping algorithm.
[0019] Compared with the prior art, the present invention has the following beneficial effects:
[0020] The answer discrimination method of the online learning system based on tree-like parsing coding proposed by the present invention realizes the computer algorithm judgment of the answer to the input content-based test question through the method of tree-like parsing coding + twin LSTM neural network, which has high accuracy and instant judgment response speed, so as to help the test question form of the online learning system to be closer to the real offline practice scene, and help users to obtain better learning effects. At the same time, the method adopted by the present invention has the optimization ability of continuously iterating to accurately respond to a certain application scene with close full coverage, so as to strongly support the online learning system to provide high-quality learning auxiliary services. Compared with the existing method of sending answer data to manual review, the response speed is more timely and the cost is lower. Compared with the existing method of changing the content input type exercises to the selection form exercises, and the method of only being able to judge the results in a simple form, it can adapt to a wider range of exercise forms. At present, in the science-oriented learning scenarios such as mathematics and physics, 98% judgment accuracy can be achieved. Combined with the certainty of the string meaning of the scene, and the continuously optimized framework design possessed by the present invention, it is expected that the accuracy can reach higher than 99.8% in the future. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in the present invention. For ordinary technicians in this field, other drawings can also be obtained based on these drawings.
[0022] Figure 1 An algorithm flow chart of an answer determination method for an online learning system based on tree parsing coding provided in an embodiment of the present invention.
[0023] Figure 2 A tree-like coding expression provided by an embodiment of the present invention.
[0024] Figure 3 The tree decomposition and encoding results provided by the embodiment of the present invention.
[0025] Figure 4 A twin LSTM neural network provided for an embodiment of the present invention. DETAILED DESCRIPTION
[0026] In order to better understand the technical solution, the method of the present invention is described in detail below with reference to the accompanying drawings.
[0027] The problem scenario solved by the present invention is similar to the semantic similarity determination in natural language processing, but there are also many differences between the two, which are specifically manifested as follows:
[0028] (1) In natural language processing problems, word vectors and sentence vectors are generally obtained through unsupervised algorithms based on a large amount of corpus data, and then the semantic similarity is determined. However, the characteristics of mathematical and scientific answer expressions make it impossible to obtain semantic word and sentence vectors through corpus without supervision. Therefore, the present invention uses labeled data to perform supervised algorithm learning.
[0029] (2) In natural language processing problems, whether in Chinese or English, a sentence can be split into the finest processing units in a single layer by word segmentation algorithms or spaces. However, the expression of answers to science subjects often has a more three-dimensional and complex expression structure, which requires multi-layer structural splitting and expression to accurately express its meaning. Therefore, the present invention adopts tree-like coding expression, such as Figure 1 shown.
[0030] The answer determination method of the online learning system based on tree parsing coding provided in this embodiment is as follows: Figure 2 As shown, the following steps are included:
[0031] Step 1: Determine the algorithm training data and test data according to the problem scenario to be solved. The so-called problem scenario means that if the input content of the mathematics subject to be solved is the answer judgment of the test question, then the typical data form of this type of question is collected and formed into a preliminary data set. The typical data form refers to the collected and summarized answer forms of the subject, and it is marked whether they have the same meaning, 1 if they are the same, and 0 if they are not the same, as shown in Table 1:
[0032] Table 1 Data sample of mathematics subjects
[0033] Comparison Items Items being compared Label a(b+c) ab+ac 1 ab ba 0
[0034] The initial data set has approximately 5,500 records, with the ratio of training data to test data being 10:1. This data set will help the algorithm achieve an actual application accuracy of no less than 90%. This data can later be supplemented and the neural network iteratively trained through a small number of misjudgment situations discovered by users during use, thereby gradually covering scenario application requirements.
[0035] Step 2: Calculate the tree encoding of all comparison items and compared items (including training data and test data) for the data set (such as Figure 1 As shown in the figure, this method will deconstruct and encode the expressions of all comparison items and compared items in a tree-like manner. Deconstruction means that the tree-like path information contains the location information of the comparison item or compared item, for example Figure 1 There are three elements in the first layer, and the path information is 1, 2, and 3 respectively. The third item in the first layer needs to be split into the second layer due to the expression structure brought by the square root operation. The path information of the second layer is 31 and 32 respectively. The 31 item brings 311 and 312 in the third layer due to the square structure. The so-called encoding refers to representing the path, node type, and value of the terminal node of the tree deconstruction result as a string of split encoded data, such as Figure 3 As shown, the data to be compared is converted into an input data format that can be processed by the neural network.
[0036] For example, Figure 3 The meaning of the third item is: the value of this item is a, the path information is 311, and the path is formed by square root (sq) and square respectively.
[0037] In summary, this tree deconstruction and encoding method will completely retain the structure and numerical information of the answer expression, thereby providing a solid data foundation for the precise training of neural networks.
[0038] Step 3: Based on the encoding result in step 2, apply the twin LSTM neural network to carry out the learning process of the training data. The reason for using LSTM is mainly to enable the neural network to learn the data sequence and the correlation characteristics between non-adjacent data in the problem scenario concerned by the present invention, so as to realize the judgment of the expression of different test answer methods. The LSTM neural network structure used in the present invention is as follows Figure 4 shown.
[0039] The twin LSTM neural network adopts the following approach:
[0040] (1) Two networks with the same structure, LSTM_a and LSTM_b, are used. In order to cope with the different lengths of comparison items and compared items, the length of the input data block is fixed to 30, and the insufficient part is padded with the number 0.
[0041] (2) In accordance with Figure 2 After encoding the sentence as shown, first define embedding_layer as the mapping layer between the input layer and the LSTM layer, and map the input sentence encoding to a list of data block vectors as the input of the LSTM layer. The outputs of the two LSTMs are concatenated as the input of the fully connected layer, and after regularization by Dropout and BatchNormalization, the final output result is used for training.
[0042] Step 4: The learning ability of the neural network model in step 3 needs to be coordinated with the test data. nAdam and EarlyStopping are used for training. 5% of the training set is randomly obtained as the validation data set, and the best parameters on the validation set are saved during the training process. Finally, the test set is predicted to avoid overfitting and other situations.
[0043] Step 5: During the test user's use, if an erroneous judgment result is encountered, the data under this data type is supplemented to the training data set and the test data set according to the method shown in Table 1, so as to help the data set to cover various data situations more and more completely.
[0044] Step 6: Use the supplemented data set to iteratively update the algorithm model according to steps 1 to 5 to help it perform better and better.
[0045] In summary, the present invention realizes the computer algorithm judgment of the answers to input content-based test questions through the method of tree-structured parsing coding + twin LSTM neural network, which has high accuracy and instant judgment response speed, thereby helping the test questions of the online learning system to be closer to the real offline practice scenario and helping users to obtain better learning results.
[0046] In addition, the method system adopted by the present invention has the optimization capability of continuously iterating to accurately respond to a certain application scenario with near-full coverage, thereby strongly supporting the online learning system to provide high-quality learning assistance services.
[0047] The above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, a person skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features thereof may be replaced by equivalents. However, such 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 determining an answer in an online learning system based on tree-structured parsing coding, characterized in that: The computer algorithm judgment of the answer to the input content-based test question is realized by the method of tree-structured parsing coding + twin LSTM neural network. The method includes the following steps: Step 1: Collect the answers to the math subjects and form an initial data set, which is divided into a training data set and a test data set. Both the training data and the test data include comparison items and compared items. The comparison items and compared items are marked as having the same meaning, 1 if they are the same, and 0 if they are not the same. Step 2: Deconstruct and encode the expressions of all comparison items and compared items in the data set in a tree-like manner. The tree-like deconstruction means that the tree-like path information contains the location information of the comparison item or the compared item. The encoding means that the path, node type, and value of the terminal node of the tree-like deconstruction result are represented as a string of split encoded data. The path of the terminal node is the element itself or the element is formed by calculation, so as to convert the data to be compared into an input data format that can be processed by the neural network. Step 3: According to the encoding result in step 2, the twin LSTM neural network is used to learn the training data. The process of the twin LSTM neural network in step 3 is as follows: after encoding the sentence, first define embedding_layer as the mapping layer of the input layer and LSTM layer, and map the input sentence encoding to a list of data block vectors as the input of the LSTM layer; the outputs of the two LSTMs are concatenated as the input of the fully connected layer, regularized by Dropout and BatchNormalization, and finally the output results are trained; Step 4: Randomly obtain 5% of the training data set as the validation data set, save the best parameters on the validation set during the training process, and finally predict the test data set; Step 5: During the test user's use, if an erroneous judgment result is encountered, the data corresponding to the judgment result is added to the training data set and the test data set according to the annotation method of step 1; Step 6: Use the supplemented data set to iteratively update the algorithm model according to steps 1 to 5.
2. The answer determination method of an online learning system based on tree-structured parsing coding according to claim 1 is characterized in that: In step 1, the initial data set contains 5,500 records, with the ratio of training data to test data being 10:
1.
3. The answer determination method of an online learning system based on tree-structured parsing coding according to claim 1 is characterized in that: In step three, the twin LSTM neural network uses two networks with the same structure, LSTM_a and LSTM_b, and fixes the length of the input data block to 30, and fills the insufficient part with the number 0.
4. The answer determination method of an online learning system based on tree-structured parsing coding according to claim 1 is characterized in that: The training adopts nAdam algorithm and EarlyStopping algorithm.
