Exercise grading method and device, electronic equipment and storage medium
By constructing a graph-structured coding network to extract the step features of the standard answer and the answer, the problem of not being able to locate the specific error location in the existing technology is solved, and the accurate grading and error analysis of exercises containing calculation steps are realized.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-09-01
- Publication Date
- 2026-03-27
AI Technical Summary
Existing technology cannot distinguish between students who have the same score but different points deducted for different reasons when grading exercises that include calculation steps. This makes it impossible to help students pinpoint the specific location and cause of their errors, thus affecting the analysis of incorrect answers.
By determining the semantic features and step relationship types of each step in the standard answer and the answer, a graph structure coding network is constructed to extract the step features of the standard answer and the answer, and then the errors are corrected to locate the cause of the errors.
It can help students quickly locate the wrong steps and the reasons for the mistakes, improving the convenience and accuracy of error analysis.
Smart Images

Figure CN115495577B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of computer, and particularly relates to a problem correction method and device, electronic equipment and storage medium. BACKGROUND
[0002] The problem correction task mainly adopts a text classification technology, that is, a process of assigning an input text to a predefined label. The goal of the problem correction task is to determine the matching degree between an input student answer and a standard answer based on the current question context, so as to obtain a correction score of the student answer.
[0003] At present, for problems containing calculation steps, such as physics problems and mathematics problems, when correcting the student answer of the whole problem, student answers with the same score but different specific deduction positions and reasons cannot be distinguished. For example, for student answers that are deducted by 2 points, some students forget to write conditions, some students have inconsistent physical quantities before and after, and some students may have calculation errors or miss units. Only the correction method of the score or the right or wrong of the whole problem can be given, and the student cannot be positioned to the specific error position and reason, which is not conducive to the student to analyze the wrong questions. SUMMARY
[0004] The present application provides a problem correction method, device, electronic equipment and storage medium to solve the defect that the existing technology can only give the correction method of the score or the right or wrong of the whole problem, and cannot help the student to locate the specific error position and reason, which is not conducive to the student to analyze the wrong questions.
[0005] The present application provides a problem correction method, comprising:
[0006] determining a standard answer and an answer answer of a problem to be corrected;
[0007] determining a step relationship type between steps in the standard answer based on semantic features of the steps in the standard answer, and determining a standard step feature of each step in the standard answer based on the semantic features of the steps in the standard answer and the step relationship type between the steps;
[0008] determining a step relationship type between steps in the answer answer based on semantic features of the steps in the answer answer, and determining an answer step feature of each step in the answer answer based on the semantic features of the steps in the answer answer and the step relationship type between the steps;
[0009] correcting the answer answer based on the standard step feature of each step in the standard answer and the answer step feature of each step in the answer answer, to obtain a step error reason of the answer answer.
[0010] The exercise correction method provided in the present application, based on the step answer step features of each step in the standard answer and the answer step features of each step in the answer answer, corrects the answer answer to obtain the step error reasons of the answer answer, comprising:
[0011] Based on the correlation between the answer step features and the answer step features, the answer step features and the answer step features are aligned to obtain the step alignment features of the answer answer;
[0012] Based on the step alignment features of the answer answer, the answer answer is corrected to obtain the step error reasons of the answer answer.
[0013] The exercise correction method provided in the present application, based on the step alignment features of the answer answer, corrects the answer answer to obtain the step error reasons of the answer answer, comprising:
[0014] Determine the title of the exercise to be corrected;
[0015] Based on the correlation between the part-of-speech semantic features corresponding to the title, the standard answer and the answer answer respectively, the part-of-speech semantic features corresponding to the title, the standard answer and the answer answer respectively are aligned to obtain the text alignment features of the answer answer;
[0016] Based on the text alignment features of the answer answer and the step alignment features, the answer answer is corrected to obtain the step error reasons of the answer answer, or the step error reasons and the correction score of the answer answer.
[0017] The exercise correction method provided in the present application, based on the correlation between the part-of-speech semantic features corresponding to the title, the standard answer and the answer answer respectively, the part-of-speech semantic features corresponding to the title, the standard answer and the answer answer respectively are aligned to obtain the text alignment features of the answer answer, comprising:
[0018] Based on the correlation between the part-of-speech semantic features corresponding to the standard answer and the answer answer respectively, the part-of-speech semantic features corresponding to the standard answer and the answer answer respectively are aligned to obtain the answer alignment features of the answer answer;
[0019] Based on the correlation between the part-of-speech semantic features of the title and the answer alignment features of the answer answer, the part-of-speech semantic features of the title and the answer alignment features of the answer answer are aligned to obtain the text alignment features of the answer answer.
[0020] According to the exercise correction method provided in the application, the step relationship type between each step in the answer is determined based on the semantic features of each step in the answer, and the step relationship type between each step in the answer is determined based on the semantic features of each step in the answer.
[0021] The context semantic features of each step in the answer are determined based on the correlation between the semantic features of each step in the answer.
[0022] The context semantic features of each step in the answer are spliced based on the sequence of each step in the answer, and the step splicing features of the answer are obtained.
[0023] The step relationship type between each step in the answer is determined based on the step splicing features of the answer.
[0024] According to the exercise correction method provided in the application, the answer step features of each step in the answer are determined based on the semantic features of each step in the answer and the step relationship type between each step.
[0025] A graph is constructed with each step in the answer as a node and the step relationship type between each step as an edge.
[0026] The semantic features of each step in the answer are used as the initial features of each node in the graph, the graph is feature-extracted based on the correlation weight between each node, the graph structure features of each node are obtained, and the graph structure features of each node are used as the answer step features of each step in the answer.
[0027] According to the exercise correction method provided in the application, the graph is constructed with each step in the answer as a node and the step relationship type between each step as an edge.
[0028] A directed graph is constructed with each step in the answer as a node, the step relationship type between each step as an edge, and the step sequence between each step as the direction of the edge.
[0029] The application also provides an exercise correction device, which comprises:
[0030] An answer determination unit is configured to determine the standard answer and the answer of the exercise to be corrected.
[0031] A standard answer step feature determination unit is configured to determine the step relationship type between each step in the standard answer based on the semantic features of each step in the standard answer, and determine the standard answer step features of each step in the standard answer based on the semantic features of each step in the standard answer and the step relationship type between each step.
[0032] The answering step feature determination unit is configured to determine a step relationship type between steps in the answering answer based on semantic features of the steps in the answering answer, and determine answering step features of the steps in the answering answer based on the semantic features of the steps in the answering answer and the step relationship type between the steps.
[0033] The exercise grading unit is configured to grade the answering answer based on the marking step features of the steps in the standard answer and the answering step features of the steps in the answering answer, to obtain a step error cause of the answering answer.
[0034] The present application also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, and the processor implements the exercise grading method according to any one of the above when executing the program.
[0035] The present application also provides a non-transitory computer readable storage medium, which stores a computer program executable by a processor to implement the exercise grading method according to any one of the above.
[0036] The present application also provides a computer program product, which includes a computer program executable by a processor to implement the exercise grading method according to any one of the above.
[0037] The exercise grading method, device, electronic device and storage medium provided by the present application can help students locate the error steps and step error causes, and provide convenience for students to analyze the wrong questions, compared with the prior art which can only obtain the score or deduction of the whole question. BRIEF DESCRIPTION OF DRAWINGS
[0038] In order to more clearly illustrate the technical solutions of the present application or the prior art, the following will briefly introduce the drawings needed to be used in the embodiments or prior art description. Obviously, the drawings in the following description are some embodiments of the present application, and those skilled in the art can obtain other drawings according to these drawings without creative labor.
[0039] Figure 1 is one of the flowcharts of the exercise grading method provided by the present application;
[0040] Figure 2 is the flowchart of step 140 in the exercise grading method provided by the present application;
[0041] Figure 3is the second flowchart of the problem correction method provided by the present application;
[0042] Figure 4 is the flowchart of the text alignment feature determination method provided by the present application;
[0043] Figure 5 is the flowchart of the step association type determination method provided by the present application;
[0044] Figure 6 is the flowchart of the answer step feature determination method provided by the present application;
[0045] Figure 7 is the third flowchart of the problem correction method provided by the present application;
[0046] Figure 8 is the structural schematic diagram of the problem correction device provided by the present application;
[0047] Figure 9 is the structural schematic diagram of the electronic device provided by the present application. DETAILED DESCRIPTION
[0048] In order to make the purpose, technical scheme and advantages of the present application clearer, the technical scheme in the present application will be described clearly and completely below in combination with the drawings in the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor fall within the protection scope of the present application.
[0049] In the step-by-step correction task of physical calculation problems, the existing text classification technology cannot distinguish the student answers of "same score different mistakes", so that only the score or right or wrong of the whole question can be given, and the student cannot be positioned to the specific error position and reason.
[0050] In view of the above problems, the present application provides a problem correction method, which is applied to the scene of automatically correcting the problems containing calculation steps, and can assist the user to quickly locate the error position and reason, so as to perform effective error analysis.
[0051] Figure 1 is the flowchart of the problem correction method provided by the present application, and the execution subject of the method can be a problem correction device, which can be realized by software and / or hardware, and the device can be integrated in an electronic device, which can be a learning machine, a personal computer, a cloud device, a smart phone or a tablet computer, etc. Figure 1 As shown in the figure, the problem correction method provided by the present application includes the following steps:
[0052] Step 110, determine the standard answer and the answer of the to-be-corrected exercise.
[0053] Specifically, the to-be-corrected exercise is an exercise that needs to be corrected, and the to-be-corrected exercise can be a physical problem, a mathematical problem, or an exercise containing a logical reasoning process or a calculation step. The standard answer of the to-be-corrected exercise can be pre-stored.
[0054] The answer is the answer obtained by the user, usually a student, to the exercise. The answer can be obtained by the student directly answering on the learning machine; or the student can answer on a paper test paper or exercise book, take a picture of the answer, and then obtain the answer image after text recognition, which is not limited in the embodiment of the application.
[0055] Step 120, determine the step relationship type between each step in the standard answer based on the semantic features of each step in the standard answer, and determine the answer step features of each step in the standard answer based on the semantic features of each step in the standard answer and the step relationship type between each step.
[0056] Specifically, due to the divergence of the user's answer, the standard answer and the answer usually have the problem of semantic information inequality. Some students may write very detailed steps, processes and explanations when answering; some write more concisely; some students list a lot of physical theorems, formulas, etc. when answering, and some students write very little or nothing when encountering unknown problems. Therefore, after obtaining the standard answer and the answer of the to-be-corrected exercise, the semantic encoding of the standard answer and the answer can be performed respectively, and the semantic features of each step can be extracted.
[0057] For example, the semantic features of each step in the standard answer can be represented as The semantic features of each step in the answer can be represented as Where p and q represent the number of steps in the standard answer and the answer, respectively.
[0058] Here, the semantic features of each step in the standard answer can represent the semantics of each step in the standard answer itself, and the word and / or formula information in each step can be quantitatively represented in the form of a vector. For the standard answer text, the standard answer is segmented in units of word segmentation, each word segmentation has a corresponding feature vector, and the feature vectors corresponding to multiple word segmentations are sequentially spliced to form a feature vector sequence of the standard answer.
[0059] On this basis, the feature vector of the special step separator position can be used to represent the features of each step, and the feature vector of the step separator position is extracted from the feature vector sequence of the standard answer, and the semantic features of each step in the standard answer are obtained.
[0060] After obtaining the semantic features of each step in the standard answer, the step relationship types between each step in the standard answer are further determined based on the semantic features of each step in the standard answer. The step relationship type here refers to the step relationship type between each pair of steps in the standard answer. The step order of each pair of steps is usually from front to back. The step relationship type can specifically include a conditional relationship, a parallel relationship, or a causal relationship, etc. For example, the standard answer contains 5 steps, and it can be obtained that step 1 and step 2 are a conditional relationship, step 1 and step 4 are also a conditional relationship, step 2 and step 3 are a causal relationship, and so on.
[0061] In order to obtain the step relationship types between steps, a step relationship type classification model can be used. The semantic features of the spliced steps are input into the pre-trained step relationship type classification model to obtain the step relationship types between steps output by the step relationship type classification model. When training the step relationship type classification model, a large number of labeled answer samples containing multiple steps can be collected first. The answer samples can be standard answers or answer answers. The initial model is trained based on the answer samples to obtain the step relationship type classification model.
[0062] It should be noted that the semantic features of the spliced steps can be obtained by directly splicing the feature vector sequences of the steps; or in order to improve the context semantic representation ability of the semantic features of the steps, a self-attention mechanism can be used to further fuse the feature vectors of the steps, which can fully extract important features associated between the steps. Then the fused semantic features of the steps are spliced to obtain the semantic features of the spliced steps.
[0063] Based on the step relationship types between steps in the standard answer, the answer step features of each step in the standard answer are determined based on the semantic features of each step in the standard answer and the step relationship types between steps.
[0064] Since the semantic features of each step can represent the semantics of each step itself, i.e., the context semantic information in a single step; the step relationship types between steps can represent the context semantic relationship between each pair of steps, the answer step features obtained thereby not only fuse the semantic features of a single step in the standard answer, but also fuse the relationship types between the single step and its relationship steps. The relationship steps here are other steps that have a step relationship with the single step.
[0065] To obtain the answer step features of each step, the semantic features of each step and the step relationship types between the steps are input into a feature encoding network, the semantic features of any step and the semantic features of other steps having a step relationship with the step are processed by the feature encoding network through weighted summation to obtain the answer step features of each step output by the feature encoding network.
[0066] Preferably, the feature encoding network here can be a graph structure encoding network, for example, a graph is constructed with each step as a node and the step relationship between the steps as an edge, feature extraction is performed on each node in the graph to obtain the answer step features of each step.
[0067] In step 130, the step relationship types between the steps in the answer are determined based on the semantic features of the steps in the answer, and the answer step features of the steps in the answer are determined based on the semantic features of the steps in the answer and the step relationship types between the steps.
[0068] Specifically, for the answer, the same feature extraction method as described above for the standard answer can be used to obtain the answer step features of the steps in the answer, which will not be described here. The answer step features of the steps in the answer thus determined not only fuse the semantic features of individual steps in the answer, but also fuse the relationship types between the individual steps and their relationship steps.
[0069] It should be noted that steps 120 and 130 can be executed simultaneously or sequentially, and the order of execution is not limited.
[0070] In step 140, the answer is corrected based on the answer step features of the steps in the standard answer and the answer step features of the steps in the answer to obtain the step error reasons of the answer.
[0071] Specifically, based on the answer step features of the steps in the standard answer and the answer step features of the steps in the answer obtained by steps 120 and 130 respectively, the answer can be corrected to obtain the step error reasons of the answer.
[0072] For the answer correction, comparison can be made between the answer step features and the standard answer step features in two levels: 1) comparison between single steps to determine the step error cause. For example, the answer step feature of step 1 in the answer is compared with the standard answer step feature of step 1 in the standard answer, and it is determined that the step 1 error cause is missing units, value calculation error, etc. 2) comparison between multiple steps to determine the step error cause. For example, the answer step feature of step 3 in the answer is compared with the standard answer step features of steps 2 and 3 in the standard answer, and although the answer step 3 is completely consistent with the standard answer step 3, the answer is missing the standard answer step 2, and the relationship between the standard answer steps 2 and 3 is a conditional relationship, i.e., step 2 is the condition of step 3. Then it can be determined that the step error cause is missing the condition.
[0073] Since the standard answer step features and the answer step features both integrate the semantic features of each step and the step relationship between each step, in the case of score deduction for the answer, the error step position of the answer can be quickly located, and the step error cause can be determined.
[0074] The problem correction method provided by the embodiment of the application can help students locate the error step and the step error cause, and provides convenience for students to analyze the wrong questions, compared with the prior art which can only obtain the total score or score deduction of the whole question.
[0075] Based on the above embodiment, Figure 2 is a flowchart of step 140 in the problem correction method provided by the application, as Figure 2 shown, step 140 specifically includes:
[0076] Step 141, based on the correlation between the standard answer step features and the answer step features, aligning the standard answer step features and the answer step features to obtain the step alignment features of the answer;
[0077] Step 142, based on the step alignment features of the answer, correcting the answer to obtain the step error cause of the answer.
[0078] Specifically, when the problem is corrected, the standard answer step features and the answer step features can be aligned. The alignment can be to query the steps matching the answer step features from the steps of the standard answer. Here, the matching includes not only the matching of the step semantic features, but also the matching of the step relationship of each step.
[0079] The higher the correlation between the marking answer step feature and the answering answer step feature is, the higher the probability of alignment between the marking answer step feature and the answering answer step feature is; on the contrary, the lower the correlation between the marking answer step feature and the answering answer step feature is, the lower the probability of alignment between the marking answer step feature and the answering answer step feature is.
[0080] The alignment between the marking answer step feature and the answering answer step feature can be realized by a method based on attention. Specifically, the marking answer step feature of the standard answer is taken as a query item, and the answering answer step feature of the answering answer is taken as a key-value pair for step alignment and information interaction. The specific process can be represented as:
[0081]
[0082] In the formula, T g represents the step alignment feature of the answering answer, represents the marking answer step feature, represents the answering answer step feature, W Q , W K and W V are parameters, is the vector dimension of the step feature.
[0083] The step alignment feature obtained in this way fuses the information of each step of the marking answer step feature, can sufficiently extract important features with higher correlation with the marking answer step feature, and improves the semantic representation ability of the step alignment feature. After obtaining the step alignment feature, the answering answer can be corrected to obtain the step error reason of the answering answer.
[0084] The method provided in the embodiments of the present application can align the marking answer step feature with the answering answer step feature based on the correlation between the marking answer step feature and the answering answer step feature, obtain the step alignment feature of the answering answer, and correct the answering answer based on the step alignment feature to obtain the step error reason of the answering answer, so that important features with higher correlation with the marking answer step feature can be sufficiently extracted, the semantic representation ability of the step alignment feature is improved, and the accuracy of step error reason classification is improved.
[0085] Based on any of the above embodiments, Figure 3 is a flowchart of the problem correction method provided by the present application, as shown in Figure 3 , the step 142 specifically includes:
[0086] Step 142-1, determining the title of the problem to be corrected;
[0087] Step 142-2, based on the correlation between the part-of-speech semantic features corresponding to the title, the standard answer and the answering answer respectively, aligning the part-of-speech semantic features corresponding to the title, the standard answer and the answering answer respectively to obtain the text alignment feature of the answering answer;
[0088] Step 142-3, grading the answer based on the text alignment feature of the answer and the step alignment feature, to obtain the step error factor of the answer, or to obtain the step error factor and the grading score of the answer.
[0089] Specifically, in order to further improve the accuracy of grading the answer, the text alignment feature and the step alignment feature of the answer can be graded at the same time, wherein the text alignment feature can represent the entire text semantic representation of the answer, and the semantic representation of each word in the answer.
[0090] The question of the to-be-graded exercise can be directly input by the user, can be obtained by speech transcription after collecting the audio, or can be obtained by scanning the image containing the question by using an image acquisition device such as a scanner, a mobile phone, or a camera, and performing OCR (Optical Character Recognition) on the image. The text of the question can be obtained by performing preprocessing such as deletion, deduplication, or splicing on the text obtained based on the above text acquisition method, and the embodiments of the present application do not limit this.
[0091] The word semantic features corresponding to the question, the standard answer, and the answer can be realized by sequence encoding based on a self-attention mechanism.
[0092] The word semantic feature of the question can be represented as P=[p1,p2,...,p l ],p i ∈R d , the word semantic feature of the standard answer can be represented as S=[s1,s2,...,s n ],s j ∈R d , and the word semantic feature of the answer can be represented as U=[u1,u2,...,u m ],u k ∈R d . Wherein, l, n, and m respectively represent the text lengths of the question, the standard answer, and the answer, p i ,s j ,u k respectively represent the feature vectors at the i, j, and k positions in the question, the standard answer, and the answer after self-attention sequence encoding.
[0093] On this basis, the word semantic features corresponding to the question, the standard answer, and the answer can be aligned based on the correlation between the respective word semantic features, to obtain the text alignment feature of the answer. The text alignment feature obtained in this way combines the important features of each word in the question, the standard answer, and the answer, and improves the text semantic representation ability of the answer.
[0094] After obtaining the text alignment feature and the step alignment feature of the answer, the answer is graded to obtain the step error reason of the answer, or the step error reason and the grading score of the answer.
[0095] In order to obtain the step error reason of the answer, the feature vector of all step separator positions in the text alignment feature is extracted separately, and is spliced with each step feature in the step alignment feature to obtain a step fusion feature vector of the answer combining the text sequence and the step structure relationship. Then, the fusion feature vector of each step obtained by splicing is input into a fully connected network to obtain the probability distribution of each error reason type to which each step belongs through a Softmax function.
[0096]
[0097] In the formula, The fusion feature vector of the i th step in the answer is represented as q, and the number of steps of the answer is represented.
[0098] In order to obtain the grading score of the answer, the mean-pooling operation is performed on each step feature vector in the obtained step alignment feature to obtain an overall step alignment feature vector. Then, the feature vector of the [CLS] position in the text alignment feature is spliced with the overall step alignment feature vector and is input into a fully connected network to predict the score of the student's answer to the whole question, which can be specifically represented as:
[0099]
[0100] In the formula, The feature of the [CLS] position in the text alignment feature, The overall step alignment feature is represented.
[0101] The method provided by the embodiment of the application can further improve the overall semantic representation ability of the answer, thereby improving the accuracy of step error reason classification. In addition, some key answer steps can be focused on when grading the score, so that the grading score is more objective and accurate.
[0102] Based on any one of the above embodiments, Figure 4 is a flowchart of the method for determining the text alignment feature provided by the application, as shown in Figure 4 Step 142-2 specifically includes:
[0103] Step 142-21, based on the correlation between the part-of-speech semantic features corresponding to the standard answer and the answer respectively, aligning the part-of-speech semantic features corresponding to the standard answer and the answer respectively to obtain the answer alignment features of the answer;
[0104] Step 142-22, based on the correlation between the part-of-speech semantic features of the question and the answer alignment features of the answer, aligning the part-of-speech semantic features of the question and the answer alignment features of the answer to obtain the text alignment features of the answer.
[0105] Specifically, in order to obtain the text alignment features of the answer, the part-of-speech semantic features corresponding to the standard answer and the answer can be aligned first to obtain the answer alignment features of the answer; then the part-of-speech semantic features of the question and the answer alignment features of the answer are aligned to obtain the text alignment features of the answer.
[0106] First, step 142-21 is performed, using the part-of-speech semantic features of the standard answer as the query item, and the part-of-speech semantic features of the answer as the key-value pair. The specific steps of alignment and feature fusion can be represented as:
[0107]
[0108] In the formula, S is the part-of-speech semantic feature of the standard answer, U is the part-of-speech semantic feature of the answer, W Q , W K and W V are parameters, is the feature dimension, and f is the answer alignment feature of the answer.
[0109] Among them, the part-of-speech semantic features of the standard answer are used as the query item, and the part-of-speech semantic features of the answer are used as the key-value pair for word-level information interaction, which can align the semantic information between the answer and the standard answer.
[0110] Then step 142-22 is performed, using the part-of-speech semantic features of the question as the query item, and the answer alignment features obtained in step 142-21 as the key-value pair, while fusing the question information to help the model locate the key answer text in the standard answer and the answer., in order to better score and correct the answer based on the question and the standard answer, which can be specifically represented as:
[0111]
[0112] In the formula, P is the part-of-speech semantic feature of the question, T s is the text alignment feature of the answer. T sis the feature vector obtained after aligning the standard answer, the question and the answer answer segmentation semantic features, wherein the feature vector containing the [CLS] special character is used to represent the text feature vector of the entire answer answer and the feature encoding vector of each segmentation, T s The length of the answer answer is consistent with the text length of the answer answer.
[0113] The method provided by the embodiment of the application first aligns the segmentation semantic features of the standard answer and the answer answer respectively to obtain answer alignment features; then aligns the segmentation semantic features of the question with the answer alignment features to obtain text alignment features of the answer answer, thereby further improving the text semantic representation ability of the answer answer.
[0114] Based on any of the above embodiments, Figure 5 is a flowchart of the step association type determination method provided by the application, as Figure 5 shown, the step 130 determines the step relationship type between each step in the answer answer based on the semantic features of each step in the answer answer, including:
[0115] Step 131, based on the correlation between the semantic features of each step in the answer answer, determine the context semantic features of each step in the answer answer;
[0116] Step 132, based on the order of each step in the answer answer, the context semantic features of each step in the answer answer are spliced to obtain the step splicing features of the answer answer;
[0117] Step 133, based on the step splicing features of the answer answer, determine the step relationship type between each step in the answer answer.
[0118] Specifically, in order to obtain the step relationship type between each step in the answer answer, the context semantic features of each step in the answer answer can be used. The context semantic features of each step can represent the semantic correlation between each two adjacent steps. Here, each two adjacent steps can be the adjacent two steps, such as step 1 and step 2; or can be non-adjacent two steps, such as step 1 and step 3.
[0119] The self-attention mechanism is used to extract features of each step to learn the association between different steps. The context semantic feature extraction process of each step can be represented as:
[0120]
[0121] In the formula, f U is the context semantic feature of each step in the answer answer, is the semantic feature of each step in the answer answer.
[0122] Then, the context semantic features of each step in the answer are spliced to obtain step splicing features, which can be represented as and i, j∈[0, q], wherein q represents the number of steps in the answer.
[0123] As can be seen from i<j, the relationship between the steps is from front to back, which can model the steps of the problem solving process. The spliced step splicing features After a fully connected layer and a Softmax function, the probability distribution of the step relationship type is obtained. In the model training process, the obtained probability distribution and the true step relationship type are calculated for loss; in the model inference process, the maximum probability value is taken as the step relationship type.
[0124] For example, the labels of the step relationship type can be set in advance, including causal relationship, conditional relationship and parallel relationship. The step splicing features obtained by splicing step 1 and step 3 After a fully connected layer and a Softmax function, the probability distribution of the step relationship type is obtained. In the model training process, the obtained probability distribution and the true step relationship type are calculated for loss; in the model inference process, the maximum probability value is taken as the step relationship type.
[0125] It should be noted that the step relationship type between each step in the standard answer can be obtained in the same way.
[0126] The method provided by the embodiment of the application determines the step relationship type between each step in the answer based on the context semantic features of each step in the answer, and provides a basis for determining the step error cause.
[0127] Based on any of the above embodiments, Figure 6 is a flowchart of the method for determining answer step features provided by the application, as Figure 6 shown, the answer step features of each step in the answer are determined based on the semantic features of each step in the answer and the step relationship type between each step in step 130, including:
[0128] In step 134, a graph is constructed with each step in the answer as a node and the step relationship type between each step as an edge.
[0129] In step 135, the semantic features of each step in the answer are used as the initial features of each node in the graph, the graph is feature extracted based on the correlation weight between each node, the graph structure features of each node are obtained, and the graph structure features of each node are used as the answer step features of each step in the answer.
[0130] Specifically, based on the semantic features of each step in the answer and the step relationship type between each step, the graph attention encoding network is used to extract features of each step to obtain the answer step features of each step.
[0131] First, the graph is constructed with each step in the answer as a node and the step relationship type between each step as an edge. For the obtained graph, the graph attention encoding network (Grap Attention Network) is used for graph encoding. The semantic features of each step in the answer are used as the initial features of each node in the graph. Based on the correlation weight between each node, the graph is feature-extracted to obtain the graph structure features of each node, and the graph structure features of each node are used as the answer step features of each step in the answer.
[0132] In the graph structure feature extraction process, each node constantly updates its own node features based on the semantic features of adjacent nodes and the step relationship with adjacent nodes. The specific feature extraction process can be represented as:
[0133]
[0134] Where n i represents the graph structure features of node i in the graph; K is the number of heads in the multi-head self-attention mechanism, represents the feature vector obtained by attention in K heads after splicing and integration operation; W k represents the weight matrix to be learned in the kth head; N i represents the set of all adjacent nodes of node i; where represents the relationship vector r ij or r ji between node j and node i after splicing through a fully connected network, the dimension is consistent with the node feature dimension, and the relationship vector r ij or r ji is the step relationship type between each step; represents the attention weight between nodes i and j in the graph attention network.
[0135] In addition, The calculation process can be represented as:
[0136]
[0137] e ij = FNN ([n i ; n j l), j e N i
[0138] Where, e ijThe value representing the correlation between node i and node j; and sigma (·) is an activation function, and the correlation weight value between the graph nodes can be calculated by the above formula.
[0139] The method provided by the embodiment of the application adopts the graph attention encoding network to obtain the graph structure features of each node, and takes the graph structure features of each node as the answering step features of each step in the answering answer, so that the obtained answering step features all fuse the graph structure relationship between the step and other steps.
[0140] Based on any of the above embodiments, step 134 specifically includes:
[0141] A directed graph is constructed with each step in the answering answer as a node, the step relationship type between each step as an edge, and the step order between each step as the direction of the edge.
[0142] Specifically, considering that when constructing the graph, for any node i, the nodes adjacent to it in the graph have two types: 1) the tail node set pointed to by node i; and 2) the head node set pointing to node i. Therefore, a directed graph can be constructed with each step in the answering answer as a node, the step relationship type between each step as an edge, and the step order between each step as the direction of the edge. That is, for the two different types of nodes, different concatenation orders of the relationship vector and the node vector are used in the model to distinguish them.
[0143] Specifically, for node B in the node set {<A, condition, B>, <B, condition, C>}, the two relationships that A is the condition of B and B is the condition of C are inconsistent, even though both are condition relationships, so they need to be distinguished, and can be specifically represented as:
[0144]
[0145] Where the values of i and j represent the step numbers, i < j indicates that step i is before step j, and j < i indicates that step j is before step i.
[0146] Based on any of the above embodiments, Figure 7 is a third flowchart of the problem correction method provided by the application, as Figure 7 indicated, a homework correction method is also provided, comprising:
[0147] S1, for the input question, standard answer and answering answer, first use the sequence encoder based on the attention mechanism to perform feature encoding, and obtain the respective segmented semantic features. And perform alignment of the segmented semantic features to obtain the text alignment features of the answering answer.
[0148] S2, the feature vector corresponding to the respective step delimiter position in the standard answer is taken as the semantic feature of each step, and the step relationship type between each step in the standard answer is classified, for example, a pre-trained discourse analysis module can be used to classify the step relationship type; on this basis, a directed step relationship graph is constructed with each step in the standard answer as a node, the step relationship type between each step as an edge, and the step order between each step as the direction of the edge, and the answer step features of each step in the standard answer are obtained based on the graph attention network graph structure encoder.
[0149] S3, according to the same method as S2, the answer step features of each step in the answer are obtained.
[0150] S4, align the answer step features with the answer step features, i.e. align the graph structure information to obtain the step alignment features of the answer.
[0151] S5, the information of the standard answer and the answer answer in the text and the graph structure is fused, i.e. based on the text alignment features and the step alignment features of the answer answer, the answer answer is corrected to obtain the step error cause of the answer answer, or the step error cause and the correction score of the answer answer. The text alignment features and the step alignment features are input into the whole question score regression module and the step error cause classification module to obtain the score of the answer answer in the current question and the step error type of the answer answer.
[0152] When classifying the step error cause of the answer answer, the step relationship between different steps in the answer answer needs to be combined to judge, as shown in the following example:
[0153] Standard answer: (s i : The object moves uniformly, r ij : Condition, s j : F 合 = F 推 + F 拉 =...)
[0154] Answer answer: u k : F 合 = F 推 + F 拉 =...
[0155] In the above example, a triple in the discourse structure graph of the standard answer and one of the steps in the answer answer are shown. When classifying the error cause of the step in the answer answer, the step u k in the answer answer needs to be aligned with the step s i and the step s j in the standard answer, so as to make the following two levels of judgment: 1) comparison between single steps, based on uk With s j The information interaction between u k With s i , s j is used to determine the deduction point, wherein the deduction point between multiple steps includes: the physical quantity before and after is not complete and unified, and the key condition is missing. For the above example, even if the steps u k With s j are exactly the same (that is, there is no single-step deduction point), but step s i is missing, that is, the description of "uniform motion" is missing, it can be concluded into the wrong cause type of "missing key condition", which depends on the modeling of the step relationship between different steps in the answer and the information alignment between different answer steps of the answer and the standard answer.
[0156] The homework correction method provided by the embodiment of the application can not only obtain the score of the student's answer, but also locate the position and error type of the error step of the student's answer, thereby assisting the student in analyzing the wrong questions.
[0157] The homework correction device provided by the application will be described below. The homework correction device described below can be correspondingly referred to the homework correction method described above.
[0158] Based on any of the above embodiments, Figure 8 is a structural schematic diagram of the exercise correction device provided by the application, as shown in Figure 8 The exercise correction device includes an answer determination unit 810, a standard answer step feature determination unit 820, an answer step feature determination unit 830, and an exercise correction unit 840.
[0159] The answer determination unit 810 is configured to determine the standard answer and the answer of the exercise to be corrected.
[0160] The standard answer step feature determination unit 820 is configured to determine the step relationship type between the steps in the standard answer based on the semantic features of the steps in the standard answer, and determine the standard answer step features of the steps in the standard answer based on the semantic features of the steps and the step relationship type between the steps.
[0161] The answer step feature determination unit 830 is configured to determine the step relationship type between the steps in the answer based on the semantic features of the steps in the answer, and determine the answer step features of the steps in the answer based on the semantic features of the steps and the step relationship type between the steps.
[0162] The exercise correction unit 840 is configured to correct the answer according to the standard answer step features and the answer step features of each step in the answer, to obtain the step error causes of the answer.
[0163] The exercise correction device provided by the embodiment of the present application can help students to locate the error steps and the step error causes by obtaining the standard answer step features and the answer step features according to the semantic features of each step in the standard answer and the answer and the step relationship types between the steps, and then correcting the answer, thereby providing convenience for the students to analyze the wrong answers.
[0164] According to any one of the above embodiments, the exercise correction unit is further configured to:
[0165] align the standard answer step features and the answer step features according to the correlation between the standard answer step features and the answer step features, to obtain the step alignment features of the answer;
[0166] correct the answer according to the step alignment features of the answer, to obtain the step error causes of the answer.
[0167] According to any one of the above embodiments, the exercise correction unit is further configured to:
[0168] determine the question of the exercise to be corrected;
[0169] align the segmentation semantic features corresponding to the question, the standard answer and the answer according to the correlation between the segmentation semantic features corresponding to the question, the standard answer and the answer, to obtain the text alignment features of the answer;
[0170] correct the answer according to the text alignment features and the step alignment features of the answer, to obtain the step error causes of the answer, or to obtain the step error causes and the correction scores of the answer.
[0171] According to any one of the above embodiments, the exercise correction unit is further configured to:
[0172] align the segmentation semantic features corresponding to the standard answer and the answer according to the correlation between the segmentation semantic features corresponding to the standard answer and the answer, to obtain the answer alignment features of the answer;
[0173] Based on the correlation between the word segmentation semantic features of the question and the answer alignment features of the answer, the word segmentation semantic features of the question and the answer alignment features of the answer are aligned to obtain the text alignment features of the answer.
[0174] Based on any of the above embodiments, the answering step feature determination unit is further configured to:
[0175] Based on the correlation between the semantic features of each step in the answer, the contextual semantic features of each step in the answer are determined;
[0176] Based on the sequential order of the steps in the answer, the contextual semantic features of each step in the answer are concatenated to obtain the step concatenation features of the answer;
[0177] Based on the step-by-step splicing characteristics of the answer, the step relationship type between each step in the answer is determined.
[0178] Based on any of the above embodiments, the answering step feature determination unit is further configured to:
[0179] A graph is constructed using each step in the answer as a node and the step relationship type between each step as an edge.
[0180] Using the semantic features of each step in the answer as the initial features of each node in the graph, and based on the correlation weights between each node, feature extraction is performed on the graph to obtain the graph structure features of each node, and the graph structure features of each node are used as the answer step features of each step in the answer.
[0181] Based on any of the above embodiments, the answering step feature determination unit is further configured to:
[0182] A directed graph is constructed using each step in the answer as a node, the step relationship type between each step as an edge, and the step order between each step as the direction of the edge.
[0183] Figure 9 An example is a schematic diagram of the physical structure of an electronic device, such as... Figure 9 As shown, the electronic device may include a processor 910, a communications interface 920, a memory 930, and a communication bus 940, wherein the processor 910, the communications interface 920, and the memory 930 communicate with each other via the communication bus 940. The processor 910 can call logical instructions in the memory 930 to execute a problem-solving grading method, which includes determining the standard answer and the written answer of the problem to be graded;
[0184] determine the step relationship types between the steps in the standard answer based on the semantic features of the steps in the standard answer, and determine the standard step features of the steps in the standard answer based on the semantic features of the steps in the standard answer and the step relationship types between the steps;
[0185] determine the step relationship types between the steps in the answer answer based on the semantic features of the steps in the answer answer, and determine the answer step features of the steps in the answer answer based on the semantic features of the steps in the answer answer and the step relationship types between the steps;
[0186] based on the standard step features of the steps in the standard answer and the answer step features of the steps in the answer answer, correct the answer answer to obtain the step error reasons of the answer answer.
[0187] In addition, the logical instructions in the memory 930 described above can be implemented in the form of a software function unit and sold or used as an independent product, and can be stored in a computer readable storage medium. Based on such understanding, the technical solutions of the present application essentially or the parts that contribute to the prior art or parts of the technical solutions can be embodied in the form of a software product. The computer software product is stored in a storage medium, and includes a plurality of instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present application. The aforementioned storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM, Read-Only Memory), a random access memory (RAM, Random Access Memory), a magnetic disk or an optical disk, and various media that can store program codes.
[0188] On the other hand, the present application also provides a computer program product, which comprises a computer program, the computer program can be stored on a non-transitory computer readable storage medium, and the computer program is executed by a processor, so that the computer can execute the exercise correction method provided by the above-mentioned methods, and the method comprises:
[0189] determine the standard answer and the answer answer of the exercise to be corrected;
[0190] determine the step relationship types between the steps in the standard answer based on the semantic features of the steps in the standard answer, and determine the standard step features of the steps in the standard answer based on the semantic features of the steps in the standard answer and the step relationship types between the steps;
[0191] determine the step relationship types between the steps in the standard answer based on the semantic features of the steps in the standard answer, and determine the standard step features of the steps in the standard answer based on the semantic features of the steps in the standard answer and the step relationship types between the steps in the standard answer;
[0192] based on the standard step features of the steps in the standard answer and the answer step features of the steps in the answer answer, correct the answer answer to obtain the step error reasons of the answer answer.
[0193] In another aspect, the present application also provides a non-transitory computer readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the problem correction method provided by the above method, and the method comprises:
[0194] determining the standard answer and the answer answer of the problem to be corrected;
[0195] determine the step relationship types between the steps in the standard answer based on the semantic features of the steps in the standard answer, and determine the standard step features of the steps in the standard answer based on the semantic features of the steps in the standard answer and the step relationship types between the steps in the standard answer;
[0196] determine the step relationship types between the steps in the answer answer based on the semantic features of the steps in the answer answer, and determine the answer step features of the steps in the answer answer based on the semantic features of the steps in the answer answer and the step relationship types between the steps in the answer answer;
[0197] based on the standard step features of the steps in the standard answer and the answer step features of the steps in the answer answer, correct the answer answer to obtain the step error reasons of the answer answer.
[0198] The device embodiments described above are only schematic, wherein the units shown as separate components can or can not be physically separate, and the components shown as units can or can not be physical units, i.e., can be located in one place, or can be distributed on multiple network units. Part or all of the modules can be selected according to actual needs to achieve the purpose of the present embodiment scheme. Those skilled in the art can understand and implement without creative labor.
[0199] Those skilled in the art can clearly understand the technical solutions of the various embodiments from the above description of the embodiments, and the various embodiments can be implemented by means of software with the necessary general hardware platforms, and of course, can also be implemented by hardware. Based on such understanding, the above technical solutions, essentially or in other words, the part of the prior art that makes a contribution, can be embodied in the form of a software product, which can be stored in a computer readable storage medium, such as a ROM / RAM, a magnetic disk, an optical disk, and the like, and includes a number of instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.
[0200] Finally, it should be noted that: the above embodiments are only used to illustrate the technical solutions of the present application, and not to limit them; although the present application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that: it can still modify the technical solutions recorded in the foregoing embodiments, or make equivalent replacement for part of the technical vectors; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application.
Claims
1. A problem correction method characterized by, include: Determine the standard answers and answer keys for the exercises to be graded; Based on the semantic features of each step in the standard answer, determine the step relationship type between each step in the standard answer, and based on the semantic features of each step in the standard answer and the step relationship type between each step, determine the standard answer step features of each step in the standard answer; Based on the semantic features of each step in the answer, the step relationship type between each step in the answer is determined, and based on the semantic features of each step in the answer and the step relationship type between each step, the answer step features of each step in the answer are determined. The step of determining the answer step features of each step in the answer based on the semantic features of each step in the answer and the step relationship type between each step includes: constructing a graph with each step in the answer as a node and the step relationship type between each step as an edge; using the semantic features of each step in the answer as the initial features of each node in the graph, extracting features from the graph based on the relevance weight between each node to obtain the graph structure features of each node, and using the graph structure features of each node as the answer step features of each step in the answer; Based on the characteristics of each step in the standard answer and the characteristics of each step in the written answer, the written answer is corrected to obtain the reasons for the errors in the steps of the written answer.
2. The exercise grading method according to claim 1, characterized by, The step-by-step characteristics of each step in the standard answer and the step-by-step characteristics of each step in the written answer are used to correct the written answer and obtain the step-by-step error reasons of the written answer, including: Based on the correlation between the marked answer step features and the answer step features, the marked answer step features and the answer step features are aligned to obtain the step alignment features of the answer; Based on the step alignment features of the answer, the answer is graded to obtain the step error reasons of the answer.
3. The exercise grading method according to claim 2, characterized by, The step alignment features of the answer are used to correct the answer and obtain the step error reasons of the answer, including: Determine the titles of the exercises to be graded; Based on the correlation between the word segmentation semantic features corresponding to the question, the standard answer, and the answer respectively, the word segmentation semantic features corresponding to the question, the standard answer, and the answer respectively are aligned to obtain the text alignment features of the answer; Based on the text alignment features and step alignment features of the answer, the answer is graded to obtain the step error reasons of the answer, or the step error reasons and grading score of the answer.
4. The exercise correction method according to claim 3, characterized in that, The method involves aligning the semantic features of the word segments corresponding to the question, the standard answer, and the answer, based on the correlation between these features, to obtain the text alignment features of the answer. This alignment includes: Based on the correlation between the word segmentation semantic features corresponding to the standard answer and the answer respectively, the word segmentation semantic features corresponding to the standard answer and the answer respectively are aligned to obtain the answer alignment features of the answer; Based on the correlation between the word segmentation semantic features of the question and the answer alignment features of the answer, the word segmentation semantic features of the question and the answer alignment features of the answer are aligned to obtain the text alignment features of the answer.
5. The exercise correction method according to claim 1, characterized in that, The determination of the step relationship type between the steps in the answer based on the semantic features of each step in the answer includes: Based on the correlation between the semantic features of each step in the answer, the contextual semantic features of each step in the answer are determined; Based on the sequential order of the steps in the answer, the contextual semantic features of each step in the answer are concatenated to obtain the step concatenation features of the answer; Based on the step-by-step splicing characteristics of the answer, the step relationship type between each step in the answer is determined.
6. The exercise correction method according to claim 1, characterized in that, The process of constructing a graph using each step in the answer as a node and the step-relationship type between the steps as edges includes: A directed graph is constructed using each step in the answer as a node, the step relationship type between each step as an edge, and the step order between each step as the direction of the edge.
7. A problem-correction device, characterized in that, include: The answer determination unit is used to determine the standard answers and written answers for exercises to be graded. The standard answer step feature determination unit determines the step relationship type between each step in the standard answer based on the semantic features of each step in the standard answer, and determines the standard answer step feature of each step in the standard answer based on the semantic features of each step in the standard answer and the step relationship type between each step. The answer step feature determination unit is used to determine the step relationship type between each step in the answer based on the semantic features of each step in the answer, and to determine the answer step feature of each step in the answer based on the semantic features of each step in the answer and the step relationship type between each step; The step of determining the answer step features of each step in the answer based on the semantic features of each step in the answer and the step relationship type between each step includes: constructing a graph with each step in the answer as a node and the step relationship type between each step as an edge; using the semantic features of each step in the answer as the initial features of each node in the graph, extracting features from the graph based on the relevance weight between each node to obtain the graph structure features of each node, and using the graph structure features of each node as the answer step features of each step in the answer; The exercise grading unit is used to grade the answer based on the characteristics of the standard answer steps and the characteristics of the answer steps, and to obtain the reasons for the errors in the answer steps.
8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the exercise grading method as described in any one of claims 1 to 6.
9. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the exercise grading method as described in any one of claims 1 to 6.
Citation Information
Patent Citations
Method and system for correcting answer result of mathematical subjective question
CN108172050A
Answer analysis method for answers to questions, electronic equipment and storage medium
CN112732868A
Question correcting method, model training method, computer equipment and storage medium
CN114328931A