Proposition method and device based on course knowledge graph and knowledge distillation and medium

By constructing a course knowledge graph and using knowledge distillation to train a problem generation model, the problem of teachers spending a lot of time when choosing topics is solved, improving the efficiency and diversity of problem generation, and reducing the consumption of computing resources.

CN120196761AActive Publication Date: 2025-06-24SOUTH CHINA NORMAL UNIV

Patent Information

Application Number
CN202510123260.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-26
Publication Date
2025-06-24
Estimated Expiration
2045-01-26

AI Technical Summary

Technical Problem

In the prior art, teachers need to spend a lot of time considering the fit, innovation and rationality of the problem and knowledge when choosing topics, as well as students' ability level and cultivation problems. At the same time, the problems generated by large language models are relatively single, and the computing resources are consumed high, which increases the difficulty of application.

Method used

A proposition method based on course knowledge graph and knowledge distillation is proposed. By constructing the course knowledge graph, the target data set is generated, and the training problem generation model is trained through the knowledge distillation method to obtain the target problem generation model and realize automated proposition.

Benefits of technology

It effectively improves the efficiency of problem generation, increases the diversity of problems, and reduces the computing resource consumption of the automated generation process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120196761A_ABST
    Figure CN120196761A_ABST
Patent Text Reader

Abstract

The invention discloses a proposition method and device based on a course knowledge graph and knowledge distillation and a medium, and can be applied to the technical field of information processing. The method comprises the following steps: after constructing a course knowledge graph comprising knowledge points and knowledge point tags, constructing a target data set comprising background materials, question tags, question types, to-be-applied questions, answers and to-be-applied analysis according to the knowledge point tags in the course knowledge graph; and then performing multi-stage training on a to-be-trained question generation model through the target data set and by adopting a knowledge distillation method to obtain a target question generation model, so that when proposition operation is performed based on the target question generation model, the target question generation model is subjected to proposition operation; problem generation efficiency and diversity of generated problems can be effectively improved, and computing resources in the automatic generation process are reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of information processing technologies, and in particular, to a proposition method, device, and medium based on a curriculum knowledge graph and knowledge distillation. Background Art

[0002] In the related art, most subject problems are manually written by proposers. In the process of topic selection, teachers need to consider the fit between the problem and knowledge, the innovation and rationality of the problem, as well as the ability level of students and the cultivation of students, resulting in teachers spending a lot of time in topic selection. Although the prior art combines large language models to automatically generate questions, currently, the questions generated by large language models are relatively single and the computing resources required by large models are relatively high, increasing the application difficulty.

[0003] In summary, the technical problems existing in the related art need to be improved. Summary of the Invention

[0004] The main purpose of the embodiments of this application is to propose a proposition method, device, and medium based on a curriculum knowledge graph and knowledge distillation, which can effectively improve the problem generation efficiency, the diversity of generated problems, and reduce the computing resources in the automated generation process.

[0005] To achieve the above object, on the one hand, an embodiment of this application proposes a proposition method based on a curriculum knowledge graph and knowledge distillation, and the method includes the following steps:

[0006] Construct a curriculum knowledge graph, where the curriculum knowledge graph includes knowledge points and knowledge point labels;

[0007] Construct a target data set according to the knowledge point labels in the curriculum knowledge graph, where the target data set includes multiple elements, and the multiple elements include background materials, question labels, question types, questions to be applied, answers, and analysis to be applied;

[0008] Through the target data set, use the knowledge distillation method to perform multi-stage training on the problem generation model to be trained, and obtain a target problem generation model;

[0009] Perform a proposition operation based on the target problem generation model.

[0010] In some embodiments, the constructing the curriculum knowledge graph includes:

[0011] Extract the knowledge points and knowledge point labels of the target curriculum;

[0012] Perform knowledge fusion on the extraction results to obtain a knowledge fusion result;

[0013] Perform knowledge importance calculation based on the knowledge fusion result to obtain the knowledge importance calculation result;

[0014] Generate the course knowledge graph corresponding to the knowledge points and knowledge point labels stored in the preset database according to the knowledge importance calculation result and the knowledge fusion result.

[0015] In some embodiments, the performing knowledge fusion on the extraction result to obtain a knowledge fusion result includes:

[0016] Calculate the first similarity of the knowledge point labels in the knowledge extraction result;

[0017] Fuse the knowledge point labels according to the first similarity to obtain a knowledge point label fusion result;

[0018] Calculate the second similarity of the knowledge points in the knowledge extraction result;

[0019] Fuse the knowledge points according to the second similarity to obtain a knowledge point fusion result.

[0020] In some embodiments, the constructing a target data set according to the knowledge point labels in the course knowledge graph includes:

[0021] Separate the background material and the problem to be applied in the problem data set to obtain a problem library;

[0022] Generate problem labels through a large language model according to the course knowledge graph;

[0023] Construct a label-knowledge mapping library according to the problem labels, where the target data set includes the problem library and the label-knowledge mapping library.

[0024] In some embodiments, the separating the background material and the problem to be applied in the problem data set to obtain a problem library includes:

[0025] Perform a preliminary separation on the problem data set to obtain a problem and background material set, an answer set, and an analysis set;

[0026] Separate the problem to be applied and the background material in the problem and background material set through a large language model to obtain the problem library.

[0027] In some embodiments, the performing multi-stage training on the problem generation model to be trained by using the knowledge distillation method through the target data set includes:

[0028] Perform multi-task training on the student model in the problem generation model to be trained according to the target data set;

[0029] Generate initial questions based on the trained student model;

[0030] Perform multi-task training on the student model in the to-be-trained question generation model by using the target dataset and the initial questions.

[0031] In some embodiments, the multi-task training of the student model in the to-be-trained question generation model according to the target dataset includes:

[0032] Using the knowledge points and background materials in the target dataset as the input of the student model to train the process of the student model to generate predicted questions;

[0033] Using the knowledge points and background materials in the target dataset as the input of the student model to train the process of the student model to generate predicted questions and predicted analyses.

[0034] To achieve the above object, another aspect of the embodiments of the present application proposes a proposition device based on a curriculum knowledge graph and knowledge distillation, and the device includes:

[0035] A first module for constructing a curriculum knowledge graph, where the curriculum knowledge graph includes knowledge points and knowledge point labels;

[0036] A second module for constructing a target dataset according to the knowledge point labels in the curriculum knowledge graph, where the target dataset includes multiple elements, and the multiple elements include background materials, question labels, question types, questions to be applied, answers, and analyses to be applied;

[0037] A third module for performing multi-stage training on the to-be-trained question generation model by using the target dataset and adopting the knowledge distillation method to obtain a target question generation model;

[0038] A fourth module for performing proposition operations based on the target question generation model.

[0039] To achieve the above object, another aspect of the embodiments of the present application proposes a computer device, including:

[0040] At least one processor;

[0041] At least one memory for storing at least one program;

[0042] When the at least one program is executed by the at least one processor, the at least one processor implements the above method.

[0043] To achieve the above object, on the other hand, an embodiment of the present application proposes a computer-readable storage medium storing a computer program, which when executed by a processor implements the above method.

[0044] The embodiments of the present application at least include the following beneficial effects: The present application provides a proposition method, device and medium based on a course knowledge graph and knowledge distillation. After constructing a course knowledge graph including knowledge points and knowledge point labels, a target data set including background materials, question labels, question types, questions to be applied, answers, and analysis to be applied is constructed according to the knowledge point labels in the course knowledge graph. Then, the model to be trained for question generation is multi-stage trained by using the target data set and the knowledge distillation method to obtain a target question generation model, so that when proposition operation is performed based on the target question generation model, the question generation efficiency, the diversity of generated questions can be effectively improved, and the computing resources in the automated generation process can be reduced. Description of the Drawings

[0045] Figure 1 is a flowchart of the proposition method based on the course knowledge graph and knowledge distillation provided by the embodiment of the present application;

[0046] Figure 2 is a schematic diagram of the course knowledge graph provided by the embodiment of the present application;

[0047] Figure 3 is a schematic diagram of the construction of the target data set provided by the embodiment of the present application;

[0048] Figure 4 is a schematic diagram of the initial training of the question generation model provided by the embodiment of the present application;

[0049] Figure 5 is a schematic diagram of the retraining of the question generation model provided by the embodiment of the present application;

[0050] Figure 6 is a schematic diagram of calculating the loss between the student model and the teacher model provided by the embodiment of the present application;

[0051] Figure 7 is a schematic diagram of the structure of the proposition device based on the course knowledge graph and knowledge distillation provided by the embodiment of the present application;

[0052] Figure 8 is a schematic diagram of the hardware structure of the computer device provided by the embodiment of the present application. Detailed Embodiments

[0053] To make the objectives, technical solutions, and advantages of this application clearer and more understandable, the following further elaborates on this application in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely for explaining this application and not for limiting it. When the following description involves the accompanying drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The implementation manners described in the following exemplary embodiments do not represent all implementation manners consistent with the embodiments of this application. They are merely examples of devices and methods that are consistent with some aspects of the embodiments of this application.

[0054] It can be understood that the terms "first", "second", etc. used in this application may be used herein to describe various concepts, but unless otherwise specified, these concepts are not limited by these terms. These terms are only used to distinguish one concept from another. For example, without departing from the scope of the embodiments of this application, the first information may also be referred to as the second information. Similarly, the second information may also be referred to as the first information. Depending on the context, as used herein, the words "if", "when" may be interpreted as "when...", "while...", or "in response to determining".

[0055] The terms "at least one", "multiple", "each", "any one", etc. used in this application, at least one includes one, two, or more than two, multiple includes two or more than two, each refers to each one of the corresponding multiple, and any one refers to any one of the multiple.

[0056] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by those skilled in the technical field to which this application belongs. The terms used herein are only for the purpose of describing the embodiments of this application and are not intended to limit this application.

[0057] In the related art, most of the subject problems are manually written by the question setters. In this manual writing method, during the topic selection process, teachers need to consider the compatibility between the problems and knowledge, the innovation and rationality of the problems, as well as the ability level and cultivation of students, which results in teachers spending a large amount of time in topic selection. Although the prior art combines large language models to automatically generate questions, currently, the questions generated by large language models are relatively single and the computing resources required by the large models are relatively high, increasing the application difficulty.

[0058] In view of this, in the embodiments of the present application, a proposition method, device and medium based on a curriculum knowledge graph and knowledge distillation are provided. After constructing a curriculum knowledge graph including knowledge points and knowledge point tags, the present application constructs a target data set including background materials, question tags, question types, questions to be applied, answers, and analysis to be applied according to the knowledge point tags in the curriculum knowledge graph, and then uses the target data set and the knowledge distillation method to perform multi-stage training on the problem generation model to be trained to obtain a target problem generation model, so that when proposition operations are performed based on the target problem generation model, the problem generation efficiency, the diversity of generated questions, and the computational resources in the automated generation process can be effectively improved.

[0059] The proposition method based on a curriculum knowledge graph and knowledge distillation provided by the embodiments of the present application relates to the field of information processing technologies. The proposition method based on a curriculum knowledge graph and knowledge distillation provided by the embodiments of the present application can be applied to a terminal, a server, or software running on a terminal or a server. In some embodiments, the terminal may be a smart phone, a tablet computer, a laptop computer, a desktop computer, a smart speaker, a smart watch, a vehicle-mounted terminal, etc., but is not limited thereto; the server side may be configured as an independent physical server, or may be configured as a server cluster or a distributed system composed of multiple physical servers, or may be configured as a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms. The server may also be a node server in a blockchain network; the software may be an application implementing the proposition method based on a curriculum knowledge graph and knowledge distillation, etc., but is not limited to the above forms.

[0060] The present application can be used in many general or special computer system environments or configurations. For example: personal computers, server computers, handheld or portable devices, tablet-type devices, multi-processor systems, microprocessor-based systems, set-top boxes, programmable consumer electronic devices, network PCs, minicomputers, mainframe computers, distributed computing environments including any of the above systems or devices, and so on. The present application can be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. The present application can also be practiced in a distributed computing environment where tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules can be located in local and remote computer storage media including storage devices.

[0061] The following specifically elaborates on the embodiments of the present application in conjunction with the accompanying drawings:

[0062] Figure 1 It is an optional flowchart of the proposition method based on the curriculum knowledge graph and knowledge distillation provided by the embodiments of the present application. Figure 1 The method in [it] may include but is not limited to steps S101 to S106.

[0063] Step S110: Construct a curriculum knowledge graph, where the curriculum knowledge graph includes knowledge points and knowledge point labels.

[0064] Step S120: Construct a target data set according to the knowledge point labels in the curriculum knowledge graph, where the target data set includes multiple elements, and the multiple elements include background materials, question labels, question types, questions to be applied, answers, and analyses to be applied.

[0065] Step S130: Through the target data set, use the knowledge distillation method to perform multi-stage training on the problem generation model to be trained to obtain a target problem generation model.

[0066] Step S140: Perform a proposition operation based on the target problem generation model.

[0067] It can be understood that the core idea of the target problem generation model in this embodiment is to combine knowledge points and materials, and generate questions through reasonable fusion. Specifically, this embodiment can regard questions as an organic combination of knowledge points and materials, so as to generate questions that not only meet the knowledge requirements but also can integrate into the material background. Among them, the set question is y, and the inputs of knowledge points and materials are respectively represented as x 知识点 and x 材料 , then the question generation process can be expressed by the following formula:

[0068] y = f(x 知识点 , x 材料 );

[0069] In the formula, f is a model representing the question generation function, and generates corresponding questions through comprehensive understanding of knowledge points and materials.

[0070] Based on the above description, this embodiment first constructs a curriculum knowledge graph. Specifically, the construction process of the curriculum knowledge graph may include but is not limited to the following steps:

[0071] Step S210: Extract the knowledge points and knowledge point labels of the target curriculum.

[0072] Step S220: Perform knowledge fusion on the extraction results to obtain a knowledge fusion result.

[0073] Step S230: Calculate the knowledge importance according to the knowledge fusion result to obtain a knowledge importance calculation result.

[0074] Step S240: Generate a curriculum knowledge graph corresponding to the knowledge points and knowledge point tags stored in the preset database according to the knowledge importance calculation result and the knowledge fusion result.

[0075] It can be understood that in the knowledge extraction stage, in this embodiment, natural language processing (NLP) technology is used to extract knowledge point tags and knowledge points from the text of the target curriculum. Specifically, in this embodiment, named entity recognition (NER) is performed through spaCy to identify knowledge point tags and specific knowledge points in the text. Among them, assume that the extracted tag set is T = {t1, t2,..., t n}, and the knowledge point set is P = {p1, p2,..., P m}. Then, during the extraction process, the preliminary correspondence between knowledge points and knowledge point tags is measured by calculating the similarity between knowledge point tags and knowledge points. In this embodiment, the following cosine similarity formula is used to measure the relationship between knowledge points and tags in the text:

[0076]

[0077] In the formula, v p and v t respectively represent the knowledge point vector and the knowledge point tag vector; v p ·v t represents the dot product; ||v p || and ||v t || represent the norms of the vectors.

[0078] By calculating the cosine similarity in this embodiment, it can help identify the correlation between tags and knowledge points in the text and construct a preliminary mapping between knowledge points and tags.

[0079] It can be understood that in the knowledge fusion process, in this embodiment, after calculating the first similarity of the knowledge point tags in the knowledge extraction result, the knowledge point tags are fused according to the first similarity to obtain the knowledge point tag fusion result; at the same time, after calculating the second similarity of the knowledge points in the knowledge extraction result, the knowledge points are fused according to the second similarity to obtain the knowledge point fusion result. Exemplarily, in this embodiment, Cosine Similarity can be used to calculate the similarity of knowledge point tags and knowledge points to achieve the merging of similar or duplicate items in different data sources. Assume that the similarity calculation between knowledge point tag t1 and knowledge point tag t2 is as follows:

[0080]

[0081] When the calculated first similarity value is higher than a set threshold θ, these two tags are regarded as the same tag and merged. Similarly, for knowledge points p1 and p2, their similarity calculation method is the same as the tag calculation formula. If they belong to the same tag and have a high similarity, it is considered that these two knowledge points are different expressions of the same knowledge point and are merged.

[0082] The data after fusion in this embodiment ensures the consistency and integrity of the curriculum knowledge graph, and can eliminate duplicate tags and knowledge points to improve the quality of the curriculum knowledge graph.

[0083] Specifically, after obtaining the knowledge fusion result in this embodiment, the importance of knowledge points can also be calculated through the PageRank algorithm to determine which knowledge points are more critical to learners. Among them, the PageRank value PR(v) is calculated by the following formula:

[0084]

[0085] In the formula, v is the node, M(v) is all the nodes pointing to node v, N(u) is the neighbor node of node u, and d is the damping coefficient, usually taking a value of 0.85.

[0086] After determining the most important knowledge points in the graph through the PageRank calculation in this embodiment, a curriculum knowledge graph corresponding to the knowledge points and knowledge point tags stored in the preset database is generated in combination with the knowledge fusion structure. Among them, the preset database in this embodiment can adopt the Neo4j graph database for storage and management. Specifically, the Neo4j graph database can efficiently store the complex relationships between nodes and edges. The nodes represent knowledge point tags and knowledge points, and the edges represent the relationships between them. Each node will store attribute information including tag names, knowledge point descriptions, etc., and each edge represents the correlation between tags or the subordination relationship between tags and knowledge points. To accelerate queries, this embodiment can also use the indexing function in Neo4j. When querying, the graph database is retrieved through the Cypher query language. Through Neo4j, complex query operations can be efficiently executed, greatly improving the access efficiency of the curriculum knowledge graph.

[0087] It can be understood that Figure 2 The shown curriculum knowledge graph includes entities and relationships. The entities include knowledge point tags and knowledge points. The knowledge point tags represent the main modules or topics of the curriculum, while the knowledge points are specific learning contents. The correlation between knowledge point tags and the subordination relationship between tags and knowledge points constitute the core content of the curriculum knowledge graph. Specifically, assume the correlation between knowledge point tags is R t,t′ , where t and t′ are two knowledge point tags, R t,t′is the relevance between label t and label t'. The subordination relationship between knowledge points and labels is S t,p , where t is the label and p is the knowledge point. If the knowledge point p belongs to the label t, then S t,p = 1; otherwise, S t,p = 0. In addition, this embodiment can adopt the RDF (Resource Description Framework) standard to construct a curriculum knowledge graph. Among them, the curriculum knowledge graph includes multiple triples (subject, predicate, object), that is, (label, relationship, knowledge point), and the relationship between the label and the knowledge point can be clearly represented in the form of triples.

[0088] In the embodiment of the present application, to effectively train the model, this embodiment constructs a data set including multiple question elements. Each question element includes materials, labels, question types, questions, answers, and analysis. Specifically, define a set s of question elements as the following formula:

[0089] s = {c, t, q, d, a, e};

[0090] In the formula, c is the material, t is the label, q is the question, d is the question type, a is the answer, and e is the analysis.

[0091] All sets of question elements constitute the overall target data set S. The target task of the target data set is as follows:

[0092] q = LLM(t, c);

[0093] The above formula means that the corresponding question q is generated by the large language model (LLM) according to the label t and the material c.

[0094] It can be understood that based on Figure 3 the processing flow shown above, the construction process of the above target data set includes but is not limited to the following steps:

[0095] Step S310: Separate the background materials and the questions to be applied in the question data set to obtain a question bank;

[0096] Step S320: Generate question labels through the large language model according to the curriculum knowledge graph;

[0097] Step S330: Construct a label-knowledge mapping library according to the question labels. Among them, the target data set includes a question bank and a label-knowledge mapping library.

[0098] In the embodiments of the present application, the problems in the obtained problem dataset often mix with the background materials. Therefore, in this embodiment, the problems are separated to extract the problem q and the background material c. Specifically, after initially separating the problem dataset to obtain the problem and background material set, the answer set, and the analysis set, this embodiment uses a large language model to separate the problem to be applied and the background material in the problem and background material set to obtain a question bank.

[0099] It can be understood that since the difficult problems in the existing problem datasets often lack labels, in this embodiment, by combining with the curriculum knowledge graph and using a large language model to automatically generate problem labels. Specifically, after writing appropriate prompt words, this embodiment combines the problem-solving process (q and a) with the analysis (e) to generate corresponding problem labels. The process of generating problem labels can be carried out through the following formula:

[0100] t = LLM(q, a, e, CKG);

[0101] In the formula, q is the problem, a is the answer, e is the analysis, CKG is the label system of the curriculum knowledge graph, and t is the problem label generated by the large language model.

[0102] The generation of problem labels in this embodiment helps improve the understanding and accuracy of the target problem generation model for the knowledge points of the questions, so as to better generate questions that meet the requirements.

[0103] After obtaining the problem labels in this embodiment, the problem labels are expanded and enriched. Specifically, this embodiment uses the curriculum knowledge graph to obtain knowledge points. The process of obtaining knowledge points is as follows:

[0104] k = KG(t);

[0105] In the formula, KG is the curriculum knowledge graph.

[0106] Next, a label-knowledge mapping library lib is constructed. This mapping-knowledge mapping library maps the label t to its corresponding knowledge point or content, so as to provide more context information to assist in question generation. Specifically, the label mapping process is as follows:

[0107] k = lib(t);

[0108] Through the expanded label-knowledge mapping library in this embodiment, the target problem generation model can obtain a more abundant knowledge background, helping it better understand the combination relationship between knowledge points and materials, so as to generate more accurate and innovative questions.

[0109] It is understandable that after obtaining the target dataset in this embodiment, the question generation model is trained with the target dataset. The question generation model in this embodiment can perform the task of question generation based on a deep learning model with an encoder-decoder structure. Among them, the design of the question generation model can adopt current generative models, such as T5 and BART, which have powerful capabilities in dealing with complex text generation tasks. Specifically, the encoder part is responsible for encoding the input knowledge points and materials and extracting their latent representations; while the decoder part is responsible for generating question texts based on these latent representations.

[0110] In this embodiment, the core of the question generation model architecture is based on the Transformer model, including an encoder and a decoder, and different NLP tasks are modeled through these structures. The input of the question generation model will first be encoded into tokens through a unified vocabulary, and the input form of all tasks is a text sequence. At the input end, the model will attach task information as a prefix to the input text. This way enables the model to clearly know the type of task when processing the task. The role of the encoder is to convert the input text into an encoding of context information, using a multi-head self-attention mechanism and a feed-forward neural network. Through a multi-layer stacked structure, the encoder can learn the dependencies between various parts of the input sequence.

[0111] The structure of the decoder can also adopt the decoder architecture of Transformer. This decoder architecture not only processes the self-attention of the decoder itself but also interacts with the output of the encoder through a cross-attention layer, so as to better utilize the input information to generate the target text. The goal of the decoder is to generate the output text step by step according to the context information until a complete text sequence is generated. Specifically, the question generation model in this embodiment is trained with a large number of knowledge points, materials, and their corresponding question data, so as to learn how to combine knowledge points with materials to generate appropriate questions.

[0112] It is understandable that during the training process of the question generation model, after multi-task training on the student model in the question generation model to be trained according to the target dataset, initial questions are generated based on the trained student model, and then multi-task training is performed on the student model in the question generation model to be trained according to the target dataset and the initial questions. It can be seen from this that the model training process in this embodiment is divided into two stages: the first stage is the initial multi-task training stage, and the second stage is the multi-task learning stage based on the teacher-student model. Different optimization strategies are adopted in each stage to improve the ability to generate questions.

[0113] In the first stage, such as Figure 4As shown, in this embodiment, after designing a suitable prompt template, multi-task training is performed using a target data set. Among them, the first stage includes two main tasks:

[0114] Task 1: Using the knowledge points and background materials in the target data set as the input of the student model, training the process of the student model to generate prediction questions; that is, generating prediction questions based on the knowledge points and background materials;

[0115] Task 2: Using the knowledge points and background materials in the target data set as the input of the student model, training the process of the student model to generate prediction questions and prediction analyses.

[0116] In the two tasks of the first stage, the predicted output of the question generation model is compared with the target output respectively, and the cross-entropy loss is calculated. The cross-entropy loss is used to measure the gap between the predicted output and the target output. For each task, the cross-entropy loss function can be expressed as:

[0117] loss i =-∑ j p j log(q j );

[0118] In the formula, Ioss i is the cross-entropy loss of task i, p j is the target distribution (the probability of the true output), q j is the probability distribution of the model's predicted output, and j is the index of each category or vocabulary of the output.

[0119] For Task 1 and Task 2, their losses loss1 and loss2 are calculated respectively. As can be seen from the following formula, these two losses will be weighted according to a weight coefficient α to obtain the total loss loss, thereby optimizing the parameters of the question generation model:

[0120] loss=α×loss1+(1-α)×loss2;

[0121] In the formula, α is a hyperparameter used to adjust the relative importance of Task 1 and Task 2.

[0122] In this embodiment, by minimizing the total loss loss, the parameters of the model can be updated to make it perform more accurately in both tasks, thereby improving the generation quality of the model.

[0123] In the embodiment of this application, after completing the initial training process of the question generation model, as Figure 5As shown in the figure. The question generation model is retrained in combination with the initial training results, that is, it enters the improvement stage based on the teacher-student model. First, the student model obtained from the first stage of training is used to generate preliminary question texts. Since the questions generated by the student model at this time may still have problems such as being imperfect or lacking context relevance. To improve these problems, the teacher model in this embodiment will optimize the questions generated by the student model and output questions and solutions that better meet the requirements.

[0124] Specifically, the teacher model uses the questions and solutions of the student model as input and generates improved questions and solutions through further optimization. The improved questions and solutions returned by the teacher model will be used as the training data for the student model. In this stage, the student model continues to perform multi-task learning and accepts the optimized results of the teacher model to further improve its performance.

[0125] It can be understood that there are still two sub-tasks in the second stage:

[0126] Task 1: Generate questions based on knowledge points and background materials;

[0127] Task 2: Generate predicted questions and predicted analyses based on knowledge points, background materials, and questions.

[0128] In the second stage, the question generation is also calculated using cross-entropy loss. For Task 1 and Task 2, the corresponding losses loss1 and loss2 are calculated, and the total loss is calculated according to the following formula based on the weighting coefficient α:

[0129] loss = α × loss1 + (1 - α) × loss2;

[0130] In this embodiment, the teacher model guides the student model to achieve knowledge distillation. In this black-box distillation method, the teacher model generates hard labels, and these labels are used as the supervision signals for the student model. The goal of the student model is to make its output as aligned as possible with the output of the teacher model. Thus, through this direct label alignment, the quality and innovation of the student model in generating questions are improved. In this way, the student model can gradually improve its ability to generate questions under the guidance of the teacher model, effectively reduce the model size, and at the same time maintain good performance.

[0131] At the same time, this embodiment also introduces the idea of step-by-step distillation to further improve the ability of the student model. The student model not only needs to generate questions but also needs to output the reasons (i.e., solutions) for generating the questions. Through this multi-task learning method, the student model can learn the reasoning and logic in the generation process while generating questions, further improving its generation quality. Specifically, as Figure 6As shown, loss calculation is performed between the questions and solutions generated by the student model and those generated by the teacher model, prompting the student model to follow the reasoning process of the teacher model when generating questions and improving the generation ability through this feedback mechanism. Through this multi-task training method, the student model can not only effectively imitate the output of the teacher model but also accumulate more knowledge in the task of generating reasons, thereby optimizing the effect and innovation of question generation.

[0132] Finally, after two stages of training in this embodiment, the generated target question generation model can generate diverse and highly innovative questions based on knowledge points and materials, and effectively combine background materials with question requirements. Through multi-task learning and knowledge distillation, the target question generation model can achieve more efficient question generation while maintaining a low computational cost.

[0133] Through the above content, the method of the embodiment of the present application has the following beneficial effects:

[0134] First, this embodiment can improve the innovation and diversity of question generation. Specifically, by combining knowledge points with materials to generate questions, this embodiment can generate more innovative and practical questions according to different knowledge backgrounds, material contents, and learning objectives, rather than being limited to simple knowledge point coverage. This can meet the needs of students at different learning levels.

[0135] Second, this embodiment can reduce manual intervention and improve the degree of automation. Specifically, this embodiment can automatically generate questions and solutions, reducing the workload of manually designing questions, saving the time of question setters, and reducing labor costs.

[0136] Third, this embodiment improves the model effect and personalized training of the model. Specifically, through multi-task learning and collaborative training of the teacher-student model, personalized question generation based on the student's knowledge mastery can be achieved, effectively improving the learning effect. The teacher model guides the student model based on the questions generated by the student model to help the student model improve its question-setting ability and understanding ability.

[0137] Fourth, this embodiment can optimize the computational efficiency. Specifically, this embodiment uses knowledge distillation technology, enabling the student model to significantly reduce the consumption of computing resources while maintaining high accuracy. The student model obtains knowledge from the teacher model, improving learning efficiency and generation effect, and having good computational performance.

[0138] Fifth, this embodiment has strong scalability. Specifically, this embodiment is not limited to question generation but can also be extended to other text generation fields, having strong flexibility and transferability, and can adjust the application scenario according to different needs.

[0139] Refer toFigure 7 , an embodiment of the present application further provides a proposition device based on a curriculum knowledge graph and knowledge distillation. The device includes:

[0140] A first module 610, configured to construct a curriculum knowledge graph, where the curriculum knowledge graph includes knowledge points and knowledge point labels;

[0141] A second module 620, configured to construct a target data set according to the knowledge point labels in the curriculum knowledge graph. The target data set includes multiple elements, and the multiple elements include background materials, question labels, question types, questions to be applied, answers, and analyses to be applied;

[0142] A third module 630, configured to perform multi-stage training on a to-be-trained question generation model through the target data set by using the knowledge distillation method to obtain a target question generation model;

[0143] A fourth module 640, configured to perform a proposition operation based on the target question generation model.

[0144] It can be understood that the content in the above method embodiments is applicable to the device embodiments of the present application. The functions specifically implemented by the device embodiments of the present application are the same as those in the above method embodiments, and the beneficial effects achieved are also the same as those in the above method embodiments.

[0145] An embodiment of the present application further provides a computer device. The computer device includes a memory and a processor. The memory stores a computer program, and when the processor executes the computer program, the above method is implemented. The computer device can be any intelligent terminal including a tablet computer, an in-vehicle computer, etc.

[0146] It can be understood that the content in the above method embodiments is applicable to the device embodiments of the present application. The functions specifically implemented by the device embodiments of the present application are the same as those in the above method embodiments, and the beneficial effects achieved are also the same as those in the above method embodiments.

[0147] Please refer to Figure 8 , Figure 8 , which schematically shows the hardware structure of a computer device according to another embodiment. The computer device includes:

[0148] A processor 710, which can be implemented by using a general-purpose CPU (Central Processing Unit), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits, etc., and is configured to execute relevant programs to implement the technical solutions provided by the embodiments of the present application;

[0149] The memory 720 can be implemented in the form of a read-only memory (ROM), a static storage device, a dynamic storage device, or a random access memory (RAM), etc. The memory 720 can store an operating system and other application programs. When implementing the technical solutions provided in the embodiments of this specification through software or firmware, the relevant program codes are stored in the memory 720, and the processor 710 is used to call and execute the above methods of the embodiments of this application;

[0150] The input / output interface 730 is used to implement information input and output;

[0151] The communication interface 740 is used to implement communication and interaction between this device and other devices. Communication can be achieved through wired means (such as USB, network cable, etc.) or through wireless means (such as mobile network, WIFI, Bluetooth, etc.);

[0152] The bus 750 transmits information between various components of the device (such as the processor 710, the memory 720, the input / output interface 730, and the communication interface 740);

[0153] Among them, the processor 710, the memory 720, the input / output interface 730, and the communication interface 740 are communicatively connected to each other inside the device through the bus 750.

[0154] The embodiments of this application also provide a computer-readable storage medium. The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the above methods are implemented.

[0155] It can be understood that the content in the above method embodiments is applicable to the embodiments of this storage medium. The functions specifically implemented by the embodiments of this storage medium are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those of the above method embodiments.

[0156] As a non-transitory computer-readable storage medium, the memory can be used to store non-transitory software programs and non-transitory computer-executable programs. In addition, the memory can include high-speed random access memory, and can also include non-transitory memory, such as at least one magnetic disk storage device, a flash memory device, or other non-transitory solid-state storage devices. In some embodiments, the memory may optionally include a memory remotely disposed relative to the processor, and these remote memories can be connected to the processor through a network. Examples of the above networks include, but are not limited to, the Internet, an enterprise intranet, a local area network, a mobile communication network, and combinations thereof.

[0157] The embodiments described in the embodiments of the present application are to more clearly illustrate the technical solutions of the embodiments of the present application, and do not constitute a limitation on the technical solutions provided by the embodiments of the present application. Those skilled in the art will know that with the evolution of technology and the emergence of new application scenarios, the technical solutions provided by the embodiments of the present application are equally applicable to similar technical problems.

[0158] Those skilled in the art can understand that the technical solutions shown in the figures do not constitute a limitation on the embodiments of the present application, and may include more or fewer steps than those shown, or combine certain steps, or different steps.

[0159] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separated, that is, they may be located in one place, or may be distributed to multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0160] Those of ordinary skill in the art can understand that all or some of the steps in the methods disclosed above, and the functional modules / units in the systems and devices, can be implemented as software, firmware, hardware, and their appropriate combinations.

[0161] The terms "first", "second", "third", "fourth", etc. (if any) in the specification of the present application and the above-mentioned drawings are used to distinguish similar objects, and do not necessarily need to be used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged under appropriate circumstances, so that the embodiments of the present application described here can be implemented in an order other than those illustrated or described here. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or device that includes a series of steps or units does not necessarily have to be limited to those steps or units clearly listed, but may include other steps or units not clearly listed or inherent to these processes, methods, products, or devices.

[0162] It should be understood that in this application, "at least one (item)" means one or more, and "a plurality" means two or more. "And / or" is used to describe the association relationship of associated objects and indicates that there can be three relationships. For example, "A and / or B" can mean: only A exists, only B exists, and both A and B exist at the same time. Among them, A and B can be singular or plural. The character " / " generally represents an "or" relationship between the associated objects before and after. "At least one (item) of the following" or its similar expressions refer to any combination of these items, including any combination of single items (items) or plural items (items). For example, at least one (item) of a, b, or c can mean: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, and c can be single or multiple.

[0163] In several embodiments provided in this application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the above-mentioned unit division is only a logical function division, and there can be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the displayed or discussed coupling, direct coupling, or communication connection to each other can be through some interfaces. The indirect coupling or communication connection of devices or units can be in electrical, mechanical, or other forms.

[0164] The units described above as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they can be located in one place, or distributed to multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0165] In addition, each functional unit in various embodiments of this application can be integrated in a processing unit, or each unit can exist physically alone, or two or more units can be integrated in one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of a software functional unit.

[0166] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes multiple instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods of the various embodiments of the present application. The foregoing storage medium includes: various media that can store programs, such as USB flash drives, mobile hard disks, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical discs.

[0167] The preferred embodiments of the embodiments of the present application have been described above with reference to the accompanying drawings. However, this does not limit the scope of the rights of the embodiments of the present application. Any modifications, equivalent replacements, and improvements made by those skilled in the art without departing from the scope and essence of the embodiments of the present application shall fall within the scope of the rights of the embodiments of the present application.

Claims

1. A proposition method based on course knowledge graph and knowledge distillation, characterized in that: The method comprises the following steps: Constructing a course knowledge graph, wherein the course knowledge graph includes knowledge points and knowledge point labels; Construct a target data set according to the knowledge point labels in the course knowledge graph, wherein the target data set includes multiple elements, and the multiple elements include background materials, question labels, question types, questions to be applied, answers, and analysis to be applied; Using the target data set, a knowledge distillation method is used to perform multi-stage training on the training problem generation model to obtain a target problem generation model; Proposition operation is performed based on the target question generation model.

2. The method according to claim 1, characterized in that: The construction of the course knowledge graph includes: Extract the knowledge points and knowledge point labels of the target course; Perform knowledge fusion on the extraction results to obtain knowledge fusion results; Calculating the importance of knowledge according to the knowledge fusion result to obtain a calculation result of the importance of knowledge; According to the knowledge importance calculation result and the knowledge fusion result, a course knowledge graph corresponding to the knowledge points and knowledge point labels stored in a preset database is generated.

3. The method according to claim 2, characterized in that The extracting result is subjected to knowledge fusion to obtain a knowledge fusion result, including: Calculating a first similarity of the knowledge point labels in the knowledge extraction result; According to the first similarity, the knowledge point labels are merged to obtain a knowledge point label fusion result; Calculating a second similarity of the knowledge points in the knowledge extraction result; The knowledge points are fused according to the second similarity to obtain a knowledge point fusion result.

4. The method according to claim 1, characterized in that: The step of constructing a target data set according to the knowledge point labels in the course knowledge graph includes: Separate the background materials and the problems to be applied in the problem data set to obtain a problem library; Generate question tags through a large language model based on the course knowledge graph; A label-knowledge mapping library is constructed according to the question label, wherein the target data set includes the question library and the label-knowledge mapping library.

5. The method according to claim 4, characterized in that The background material and the problems to be applied in the problem data set are separated to obtain a problem library, including: Preliminarily separating the question data set to obtain a question and background material set, an answer set, and a resolution set; The problem library is obtained by separating the problem to be applied and the background materials in the problem and background material set through a large language model.

6. The method according to claim 1, characterized in that The target data set is used to perform multi-stage training on the training problem generation model using the knowledge distillation method, including: Performing multi-task training on the student model in the to-be-trained problem generation model according to the target data set; Generate initial questions based on the trained student model; The student model in the to-be-trained problem generation model is subjected to multi-task training according to the target data set and the initial problem.

7. The method according to claim 6, characterized in that The performing multi-task training on the student model in the problem generation model to be trained according to the target data set includes: The process of training the student model to generate prediction questions using the knowledge points and background materials in the target data set as inputs to the student model; The process of using the knowledge points and background materials in the target data set as input to the student model and training the student model to generate prediction questions and prediction analysis.

8. A proposition device based on course knowledge graph and knowledge distillation, characterized in that: The device comprises: The first module is used to construct a course knowledge graph, which includes knowledge points and knowledge point labels; The second module is used to construct a target data set according to the knowledge point labels in the course knowledge graph, wherein the target data set includes multiple elements, and the multiple elements include background materials, question labels, question types, questions to be applied, answers, and analysis to be applied; The third module is used to perform multi-stage training on the to-be-trained problem generation model using the target data set and the knowledge distillation method to obtain a target problem generation model; The fourth module is used to perform proposition operations based on the target problem generation model.

9. A computer device, characterized in that: include: at least one processor; at least one memory for storing at least one program; When the at least one program is executed by the at least one processor, the at least one processor implements the method according to any one of claims 1 to 7.

10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.

Citation Information

Patent Citations

  • Pre-training model method for mathematical problem classification

    CN111563166A

  • Large-model reliable medical knowledge injection method and device based on knowledge graph

    CN118194996A

  • Data asset identification and risk early warning system and method based on financial knowledge graph and large language model

    CN118247057A

  • Method and apparatus for generating common-sense after-class exercise in low-resource scenario

    WO2024197740A1

Cited By

  • Deep learning model-based training content generation method and system, and storage medium

    CN121501983A