Method, apparatus, computer device, and storage medium for identifying exercise knowledge points
By obtaining and updating the vectors of the exercises to be identified and using their association with the reference elements, the problem of difficulty in accurately obtaining the knowledge points of the newly entered question in the prior art is solved, and a high-accuracy knowledge point recognition is achieved.
Patent Information
- Application Number
- CN202110160794.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-02-05
- Publication Date
- 2025-06-20
- Estimated Expiration
- 2041-02-05
AI Technical Summary
It is difficult for the existing technology to accurately obtain the knowledge points corresponding to new questions in the database, especially when new questions appear, it is difficult to accurately predict the existing methods.
By obtaining the initial question vector corresponding to the text information of the exercise to be identified, the correlation relationship between the exercise to be identified and multiple reference elements is determined based on the vector, the update question vector is generated and the probability distribution of the knowledge points of the exercise to be identified is determined based on the update question vector, thereby obtaining the knowledge points.
While using the exercise text information, it is possible to use the correlation between the exercises and reference elements to identify knowledge points, effectively improving the accuracy of knowledge points recognition, especially when new question types appear.
Smart Images

Figure CN114880442B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and particularly to a method and apparatus for identifying knowledge points of exercises, a computer device, and a storage medium. Background Art
[0002] With the booming development of online education, a large number of online education products have emerged on the market, including many application products related to online question banks. Through the online question bank, users can do exercises on the terminal device without carrying exercise books with them. Compared with the offline question bank, the online question bank is gradually favored by users because of its larger data volume and more timely update. To facilitate users to select appropriate exercises from a large number of exercises for learning, knowledge points are often marked on the exercises and knowledge point tags are added.
[0003] In the prior art, when a new exercise is added to the question bank, similar exercises can be retrieved from the database, and the corresponding knowledge points are used as the knowledge points of the new exercise to achieve the prediction of knowledge points; alternatively, the text corresponding to the exercise can be converted into a feature vector, and the exercise is classified by combining a classification algorithm to obtain the corresponding knowledge points.
[0004] However, for the first method, the similarity of exercises does not mean that the corresponding knowledge point tags can be shared. At the same time, this method requires the existence of similar exercises in the existing question bank. For new question types, it is difficult to accurately predict. In the second method, only the text information of the exercise itself is used while ignoring other associated information for prediction, which has a great impact on the accuracy of the prediction result. The existing methods are difficult to accurately obtain the knowledge points corresponding to the newly added questions. Summary of the Invention
[0005] Based on this, it is necessary to provide a method and apparatus for identifying knowledge points of exercises, a computer device, and a storage medium for the above technical problems.
[0006] A method for identifying knowledge points of exercises, the method comprising:
[0007] Obtaining an initial question vector corresponding to the text information of the exercise to be identified;
[0008] Based on the initial question vector, determining the association relationship between the exercise to be identified and multiple reference elements, the multiple reference elements being determined based on the text features and attribute features of multiple historical exercises;
[0009] According to the association relationship and the initial question vector, determining an updated question vector corresponding to the exercise to be identified;
[0010] According to the updated question vector, determining the knowledge point probability distribution corresponding to the exercise to be identified, and obtaining the knowledge points corresponding to the exercise to be identified according to the knowledge point probability distribution.
[0011] In one embodiment, determining the association relationship between the exercise to be recognized and multiple reference elements based on the initial topic vector includes:
[0012] Input the initial topic vector into a trained first language model, and through the first language model, based on the initial topic vector, determine the node corresponding to the exercise to be recognized in the knowledge graph, and determine the association relationship between the exercise to be recognized and multiple reference elements according to this node;
[0013] Wherein, the knowledge graph includes multiple nodes and the association relationships between the nodes, and each node corresponds to a reference element.
[0014] In one embodiment, the method further includes:
[0015] Obtain the text features and attribute features corresponding to multiple historical exercises respectively, thereby obtaining multiple text features and multiple attribute features;
[0016] Determine the multiple text features and multiple attribute features as corresponding reference elements respectively, to obtain multiple reference elements;
[0017] Obtain the element association relationships between the multiple reference elements, and generate the knowledge graph according to the multiple reference elements and the element association relationships.
[0018] In one embodiment, the attribute features include at least one of knowledge point attribute, chapter attribute, and question difficulty attribute; obtaining the element association relationships between the multiple reference elements includes:
[0019] Obtain the first association relationship between the text features of historical exercises and various attribute features;
[0020] Obtain the second association relationship between the same attribute features;
[0021] Obtain the third association relationship between different attribute features;
[0022] Obtain the fourth association relationship between the text features of multiple historical exercises;
[0023] Based on the first association relationship and at least one of the second association relationship, the third association relationship, and the fourth association relationship, obtain the element association relationship.
[0024] In one embodiment, each node in the knowledge graph corresponds to a reference element, and the method further includes:
[0025] Obtain the element feature vectors corresponding to the multiple reference elements respectively;
[0026] Input multiple feature vectors of elements and the knowledge graph into a neural network model, so as to select multiple nodes from the knowledge graph through the neural network model to obtain a node sequence, and for each node in the node sequence, according to the feature vector of the element corresponding to the node and the mapping function in the neural network model, obtain the node vector corresponding to the node;
[0027] Determine the corresponding loss function according to multiple node vectors, and adjust the model parameters of the neural network model according to the loss function;
[0028] Return to the step of inputting multiple feature vectors of elements and the knowledge graph into the neural network model, and adjust the model parameters of the neural network model again until the training end condition is met to obtain the first language model.
[0029] In one embodiment, the selecting multiple nodes from the knowledge graph to obtain a node sequence includes:
[0030] Obtain a preset meta-path; the meta-path is a predefined sorting rule for node types;
[0031] Select multiple nodes from the knowledge graph according to the meta-path and the transition probability to obtain a node sequence.
[0032] In one embodiment, the obtaining the node vector corresponding to the node according to the feature vector of the element corresponding to the node and the mapping function in the neural network model includes:
[0033] Obtain the edge type corresponding to the connection edge connecting the node, and determine the corresponding edge feature vector when the node connects to a neighbor node through the edge of the edge type;
[0034] Obtain the weight corresponding to the edge feature vector;
[0035] Substitute the edge feature vector, the weight corresponding to the edge feature vector, and the feature vector of the element corresponding to the node into the mapping function in the neural network model to obtain the node vector corresponding to the node.
[0036] In one embodiment, the determining the corresponding edge feature vector when the node connects to a neighbor node through the edge of the edge type includes:
[0037] Obtain the neighbor nodes connected by the edge of the edge type, and the corresponding edge feature vectors of the neighbor nodes;
[0038] Aggregate the edge feature vectors corresponding to the neighbor nodes, and determine the aggregation result as the edge feature vector corresponding to the node.
[0039] In one embodiment, obtaining the initial question vector corresponding to the text information of the exercise to be recognized includes:
[0040] Obtaining the text information corresponding to the exercise to be recognized;
[0041] Inputting the text information into a second language model to convert the text information into the initial question vector corresponding to the exercise to be recognized through the second language model;
[0042] The text information includes at least one of the following: stem text, option text, and exercise explanation text.
[0043] An apparatus for recognizing exercise knowledge points, the apparatus includes:
[0044] An initial question vector acquisition module, configured to obtain the initial question vector corresponding to the text information of the exercise to be recognized;
[0045] An association relationship acquisition module, configured to determine the association relationship between the exercise to be recognized and multiple reference elements based on the initial question vector, where the multiple reference elements are determined based on the text features and attribute features of multiple historical exercises;
[0046] An updated question vector acquisition module, configured to determine the updated question vector corresponding to the exercise to be recognized according to the association relationship and the initial question vector;
[0047] A knowledge point acquisition module, configured to determine the knowledge point probability distribution corresponding to the exercise to be recognized according to the updated question vector, and obtain the knowledge point corresponding to the exercise to be recognized according to the knowledge point probability distribution.
[0048] A computer device includes a memory and a processor, the memory stores a computer program, and when the processor executes the computer program, the steps of the method described in any one of the above are implemented.
[0049] A computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the method described in any one of the above are implemented.
[0050] The above-mentioned method, device, computer equipment and storage medium for identifying knowledge points in exercises obtain an initial question vector corresponding to the text information of the exercise to be identified, determine the association relationship between the exercise to be identified and multiple reference elements based on the initial question vector, determine the updated question vector corresponding to the exercise to be identified according to the association relationship and the initial question vector, determine the probability distribution of knowledge points corresponding to the exercise to be identified according to the updated question vector, and obtain the knowledge points corresponding to the exercise to be identified according to the probability distribution of knowledge points, thereby achieving full utilization of text information and association relationships, being able to use the association relationship between the exercise and multiple reference elements while using the exercise text information to identify the knowledge points of the exercise, and effectively improving the accuracy of knowledge point recognition. BRIEF DESCRIPTION OF THE DRAWINGS
[0051] Figure 1 A schematic diagram of a flow chart of a method for identifying knowledge points in an exercise in one embodiment;
[0052] Figure 2 A schematic diagram of a process of generating a knowledge graph in one embodiment;
[0053] Figure 3 This is an example diagram of a knowledge graph in an embodiment;
[0054] Figure 4 A schematic diagram of a flow chart of a first language model training step in an embodiment;
[0055] Figure 5 A schematic diagram of a flow chart of another method for identifying knowledge points in an exercise in one embodiment;
[0056] Figure 6 A structural block diagram of a device for identifying knowledge points in an exercise in one embodiment;
[0057] Figure 7 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0058] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0059] With the booming development of online education, a large number of online education products have emerged on the market, such as education-related apps, websites, and mini-programs, among which there are many application products related to online question banks. Through online question banks, users do not need to carry exercise books with them, and can do questions on mobile phones, tablets, computers and other terminal devices. Compared with offline question banks, online question banks are gradually favored by users because of their larger data volume and more timely updates.
[0060] In practical applications, to facilitate users in selecting appropriate exercises from a vast number of exercises for learning, the exercises are often marked with knowledge points and relevant tags, such as the corresponding chapters, knowledge points, etc. of the exercises. When users use the question bank, they can quickly filter through the tags of the exercises to obtain the exercise content they want to practice. Since a large number of exercises are stored in the online question bank, to improve the efficiency of adding relevant tags to the exercises and save manpower and material resources, an automated method for determining exercise tags can be adopted to avoid hiring specialists to tag the exercises.
[0061] When determining the tags corresponding to the exercises, it can be judged by similarity. For example, when a new exercise is added to the question bank, similar exercises can be retrieved from the database, and the corresponding knowledge points can be used as the knowledge points of the new exercise to achieve the prediction of knowledge points. Or, the determination of knowledge points can also be regarded as a text classification task, that is, input the text content corresponding to the question, and through vector space models such as TF-IDF, bag of words, word2vec, Glove, etc., convert the text content into feature vectors that can be processed by the model, and combine machine learning algorithms such as support vector machines and naive Bayesian models or relevant models of deep learning to classify the exercises and predict which preset knowledge point the question belongs to.
[0062] However, for the first method, the similarity of exercises does not mean that the corresponding knowledge point tags can be shared. At the same time, this method requires the existence of similar exercises in the existing question bank, that is, a large question bank is needed to obtain similar exercises for each newly added exercise. For new question types, it is difficult to accurately predict. In the second method, only the text information of the exercise itself is used while ignoring other associated information for prediction, which has a greater impact on the accuracy of the prediction results. The existing methods are difficult to accurately obtain the knowledge points corresponding to the newly added questions.
[0063] In view of the above problems, in one embodiment, as Figure 1 shown, the present application provides a method for identifying knowledge points of exercises. In this embodiment, an example is given where this method is applied to a terminal. In this terminal, exercises to be identified with knowledge points to be determined can be stored, and the corresponding knowledge points can be identified through the method provided in this embodiment. It can be understood that this method can also be applied to a server. For example, the server can obtain the exercises to be identified through the network and update the question bank. This method can also be applied to a system including a terminal and a server and implemented through the interaction between the terminal and the server.
[0064] In this embodiment, the method may include the following steps:
[0065] Step 101, obtain an initial question vector corresponding to the text information of the exercise to be identified.
[0066] As an example, the exercise to be recognized can be an exercise corresponding to the knowledge point to be recognized. Among them, the exercise to be recognized can be a question for users to practice during the teaching process. The question types corresponding to the exercise to be recognized can include objective questions and / or subjective questions. Among them, objective questions can include multiple-choice questions and true / false questions, and subjective questions can include fill-in-the-blank questions, calculation questions, proof questions, etc. Those skilled in the art can select the exercise to be recognized from multiple subject types or question types according to actual needs.
[0067] In practical applications, the exercise to be recognized has corresponding text information, and the user understands the exercise to be recognized through this text information. In this embodiment, the server can obtain an initial question vector corresponding to the text information of the exercise to be recognized, where the initial question vector is a vector representing the text information of the exercise to be recognized.
[0068] Step 102: Based on the initial question vector, determine the association relationship between the exercise to be recognized and multiple reference elements.
[0069] As an example, the reference element can be an element referred to when recognizing the knowledge point corresponding to the exercise. Multiple reference elements can be determined based on the text features and attribute features of multiple historical exercises. Among them, the text feature of the historical exercise can be a feature reflecting the text information in the exercise, such as the text information corresponding to the historical exercise; the attribute feature can be information reflecting the usage characteristics of the exercise.
[0070] In specific implementation, there can be an association relationship between exercises or between an exercise and an attribute feature. For example, exercise 1 is associated with exercise 2, and exercise 1 is associated with attribute feature a. Moreover, the text features, attribute features corresponding to the historical exercise itself, and the association between the text features and attribute features are helpful for the recognition of knowledge points. After obtaining the initial question vector, the association relationship between the exercise to be recognized and multiple reference elements can be determined based on the initial question vector.
[0071] Step 103: According to the association relationship and the initial question vector, determine the updated question vector corresponding to the exercise to be recognized.
[0072] Specifically, after determining the association relationship, the initial question vector can be updated according to the association relationship to determine the updated question vector corresponding to the exercise to be recognized. Since the updated question vector is generated based on the association relationship and the initial question vector, the updated question vector can reflect the association between the exercise to be recognized and other reference elements while reflecting the features of the text information of the exercise to be recognized, that is, it synthesizes the text information of the exercise to be recognized and the association information between it and multiple reference elements.
[0073] Step 104: Determine the probability distribution of knowledge points corresponding to the exercise to be recognized according to the updated question vector, and obtain the knowledge points corresponding to the exercise to be recognized according to the probability distribution of knowledge points.
[0074] As an example, the probability distribution of knowledge points can be the probabilities that the exercise to be recognized belongs to different knowledge points.
[0075] After obtaining the updated question vector, the probability distribution of knowledge points corresponding to the exercise to be recognized can be determined according to the updated question vector. By analyzing the distribution probabilities of knowledge points, the probabilities corresponding to the exercise to be recognized belonging to different knowledge points can be determined. Furthermore, by comparing the probabilities corresponding to different knowledge points, the knowledge points corresponding to the exercise to be recognized can be obtained.
[0076] In this embodiment, by obtaining the initial question vector corresponding to the text information of the exercise to be recognized, based on the initial question vector, determining the association relationship between the exercise to be recognized and multiple reference elements, according to the association relationship and the initial question vector, determining the updated question vector corresponding to the exercise to be recognized, according to the updated question vector, determining the probability distribution of knowledge points corresponding to the exercise to be recognized, and according to the probability distribution of knowledge points, obtaining the knowledge points corresponding to the exercise to be recognized, the full utilization of text information and association relationship is realized. It can utilize the association relationship between the exercise and multiple reference elements while using the exercise text information to identify the exercise knowledge points, effectively improving the accuracy of knowledge point identification.
[0077] Compared with the existing knowledge point prediction methods that simply regard knowledge point prediction as a text classification task and only use the text information of the exercise, or directly share the knowledge points of similar exercises, the accuracy of exercise knowledge point identification in this application is greatly improved. Moreover, since this application can be based on the text information of the exercise and the association relationship between the exercise and the reference elements, when adding new question types, the corresponding knowledge points can still be identified.
[0078] In one embodiment, the determining the association relationship between the exercise to be recognized and multiple reference elements based on the initial question vector includes:
[0079] Input the initial question vector into the trained first language model. Through the first language model, based on the initial question vector, determine the node corresponding to the exercise to be recognized in the knowledge graph, and determine the association relationship between the exercise to be recognized and multiple reference elements according to this node.
[0080] Among them, the knowledge graph includes multiple nodes and the association relationships between the nodes, and each node corresponds to a reference element.
[0081] In practical applications, the initial problem vector can be input into the trained first language model, and the first language model can determine the node corresponding to the exercise to be recognized in the knowledge graph based on the initial problem vector and the trained mapping relationship h in the language model z , and this node can be represented by a vector. After obtaining this node, since each node in the knowledge graph corresponds to a reference element, the association relationship between the exercise to be recognized and multiple reference elements can be determined based on the association relationship between this node and other nodes in the graph
[0082] Among them, the mapping relationship h z is associated with the passing relationship in the knowledge graph and can be learned through the DeepWalk model to obtain the embedding of the knowledge graph. During the training process of the DeepWalk model, a network including multiple nodes can be input, and the output is the vector representation of the nodes in the network. During the training process of the first language model, the mapping relationship between the input vector x i and the corresponding representation vector of the Deep Walk model can be learned. Thus, when the initial problem vector is obtained, the node corresponding to the exercise to be recognized in the knowledge graph can be determined based on this vector
[0083] In this embodiment, the association between the exercise to be recognized and other reference elements can be obtained based on the initial problem vector, and the task of inductive learning can be processed. While fully utilizing the text information and association relationships, it can also predict newly added exercises, enabling this method to have a wider application range and higher transferability, without the need to retrain the model when new exercises are obtained
[0084] In one embodiment, as Figure 2 shown, the method may further include the following steps
[0085] Step 201, obtain the text features and attribute features corresponding to multiple historical exercises respectively, thereby obtaining multiple text features and multiple attribute features
[0086] In a specific implementation, multiple historical exercises can be obtained from the exercise database, the text information corresponding to each historical exercise can be used as the text feature, and the attribute features corresponding to each of the multiple historical exercises can be obtained, thereby obtaining multiple text features and multiple attribute features
[0087] Step 202, determine the multiple text features and multiple attribute features as the corresponding reference elements respectively, to obtain multiple reference elements
[0088] After obtaining multiple text features and multiple attribute features, each text feature and each attribute feature can be determined as the corresponding reference element respectively, thereby obtaining multiple reference elements
[0089] Step 203: Obtain the element association relationships among the multiple reference elements, and generate the knowledge graph according to the multiple reference elements and the element association relationships.
[0090] As an example, the element association relationship is information characterizing the association relationships among multiple reference elements.
[0091] After obtaining multiple reference elements, the element association relationships among the respective reference elements can be obtained, and a knowledge graph, which can also be called a heterogeneous graph, can be generated according to the multiple reference elements and the element association relationships.
[0092] In this embodiment, by obtaining the text features and attribute features corresponding to multiple historical exercises respectively, the multiple text features and multiple attribute features are respectively determined as the corresponding reference elements to obtain multiple reference elements, the element association relationships among the multiple reference elements are obtained, and a knowledge graph is generated according to the multiple reference elements and the element association relationships, providing a data basis for the training of the first language model.
[0093] In one embodiment, the obtaining of the element association relationships among the multiple reference elements may include the following steps:
[0094] Obtain the first association relationship between the text features of the historical exercise and various attribute features; obtain the second association relationship between the same type of attribute features; obtain the third association relationship between different types of attribute features; obtain the fourth association relationship between the text features of multiple historical exercises; and obtain the element association relationship based on the first association relationship and at least one of the second association relationship, the third association relationship, and the fourth association relationship.
[0095] As an example, the attribute features may include at least one of the following: knowledge point attribute, chapter attribute, question difficulty attribute, and question concept attribute.
[0096] Among them, the knowledge point attribute may be the knowledge point corresponding to the exercise; the chapter attribute may be the chapter to which the knowledge point corresponding to the exercise belongs in the teaching material; the question difficulty attribute may be the difficulty corresponding to the exercise, which can be characterized by a level or a specific value; and the question concept attribute may be the knowledge point concept corresponding to the knowledge point of the exercise.
[0097] In a specific implementation, after obtaining multiple reference elements, various association relationships can be obtained. Specifically, text features can be associated with attribute features to obtain a first association relationship, thereby determining the association relationships between each historical exercise and knowledge points, chapters, or difficulty levels. In an example, historical exercises can be obtained from an exercise database, and chapters and knowledge points can be obtained from a knowledge base. Among the obtained historical exercises, there can be multiple historical exercises associated with chapters and / or knowledge points. At the same time, the relationships between knowledge points can also be obtained, such as knowledge point A being a prerequisite knowledge point for knowledge point B, and chapter A containing knowledge points B, C, and D.
[0098] For the same type of attribute feature, a second association relationship between multiple attribute features of the same type can be obtained. For example, for the knowledge point attribute, the association relationship between knowledge point A, knowledge point B, knowledge point C, and knowledge point D can be obtained to get the second association relationship. At the same time, a third association relationship between different types of attribute features can be obtained. For example, different knowledge points can be associated with different chapters, and different knowledge points or chapters can have different difficulties, and associations can be made between multiple knowledge point attributes, multiple chapter attributes, or difficulty attributes.
[0099] In this embodiment, a fourth association relationship between the text features of historical exercises can also be obtained. When obtaining the fourth association relationship, the feature vectors corresponding to the text features of each historical exercise can be obtained. This feature vector can also be called an exercise vector. Then, based on the exercise vectors corresponding to each exercise, the similarity between every two exercises can be obtained. For example, the exercise vectors corresponding to two historical exercises can be obtained, and based on the two obtained exercise vectors, the cosine value (which can also be called cosine similarity) corresponding to the two historical exercises can be calculated. When the cosine value is greater than the threshold, it is determined that there is an association relationship between the two historical exercises. Through the above method, the fourth association relationship between the text features of multiple historical exercises can be determined.
[0100] Furthermore, in this embodiment, an element association relationship can be obtained based on the first association relationship and at least one of the second association relationship, the third association relationship, and the fourth association relationship. For example, the following six association relationships can be determined as the element association relationship: exercise-exercise, exercise-chapter, exercise-knowledge point, knowledge point-knowledge point, chapter-knowledge point, and a knowledge graph can be generated according to this element association relationship and multiple reference elements, as shown in Figure 3.
[0101] In this embodiment, an element association relationship can be obtained based on the first association relationship and at least one of the second association relationship, the third association relationship, and the fourth association relationship, providing a data basis for the construction of the knowledge graph.
[0102] In one embodiment, as Figure 4As shown, the method may further include the following steps:
[0103] Step 401: Obtain the element feature vectors corresponding to multiple reference elements respectively.
[0104] In a specific implementation, each obtained reference element can be identified by text information understandable by humans. For the convenience of further processing later, the element feature vectors corresponding to multiple reference elements can be obtained.
[0105] Specifically, the text information corresponding to the reference element can be converted into an element feature vector through a second language model. In practical applications, a pre-trained language model can be used, such as the BERT pre-trained language model. Since the pre-trained language model is trained on a publicly available preset corpus, when the preset corpus is not the topic corpus, there is a situation where the distribution of vectors is inconsistent with the distribution of the topic text information. Therefore, based on multiple historical exercises, the pre-trained language model can be fine-tuned so that the distribution of the obtained text vectors is aligned with the distribution of the historical exercises to better represent the exercise distribution. After fine-tuning the pre-trained language model, a second language model can be obtained. Then, the text information corresponding to multiple reference elements can be input into the second language model to obtain the corresponding element feature vectors.
[0106] Step 402: Input the multiple element feature vectors and the knowledge graph into a neural network model, so that the neural network model selects multiple nodes from the knowledge graph to obtain a node sequence, and for each node in the node sequence, according to the text vector corresponding to the node and the mapping function in the neural network model, obtain the node vector corresponding to the node.
[0107] As an example, the node vector is the vector corresponding to the node when the same type of connection edges are connected. Specifically, it can be the final vector representation of the i-th node under the r-th type of connection edge.
[0108] In a specific implementation, the neural network model can be trained based on the sampling and training method of metapath2vec. Specifically, after obtaining multiple element feature vectors, the multiple element feature vectors and the knowledge graph can be input into the neural network model to be trained. The neural network model can select multiple nodes of different types from the knowledge graph to obtain a node sequence. For each node in the node sequence, the node vector corresponding to the node can be determined according to the text vector corresponding to the node and the mapping function in the neural network model.
[0109] Step 403: Determine the corresponding loss function based on multiple node vectors, adjust the model parameters of the neural network model according to the loss function, return to Step 402, and adjust the model parameters of the neural network model again until the training end condition is met, obtaining the first language model.
[0110] When obtaining the node vectors corresponding to multiple nodes, the corresponding loss function can be determined according to the node vectors corresponding to each of the multiple nodes, and the model parameters of the neural network model can be adjusted according to the loss function.
[0111] After adjusting the model parameters, it is possible to return to Step 402, input multiple feature vectors and the knowledge graph into the neural network model, determine the node sequence again, determine the corresponding loss function according to the node vectors corresponding to each node in the node sequence, and adjust the model parameters until the training end condition is met, at which point the current neural network model is determined as the first language model.
[0112] In one example, the optimized objective function can be the negative log-likelihood function as shown below:
[0113]
[0114] Given v i , the probability of v j is as follows:
[0115]
[0116] where v j , v i are nodes in the node sequence, v i,r is the node vector, θ represents all the parameters in the neural network model, C is the context node corresponding to node v i , and is the context embedding corresponding to node v j .
[0117] During the model training process, in order to accelerate the model training, the negative sampling technique can be used, and then the corresponding loss function can be determined as:
[0118]
[0119] where L is the number of negative samples obtained by negative sampling for each positive sample
[0120] When adjusting the model parameters according to the loss function, the model parameters can be adjusted using the stochastic gradient descent, Adam optimization algorithm, etc. When the above loss function converges, it is determined that the training end condition is met, that is, the entire training process of the neural network model is completed, and the first language model is obtained.
[0121] In an optional way of determining knowledge points, the prediction of knowledge points can be based on the particularity of the graph. For example, the interaction features between labels are characterized by means of a graph, and then knowledge points are identified through methods such as link prediction and text classification. However, most graph-related models ignore the attribute information of network nodes in the graph and can only handle transductive problems, unable to handle inductive problems. That is, if an exercise is not in the database, a network containing the nodes corresponding to the exercise cannot be constructed, and the updated exercise vector corresponding to the exercise cannot be obtained, and the prediction of newly added exercises cannot be performed. Due to the difficulty in making full use of the attributes of the exercises themselves, this method has certain limitations.
[0122] In this embodiment, the neural network model is trained by using the feature vectors of elements and the knowledge graph to obtain the first language model, which can provide a model basis for obtaining updated problem vectors containing association relationships and initial problem vectors based on the initial problem vectors of exercises in the subsequent stage. Moreover, compared with the graph algorithm that can only perform transductive tasks, the first language model trained in this embodiment can obtain the attributes of exercises based on the initial problem vectors and use these attributes to perform inductive tasks. Through the mapping relationship between the attributes of the exercises and the embedding vectors (i.e., the updated problem vectors), knowledge points of newly added exercises of which no relevant types have been stored can also be identified. At the same time, since the first language model is trained based on the knowledge graph, as long as there are corresponding node types, such as chapters and knowledge points, when constructing the knowledge graph, the first language model can be migrated to the corresponding application scenarios to effectively identify the knowledge points of exercises in different disciplines and different types, and has high transferability.
[0123] In one embodiment, the step of selecting multiple nodes from the knowledge graph to obtain a node sequence may include the following steps:
[0124] Obtain a preset meta-path; select multiple nodes from the knowledge graph according to the meta-path and transition probability to obtain a node sequence.
[0125] As an example, the meta-path is a predefined sorting rule for node types; in the meta-path, multiple nodes of different types are sorted in a preset order, for example, arranged in the order of "exercise - knowledge point - chapter" to obtain the meta-path.
[0126] In practical applications, the meta-path can be predefined in advance. After inputting multiple feature vectors of elements and the knowledge graph into the neural network model, the neural network model can perform random walks according to the predefined meta-path and transition probability, select multiple nodes from the knowledge graph, and obtain a node sequence.
[0127] In one example, the transition probability p can be determined in the following manner:
[0128]
[0129] Among them, Τ is the meta-path, and ε r is the set of nodes of the same node type, and V is the set of nodes in the knowledge graph; N i,r represents the set composed of the neighbor nodes corresponding to the node v i under the connection edge of the r-th type.
[0130] In this embodiment, multiple nodes can be selected from the knowledge graph according to the meta-path and the transition probability to obtain a node sequence, providing a basis for model training.
[0131] In one embodiment, obtaining the node vector corresponding to the node according to the text vector corresponding to the node and the mapping function in the neural network model includes:
[0132] Obtain the edge type corresponding to the connection edge connecting the node, and determine the corresponding edge feature vector when the node connects to neighbor nodes through the edge of the edge type; obtain the weight corresponding to the edge feature vector; substitute the edge feature vector, the weight corresponding to the edge feature vector, and the element feature vector corresponding to the node into the mapping function in the neural network model to obtain the node vector corresponding to the node.
[0133] In practical applications, the node vectors corresponding to each node can be determined based on the idea of general heterogeneous network embedding. Specifically, for each node in the node sequence, after determining the position of the node in the knowledge graph, the connection edges corresponding to the node can be obtained, and the edge types (the edge type can also be called a relationship) corresponding to each connection edge can be determined. For the connection edges of the same edge type connecting the node, the corresponding edge feature vector can be determined when the node connects to neighbor nodes through the edge of the edge type. Among them, the connection edges of the same edge type can refer to the connection edges corresponding to the same type of association relationship. For example, the connection edges corresponding to "knowledge point 1 - chapter 1" and "knowledge point 1 - chapter 3", and the corresponding association relationships of both are the third association relationship, then they can be determined as the connection edges of the same edge type. Since the semantic information corresponding to the connection edges corresponding to different association relationships (such as the relationships of "exercises - chapter" and "exercises - knowledge point") is different, therefore, in this embodiment, the variable feature vector can be obtained is used for characterization, where i represents the i-th node, r represents the r-th type of edge, and k represents the k-th layer centered on node i.
[0134] After obtaining the edge feature vectors, the weights corresponding to the edge feature vectors can be obtained, and the edge feature vector machine corresponding weights, as well as the element feature vectors corresponding to the nodes, are substituted into the mapping function in the neural network model to obtain the node vectors corresponding to the nodes.
[0135] In one example, the mapping function can be as shown below:
[0136]
[0137] where, v i,r represents the node vector under the i-th node and the r-th edge type, x i is the element feature vector obtained through the second language model, α r is the weight of each edge type, which can be specified manually, a i represents the weight corresponding to the edge of the r-th edge type of the i-th node, U i is a matrix formed by splicing multiple edge feature vectors corresponding to node i, is a trainable transformation matrix, β r is the weight corresponding to the r-th edge type, represents the feature transformation matrix of the z-th node type, h z is the mapping relationship, which is the mapping relationship from the input element feature vector x i to the representation vector obtained by Deep Walk, h z 、 β r 、 are model parameters learned through model training. As can be seen from the above formula, the node vector can include the part corresponding to the mapping relationship shared by different nodes, that is, the first term of the formula, and can also include the vectors corresponding to different types of edges, that is, the second term in the formula.
[0138] In one example, the mapping relationship h z reflects the general relationship in the knowledge graph, and this general relationship can be shared by multiple nodes in the knowledge graph. Taking the knowledge graph in Figure 3 as an example, for the edge "precedence", the edges "knowledge point 2 - knowledge point 1", "knowledge point 2 - knowledge point 4", "knowledge point 4 - knowledge point 3", and "knowledge point 4 - knowledge point 5" all have this edge. Then the above 4 groups of samples can all be used as training samples for the "precedence" association relationship, and based on this, the mapping relationship for "precedence" is generated. Correspondingly, the mapping relationship for "precedence" obtained after training can be shared by the above samples.
[0139] In this embodiment, the edge feature vector, the weight corresponding to the feature vector, and the element feature vector corresponding to the node can be substituted into the mapping function in the neural network model to obtain the node vector corresponding to the node, realizing inductive heterogeneous graph embedding. For the first language model trained based on the above method, as long as the initial exercise vector corresponding to the exercise is obtained, an updated exercise vector including the association relationship and the initial exercise vector can be obtained, providing a basis for predicting the knowledge points of new exercises.
[0140] In one embodiment, when determining the edge feature vector corresponding to the node connected to the neighbor node through the edge of the edge type, it includes:
[0141] Obtain the neighbor nodes connected by the edge of the edge type, and the edge feature vectors corresponding to the neighbor nodes; aggregate the edge feature vectors corresponding to the neighbor nodes, and determine the aggregation result as the edge feature vector corresponding to the node.
[0142] In a specific implementation, for each node in the node sequence, the neighbor nodes connected by the edge of the same edge type can be determined according to the knowledge graph, and the edge feature vectors corresponding to the neighbor nodes can be obtained. During calculation, the edge feature vectors of the neighbor nodes can be initialized, and then calculations can be performed based on the initialized edge feature vectors.
[0143] After obtaining the edge feature vectors corresponding to the neighbor nodes, the edge feature vectors can be aggregated, and the aggregation result can be determined as the edge feature vector corresponding to the node. Among them, aggregation can be performed through aggregation functions such as the average value and the maximum value.
[0144] As an example, the edge feature vector of the node can be determined by the following formula:
[0145]
[0146] where aggregator represents the aggregation function, and N i,r represents the neighbor nodes corresponding to the node.
[0147] When node i has m corresponding edge types, m corresponding edge feature vectors can be obtained. Concatenating the multiple edge feature vectors can obtain the following matrix:
[0148] U i =(u i,1 , u i,2 ,…u i,m )
[0149] In this embodiment, by aggregating the edge feature vectors corresponding to neighbor nodes and determining the aggregation result as the edge feature vector corresponding to the node, the correlation between the node and its surrounding neighbor nodes can be reflected by the edge feature vector, providing a basis for obtaining an inductive heterogeneous graph embedding.
[0150] In one embodiment, since there can be correlations between edges of different edge types, that is, the edges are not independent of each other. For example, Figure 3 in the knowledge graph shown, there is an edge of "related" between "chapter" and "knowledge point", and an edge of "prerequisite" between "knowledge point" and "knowledge point". These two types of edges are not independent of each other. If it is known that chapter A is related to knowledge point B, then based on the other edges corresponding to knowledge point B, there is a certain probability of inferring which other knowledge points chapter A is also related to. Therefore, a set of weights can be obtained through the attention mechanism to represent the interaction relationship between edges of different edge types of the same node. Specifically, the weights corresponding to edges of the same edge type can be obtained through the following formula:
[0151]
[0152] where a i,r represents the weight of the r-th edge of the i-th node, and are parameters learned by the model. Tanh represents the activation function, and softmax is used to make the sum of all weights corresponding to the i-th node equal to 1.
[0153] In one embodiment, the obtaining of the initial question vector corresponding to the text information of the exercise to be recognized includes:
[0154] Obtaining the text information corresponding to the exercise to be recognized; inputting the text information into a second language model to convert the text information into the initial question vector corresponding to the exercise to be recognized through the second language model.
[0155] As an example, the text information may include at least one of the following: stem text, option text, exercise explanation text. Among them, the exercise explanation text may include the answer corresponding to the exercise or the reasoning process corresponding to the answer.
[0156] In practical applications, the text information corresponding to the exercise to be recognized can be obtained and input into the second language model, and the second language model can convert the text information into the initial exercise vector corresponding to the exercise to be recognized.
[0157] Specifically, the text information corresponding to the exercise to be recognized can be obtained. After inputting it into the second language model, an initial exercise vector can be obtained. Furthermore, the initial exercise vector can be input into the first language model, and the corresponding updated exercise vector can be obtained through the first language model, and the knowledge points corresponding to the exercise to be recognized can be determined according to the updated exercise vector.
[0158] In this embodiment, by obtaining the text information corresponding to the exercise to be recognized and converting it into an initial exercise vector through the second language model, the information such as the stem, options or explanations of the exercise to be recognized can be converted into vectors, which is convenient for subsequent model processing and improves the recognition efficiency of knowledge points.
[0159] In one embodiment, the determining the probability distribution of the knowledge points corresponding to the exercise to be recognized according to the updated exercise vector may be inputting the updated exercise vector into a trained Bi-LSTM model. The Bi-LSTM (Bi-directional Long Short-Term Memory) model, as a feature extractor, can perform text classification based on the updated exercise vector and obtain the probability distribution of the knowledge points corresponding to the updated exercise vector through the softmax activation function. Furthermore, the knowledge point corresponding to the maximum probability value can be determined as the knowledge point of the exercise to be recognized. In an example, the probability distribution of knowledge points may be a vector representing the probability distribution state. When determining the knowledge points, the knowledge point corresponding to the dimension with the largest value in the vector can be taken as the recognition result.
[0160] Optionally, other deep learning models can also be combined for text classification, such as a multi-layer perceptron (MLP), a convolutional neural network (CNN), and other types of recurrent neural networks (RNN).
[0161] To enable those skilled in the art to better understand the above steps, the following provides an exemplary illustration of the embodiments of the present application through an example, but it should be understood that the embodiments of the present application are not limited thereto.
[0162] As Figure 5 shown, the terminal can be provided with an exercise library and a knowledge library. Before starting model training, exercise data can be obtained from the exercise library, and chapter data and knowledge point data can be obtained from the knowledge library. Among them, for the exercises obtained that are associated with chapter or knowledge point labels, at the same time, the relationship between the knowledge points and the chapters can also be obtained.
[0163] After obtaining chapter data, knowledge point data, and exercise data (equivalent to the reference elements in this application), the corresponding initial vectors can be obtained through the BERT language model, including the initial chapter vector, the initial knowledge point vector, and the initial exercise vector (corresponding to the element feature vector in this application). For the initial exercise vector, similarity calculation can be performed to obtain the correlation relationship between exercises. Combining the correlation relationships pre-obtained based on the exercise bank and the knowledge base, the correlation relationships such as "exercise-exercise", "exercise-chapter", "exercise-knowledge point", "knowledge point-knowledge point", "chapter-knowledge point", and "chapter-chapter" can be obtained. At the same time, for the edges corresponding to the same node type, such as "exercise-exercise", "knowledge point-knowledge point", or "chapter-chapter", the correlation relationships such as "similar", "identical", or "preceding" can also be obtained. Furthermore, based on multiple correlation relationships and each exercise, knowledge point, and chapter, a heterogeneous graph (corresponding to the knowledge graph in this application) can be generated. For example Figure 3 as shown in the knowledge graph, each node in the knowledge graph corresponds to any one of exercises, knowledge points, or chapters, and each edge corresponds to a correlation relationship.
[0164] After obtaining the heterogeneous graph and the initial vectors of each node in the heterogeneous graph, based on the idea of general heterogeneous network embedding, such as inductive general heterogeneous network embedding (GATNE-I), model training can be carried out to obtain a language model and update the vectors of each node, so that the updated vectors can contain the correlation information between exercises, knowledge points, and chapters. In this way, the updated chapter vector, the updated knowledge point vector, and the updated exercise vector can be obtained. For the updated exercise vector, the Bi-LSTM model can be used as a feature extractor for text classification, and finally the softmax activation function is used to obtain the vector about the probability distribution. Furthermore, based on this vector, the knowledge point prediction result can be obtained.
[0165] It should be understood that although Figure 1 、 Figure 2 、 Figure 4 、 Figure 5 the steps in the flowchart of Figure 1 、 Figure 2 、 Figure 4 、 Figure 5 are shown in sequence according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless there is a clear indication in this article, the execution of these steps has no strict order limit, and these steps can be executed in other orders. Moreover Figure 1 、 Figure 2 、 Figure 4 、 Figure 5 at least a part of the steps in Figure 1 、 Figure 2 、 Figure 4 、 Figure 5 may include multiple steps or multiple stages. These steps or stages are not necessarily executed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential either, but can be executed alternately or in turn with at least a part of the steps or stages in other steps or other steps.
[0166] In one embodiment, as Figure 6 shown, a recognition device for exercise knowledge points is provided, and the device may include:
[0167] An initial question vector acquisition module 601, configured to acquire an initial question vector corresponding to the text information of the exercise to be recognized;
[0168] An association relationship acquisition module 602, configured to determine an association relationship between the exercise to be recognized and multiple reference elements based on the initial question vector, where the multiple reference elements are determined based on the text features and attribute features of multiple historical exercises;
[0169] An updated question vector acquisition module 603, configured to determine an updated question vector corresponding to the exercise to be recognized according to the association relationship and the initial question vector;
[0170] A knowledge point acquisition module 604, configured to determine a knowledge point probability distribution corresponding to the exercise to be recognized according to the updated question vector, and acquire the knowledge point corresponding to the exercise to be recognized according to the knowledge point probability distribution.
[0171] In one embodiment, the association relationship acquisition module 602 includes:
[0172] An initial question vector input sub-module, configured to input the initial question vector into a trained first language model, and determine, by the first language model based on the initial question vector, a node corresponding to the exercise to be recognized in the knowledge graph, and determine an association relationship between the exercise to be recognized and multiple reference elements according to the node;
[0173] Wherein, the knowledge graph includes multiple nodes and association relationships between the nodes, and each node corresponds to a reference element.
[0174] In one embodiment, the device further includes:
[0175] An attribute feature acquisition module, configured to acquire text features and attribute features corresponding to multiple historical exercises respectively, thereby obtaining multiple text features and multiple attribute features;
[0176] A reference element acquisition module, configured to respectively determine the multiple text features and multiple attribute features as corresponding reference elements, and obtain multiple reference elements;
[0177] A knowledge graph acquisition module, configured to acquire an element association relationship between the multiple reference elements, and generate the knowledge graph according to the multiple reference elements and the element association relationship.
[0178] In one embodiment, the attribute features include at least one of knowledge point attributes, chapter attributes, and question difficulty attributes. The knowledge graph acquisition module includes:
[0179] A first relationship acquisition sub-module, configured to acquire a first association relationship between the text features of historical exercises and various attribute features;
[0180] A second relationship acquisition sub-module, configured to acquire a second association relationship between the same type of attribute features;
[0181] A third relationship acquisition sub-module, configured to acquire a third association relationship between different types of attribute features;
[0182] A fourth relationship acquisition sub-module, configured to acquire a fourth association relationship between the text features of multiple historical exercises;
[0183] An element association relationship determination sub-module, configured to obtain an element association relationship based on the first association relationship and at least one of the second association relationship, the third association relationship, and the fourth association relationship.
[0184] In one embodiment, the apparatus further includes:
[0185] An element feature vector acquisition module, configured to acquire element feature vectors corresponding to multiple reference elements;
[0186] A node vector acquisition module, configured to input multiple element feature vectors and the knowledge graph into a neural network model, so as to select multiple nodes from the knowledge graph through the neural network model to obtain a node sequence, and for each node in the node sequence, according to the element feature vector corresponding to the node and the mapping function in the neural network model, obtain the node vector corresponding to the node;
[0187] A model training module, configured to determine a corresponding loss function according to multiple node vectors, adjust the model parameters of the neural network model according to the loss function, and call the node vector acquisition module to adjust the model parameters of the neural network model again until the training end condition is satisfied, and obtain a first language model.
[0188] In one embodiment, the node vector acquisition module includes:
[0189] A meta-path acquisition sub-module, configured to acquire a preset meta-path; the meta-path is a pre-defined node type sorting rule;
[0190] A node sequence acquisition sub-module, configured to select multiple nodes from the knowledge graph according to the meta-path and the transition probability to obtain a node sequence.
[0191] In one embodiment, the node vector acquisition module includes:
[0192] An edge feature vector acquisition sub-module, configured to acquire the edge type corresponding to the connection edge connecting the node, and determine the corresponding edge feature vector when the node connects to a neighbor node through the edge of the edge type;
[0193] A weight acquisition sub-module, configured to acquire the weight corresponding to the edge feature vector;
[0194] A node vector determination sub-module, configured to substitute the edge feature vector, the weight corresponding to the edge feature vector, and the element feature vector corresponding to the node into the mapping function in the neural network model to obtain the node vector corresponding to the node.
[0195] In one embodiment, the edge feature vector acquisition sub-module includes:
[0196] A neighbor node determination unit, configured to acquire the neighbor nodes connected through the edge of the edge type, and the edge feature vectors corresponding to the neighbor nodes;
[0197] An aggregation unit, configured to aggregate the edge feature vectors corresponding to the neighbor nodes and determine the aggregation result as the edge feature vector corresponding to the node.
[0198] In one embodiment, the initial problem vector acquisition module 601 includes:
[0199] A text information acquisition sub-module, configured to acquire the text information corresponding to the exercise to be recognized;
[0200] A conversion sub-module, configured to input the text information into a second language model to convert the text information into the initial problem vector corresponding to the exercise to be recognized through the second language model;
[0201] The text information includes at least one of the following: stem text, option text, exercise explanation text.
[0202] In this embodiment, by acquiring the initial problem vector corresponding to the text information of the exercise to be recognized, based on the initial problem vector, determining the association relationship between the exercise to be recognized and multiple reference elements, according to the association relationship and the initial problem vector, determining the updated problem vector corresponding to the exercise to be recognized, according to the updated problem vector, determining the knowledge point probability distribution corresponding to the exercise to be recognized, and according to the knowledge point probability distribution, acquiring the knowledge points corresponding to the exercise to be recognized, the full utilization of the text information and the association relationship is realized, and the association relationship between the exercise and multiple reference elements can be utilized while using the exercise text information to identify the exercise knowledge points, effectively improving the accuracy of knowledge point identification.
[0203] For the specific limitations of an identification device for exercise knowledge points, reference can be made to the limitations of the method for identifying exercise knowledge points in the above text, which will not be elaborated here. Each module in the above identification device for exercise knowledge points can be implemented in whole or in part by software, hardware, or a combination thereof. The above modules can be embedded in the processor of the computer device in hardware form or independent of it, or stored in the memory of the computer device in software form, so that the processor can call and execute the operations corresponding to each of the above modules.
[0204] In one embodiment, a computer device is provided. The computer device can be a terminal, and its internal structure diagram can be as Figure 7 shown. The computer device includes a processor, a memory, a communication interface, a display screen, and an input device connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be implemented through WIFI, a carrier network, NFC (Near Field Communication), or other technologies. When the computer program is executed by the processor, it implements a method for identifying exercise knowledge points. The display screen of the computer device can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covering the display screen, or a button, a trackball, or a touchpad provided on the shell of the computer device, or an external keyboard, a touchpad, or a mouse, etc.
[0205] Those skilled in the art can understand that Figure 7 the structure shown in
[0206] is only a block diagram of some structures related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine some components, or have a different component layout.
[0207] Obtain an initial question vector corresponding to the text information of the exercise to be identified;
[0208] Based on the initial question vector, determine the association relationship between the exercise to be identified and multiple reference elements, where the multiple reference elements are determined based on the text features and attribute features of multiple historical exercises;
[0209] Determine the updated problem vector corresponding to the problem to be recognized according to the association relationship and the initial problem vector;
[0210] Determine the knowledge point probability distribution corresponding to the problem to be recognized according to the updated problem vector, and obtain the knowledge points corresponding to the problem to be recognized according to the knowledge point probability distribution.
[0211] In one embodiment, when the processor executes the computer program, the steps in the above-mentioned other embodiments are also implemented.
[0212] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the following steps are implemented:
[0213] Obtain the initial problem vector corresponding to the text information of the problem to be recognized;
[0214] Based on the initial problem vector, determine the association relationship between the problem to be recognized and multiple reference elements, where the multiple reference elements are determined based on the text features and attribute features of multiple historical problems;
[0215] Determine the updated problem vector corresponding to the problem to be recognized according to the association relationship and the initial problem vector;
[0216] Determine the knowledge point probability distribution corresponding to the problem to be recognized according to the updated problem vector, and obtain the knowledge points corresponding to the problem to be recognized according to the knowledge point probability distribution.
[0217] In one embodiment, when the computer program is executed by a processor, the steps in the above-mentioned other embodiments are also implemented.
[0218] Those of ordinary skill in the art can understand that all or part of the processes in the methods of the above embodiments can be completed by instructing relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above various methods. Among them, any reference to a memory, storage, database, or other medium used in the various embodiments provided in the present application can include at least one of non-volatile and volatile memories. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, or optical memory, etc. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM), etc.
[0219] The technical features of the above embodiments can be combined arbitrarily. For the sake of brevity of description, not all possible combinations of the various technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, it should be considered as the scope recorded in this specification.
[0220] The above-described embodiments merely represent several implementation manners of the present application. Their descriptions are relatively specific and detailed, but they should not be construed as limiting the scope of the invention patent. It should be noted that for those of ordinary skill in the art, without departing from the concept of the present application, several modifications and improvements can still be made, and these all belong to the protection scope of the present application. Therefore, the protection scope of the patent of the present application should be subject to the appended claims.
Claims
1. A method for identifying knowledge points of exercises, characterized in that, The method includes: Obtaining an initial question vector corresponding to the text information of the exercise to be recognized; Based on the initial question vector, determining, by a trained first language model, the node corresponding to the exercise to be recognized in the knowledge graph, and determining the association relationship between the exercise to be recognized and multiple reference elements according to the node; the knowledge graph includes multiple nodes and the association relationships between the nodes, each node corresponds to a reference element, and the multiple reference elements are the text features and attribute features of multiple historical exercises respectively; the first language model is obtained after adjusting the parameters of the neural network model according to the loss function determined by multiple node vectors, and the multiple node vectors are determined by the neural network model selecting multiple nodes from the knowledge graph after inputting the respective element feature vectors corresponding to the multiple reference elements and the knowledge graph into the neural network model, and according to the element feature vector corresponding to each node and the mapping function in the neural network model; Determining an updated question vector corresponding to the exercise to be recognized according to the association relationship and the initial question vector; Determining the knowledge point probability distribution corresponding to the exercise to be recognized according to the updated question vector, and obtaining the knowledge points corresponding to the exercise to be recognized according to the knowledge point probability distribution.
2. The method according to claim 1, characterized in that, The knowledge graph is generated through the following steps: Obtaining the element association relationships between the multiple reference elements, and generating the knowledge graph according to the multiple reference elements and the element association relationships.
3. The method according to claim 2, characterized in that, The attribute features include at least one of knowledge point attribute, chapter attribute, and question difficulty attribute; the obtaining of the element association relationships between the multiple reference elements includes: Obtaining the first association relationship between the text features of historical exercises and various attribute features; Obtaining the second association relationship between the same attribute features; Obtaining the third association relationship between different attribute features; Obtaining the fourth association relationship between the text features of multiple historical exercises; Obtaining the element association relationships based on the first association relationship and at least one of the second association relationship, the third association relationship, and the fourth association relationship.
4. The method according to claim 1, characterized in that, The first language model is trained through the following steps: Obtaining the respective element feature vectors corresponding to multiple reference elements; Inputting the multiple element feature vectors and the knowledge graph into a neural network model, so as to select multiple nodes from the knowledge graph through the neural network model to obtain a node sequence, and for each node in the node sequence, obtaining the node vector corresponding to the node according to the element feature vector corresponding to the node and the mapping function in the neural network model; Determining the corresponding loss function according to the multiple node vectors, and adjusting the model parameters of the neural network model according to the loss function; Returning to the step of inputting the multiple element feature vectors and the knowledge graph into the neural network model, and adjusting the model parameters of the neural network model again until the training end condition is met, to obtain the first language model.
5. The method according to claim 4, characterized in that, The selecting multiple nodes from the knowledge graph to obtain a node sequence includes: Obtain a preset meta-path; the meta-path is a pre-defined sorting rule for node types; Select multiple nodes from the knowledge graph according to the meta-path and the transition probability to obtain a node sequence.
6. The method according to claim 4, characterized in that, The obtaining the node vector corresponding to the node according to the element feature vector corresponding to the node and the mapping function in the neural network model includes: Obtain the edge type corresponding to the connection edge connecting the node, and determine the edge feature vector corresponding to the node when the node connects to neighbor nodes through the edge of the edge type; Obtain the weight corresponding to the edge feature vector; Substitute the edge feature vector, the weight corresponding to the edge feature vector, and the element feature vector corresponding to the node into the mapping function in the neural network model to obtain the node vector corresponding to the node.
7. The method according to claim 6, characterized in that, The determining the edge feature vector corresponding to the node when the node connects to neighbor nodes through the edge of the edge type includes: Obtain the neighbor nodes connected through the edge of the edge type, and the edge feature vectors corresponding to the neighbor nodes; Aggregate the edge feature vectors corresponding to the neighbor nodes, and determine the aggregation result as the edge feature vector corresponding to the node.
8. The method according to any one of claims 1-7, characterized in that, The obtaining the initial question vector corresponding to the text information of the exercise to be recognized includes: Obtain the text information corresponding to the exercise to be recognized; Input the text information into the second language model to convert the text information into the initial question vector corresponding to the exercise to be recognized through the second language model; The text information includes at least one of the following: stem text, option text, exercise explanation text.
9. An identification device for exercise knowledge points, characterized in that, The device includes: An initial question vector acquisition module, configured to obtain an initial question vector corresponding to the text information of the exercise to be recognized; An association relationship acquisition module, configured to determine, based on the initial question vector through a trained first language model, the node corresponding to the exercise to be recognized in the knowledge graph, and determine the association relationship between the exercise to be recognized and multiple reference elements according to the node; the knowledge graph includes multiple nodes and the association relationships between the nodes, each node corresponds to a reference element, and the multiple reference elements are the text features and attribute features of multiple historical exercises; the first language model is obtained after adjusting the parameters of the neural network model according to the loss function determined by multiple node vectors, and the multiple node vectors are obtained by inputting the element feature vectors corresponding to the multiple reference elements and the knowledge graph into the neural network model, and then the neural network model selects multiple nodes from the knowledge graph and determines them according to the element feature vector corresponding to each node and the mapping function in the neural network model; An updated question vector acquisition module, configured to determine the updated question vector corresponding to the exercise to be recognized according to the association relationship and the initial question vector; A knowledge point acquisition module, configured to determine the knowledge point probability distribution corresponding to the exercise to be recognized according to the updated question vector, and obtain the knowledge point corresponding to the exercise to be recognized according to the knowledge point probability distribution.
10. A computer device, comprising a memory and a processor, the memory storing a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 8.
11. A 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 steps of the method according to any one of claims 1 to 8.
Citation Information
Patent Citations
Question knowledge point association method, question knowledge point association system and storage medium
CN112182237A
Method and System for Knowledge Diagnosis and Tutoring
US20100041007A1