Structured test paper characterization method, system, device, and storage medium

CN117350376BActive Publication Date: 2026-10-23UNIV OF SCI & TECH OF CHINA
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202311358758.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-10-19
Publication Date
2026-10-23
Estimated Expiration
2043-10-19

AI Technical Summary

Technical Problem

[0003]传统的通用文档表征任务只使用文档的文本信息,而忽略了结构信息;近年的文档表征方法开始使用预训练模型,但大多针对特定种类的文档,无法适应试卷独特的结构特点和领域特征(如知识概念);此外,现有的针对试卷表征的工作虽然使用了试卷的结构信息,但是方法较为简单且没有考虑其与试卷属性的联系

Benefits of technology

[0017]由上述本发明提供的技术方案可以看出,使用一种抽象的树形结构EOT表示试卷的结构信息,将其节点的路径转化为特征向量与文本特征向量共同输入到试卷表征模型中,之后,基于试卷结构特点和领域特征设计了三个预训练目标来进行预训练,使模型输出的试卷表征能够有效地捕获与试卷属性和整体特征相关的文本和结构特征,从而很好地适应多个试卷相关的下游任务。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117350376B_ABST
    Figure CN117350376B_ABST
Patent Text Reader

Abstract

The application discloses a structured test paper characterization method, system, equipment and storage medium, which are one-to-one corresponding solutions, and in the solutions: an abstract tree structure EOT is used to represent the structural information of the test paper, the path of the node is converted into a feature vector and a text feature vector, and the feature vector and the text feature vector are jointly input into a test paper characterization model, then, three pre-training targets are designed based on the test paper structure characteristics and field characteristics to perform pre-training, so that the test paper characterization output by the model can effectively capture the text and structural characteristics related to the test paper attributes and overall characteristics, and therefore, the model can well adapt to multiple test paper related downstream tasks.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of test paper characterization technology, and in particular to a structured test paper characterization method, system, device and storage medium. Background Technology

[0002] In the field of machine learning, representation learning is a process of transforming raw data such as text and images into data that is easier for machine learning applications. In recent years, online education systems have received widespread attention, and much work has begun to explore representation learning for educational resources. Previous research mainly focused on understanding individual test items in online education systems, with little attention paid to understanding the entire test paper. However, test papers, as an important means of assessing student learning, deserve equal attention. Test papers themselves contain certain structural information, and this structural information (distribution of question types, question order) is related to the test paper's attributes (especially difficulty), which is crucial for learning test paper representations.

[0003] Traditional general document representation tasks only use the textual information of documents, ignoring structural information. Recent document representation methods have begun to use pre-trained models, but most are designed for specific types of documents and cannot adapt to the unique structural characteristics and domain features (such as knowledge concepts) of test papers. In addition, existing work on test paper representation, although it uses the structural information of test papers, is relatively simple and does not consider its relationship with test paper attributes.

[0004] Because existing solutions are difficult to effectively represent the entire test paper, they suppress the performance of downstream tasks (test paper difficulty prediction, similar test paper retrieval).

[0005] In view of this, the present invention is hereby proposed. Summary of the Invention

[0006] The purpose of this invention is to provide a structured test paper characterization method, system, device, and storage medium, which can better characterize test papers and thus effectively improve the performance of downstream tasks.

[0007] The objective of this invention is achieved through the following technical solution:

[0008] A method for representing structured test papers, comprising:

[0009] Pre-training phase: The structure of the test paper is abstracted into a tree structure, where each node corresponds to a different part of the test paper. The tree structure is input into the test paper representation model and converted into corresponding embedding vectors. The text corresponding to all nodes in the tree structure, except for those representing question categories, is converted into text feature vectors and then input into the test paper representation model. The test paper representation model adds the embedding vectors and text feature vectors and encodes them to obtain the representation of each node. Average pooling is performed on all node representations to obtain the test paper representation vector. The relationships between different nodes are predicted using the node representations, and a first prediction loss is calculated. The corresponding question categories are predicted using the representations of nodes representing question categories, and a second prediction loss is calculated. Contrastive learning is used to narrow the distance between the test paper representation vectors of test papers with the same knowledge points, and a contrastive loss is calculated. A pre-training loss function is constructed by combining the first prediction loss, the second prediction loss, and the contrastive loss to pre-train the test paper representation model.

[0010] Inference phase: The structure of the test paper is abstracted into a tree structure, and the text corresponding to each node of the tree structure is converted into a text feature vector. The tree structure is converted into a corresponding embedding vector through the pre-trained test paper representation model, and then encoded after being added to the corresponding text feature vector to obtain the test paper representation vector.

[0011] A structured test paper representation system, comprising:

[0012] A pre-training unit is used in the pre-training phase, which includes: abstracting the structure of the test paper into a tree structure, where each node in the tree structure corresponds to a different part of the test paper; inputting the tree structure into the test paper representation model to convert it into corresponding embedding vectors; and converting the text corresponding to all nodes in the tree structure except those representing question categories into text feature vectors and inputting them into the test paper representation model. The test paper representation model adds the embedding vectors and text feature vectors and encodes them to obtain the representation of each node. Average pooling is then performed on the representations of all nodes to obtain the test paper representation vector; the relationship between different nodes is predicted using the node representations, and a first prediction loss is calculated; the corresponding question category is predicted using the representation of the node representing the question category, and a second prediction loss is calculated; the distance between the test paper representation vectors of test papers with the same knowledge points is narrowed using contrastive learning, and a contrastive loss is calculated; and a pre-training loss function is constructed by combining the first prediction loss, the second prediction loss, and the contrastive loss to pre-train the test paper representation model.

[0013] The reasoning unit is used in the reasoning stage, which includes: abstracting the structure of the test paper into a tree structure, and converting the text corresponding to each node of the tree structure into text feature vectors. The tree structure is converted into corresponding embedding vectors through the pre-trained test paper representation model, and then encoded after being added to the corresponding text feature vectors to obtain the test paper representation vector.

[0014] A processing device includes: one or more processors; and a memory for storing one or more programs;

[0015] When the one or more programs are executed by the one or more processors, the one or more processors implement the aforementioned method.

[0016] A readable storage medium storing a computer program that, when executed by a processor, implements the aforementioned method.

[0017] As can be seen from the technical solution provided by the present invention, an abstract tree structure EOT is used to represent the structural information of the test paper. The path of its node is transformed into a feature vector and a text feature vector, which are then input into the test paper representation model. Subsequently, three pre-training objectives are designed based on the structural characteristics of the test paper and the domain characteristics for pre-training. This enables the test paper representation output by the model to effectively capture the text and structural features related to the test paper attributes and overall features, thereby adapting well to multiple downstream tasks related to the test paper. Attached Figure Description

[0018] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the following description of the embodiments will be briefly introduced. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0019] Figure 1 A flowchart illustrating a structured test paper representation method provided in an embodiment of the present invention;

[0020] Figure 2 The test paper and its structure (EOT) and knowledge point structure are provided for embodiments of the present invention.

[0021] Figure 3 A schematic diagram of the architecture of the test paper representation model provided in an embodiment of the present invention;

[0022] Figure 4 This is a schematic diagram illustrating the process of vectorizing EOT structure information provided in an embodiment of the present invention;

[0023] Figure 5 This is a schematic diagram of a structured test paper representation system provided in an embodiment of the present invention;

[0024] Figure 6 This is a schematic diagram of a processing device provided in an embodiment of the present invention. Detailed Implementation

[0025] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the protection scope of the present invention.

[0026] First, the following explanations are provided for the terms that may be used in this article:

[0027] The terms “including,” “comprising,” “containing,” “having,” or other similar semantic descriptions should be interpreted as non-exclusive inclusion. For example, “including a technical feature element (such as raw material, component, ingredient, carrier, dosage form, material, size, part, component, mechanism, device, step, process, method, reaction conditions, processing conditions, parameter, algorithm, signal, data, product or article of manufacture, etc.)” should be interpreted as including not only the expressly listed technical feature element, but also other technical feature elements that are not expressly listed and are well-known in the art.

[0028] The following provides a detailed description of a structured test paper characterization method, system, device, and storage medium provided by the present invention. Contents not described in detail in the embodiments of the present invention are prior art known to those skilled in the art. Where specific conditions are not specified in the embodiments of the present invention, they should be performed according to conventional conditions in the art or conditions recommended by the manufacturer.

[0029] Example 1

[0030] This invention provides a structured test paper representation method. It uses an abstract tree structure, EOT, to represent the structural information of the test paper. The paths of its nodes are transformed into feature vectors, which, along with text feature vectors, are input into the test paper representation model. Then, based on the structural characteristics of the test paper and domain features, three pre-training objectives are designed for pre-training. This enables the model's output test paper representation to effectively capture textual and structural features related to the test paper's attributes and overall features, thus adapting well to multiple downstream tasks related to test papers, such as... Figure 1 As shown, it mainly includes the following steps:

[0031] 1. Pre-training phase.

[0032] 1) The structure of the test paper is abstracted into a tree structure, where each node in the tree structure corresponds to a different part of the test paper; the tree structure is input into the test paper representation model and converted into the corresponding embedding vector; and the text corresponding to all nodes in the tree structure except for the nodes representing the question categories is converted into text feature vectors and then input into the test paper representation model. The test paper representation model adds the embedding vector and the text feature vector and performs encoding processing to obtain the representation of each node. The representations of all nodes are averaged and pooled to obtain the test paper representation vector.

[0033] 2) Utilize the node representations to predict the relationships between different nodes and calculate the first prediction loss; utilize the node representations representing question categories to predict the corresponding question categories and calculate the second prediction loss; utilize contrastive learning to narrow the distance between the test paper representation vectors of test papers with the same knowledge points and calculate the contrastive loss; combine the first prediction loss, the second prediction loss, and the contrastive loss to construct a pre-training loss function to pre-train the test paper representation model.

[0034] 2. Reasoning stage.

[0035] This part of the process is similar to the pre-training stage. The main difference is in extracting the text feature vectors corresponding to all nodes. That is, the structure of the test paper is abstracted into a tree structure, and the text corresponding to each node of the tree structure is converted into text feature vectors. The tree structure is converted into the corresponding embedding vectors through the pre-trained test paper representation model, and then encoded after being added to the corresponding text feature vectors to obtain the test paper representation vector (that is, the representation of each node is obtained first, and then the representation of all nodes is averaged to obtain the test paper representation vector).

[0036] The transformed embedding vector and text feature vector are input into the pre-trained test paper representation model to obtain the test paper representation vector.

[0037] The above-described solution provided by the embodiments of the present invention can improve the test paper representation capability. The obtained test paper representation can serve test paper-related services of online education systems, such as test paper difficulty prediction and similar test paper retrieval, and improve their performance. For example, when using test paper representation to predict test paper difficulty, the accuracy of the prediction results can be improved compared with existing solutions; when using test paper representation to retrieve similar test papers, the accuracy of the retrieval results can be improved compared with existing solutions.

[0038] To more clearly demonstrate the technical solution and its effects provided by the present invention, the method provided by the embodiments of the present invention will be described in detail below with reference to specific examples.

[0039] I. Problem Definition and Formalization.

[0040] Given a test paper P, the goal of the test paper representation is to use a dh dimensional vector (exam paper representation) r p Let P and r represent the test paper. p It can be used for multiple downstream tasks of test papers and can improve task performance. The purpose of this invention is to learn the test paper representation r. p It can effectively capture textual and structural features related to test paper attributes and overall characteristics.

[0041] II. Data Preprocessing.

[0042] In this embodiment of the invention, test papers can be collected from public datasets or online education systems.

[0043] Taking online education system exam papers as an example, after collecting a large number of exam papers, data preprocessing is performed. In this embodiment of the invention, a syntax parser based on regular expressions is designed to extract the structure of the exam papers, abstracting it as a special tree structure (Examination Organization Tree, EOT). Examples of exam papers and their EOTs are shown below. Figure 2 As shown, the Examination of Tests (EOT) uses a tree structure, where nodes represent different parts of the test paper, and edges represent the hierarchical relationships between these parts. Each component of the test paper (test item) corresponds one-to-one with a node in the EOT. Leaf nodes in the EOT typically represent questions within the test paper, while non-leaf nodes usually represent the conditions or summaries of their child questions. For example... Figure 2 As shown on the right, for each node in EOT, its text content and its path in the tree structure are extracted as the node's structural information for subsequent processing.

[0044] It should be noted that, Figure 2 The English-language test paper provided is for illustrative purposes only and is not intended to be restrictive. In practical applications, it may be necessary to select a test paper in the desired language.

[0045] 3. Build the model and perform pre-training.

[0046] In this embodiment of the invention, a test paper representation model is established. It is a pre-trained model called PaperLM, and its main architecture is as follows: Figure 3 As shown, the PaperLM Encoder is based on a multi-layer Transformer, receiving the sum of text feature vectors and structural embedding vectors as input. The average pooling result of the last layer of the encoder is used as the model output, representing the test paper. The pre-trained model also includes a network that vectorizes the structural information of the test paper. Figure 3 It is not shown in the text; it will be described in detail later. Figure 3In the row below [PAD], each box contains an EP that represents the structural embedding vector of a node, with the subscript indicating the node's identifier. Above it, each box contains a T that represents the text feature vector of the corresponding node. [CLS] and [SEP] represent the start and end symbols in all text feature vector groups, respectively. PAD is used to pad the structural embedding vector, specifically as a vector filled with zeros, to align with the start and end symbols of the text. The syntax parser is a syntax parser that identifies identifiers such as question numbers in the exam paper. Its function is to divide the exam paper into nodes in a tree structure for subsequent processing.

[0047] 1. Vectorize the input information.

[0048] In this embodiment of the invention, the extracted text and structural information of the test paper are vectorized respectively.

[0049] 1) For the text content of each node, a pre-trained BERT model can be used to transform it into a feature vector.

[0050] 2) For the structural information of each node, after... Figure 4 The network shown is converted into an embedding vector, and the following is a detailed explanation of this process.

[0051] For the i-th test paper item x i It corresponds to a node, and its structural information includes information from the root node to the i-th test item x. i For the path of a corresponding node, separate its corresponding path (EOT path) expression with " / ", and obtain the node information of each level in the path in list form:

[0052]

[0053] Among them, ep i For the i-th test paper item x i The structural information (including information about all nodes in the path) is provided, where t and r represent the node type and order, respectively, the subscript value represents the level in the path, and d represents the path depth. For ep... i Perform the filling process, and after filling, the path depth will be uniformly set to L.

[0054] for Will Input into the j-th type unit embedding table, and... Input the j-th rank unit embedding table to obtain the corresponding embedding vectors. Then, add the two embedding vectors to obtain the test item x. i The embedding vector of the j-th layer

[0055]

[0056] Among them, TypeUnitEmb j RankUnitEmb j The corresponding embedding table represents the embedding table of the j-th type unit and the embedding table of the j-th order unit.

[0057] By concatenating the embedding vectors of all units, we obtain the test item x. i The intermediate representation of the complete path. i :

[0058]

[0059] The intermediate representation r i The data is fed into a feedforward neural network to obtain the final embedding vector (EOT path embedding) epe. i :

[0060] epe i =W2[ReLU(W1r i +b1)]+b2

[0061]

[0062]

[0063] Where W1 and W2 are the weight parameters of the feedforward neural network, and b1 and b2 are the bias parameters of the feedforward neural network; d h This represents the width of the model.

[0064] 2. Model pre-training.

[0065] To guide the model in learning the structural information and domain features of the test paper, this invention designs three pre-training objectives to train the model.

[0066] (1) Prediction of EOT node relationships.

[0067] First, this invention defines a set of node relationships:

[0068] R={self, child, parent, sibling, descendant, ancestor, others}

[0069] Where R is the set of node relationships, which includes seven types of relationships: self, child node, parent node, sibling node, grandchild node, ancestor node, and others.

[0070] In this embodiment of the invention, different nodes are combined into node pairs, and a relation in R is assigned as a relation label to each node pair according to the tree structure. For each node pair, the representations of the nodes are concatenated to obtain the embedding of the node pair, and the relation of the node pair is predicted by a feedforward neural network. Then, the first prediction loss is calculated by combining the relation label of the node pair.

[0071] Specifically: Given a test paper with N test items, consider the output embedding of each pair of nodes in the last layer of the model encoder, where the node pair {n, m} is represented by e. n and e m And concatenate them in pairs to obtain the node pair embeddings NPES. nm :

[0072] npe nm =[e n e m ], 0≤n, m≤N-1

[0073] Then embed the node pairs into npe. nm The data is fed into the first feedforward neural network to obtain the predicted classification results for node pairs {i, j}, and the first prediction loss L is calculated using the cross-entropy loss function. ENRP Through this pre-training objective, the model can learn the hierarchical structure of the test paper.

[0074] (2) Question type prediction.

[0075] like Figure 3 As shown, during pre-training, while preserving the corresponding EOT path embeddings, the text feature vectors of Section items (second-level EOT nodes, whose content represents the question type of the lower-level nodes) in the input are masked; that is, these are the nodes representing question categories as mentioned earlier. There are two specific implementation methods: the first is to not extract the text feature vectors of the nodes representing question categories; the second is to extract the text feature vectors of all nodes, and then mask the text feature vectors of the nodes representing question categories. Figure 3 An example of the second approach is shown. The model is then asked to predict the question type corresponding to the node representing the question category. In this way, based on the model's learning of the hierarchical structure of the exam paper, it will learn to predict results by referring to its child nodes, thus bridging the gap between structural and textual information.

[0076] Specifically: The representation of the node indicating the question category is fed into the second feedforward neural network to predict the question category. Then, it is combined with the actual question categories in the test paper, and the second prediction loss L is calculated using the cross-entropy loss function. QTP .

[0077] The first and second feedforward neural networks described above are implemented using the same structure, but they do not share parameters.

[0078] (3) Comparative study of test papers.

[0079] The purpose of test paper comparison learning is to model the scope of test papers. By bringing test paper representations with similar knowledge points closer together, the model learns a comprehensive representation of test papers, so that the model can measure the similarity between test papers according to the scope of the exam.

[0080] To this end, the present invention proposes the following test paper enhancement strategy: for each question in the current test paper, a question with the same knowledge point and question type is randomly selected from the pre-training dataset with probability p to replace it, thereby obtaining positive samples of the current test paper. In addition, a memory bank with momentum encoder is used, which can hold a large number of negative samples, thereby improving the effect of contrastive learning.

[0081] Those skilled in the art will understand that identical knowledge points mean that the most granular knowledge points in the knowledge point structure tree are completely identical.

[0082] For positive and negative samples of the test paper, the corresponding test paper representation vectors are extracted using the test paper representation model (see the previous text for the specific process); the test paper representation vector of the current test paper, as well as the test paper representation vectors of its positive and negative samples, are input into the multilayer perceptron to obtain intermediate representations. The intermediate representation of the current test paper is denoted as q, and the intermediate representations of its positive and negative samples are denoted as k respectively. + and k i The losses were compared in the following ways:

[0083]

[0084] Among them, L PCL For comparison of losses, K is the size of the memory bank, and τ is a temperature hyperparameter.

[0085] (4) Pre-training loss function.

[0086] Finally, the pre-training loss function is constructed by combining the first prediction loss, the second prediction loss, and the contrastive loss, and is expressed as follows:

[0087] L total =αL ENRP +βL QTP +γL PCL

[0088] Among them, L total L represents the pre-training loss function. ENRP L represents the first predicted loss. QTP L represents the second predicted loss. PCLThis represents the contrastive loss, where α, β, and γ are learnable parameters used to control the weight of the corresponding loss.

[0089] The model parameters are continuously optimized based on the aforementioned pre-training loss function until convergence, thus completing the pre-training process. The model parameter optimization process involved here can be implemented using conventional techniques, and therefore will not be elaborated upon.

[0090] IV. Reasoning Stage.

[0091] During the inference phase, the tree structure of the test paper is extracted and converted into corresponding embedding vectors. At the same time, the text feature vectors of each node are extracted. Both types of vectors are input into the pre-trained test paper representation model to obtain the test paper representation vector.

[0092] Through the above description of the embodiments, those skilled in the art can clearly understand that the above embodiments can be implemented by software, or by using software plus necessary general-purpose hardware platforms. Based on this understanding, the technical solutions of the above embodiments can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (such as a CD-ROM, USB flash drive, external hard drive, etc.), including several instructions to cause a computer device (such as a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments of the present invention.

[0093] Example 2

[0094] This invention also provides a structured test paper representation system, which is mainly used to implement the methods provided in the foregoing embodiments, such as... Figure 5 As shown, the system mainly includes:

[0095] A pre-training unit is used in the pre-training phase, which includes: abstracting the structure of the test paper into a tree structure, where each node in the tree structure corresponds to a different part of the test paper; inputting the tree structure into the test paper representation model to convert it into corresponding embedding vectors; and converting the text corresponding to all nodes in the tree structure except those representing question categories into text feature vectors and inputting them into the test paper representation model. The test paper representation model adds the embedding vectors and text feature vectors and encodes them to obtain the representation of each node. Average pooling is then performed on the representations of all nodes to obtain the test paper representation vector; the relationship between different nodes is predicted using the node representations, and a first prediction loss is calculated; the corresponding question category is predicted using the representation of the node representing the question category, and a second prediction loss is calculated; the distance between the test paper representation vectors of test papers with the same knowledge points is narrowed using contrastive learning, and a contrastive loss is calculated; and a pre-training loss function is constructed by combining the first prediction loss, the second prediction loss, and the contrastive loss to pre-train the test paper representation model.

[0096] The reasoning unit is used in the reasoning stage, which includes: abstracting the structure of the test paper into a tree structure, and converting the text corresponding to each node of the tree structure into text feature vectors. The tree structure is converted into corresponding embedding vectors through the pre-trained test paper representation model, and then encoded after being added to the corresponding text feature vectors to obtain the test paper representation vector.

[0097] Those skilled in the art will understand that, for the sake of convenience and brevity, the above-described division of functional modules is used as an example. In practical applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the system can be divided into different functional modules to complete all or part of the functions described above.

[0098] Example 3

[0099] The present invention also provides a processing device, such as Figure 6 As shown, it mainly includes: one or more processors; a memory for storing one or more programs; wherein, when the one or more programs are executed by the one or more processors, the one or more processors implement the method provided in the foregoing embodiments.

[0100] Furthermore, the processing device also includes at least one input device and at least one output device; in the processing device, the processor, memory, input device, and output device are connected via a bus.

[0101] In this embodiment of the invention, the specific types of the memory, input device, and output device are not limited; for example:

[0102] Input devices can be touchscreens, image acquisition devices, physical buttons, or mice, etc.

[0103] The output device can be a display terminal;

[0104] The memory can be random access memory (RAM) or non-volatile memory, such as disk storage.

[0105] Example 4

[0106] The present invention also provides a readable storage medium storing a computer program that, when executed by a processor, implements the method provided in the foregoing embodiments.

[0107] In this embodiment of the invention, the readable storage medium is a computer-readable storage medium and can be disposed in the aforementioned processing device, for example, as a memory in the processing device. Furthermore, the readable storage medium can also be any medium capable of storing program code, such as a USB flash drive, portable hard drive, read-only memory (ROM), magnetic disk, or optical disk.

[0108] The above description is merely a preferred embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in the present invention should be included within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.

Claims

1. A method for representing structured test papers, characterized in that, include: Pre-training phase: The structure of the test paper is abstracted into a tree structure, with each node in the tree structure corresponding to a different part of the test paper; The tree structure is input into the test paper representation model and transformed into the corresponding embedding vector. The text corresponding to all nodes in the tree structure except for the nodes representing the question categories is transformed into text feature vectors and then input into the test paper representation model. The test paper representation model adds the embedding vector and the text feature vector and performs encoding processing to obtain the representation of each node. The representations of all nodes are averaged and pooled to obtain the test paper representation vector. The relationship between different nodes is predicted using the node representations, and the first prediction loss is calculated. The corresponding question category is predicted using the representation of the node representing the question category, and the second prediction loss is calculated; the distance between the test paper representation vectors of test papers with the same knowledge points is narrowed using contrastive learning, and the contrastive loss is calculated; the test paper representation model is pre-trained by constructing a pre-training loss function by combining the first prediction loss, the second prediction loss and the contrastive loss. Inference phase: The structure of the test paper is abstracted into a tree structure, and the text corresponding to each node of the tree structure is converted into a text feature vector. The tree structure is converted into a corresponding embedding vector through the pre-trained test paper representation model, and then encoded after being added to the corresponding text feature vector to obtain the test paper representation vector.

2. The structured test paper representation method according to claim 1, characterized in that, The abstraction of the exam paper structure into a tree structure includes: The structure of the test paper is extracted by a syntax parser and abstracted as a tree structure. The nodes in the tree structure represent different parts of the test paper, and the edges in the tree structure represent the subordinate relationships between different parts. The components of the test paper correspond one-to-one with the nodes in the tree structure. According to the tree structure, the test paper is divided into multiple test paper items.

3. The structured test paper representation method according to claim 2, characterized in that, The process of converting the tree structure into a corresponding embedding vector includes: For the i-th test paper item x i It corresponds to a node, and its structural information includes information from the root node to the i-th test item x. i For each node's path, split its corresponding path expression and obtain the node information for each level of the path in list form: Among them, ep i For the i-th test paper item x i The structural information, where t and r represent node type and order respectively, the subscript value is the level in the path, and d is the path depth, for ep i Perform filling; after filling, the path depth is uniformly set to L. for Will Input the embedding table to the j-th type unit, and... Input the j-th ordered unit embedding table to obtain the corresponding embedding vectors. Then, add the two embedding vectors to obtain the test item x. i The embedding vector of the j-th layer Among them, TypeUnitEmb j RankUnitEmb j The corresponding embedding table represents the embedding table of the j-th type unit and the embedding table of the j-th order unit; By concatenating the embedding vectors of all units, we obtain the test item x. i The intermediate representation of the complete path r i : The intermediate representation r i The data is fed into a feedforward neural network to obtain the final embedding vector epe. i : epe i =W2[ReLU(W1r i +b1)]+b2 Where W1 and W2 are the weight parameters of the feedforward neural network, and b1 and b2 are the bias parameters of the feedforward neural network.

4. The structured test paper representation method according to claim 1, characterized in that, The method of predicting the relationship between different nodes using the node representation and calculating the first prediction loss includes: Different nodes are combined into node pairs, and relationship labels are assigned to each node pair according to the tree structure; For each node pair, the node representations are concatenated to obtain the node pair embedding. The relationship between the node pairs is then predicted using a feedforward neural network, and the first prediction loss is calculated by combining the relationship labels of the node pairs.

5. The structured test paper representation method according to claim 1, characterized in that, The step of predicting the corresponding question category using the representation of the node representing the question category and calculating the second prediction loss includes: The question category is predicted by combining the representation of the node representing the question category, and then the second prediction loss is calculated by combining the actual question categories in the test paper.

6. The structured test paper representation method according to claim 1, characterized in that, The method of using contrastive learning to narrow the distance between the representation vectors of test papers with the same knowledge points involves calculating the contrastive loss, which includes: For each question in the current test paper, a question with the same knowledge point and question type is randomly selected from the pre-training dataset with probability p to replace it, thus obtaining positive samples of the current test paper; and negative samples are stored using a memory bank with a momentum encoder. The test paper representation vectors corresponding to positive and negative samples are extracted using a test paper representation model. The test paper representation vector of the current test paper, as well as the test paper representation vectors of its positive and negative samples, are input into a multilayer perceptron to obtain intermediate representations. The intermediate representation of the current test paper is denoted as q, and the intermediate representations of its positive and negative samples are denoted as k, respectively. + and k i The losses were compared in the following ways: Among them, L PCL For comparison of loss, K is the size of the memory bank storing negative samples, and τ is a temperature hyperparameter.

7. The structured test paper representation method according to claim 1, characterized in that, The pre-training loss function, constructed by combining the first prediction loss, the second prediction loss, and the contrastive loss, is expressed as follows: L total =αL ENRP +βL QTP +γL PCL Among them, L total L represents the pre-training loss function. ENRP L represents the first predicted loss. QTP L represents the second predicted loss. PCL This represents the contrastive loss, where α, β, and γ are learnable parameters used to control the weight of the corresponding loss.

8. A structured test paper representation system, characterized in that, include: A pre-training unit is used in the pre-training phase, which includes: abstracting the structure of the test paper into a tree structure, where each node in the tree structure corresponds to a different part of the test paper; inputting the tree structure into the test paper representation model to convert it into corresponding embedding vectors; and converting the text corresponding to all nodes in the tree structure except those representing question categories into text feature vectors and inputting them into the test paper representation model. The test paper representation model adds the embedding vectors and text feature vectors and encodes them to obtain the representation of each node. Average pooling is then performed on the representations of all nodes to obtain the test paper representation vector; the relationship between different nodes is predicted using the node representations, and a first prediction loss is calculated; the corresponding question category is predicted using the representation of the node representing the question category, and a second prediction loss is calculated; the distance between the test paper representation vectors of test papers with the same knowledge points is narrowed using contrastive learning, and a contrastive loss is calculated; and a pre-training loss function is constructed by combining the first prediction loss, the second prediction loss, and the contrastive loss to pre-train the test paper representation model. The reasoning unit is used in the reasoning stage, which includes: abstracting the structure of the test paper into a tree structure, and converting the text corresponding to each node of the tree structure into text feature vectors. The tree structure is converted into corresponding embedding vectors through the pre-trained test paper representation model, and then encoded after being added to the corresponding text feature vectors to obtain the test paper representation vector.

9. A processing device, characterized in that, include: One or more processors; Memory, used to store one or more programs; Wherein, when the one or more programs are executed by the one or more processors, the one or more processors cause the one or more processors to implement the method as described in any one of claims 1 to 7.

10. A readable storage medium storing a computer program, characterized in that, When a computer program is executed by a processor, it implements the method as described in any one of claims 1 to 7.

Citation Information

Patent Citations

  • Text similarity detection model training method and device and related medium

    CN116720498A

  • Method and apparatus for joint-extracting clinical text entities and attributes and their relationships

    EP4068149A1