A method for predicting the relationship between mathematical knowledge points based on span and exercise analysis

By adopting a method based on span and exercise analysis in the field of middle school mathematics, combining the cross attention mechanism and graph attention network, a relationship prediction model is constructed, and the problem of difficult to predict complex and implicit relationships between mathematical knowledge points in the existing technology is solved, and the accuracy and adaptability of predictions are improved.

CN119202259BActive Publication Date: 2025-05-06ZHONGKE YIZHEN (BEIJING) TECHNOLOGY CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411711142.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-11-27
Publication Date
2025-05-06
Estimated Expiration
2044-11-27

AI Technical Summary

Technical Problem

The existing technology is difficult to accurately predict the complex and implicit relationships between mathematical knowledge points in middle schools, and lacks the ability to adapt to changes, which affects the quality of personalized education.

Method used

The mathematical knowledge point relationship prediction method based on span and exercise analysis is adopted. By constructing data sets, formal relationship prediction tasks, and building relationship prediction models, including exercise analysis modules, embedded modules, graph attention networks, fusion modules and relationship prediction modules, combined with cross attention mechanisms and graph attention networks, the dependence and hierarchy between knowledge points are captured.

Benefits of technology

The accuracy of knowledge point relationship prediction and the generalization ability of the model are improved, and the closeness between knowledge points can be better understood, adapt to changes in knowledge structure, and reduce interference from noise information.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119202259B_ABST
    Figure CN119202259B_ABST
Patent Text Reader

Abstract

The present invention discloses a mathematical knowledge point relationship prediction method based on span and problem analysis, which introduces span information and constructs an external problem analysis knowledge base as a prompt, and uses a cross-attention mechanism to fuse the input text knowledge point pairs with the span information to obtain a knowledge point span fusion feature representation, so as to improve the model's ability to capture knowledge point relationships under different span lengths. At the same time, the model converts the problem analysis text into a problem analysis tree in a semi-automatic manner. This process is based on the analysis of the problem analysis content to construct a hierarchical knowledge expression structure. By extracting knowledge points with a logical order in the analysis content and mapping them into a graph structure. After generating the problem analysis tree, the model uses a graph attention network to perform representation learning on it, and splices the obtained problem analysis tree representation with the knowledge point-span fusion feature representation to generate a final fusion feature vector for relationship prediction.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of data processing, and in particular relates to a method for predicting the relationship between mathematical knowledge points based on span and exercise analysis. Background Art

[0002] In the middle school mathematics knowledge system, there are many logical relationships between knowledge points, including partial order, parallel and independent relationships, etc. These multiple relationship systems are called knowledge point dependency relationships. With the increase in personalized learning needs, each student needs a targeted learning path. In personalized education, since each student's learning ability, background and interests are different, their learning paths have highly personalized characteristics. The quality of the personalized recommendation system depends to a large extent on the accuracy of the knowledge point relationship prediction. The relationship between mathematical knowledge points is extremely complex, and there are often multi-level dependency structures. The association between some knowledge points is not obvious, which makes it difficult for the model to mine this implicit information. In addition, with the continuous updating of educational content and syllabus, the definition of knowledge points and the relationship between them are also changing, so the knowledge point relationship prediction model also needs to have the ability to adapt to changes. Therefore, the prediction of the relationship between knowledge points in the field of mathematics needs to deal with many difficult problems such as complex knowledge structure and implicit knowledge point relationship.

[0003] Early data-driven methods such as association rule mining and sequential pattern mining can discover explicit dependencies between knowledge points, but cannot capture complex and implicit knowledge structures. With the introduction of graph model methods, such as knowledge graphs and Bayesian networks, they have simplified the complexity of the problem to a certain extent through graph structures and probabilistic inference. However, the construction process of knowledge graphs is highly dependent on manual intervention and a large amount of domain knowledge, and shows great limitations when facing the dynamic changes of knowledge structures. Subsequent machine learning methods, including supervised learning and unsupervised learning, train models through large amounts of data, but rely on labeled data and may ignore personalized learning paths. In the era of data-driven + deep learning, although the model has improved in predicting complex relationships, its demand for computing resources is still high, and the model's interpretability is poor. In addition, these models usually lack effective knowledge structure information, making it difficult to mine implicit relationships. More importantly, existing studies have not yet considered that knowledge points between different chapters in mathematics have their own relevance and span, which further limits the effectiveness and application of the model. In recent years, the rise of various large language models such as ChatGPT, Wenxin Yiyan and Tongyi Qianwen has brought new opportunities for educational data analysis. However, they are faced with the problems of scarce domain data, insufficient structured data processing, limited generalization ability and model hallucination generation. "9.11 is bigger than 9.8" is a typical example of large language model hallucination. This example shows that when large models compare the size of two numbers, they generally use text models, which are easy to understand these numbers from the perspective of text, ignoring the actual meaning in the context, reflecting its limitation of relying on language patterns rather than real-world reasoning.

[0004] In the field of middle school mathematics, due to the huge number of knowledge points, manual annotation and verification of the relationships between these knowledge points requires a lot of effort. Therefore, it is necessary to develop a classification model with strong generalization ability. Such a model can be generalized to uninvolved knowledge points through training on some knowledge points, thereby realizing automatic prediction and verification of knowledge point relationships. However, this requires not only that the model can accurately capture the explicit and implicit relationships between knowledge points, but also that it has efficient generalization capabilities to adapt to the ever-changing and expanding knowledge structure. Summary of the invention

[0005] In view of the deficiencies in the prior art, the present invention provides a method for predicting the relationship between mathematical knowledge points based on span and exercise analysis, comprising the following steps:

[0006] Step S1: construct a data set, the data set includes several knowledge chains, the knowledge chain includes text knowledge point pairs, span information text and annotated real relationships;

[0007] Step S2: Formalize the relationship prediction task and build a relationship prediction model. The relationship prediction model includes an exercise parsing module, an embedding module, a graph attention network, a fusion module, and a relationship prediction module. Import the text knowledge point pairs in step S1 into the exercise parsing module to obtain the knowledge point nodes and the adjacency matrix.

[0008] Step S3: import the text knowledge point pairs and span information text in step S1, and the knowledge point nodes in step S2 into the embedding module, and obtain the knowledge point pair feature representation, span feature representation and knowledge point node feature matrix respectively;

[0009] Step S4: import the adjacency matrix in step S2 and the knowledge point node feature matrix in step S3 into the graph attention network to obtain the exercise parsing tree representation;

[0010] Step S5: import the knowledge point pair feature representation and span feature representation in step S3 into the fusion module to obtain the knowledge point span fusion representation; import the exercise parsing tree representation in step S4 into the fusion module to further fuse with the knowledge point span fusion representation to obtain the fusion feature representation;

[0011] Step S6: importing the fused feature representation in step S5 into the relationship prediction module, obtaining the classification probability, and obtaining the prediction result according to the classification probability;

[0012] Step S7: Construct a cross entropy loss function and minimize the loss function through the true relationship marked in step S1 to optimize the parameters of the model.

[0013] Furthermore, the formalized relationship prediction task in step S2 is specifically:

[0014] Given the fused feature representation corresponding to any knowledge chain as input, a binary classification function is constructed to predict the dependency relationship between text knowledge point pairs and output the predicted dependency label, that is, the prediction result, which is formally expressed as follows:

[0015] ;

[0016] in, represents the fusion feature representation, represents a binary classification function, Indicates the prediction result.

[0017] Furthermore, in step S2, the text knowledge point pairs in step S1 are imported into the question parsing module to obtain the knowledge point nodes and the adjacency matrix, specifically:

[0018] Step S21: input text knowledge point pairs, and search for corresponding exercise analysis texts in an external exercise analysis knowledge base;

[0019] Step S22: automatically extracting knowledge points from the exercise analysis text through the ChatGLM dialogue language model based on the GLM architecture, combining the knowledge points into triples based on the problem-solving logic; and using the graph database to process the triples to construct an exercise analysis tree;

[0020] The exercise parse tree is formalized as:

[0021] ;

[0022] in, Represents the exercise parse tree, V is a set of knowledge points, including N knowledge points, , which is the knowledge point node; E is the set of edges, which represents the connection relationship between knowledge points;

[0023] Each edge (p, q)∈E indicates that there is a connection between the knowledge point node Vq and the knowledge point node Vp, thus generating the exercise parse tree The adjacency matrix of .

[0024] Furthermore, step S3 is specifically as follows:

[0025] Step S31: The embedding module obtains the knowledge point pair feature representation and span feature representation through the pre-trained language model, which is expressed as:

[0026] ;

[0027] ;

[0028] in, Text knowledge point pair The i-th word is represented by the vector obtained by the ALBERT pre-trained language model. Text knowledge point pair The nth word is represented by the vector obtained by the ALBERT pre-trained language model. For span information text The mth word is represented by the vector obtained by the ALBERT pre-trained language model; For span information text The i-th word is represented by the vector obtained by the ALBERT pre-trained language model; n and m represent the text knowledge point pair , span information text The total number of Chinese characters; is the feature representation of knowledge point pair, is the span feature representation, represents the pre-trained language model;

[0029] Step S32: Parsing tree for the exercise in step S22 The qth knowledge point in , use the ALBERT pre-trained model to extract the corresponding knowledge point representation ; Represent all knowledge points Combine to get the knowledge point feature matrix , expressed as:

[0030] .

[0031] Furthermore, step S4 is specifically as follows:

[0032] Step S41: The knowledge point feature matrix of the exercise parsing tree Gtree Input into the graph attention network to obtain the updated knowledge point feature matrix;

[0033] Specifically: for the knowledge point feature matrix Perform a linear transformation and transform the exercise parse tree through the weight matrix W The knowledge point representation of the qth knowledge point in Transform to a new feature space; that is, feature mapping operation, expressed as:

[0034] ;

[0035] in, represents the updated knowledge point representation;

[0036] Obtain the updated knowledge point feature matrix by repeating the feature mapping operation , expressed as:

[0037] ;

[0038] Step S42: Calculate the attention score between each knowledge point node and its neighboring knowledge point nodes by importing the adjacency matrix M of step S22 tree To determine whether the two are connected; specifically: if the knowledge point node Vq is connected to the neighboring knowledge point node Vp, then M tree =1, if not connected, then M tree =0;

[0039] Step S42 is specifically as follows:

[0040] The updated knowledge point corresponding to the knowledge point node Vq is represented as The updated knowledge point corresponding to the neighbor knowledge point Vp is represented as After the concatenation operation, it is input into the attention mechanism to calculate the attention score between the two, which is expressed as:

[0041] ;

[0042] in, represents the activation function of nonlinear activation, a represents the learnable weight parameter, T represents the matrix transpose, || represents the concatenation operation, Represents the attention score between the knowledge point node Vq and its neighbor knowledge point node Vp;

[0043] Compare the attention weights between different knowledge point nodes and use the Softmax function to normalize the attention scores, that is, according to the adjacency matrix M tree To determine the neighbor nodes, it is expressed as:

[0044]

[0045] in, represents the attention coefficient between the knowledge point node Vq and its neighbor knowledge point node Vp; N(q) represents all direct neighbor knowledge point nodes of the knowledge point node Vq; k represents the index of all neighbor knowledge point nodes traversed in N(q); Represents the knowledge point node Vq and all neighboring knowledge point nodes The attention score between represents the exponential function;

[0046] Step S43: For the knowledge point node Vq itself and all neighboring knowledge points The features of are weighted summed to obtain the exercise parse tree The qth knowledge point in Final knowledge point representation , expressed as:

[0047] ;

[0048] in, represents a nonlinear activation function, Represents the knowledge point node Vq and all neighboring knowledge point nodes The attention coefficient between

[0049] Parsing tree for the problem The final knowledge point representation corresponding to each knowledge point in is concatenated to obtain the updated knowledge point representation , expressed as:

[0050] ;

[0051] Step S44: Represent the updated knowledge points Perform weighted aggregation, and then perform average pooling on the weighted aggregation results to obtain the final exercise parse tree feature representation h tree , expressed as:

[0052] ;

[0053] in, It is a knowledge point node The weight of i represents the index of the knowledge point after the final update. Represents an average pooling operation.

[0054] Furthermore, step S5 is specifically as follows:

[0055] Step S51: Use the cross attention mechanism to represent the features of the knowledge points in step S31 and span feature representation The fusion is performed, and the fusion result is used as the span information representation with the semantic feature connection of the knowledge point pair, that is, the knowledge point span fusion representation; specifically:

[0056] First, calculate the feature representation of the knowledge point pair and span feature representation The attention scores between them are then converted into corresponding attention weights through the activation function. The obtained attention weights are weighted summed, and the summation results are further averaged and pooled to obtain the knowledge point span fusion representation:

[0057] ;

[0058] in, Indicates the span fusion representation of knowledge points; , , are three learnable weight matrices; represents the scaling factor, represents the activation function, represents the average pooling operation;

[0059] Step S52: By concatenating the problem parsing tree feature representation h of step S44 tree The knowledge point span fusion representation in step S51 is obtained to obtain the fusion feature representation, which is expressed as:

[0060] ;

[0061] in, Represents a splicing operation, Represents fusion features.

[0062] Furthermore, step S6 is specifically as follows:

[0063] Step S61: Input the fused feature representation u to the prediction layer to generate the final classification probability, which is expressed as:

[0064] ;

[0065] in, and are learnable matrices and bias vectors, is the activation function, Represents the classification probability;

[0066] Step S62: Classification probability Converted into specific prediction categories; specifically:

[0067] Introducing classification threshold , when the classification probability Exceeding classification threshold When using the prediction results Indicates the dependency relationship between the current knowledge point pairs, expressed as:

[0068] .

[0069] Furthermore, step S7 is specifically as follows:

[0070] Constructing the cross entropy loss function , minimize the cross entropy loss function To optimize the model; expressed as:

[0071] ;

[0072] in, Indicates the true relationship of the annotation.

[0073] The positive and progressive effects of the present invention are:

[0074] (1) The present invention uses a cross-attention mechanism to fuse the knowledge point span information with the features of the text knowledge point pair, thereby distinguishing the correlation between adjacent node knowledge points and non-adjacent node knowledge points, which helps the model better understand the closeness between knowledge points and further improves the accuracy of relationship prediction and the generalization ability of the model.

[0075] (2) The present invention converts the exercise analysis text into a graph structure containing knowledge points and their relationships, and uses a graph attention network for representation learning and feature extraction. This can better capture the knowledge structure in the exercise analysis, effectively simplify the complex relationships between knowledge points, highlight their dependencies and hierarchical structures, and reduce the interference of noise information on the model. BRIEF DESCRIPTION OF THE DRAWINGS

[0076] Figure 1 The present invention is a flowchart of the steps of a method for predicting the relationship between mathematical knowledge points based on span and exercise analysis. DETAILED DESCRIPTION

[0077] The following describes the embodiments of the present invention through specific examples, and those skilled in the art can easily understand other advantages and effects of the present invention from the contents disclosed in this specification. The present invention can also be implemented or applied through other different specific embodiments, and the details in this specification can also be modified or changed in various ways based on different viewpoints and applications without departing from the spirit of the present invention.

[0078] Reference Figure 1 , a mathematical knowledge point relationship prediction method based on span and exercise analysis, in one example, includes the following steps:

[0079] Step S1: construct a data set, the data set includes several knowledge chains, the knowledge chain includes text knowledge point pairs, span information text and annotated real relationships;

[0080] Step S2: Formalize the relationship prediction task and build a relationship prediction model. The relationship prediction model includes an exercise parsing module, an embedding module, a graph attention network, a fusion module, and a relationship prediction module. Import the text knowledge point pairs in step S1 into the exercise parsing module to obtain the knowledge point nodes and the adjacency matrix.

[0081] Step S3: import the text knowledge point pairs and span information text in step S1, and the knowledge point nodes in step S2 into the embedding module, and obtain the knowledge point pair feature representation, span feature representation and knowledge point node feature matrix respectively;

[0082] Step S4: import the adjacency matrix in step S2 and the knowledge point node feature matrix in step S3 into the graph attention network to obtain the exercise parsing tree representation;

[0083] Step S5: import the knowledge point pair feature representation and span feature representation in step S3 into the fusion module to obtain the knowledge point span fusion representation; import the exercise parsing tree representation in step S4 into the fusion module to further fuse with the knowledge point span fusion representation to obtain the fusion feature representation;

[0084] Step S6: importing the fused feature representation in step S5 into the relationship prediction module, obtaining the classification probability, and obtaining the prediction result according to the classification probability;

[0085] Step S7: Construct a cross entropy loss function and minimize the loss function through the true relationship marked in step S1 to optimize the parameters of the model.

[0086] Furthermore, in one example, the formalized relationship prediction task in step S2 is specifically:

[0087] Given the fused feature representation corresponding to any knowledge chain as input, a binary classification function is constructed to predict the dependency relationship between text knowledge point pairs and output the predicted dependency label, that is, the prediction result, which is formally expressed as follows:

[0088] ;

[0089] in, represents the fusion feature representation, represents a binary classification function, Indicates the prediction result.

[0090] Further, in one example, the text knowledge point pairs in step S1 are imported into the question parsing module in step S2 to obtain the knowledge point nodes and the adjacency matrix, specifically:

[0091] Step S21: input text knowledge point pairs, and search for corresponding exercise analysis texts in an external exercise analysis knowledge base;

[0092] Step S22: automatically extracting knowledge points from the exercise analysis text through the ChatGLM dialogue language model based on the GLM architecture, combining the knowledge points into triples based on the problem-solving logic; and constructing an exercise analysis tree by processing the triples using a graph database;

[0093] The exercise parse tree is formalized as:

[0094] ;

[0095] in, Represents the exercise parse tree, V is a set of knowledge points, including N knowledge points, , which is the knowledge point node; E is the set of edges, which represents the connection relationship between knowledge points;

[0096] Each edge (p, q)∈E indicates that there is a connection between the knowledge point node Vq and the knowledge point node Vp, thus generating the exercise parse tree The adjacency matrix of .

[0097] Furthermore, in one example, step S3 is specifically:

[0098] Step S31: The embedding module obtains the knowledge point pair feature representation and span feature representation through the pre-trained language model, which is expressed as:

[0099] ;

[0100] ;

[0101] in, Text knowledge point pair The i-th word is represented by the vector obtained by the ALBERT pre-trained language model. Text knowledge point pair The nth word is represented by the vector obtained by the ALBERT pre-trained language model. For span information text The mth word is represented by the vector obtained by the ALBERT pre-trained language model; For span information text The i-th word is represented by the vector obtained by the ALBERT pre-trained language model; n and m represent the text knowledge point pair , span information text The total number of Chinese characters; is the feature representation of knowledge point pair, is the span feature representation, represents the pre-trained language model;

[0102] Step S32: Parsing tree for the exercise in step S22 The qth knowledge point in , use the ALBERT pre-trained model to extract the corresponding knowledge point representation ; Represent all knowledge points Combine to get the knowledge point feature matrix , expressed as:

[0103] .

[0104] Furthermore, in one example, step S4 is specifically as follows:

[0105] Step S41: The knowledge point feature matrix of the exercise parsing tree Gtree Input into the graph attention network to obtain the updated knowledge point feature matrix;

[0106] Specifically: for the knowledge point feature matrix Perform a linear transformation and transform the exercise parse tree through the weight matrix W The knowledge point representation of the qth knowledge point in Transform to a new feature space; that is, feature mapping operation, expressed as:

[0107] ;

[0108] in, represents the updated knowledge point representation;

[0109] Obtain the updated knowledge point feature matrix by repeating the feature mapping operation , expressed as:

[0110] ;

[0111] Step S42: Calculate the attention score between each knowledge point node and its neighboring knowledge point nodes by importing the adjacency matrix M of step S22 tree To determine whether the two are connected; specifically: if the knowledge point node Vq is connected to the neighboring knowledge point node Vp, then M tree =1, if not connected, then M tree =0;

[0112] Step S42 is specifically as follows:

[0113] The updated knowledge point corresponding to the knowledge point node Vq is represented as The updated knowledge point corresponding to the neighbor knowledge point Vp is represented as After the concatenation operation, it is input into the attention mechanism to calculate the attention score between the two, which is expressed as:

[0114] ;

[0115] in, represents the activation function of nonlinear activation, a represents the learnable weight parameter, T represents the matrix transpose, || represents the concatenation operation, Represents the attention score between the knowledge point node Vq and its neighbor knowledge point node Vp;

[0116] Compare the attention weights between different knowledge point nodes and use the Softmax function to normalize the attention scores, that is, according to the adjacency matrix M tree To determine the neighbor nodes, it is expressed as:

[0117]

[0118] in, represents the attention coefficient between the knowledge point node Vq and its neighbor knowledge point node Vp; N(q) represents all direct neighbor knowledge point nodes of the knowledge point node Vq; k represents the index of all neighbor knowledge point nodes traversed in N(q); Represents the knowledge point node Vq and all neighboring knowledge point nodes The attention score between represents the exponential function;

[0119] Step S43: For the knowledge point node Vq itself and all neighboring knowledge points The features of are weighted summed to obtain the exercise parse tree The qth knowledge point in Final knowledge point representation , expressed as:

[0120] ;

[0121] in, represents a nonlinear activation function, Represents the knowledge point node Vq and all neighboring knowledge point nodes The attention coefficient between

[0122] Parsing tree for the problem The final knowledge point representation corresponding to each knowledge point in is concatenated to obtain the updated knowledge point representation , expressed as:

[0123] ;

[0124] Step S44: Represent the updated knowledge points Perform weighted aggregation, and then perform average pooling on the weighted aggregation results to obtain the final exercise parse tree feature representation h tree , expressed as:

[0125] ;

[0126] in, It is a knowledge point node The weight of i represents the index of the knowledge point after the final update. Represents an average pooling operation.

[0127] Furthermore, in one example, step S5 is specifically as follows:

[0128] Step S51: Use the cross attention mechanism to represent the features of the knowledge points in step S31 and span feature representation The fusion is performed, and the fusion result is used as the span information representation with the semantic feature connection of the knowledge point pair, that is, the knowledge point span fusion representation; specifically:

[0129] First, calculate the feature representation of the knowledge point pair and span feature representation The attention scores between them are then converted into corresponding attention weights through the activation function. The obtained attention weights are weighted summed, and the summation results are further averaged and pooled to obtain the knowledge point span fusion representation:

[0130] ;

[0131] in, Indicates the span fusion representation of knowledge points; , , are three learnable weight matrices; represents the scaling factor, represents the activation function, represents the average pooling operation;

[0132] Step S52: By concatenating the problem parsing tree feature representation h of step S44 tree The knowledge point span fusion representation in step S51 is obtained to obtain the fusion feature representation, which is expressed as:

[0133] ;

[0134] in, Represents a splicing operation, Represents fusion features.

[0135] Furthermore, step S6 is specifically as follows:

[0136] Step S61: Input the fused feature representation u to the prediction layer to generate the final classification probability, which is expressed as:

[0137] ;

[0138] in, and are learnable matrices and bias vectors, is the activation function, Represents the classification probability;

[0139] Step S62: Classification probability Converted into specific prediction categories; specifically:

[0140] Introducing classification threshold , when the classification probability Exceeding classification threshold When using the prediction results Indicates the dependency relationship between the current knowledge point pairs, expressed as:

[0141] .

[0142] Furthermore, in one example, step S7 is specifically as follows:

[0143] Constructing the cross entropy loss function , minimize the cross entropy loss function To optimize the model; expressed as:

[0144] ;

[0145] in, Indicates the true relationship of the annotation.

[0146] The present invention is described in detail above in conjunction with the embodiments of the accompanying drawings. A person skilled in the art can make various variations of the present invention according to the above description. Therefore, some details in the embodiments should not be construed as limiting the present invention, and the present invention shall be protected by the scope defined by the attached claims.

Claims

1. A method for predicting the relationship between mathematical knowledge points based on span and problem analysis, characterized in that: The following steps are involved: Step S1: construct a data set, the data set includes several knowledge chains, the knowledge chain includes text knowledge point pairs, span information text and annotated real relationships; Step S2: Formalize the relationship prediction task and construct a relationship prediction model. The relationship prediction model includes an exercise parsing module, an embedding module, a graph attention network, a fusion module, and a relationship prediction module. The text knowledge point pairs in step S1 are imported into the exercise parsing module to obtain the knowledge point nodes and the adjacency matrix. In this process, the knowledge points are combined into triples. The graph database is used to process the triples to construct the exercise parsing tree. The exercise parse tree is formalized as: ; in, Represents the exercise parse tree, V is a set of knowledge points, including N knowledge points, , which is the knowledge point node; E is the set of edges, which represents the connection relationship between knowledge points; Step S3: import the text knowledge point pairs and span information text in step S1, and the knowledge point nodes in step S2 into the embedding module, and obtain the knowledge point pair feature representation, span feature representation and knowledge point node feature matrix respectively; the process of obtaining the knowledge point feature matrix is ​​specifically as follows: For the problem parse tree The qth knowledge point in , use the ALBERT pre-trained model to extract the corresponding knowledge point representation ; Represent all knowledge points Combine to get the knowledge point node feature matrix , expressed as: ; Step S4: import the adjacency matrix in step S2 and the knowledge point node feature matrix in step S3 into the graph attention network to obtain the exercise parsing tree representation; Step S5: import the knowledge point pair feature representation and span feature representation in step S3 into the fusion module to obtain the knowledge point span fusion representation; import the exercise parsing tree representation in step S4 into the fusion module to further fuse with the knowledge point span fusion representation to obtain the fusion feature representation; Step S6: importing the fused feature representation in step S5 into the relationship prediction module, obtaining the classification probability, and obtaining the prediction result according to the classification probability; Step S7: Construct a cross entropy loss function and minimize the loss function through the true relationship marked in step S1 to optimize the parameters of the model.

2. A method for predicting the relationship between mathematical knowledge points based on span and exercise analysis as claimed in claim 1, characterized in that: The formalized relationship prediction task in step S2 is specifically: Given the fused feature representation corresponding to any knowledge chain as input, a binary classification function is constructed to predict the dependency relationship between text knowledge point pairs and output the predicted dependency label, that is, the prediction result, which is formally expressed as follows: ; in, represents the fusion feature representation, represents a binary classification function, Represents the prediction result.

3. A method for predicting the relationship between mathematical knowledge points based on span and exercise analysis as claimed in claim 1, characterized in that: Step S2 imports the text knowledge point pairs in step S1 into the question parsing module to obtain the knowledge point nodes and adjacency matrix, specifically: Step S21: input text knowledge point pairs, and search for corresponding exercise analysis texts in an external exercise analysis knowledge base; Step S22: automatically extracting knowledge points from the exercise analysis text through the ChatGLM dialogue language model based on the GLM architecture, combining the knowledge points into triples based on the problem-solving logic; and using the graph database to process the triples to construct an exercise analysis tree; The exercise parse tree is formalized as: ; in, Represents the exercise parse tree, V is a set of knowledge points, including N knowledge points, , which is the knowledge point node; E is the set of edges, which represents the connection relationship between knowledge points; Each edge (p, q)∈E indicates that there is a connection between the knowledge point node Vq and the knowledge point node Vp, thus generating the exercise parse tree The adjacency matrix of .

4. A method for predicting the relationship between mathematical knowledge points based on span and exercise analysis as claimed in claim 3, characterized in that: Step S3 is specifically as follows: Step S31: The embedding module obtains the knowledge point pair feature representation and span feature representation through the pre-trained language model, which is expressed as: ; ; in, Text knowledge point pair The i-th word is represented by the vector obtained by the ALBERT pre-trained language model. Text knowledge point pair The nth word is represented by the vector obtained by the ALBERT pre-trained language model. For span information text The mth word is represented by the vector obtained by the ALBERT pre-trained language model; For span information text The i-th word is represented by the vector obtained by the ALBERT pre-trained language model; n and m represent the text knowledge point pair , span information text The total number of Chinese characters; is the feature representation of knowledge point pair, is the span feature representation, represents the pre-trained language model; Step S32: Parsing tree for the exercise in step S22 The qth knowledge point in , use the ALBERT pre-trained model to extract the corresponding knowledge point representation ; Represent all knowledge points Combine to get the knowledge point node feature matrix , expressed as: 。 5. A method for predicting the relationship between mathematical knowledge points based on span and problem analysis as claimed in claim 4, characterized in that: Step S4 is specifically as follows: Step S41: The knowledge point node feature matrix of the exercise parsing tree Gtree Input into the graph attention network to obtain the updated knowledge point node feature matrix; Specifically: for the knowledge point node feature matrix Perform a linear transformation and transform the exercise parse tree through the weight matrix W The knowledge point representation of the qth knowledge point in Transform to a new feature space; that is, feature mapping operation, expressed as: ; in, represents the updated knowledge point representation; Obtain the updated knowledge point node feature matrix by repeating the feature mapping operation , expressed as: ; Step S42: Calculate the attention score between each knowledge point node and its neighboring knowledge point nodes by importing the adjacency matrix M of step S22 tree To determine whether the two are connected; specifically: if the knowledge point node Vq is connected to the neighboring knowledge point node Vp, then M tree =1, if not connected, then M tree =0; Step S42 is specifically as follows: The updated knowledge point corresponding to the knowledge point node Vq is represented as The updated knowledge point corresponding to the neighbor knowledge point Vp is represented as After the concatenation operation, it is input into the attention mechanism to calculate the attention score between the two, which is expressed as: ; in, represents the activation function of nonlinear activation, a represents the learnable weight parameter, T represents the matrix transpose, || represents the concatenation operation, Represents the attention score between the knowledge point node Vq and its neighbor knowledge point node Vp; Compare the attention weights between different knowledge point nodes and use the Softmax function to normalize the attention scores, that is, according to the adjacency matrix M tree To determine the neighbor nodes, it is expressed as: ; in, represents the attention coefficient between the knowledge point node Vq and its neighbor knowledge point node Vp; N(q) represents all direct neighbor knowledge point nodes of the knowledge point node Vq; k represents the index of all neighbor knowledge point nodes traversed in N(q); Represents the knowledge point node Vq and all neighboring knowledge point nodes The attention score between represents the exponential function; Step S43: For the knowledge point node Vq itself and all neighboring knowledge points The features of are weighted summed to obtain the exercise parse tree The qth knowledge point in Final knowledge point representation , expressed as: ; in, represents a nonlinear activation function, Represents the knowledge point node Vq and all neighboring knowledge point nodes The attention coefficient between Parsing tree for the problem The final knowledge point representation corresponding to each knowledge point in is concatenated to obtain the updated knowledge point representation , expressed as: ; Step S44: Represent the updated knowledge points Perform weighted aggregation, and then perform average pooling on the weighted aggregation results to obtain the final exercise parse tree feature representation h tree , expressed as: ; in, It is a knowledge point node The weight of i represents the index of the knowledge point after the final update. Represents an average pooling operation.

6. A method for predicting the relationship between mathematical knowledge points based on span and problem analysis as claimed in claim 5, characterized in that: Step S5 is specifically as follows: Step S51: Use the cross attention mechanism to represent the features of the knowledge points in step S31 and span feature representation The fusion is performed, and the fusion result is used as the span information representation with the semantic feature connection of the knowledge point pair, that is, the knowledge point span fusion representation; specifically: First, calculate the feature representation of the knowledge point pair and span feature representation The attention scores between them are then converted into corresponding attention weights through the activation function. The obtained attention weights are weighted summed, and the summation results are further averaged and pooled to obtain the knowledge point span fusion representation: ; in, Indicates the span fusion representation of knowledge points; , , are three learnable weight matrices; represents the scaling factor, represents the activation function, represents the average pooling operation; Step S52: By concatenating the problem parsing tree feature representation h of step S44 tree The knowledge point span fusion representation in step S51 is obtained to obtain the fusion feature representation, which is expressed as: ; in, Represents a splicing operation, Represents fusion features.

7. A method for predicting the relationship between mathematical knowledge points based on span and problem analysis as claimed in claim 6, characterized in that: Step S6 is specifically as follows: Step S61: Input the fused feature representation u to the prediction layer to generate the final classification probability, which is expressed as: ; in, and are learnable matrices and bias vectors, is the activation function, Represents the classification probability; Step S62: Classification probability Converted into specific prediction categories; specifically: Introducing classification threshold , when the classification probability Exceeding classification threshold When using the prediction results Indicates the dependency relationship between the current knowledge point pairs, expressed as: 。 8. A method for predicting the relationship between mathematical knowledge points based on span and exercise analysis as claimed in claim 7, characterized in that: Step S7 is specifically as follows: Constructing the cross entropy loss function , minimize the cross entropy loss function To optimize the model; expressed as: ; in, Indicates the true relationship of the annotation.

Citation Information

Patent Citations

  • Knowledge point prediction method and device, storage medium and computer equipment

    CN115017321A

  • Primary school Chinese personalized learning system based on knowledge graph and large model

    CN116860978A