A hierarchical semantic matching method for test knowledge point classification
By constructing a hierarchical semantic matching method in the classification of test question knowledge points, the semantics of the test question text and knowledge points are mapped to the joint space, which solves the problems of ignoring the hierarchical structure and not considering the semantic matching relationship in the existing technology, and achieves a more efficient and accurate classification of test question knowledge points.
Patent Information
- Application Number
- CN202210063062.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-01-19
- Publication Date
- 2024-09-06
- Estimated Expiration
- 2042-01-19
AI Technical Summary
The existing technology ignores the hierarchical structure formed by knowledge points in the classification of test question knowledge points, resulting in insufficient semantic extraction, and fails to effectively consider the matching relationship between the test question text semantics and the knowledge point semantics, resulting in low classification efficiency and concept confusion.
The hierarchical semantic matching method for test question knowledge points is used to map the test question text semantics and the hierarchical semantics of knowledge points into the joint space. The semantic matching method is used to model the matching relationship between the test question text semantics and the hierarchical structure of knowledge points. Through the joint space Loss function and edge loss function are used for training, and the matching feature vectors of test question text and knowledge points are extracted to achieve hierarchical perception of knowledge point classification.
It improves the generalization and accuracy of the classification of test questions and knowledge points, can better analyze the matching degree of test questions and knowledge points, and provides more complete and interpretable classification results.
Smart Images

Figure CN114429138B
Abstract
Description
Technical Field
[0001] The present invention relates to the field of hierarchical text classification in natural language processing, and in particular to a hierarchical semantic matching method for test question knowledge point classification. Background Art
[0002] The task of hierarchical text classification is to analyze and model a text and give classification labels from general concepts to fine-grained concepts. In the field of education, represented by the classification of test knowledge points, a hierarchical structure of knowledge points including large knowledge areas and small knowledge points can be pre-built. Given a number of test questions, this task can obtain the labels of knowledge points corresponding to the test questions in a targeted manner. This research task can intelligently analyze and classify the electronic test question bank, which is the basis for scenarios such as test question analysis and intelligent test question recommendation. In the context of the rapid development of intelligent education today, the classification of test question knowledge points has important practical and application value.
[0003] In terms of the test question knowledge point classification method, the model methods used at home and abroad can be divided into general text classification methods and hierarchical perception text classification methods. In the general text classification method, the existing Chinese patent "Tan Chunyan; Qin Yusen. Knowledge point recommendation method, device, terminal and computer-readable storage medium [P]. Chinese invention patent, CN113590956A, 2021-11-02" uses a general text classification method to analyze the test questions, obtain the semantic representation corresponding to the test questions, and retrieve the classification to obtain the corresponding knowledge point classification label. This general text classification method is suitable for various classification scenarios, but for the classification of test question knowledge points with a clear hierarchical structure, if the hierarchical structure formed by the knowledge points from general concepts to fine-grained concepts is ignored, the classification labels may cause concept confusion, and it is impossible to obtain complete labels for the test questions from large knowledge fields to small knowledge points. In the document “Huang, Wei, et al.” “Hierarchical multi-label text classification: An attention-based recurrent network approach.” Proceedings of the 28th ACMIhternational Conference on Information and Knowledge Management. 2019.”, Huang et al. classified knowledge points layer by layer based on the attention mechanism. When the number of knowledge points is large, the efficiency of multiple layer-by-layer judgments decreases, and the matching relationship between the semantics of the test text and the semantics of the knowledge point text to varying degrees is ignored. The current problem in this field is that the semantic extraction of test knowledge points is not sufficient, and the matching relationship between the semantics of the test text and the semantics of knowledge points of different granularities is not considered. Summary of the invention
[0004] The purpose of the present invention is to solve the above-mentioned defects in the prior art and provide a hierarchical semantic matching method for test question knowledge point classification. The classification method maps the test question text semantics and the knowledge point hierarchical semantics into the joint space of the two, and uses the semantic matching method to model the matching relationship between the test question text semantics and the hierarchical structure of different test question knowledge points. When applied to the test question knowledge point classification, the method of the present invention obtains the hierarchical perception knowledge point classification result according to the semantic matching distance between the test question text semantics and the knowledge point hierarchical semantics. The classification effect of the method of the present invention is good and has certain explanatory power.
[0005] Compared with the prior art, the present invention focuses on extracting semantic vectors of test question knowledge points, constructing a joint space of test question text semantics and knowledge point text semantics, and classifying knowledge points according to the degree of semantic matching, thereby having better generalization and accuracy, and is applicable to different types of test questions.
[0006] The purpose of the present invention can be achieved by adopting the following technical solutions:
[0007] A hierarchical semantic matching method for test question knowledge point classification, the method comprising the following steps:
[0008] S1. According to the hierarchical structure of the knowledge points in the test questions, the knowledge point labels l = (l1, l2, ...l K )(K is the number of knowledge point labels) to construct a hierarchical structure of test knowledge points. The edge value between labels is expressed as e=(e l1-l2 , e l1-l3 ,...e l1-lK ), if there is a connection between two knowledge point labels in the hierarchical structure of the test knowledge points, the edge value is 1, and if there is no connection, the edge value is 0.
[0009] S2, divide the test text into sentences s = (s1, s2, ...s T )(T is the number of sentences after segmentation), each sentence is segmented into words w = (w1, w2, ...w S )(S is the number of words in each sentence). Input the text sentence into the feature extractor BERT (Bidirectional Encoder Representation Based on Transformer) m1 to extract the vector representation of the test text is a eigenvector, and the superscript i is the vector dimension.
[0010] S3. Based on the knowledge point label l and the edge e between labels in S1, we can construct a directed graph G = (V, E) that describes the hierarchical structure. The node of the directed graph G is V, which is constructed by the knowledge point label l. The node edge E of the directed graph G is constructed by the edge e between labels. In order to extract the feature vector that reflects the hierarchical structure, we first convert the text of the knowledge point label l into a vector representation V, and then input the directed graph G into the feature extractor GCN (graph convolutional neural network) m2 to extract the hierarchical semantic vector representation of the knowledge point. is the feature vector, and the superscript j is the vector dimension.
[0011] S4. Vector representation H based on test text t and knowledge point hierarchical semantic vector H l , use MLP (multi-layer perceptron) neural network to transform H t and H l Mapped into the joint space. In the joint space, the vector representation of the test text is The hierarchical semantic vector of knowledge points is The superscript k is the dimension of the vector in the joint space.
[0012] S5. Based on the joint space vector representation obtained in S4, matching learning is performed in combination with the specific hierarchical structure of knowledge points. The semantics of the test text is relatively matched with the semantics of the knowledge points that are core to the test, and is not matched with the semantics of irrelevant knowledge points. First, the joint space loss function is used to constrain the joint space vector representation. Specifically, the loss function brings the vector representation of the test text in the joint space closer to the vector representation of the knowledge point that is most relevant to the test. Secondly, the Margin Loss function is used to model the relationship between the vector representation of the test text and the vector representation of other knowledge points. Specifically, in addition to the above-mentioned small knowledge points that are most relevant to the test questions, the test text vector should basically match the labels of the large field of knowledge, and be completely mismatched with irrelevant knowledge points.
[0013] S6. When training a neural network, the method of the present invention performs gradient back propagation training based on the joint space loss function and the margin loss function to obtain a knowledge point classification model with better performance.
[0014] S7. After training the neural network model based on the above method, when classifying test question knowledge points, the method of the present invention searches for several knowledge point label semantics that are closest to the test question text semantics in the joint space to obtain the test question knowledge point classification label.
[0015] Furthermore, in step S3, a feature extractor GCN (graph convolutional neural network) m2 is used to extract the hierarchical semantic vector φ of the knowledge point l The process is as follows:
[0016] H l =σ(E*V*W1)
[0017] Among them, σ is the activation function and W1 is the learnable matrix parameter.
[0018] Furthermore, in step S4, the vector representation H of the test text is t and knowledge point hierarchical semantic vector H l The process of mapping to the joint space is as follows:
[0019] φ t =FFN(H t )
[0020] φ l =FFN(H l )
[0021] Among them, FFN is a two-layer perceptron neural network.
[0022] Furthermore, in step S5, the process of combining the spatial loss function is as follows:
[0023]
[0024] The form of the loss function is the squared difference of the L2 norm, where g represents the knowledge point that is most relevant to the test question. This loss function brings the vector representation of the test question text and the vector representation of the knowledge point that is most relevant to the test question closer in the joint space.
[0025] Furthermore, in step S5, the Margin Loss function process is as follows:
[0026]
[0027] Wherein, D is the L2 norm of the semantic distance measurement function, n represents the knowledge point that is not completely consistent with the test question, and γ represents the weight of the loss function penalty. Among the knowledge point labels n that are not completely consistent with the test question, if it is a label of a large knowledge field, it is relatively matched with the test question, but it is not accurate enough. Therefore, a small γ value is set and a small loss function penalty is performed to encourage it to maintain an appropriate semantic distance. Among the knowledge n that is not completely consistent with the test question, if it is a completely irrelevant knowledge point label, a large γ value is set to encourage the test question text vector representation to stay away from the irrelevant knowledge point label representation. Through the above method, the invention uses a hierarchical-aware semantic matching method to model the matching relationship between the test question text semantics and the semantics of different test question knowledge points.
[0028] Furthermore, in step S7, when classifying the knowledge points of the test questions, the method of the present invention searches for several knowledge point label semantics that are closest to the semantics of the test question text in the joint space to obtain the test question knowledge point classification labels, which are specifically in the following form:
[0029]
[0030] Among them, Y label Classify labels for test questions and knowledge points. represents the semantic distance between the test text semantics and the knowledge point label, ξ represents the classification threshold. If the semantic distance between the test text semantics and the specific knowledge point label is less than the threshold, it is considered to be classified as the label.
[0031] Furthermore, the method of the present invention can analyze the matching degree between a specific test question and different knowledge points in a joint space according to the semantic distance between the semantics of the test question text and the semantics of different knowledge points, and has a certain degree of explanatory power.
[0032] Furthermore, the test question text data covers test questions in Chinese, test questions in English, science subjects containing formulas, etc.
[0033] Compared with the prior art, the present invention has the following advantages and effects:
[0034] The present invention discloses a hierarchical semantic matching method for test question knowledge point classification, which models the label semantics of the hierarchical structure of test question knowledge points; combines the characteristics of the hierarchical structure and uses the semantic matching method to model the matching relationship between the test question text semantics and the semantics of different knowledge points; during classification, the matching degree between a specific test question and different knowledge points can be analyzed, which has a good effect and a certain degree of explanatory power. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] Figure 1 It is a flow chart of a hierarchical semantic matching method for test question knowledge point classification disclosed by the present invention;
[0036] Figure 2 It is a schematic diagram of the hierarchical structure of test knowledge points disclosed by the present invention;
[0037] Figure 3 It is a schematic diagram of the hierarchical semantic matching method disclosed in the present invention. DETAILED DESCRIPTION
[0038] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0039] Example
[0040] Figure 1 It is a flow chart of the present invention, such as Figure 1 As shown, the multi-scale difficulty vector classification method for graded reading materials disclosed in this embodiment includes the following steps: knowledge point hierarchical structure construction, test question text feature and knowledge point text feature extraction, mapping to joint space, matching learning, and knowledge point classification, which are as follows:
[0041] T1. According to the hierarchical structure of the test knowledge points, the knowledge point labels are constructed into a hierarchical structure of the test knowledge points. Figure 2 The knowledge point labels form a hierarchical structure tree. If there is a superior-subordinate relationship between "Algebra" and "Function", the edge value is 1, and if there is no connection, the edge value is 0.
[0042] T2, input the test sentence into the feature extractor BERT (Bidirectional Encoder Representation based on Transformer) m1 to extract the vector representation of the test text When using the BERT-base model, i takes the value of 768 dimensions.
[0043] T3. Use models such as BERT to convert the text of the knowledge point label l into a vector representation V, and then input the directed graph G into the feature extractor GCN (graph convolutional neural network) m2 to obtain the vector representation of the knowledge point label The common value of j is 200.
[0044] T4. Represent the vector of the test text as H t and the vector representation H of the knowledge point label l Input the MLP (Multi-layer Perceptron) neural network and map it to the joint space. The vector representation of the test text is: The hierarchical semantic vector of knowledge points is A common value for k is 200.
[0045] T5. Based on the joint space vector representation, matching learning is performed in combination with the hierarchical structure of knowledge points. Figure 2 , Figure 3For example, input the test question text "power function y=f(x)...", the knowledge point that this test question completely fits is "function", and the joint space loss function is used to encourage the vector representation of the test question text to be similar to the vector representation of the knowledge point "function". The knowledge point "algebra" is a label for a large field of knowledge, so we use the margin loss function and a small penalty parameter γ to encourage it to maintain an appropriate semantic distance. The knowledge point "geometry" is a completely unrelated knowledge point label, so we use the margin loss function and a large penalty parameter γ to encourage a relatively far semantic distance.
[0046] T6. During the training process, we use the gradient back-propagation algorithm to learn the model based on the above-mentioned joint spatial loss and edge loss.
[0047] T7. After training the neural network model based on the above method, when classifying the knowledge points of the test questions, the method of the present invention searches for several knowledge point label semantics that are closest to the semantics of the test question text in the joint space, that is, based on the test question text "power function y=f(x)...", the labels "function" and "algebra" whose semantic distance is less than a specific threshold ξ are searched, and the knowledge points of the question are classified as "function" and "algebra".
[0048] To sum up, the hierarchical semantic matching method for test question knowledge point classification proposed in this embodiment first constructs a hierarchical structure diagram of the test question knowledge points, obtains vector representations for the test question text representation and the knowledge point label respectively, maps the two into a joint space, and performs hierarchical-aware semantic matching learning. When applied, the hierarchical-aware knowledge point classification result is obtained based on the matching distance between the test question text semantics and the knowledge point text semantics. The inventive method has good classification effect and certain interpretability.
[0049] The above embodiments are preferred implementation modes of the present invention, but the implementation modes of the present invention are not limited to the above embodiments. Any other changes, modifications, substitutions, combinations, and simplifications that do not deviate from the spirit and principles of the present invention should be equivalent replacement methods and are included in the protection scope of the present invention.
Claims
1. A hierarchical semantic matching method for test knowledge point classification. The following steps are involved: S1. According to the hierarchical structure of the knowledge points in the test questions, the knowledge point label l = (l 1 , l 2 ,...l K ) is constructed as a hierarchical structure of test knowledge points, K is the number of knowledge point labels; the edge value between labels is expressed as e = (e l1-l2 , e l1-l3 ,...e l1-lK ), if there is a connection between two knowledge point labels in the hierarchical structure of the test question knowledge points, the edge value is 1, and if there is no connection, the edge value is 0; S2. Divide the test text into sentences s=(s 1 ,s 2 ,...s T ), T is the number of sentences after the clause, each sentence is divided into words w = (w 1 , w 2 , ...w S ), S is the number of words in each sentence; the text sentence is input into the feature extractor BERT m1 to extract the vector representation of the test text is the eigenvector, and the superscript i is the vector dimension; S3, based on the knowledge point label l and the edge e between labels in S1, construct a directed graph G = (V, E) describing the hierarchical structure; wherein the node of the directed graph G is V, which is constructed by the knowledge point label l, and the node edge E of the directed graph G is constructed by the edge e between labels; in order to extract the feature vector that reflects the hierarchical structure, first convert the text of the knowledge point label l into a vector representation, and then input the directed graph G into the feature extractor GCN m2 to extract the hierarchical semantic vector representation of the knowledge point is the eigenvector, and the superscript j is the vector dimension; S4. Vector representation H based on test text t and knowledge point hierarchical semantic vector H l , use MLP neural network to transform H t and H l Mapped into the joint space; in the joint space, the vector representation of the test text is The hierarchical semantic vector of knowledge points is The superscript k is the vector dimension in the joint space; S5. Based on the joint space vector representation obtained in S4, matching learning is performed in combination with the hierarchical structure of knowledge points. First, the joint space loss function is used to constrain the joint space vector representation. Second, the marginal loss function is used to model the relationship between the test text vector representation and the other knowledge point vector representations. The joint space loss function process is as follows: ; The form of the loss function is the squared difference of the L2 norm, where g represents the knowledge point that is most relevant to the test question; the marginal loss function process is as follows: ; Among them, D is the L2 norm of the semantic distance measurement function, n represents the knowledge point that is not completely consistent with the test question, and γ represents the weight of the loss function penalty; S6. During neural network training, gradient back propagation training is performed based on the joint space loss function and the edge loss function to obtain a knowledge point classification model; S7. After training the neural network model based on the above method, when classifying the knowledge points of the test questions, search for several knowledge point label semantics that are closest to the semantics of the test question text in the joint space to obtain the test question knowledge point classification labels. The specific form is as follows: ; Among them, Y label Classify labels for test questions and knowledge points. represents the semantic distance between the test text semantics and the knowledge point label, ξ represents the classification threshold. If the semantic distance between the test text semantics and the specific knowledge point label is less than the threshold, it is considered to be classified as the label.
2. A hierarchical semantic matching method for test question knowledge point classification according to claim 1, Features In step S3, the feature extractor GCN m2 is used to extract the knowledge point hierarchical semantic vector φ i The process is as follows: H l =σ(E*V*W 1 ) Among them, σ is the activation function, W 1 is the learnable matrix parameter.
3. A hierarchical semantic matching method for test question knowledge point classification according to claim 1, Features In step S4, the vector representation H of the test text is t and knowledge point hierarchical semantic vector H l The process of mapping to the joint space is as follows: φ t =FFN(H t ) φ l =FFN(H l ) Among them, FFN is a two-layer perceptron neural network.
4. A hierarchical semantic matching method for test question knowledge point classification according to claim 1, Features ,In the joint space, the matching degree between the test question text and the ,semantics of different knowledge points is analyzed.
5. A hierarchical semantic matching method for test question knowledge point classification according to claim 1, Features The test question text data covers test questions in Chinese, test questions in English, and science subjects containing formulas.
Citation Information
Patent Citations
Multi-scale difficulty vector classification method for graded reading materials
CN110727796A
Similar test question identification method based on knowledge structure
CN112231491A
Knowledge point recommendation method and device, terminal and computer readable storage medium
CN113590956A
Test question difficulty prediction method and system based on deep semantic representation
CN113743083A
Intelligent semantic matching method and apparatus based on deep hierarchical coding
WO2021164200A1
