Proposition method and device based on course knowledge graph and knowledge distillation and medium
By constructing a course knowledge graph and using the knowledge distillation method to conduct multi-stage training of the question generation model, the problems of high time consumption and high computing resources in the question setting process were solved, and efficient and diversified automated question setting was achieved.
Patent Information
- Application Number
- CN202510123260.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-26
- Publication Date
- 2025-10-10
- Estimated Expiration
- 2045-01-26
AI Technical Summary
In the existing technology, the proposition process relies on manual writing, which consumes a lot of time. In addition, the questions generated by large language models are relatively simple and require high computing resources, which increases the difficulty of application.
By constructing a course knowledge graph and combining it with the knowledge distillation method to conduct multi-stage training on the question generation model, a target question generation model is generated for proposition operations.
It improves the efficiency and diversity of question generation, reduces the consumption of computing resources, and realizes the efficiency and diversity of the automated generation process.
Smart Images

Figure CN120196761B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of information processing technology, and in particular to a proposition method, device and medium based on course knowledge graph and knowledge distillation. Background Art
[0002] In related technologies, most subject questions are manually written by question setters. This manual approach requires teachers to consider the question's alignment with knowledge, its innovation and rationality, as well as the students' abilities and development, which results in a significant time investment. While existing technologies incorporate large language models to automatically generate questions, the questions currently generated by these models are relatively simple and require high computing resources, increasing their application difficulty.
[0003] In summary, the technical problems existing in the relevant technologies 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 course knowledge graph and knowledge distillation, which can effectively improve the efficiency of question generation, the diversity of generated questions and reduce the computing resources of the automatic generation process.
[0005] To achieve the above objectives, one aspect of an embodiment of the present application proposes a proposition method based on a course knowledge graph and knowledge distillation, the method comprising the following steps:
[0006] Constructing a course knowledge graph, wherein the course knowledge graph includes knowledge points and knowledge point labels;
[0007] Constructing a target data set according to the knowledge point labels in the course knowledge graph, wherein the target data set includes multiple elements, including background materials, question labels, question types, questions to be applied, answers, and solutions to be applied;
[0008] 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;
[0009] Proposition operation is performed based on the target question generation model.
[0010] In some embodiments, constructing a course knowledge graph includes:
[0011] Extract the knowledge points and knowledge point labels of the target course;
[0012] Perform knowledge fusion on the extraction results to obtain knowledge fusion results;
[0013] performing knowledge importance calculation according to the knowledge fusion result to obtain a knowledge importance calculation result;
[0014] 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.
[0015] In some embodiments, performing knowledge fusion on the extraction results to obtain a knowledge fusion result includes:
[0016] Calculating a first similarity of the knowledge point labels in the knowledge extraction result;
[0017] fusing the knowledge point labels according to the first similarity to obtain a knowledge point label fusion result;
[0018] Calculating a second similarity of the knowledge points in the knowledge extraction result;
[0019] The knowledge points are fused according to the second similarity to obtain a knowledge point fusion result.
[0020] In some embodiments, constructing a target dataset based on knowledge point labels in the course knowledge graph includes:
[0021] Separate the background materials and the problems to be applied in the problem dataset to obtain a problem library;
[0022] Generate question tags based on the course knowledge graph using a large language model;
[0023] 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.
[0024] In some embodiments, separating the background material and the application questions in the question dataset to obtain a question library includes:
[0025] Preliminarily separating the question data set to obtain a question and background material set, an answer set, and a resolution set;
[0026] The problem library is obtained by separating the problem and the background materials in the background material set through a large language model.
[0027] In some embodiments, the target dataset is used to perform multi-stage training on the training problem generation model using a knowledge distillation method, including:
[0028] Performing multi-task training on the student model in the to-be-trained problem generation model according to the target data set;
[0029] generating an initial question based on the trained student model;
[0030] training a student model in the question generation model to be trained based on the target dataset and the initial question.
[0031] In some embodiments, the training of the student model in the question generation model to be trained based on the target dataset comprises:
[0032] a process of training the student model to generate a predicted question by taking the knowledge points and background materials in the target dataset as inputs of the student model;
[0033] a process of training the student model to generate a predicted question and a predicted solution by taking the knowledge points and background materials in the target dataset as inputs of the student model.
[0034] To achieve the above object, another aspect of the embodiments of the present application proposes a proposition device based on course knowledge graph and knowledge distillation, which comprises:
[0035] A first module is configured to construct a course knowledge graph, wherein the course knowledge graph comprises knowledge points and knowledge point labels;
[0036] A second module is configured to construct a target dataset based on the knowledge point labels in the course knowledge graph, wherein the target dataset comprises a plurality of elements, and the plurality of elements comprise background materials, question labels, question types, questions to be applied, answers, and solutions to be applied;
[0037] A third module is configured to train a question generation model to be trained by using a knowledge distillation method based on the target dataset, so as to obtain a target question generation model;
[0038] A fourth module is configured to perform a proposition operation 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, which comprises:
[0040] at least one processor;
[0041] at least one memory configured to store 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, another aspect of the embodiment of the present application provides a computer readable storage medium, which stores a computer program, and the computer program is executed by a processor to implement the above method.
[0044] The embodiment of the present application at least has the following beneficial effects: the present application provides a proposition method and device based on course knowledge graph and knowledge distillation and medium, after constructing a course knowledge graph including knowledge points and knowledge point labels, the target data set including background materials, problem labels, problem types, to-be-applied problems, answers and to-be-applied analysis is constructed according to the knowledge point labels in the course knowledge graph, then the target data set is used to train the to-be-trained problem generation model in multiple stages by using the knowledge distillation method to obtain the target problem generation model, so that when the proposition operation is performed based on the target problem generation model, the problem generation efficiency can be effectively improved, the diversity of the generated problems can be improved, and the calculation resources in the automatic generation process can be reduced. BRIEF DESCRIPTION OF DRAWINGS
[0045] Figure 1 is a flowchart of the proposition method based on the course knowledge graph and the 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 construction schematic diagram of the target data set provided by the embodiment of the present application;
[0048] Figure 4 is an initial training schematic diagram of the problem generation model provided by the embodiment of the present application;
[0049] Figure 5 is a retraining schematic diagram of the problem generation model provided by the embodiment of the present application;
[0050] Figure 6 is a schematic diagram of calculating loss between the student model and the teacher model provided by the embodiment of the present application;
[0051] Figure 7 is a structural schematic diagram of the proposition device based on the course knowledge graph and the knowledge distillation provided by the embodiment of the present application;
[0052] Figure 8 is a hardware structure schematic diagram of the computer device provided by the embodiment of the present application. DETAILED DESCRIPTION
[0053] In order to make the purposes, technical solutions and advantages of the present application clearer, further detailed description will be made to the present application in combination with the accompanying drawings and examples. It should be understood that the specific examples described herein are only used to explain the present application, and are not used to limit the present application. When the following description relates to the accompanying drawings, the same numerals in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary examples do not represent all implementations consistent with the embodiments of the present application, and they are only examples of devices and methods consistent with some aspects of the embodiments of the present application.
[0054] It can be understood that the terms "first", "second" and the like used in the present application can be used herein to describe various concepts, but unless specifically stated, these concepts are not limited by these terms. These terms are only used to distinguish one concept from another concept. For example, without departing from the scope of the embodiments of the present application, the first information can also be referred to as the second information, and similarly, the second information can also be referred to as the first information. Depending on the context, the word "if" as used herein can be interpreted as "when" or "when" or "in response to determining".
[0055] The terms "at least one", "multiple", "each", "any" and the like used in the present application include one, two or more than two, multiple includes two or more than two, each refers to each of the corresponding multiple, and any refers to any one of the multiple.
[0056] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as understood by a person skilled in the art to which the present application belongs. The terms used herein are only for the purpose of describing the embodiments of the present application, and are not intended to limit the present application.
[0057] In the related art, most of the subject problems are artificially written by proposers. In the process of selecting topics, teachers need to consider the compatibility of problems and knowledge, the innovation and rationality of problems, the ability level of students, and the training of students, so that teachers need to spend a lot of time in selecting topics. Although the existing technology can automatically generate problems in combination with large language models, the problems generated by the current large language model are relatively single and the computing resources required by the large model are high, which increases the application difficulty.
[0058] Therefore, the application provides a proposition method and device based on course knowledge graph and knowledge distillation and a medium. After a course knowledge graph including knowledge points and knowledge point labels is constructed, the application constructs a target data set including background materials, problem labels, problem types, to-be-applied problems, answers, and to-be-applied analyses according to the knowledge point labels in the course knowledge graph. Then, the target data set is used to perform multi-stage training on a to-be-trained problem generation model by using a knowledge distillation method to obtain a target problem generation model. As a result, when the target problem generation model is used for proposition operation, the problem generation efficiency can be effectively improved, the diversity of generated problems can be improved, and the computing resources in the automatic generation process can be reduced.
[0059] The proposition method based on the course knowledge graph and the knowledge distillation provided in the embodiments of the application relates to the technical field of information processing. The proposition method based on the course knowledge graph and the knowledge distillation provided in the embodiments of the application can be applied to a terminal, can be applied to a server, and can also be software running in the terminal or the server. In some embodiments, the terminal can be a smart phone, a tablet computer, a notebook computer, a desktop computer, a smart speaker, a smart watch, a vehicle-mounted terminal, and the like, but is not limited thereto. The server end can be configured as a stand-alone physical server, can be configured as a server cluster or a distributed system formed by multiple physical servers, can 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 communication, middleware services, domain name services, security services, CDNs, and big data and artificial intelligence platforms, and the server can also be a node server in a blockchain network. The software can be an application that implements the proposition method based on the course knowledge graph and the knowledge distillation, and the like, but is not limited to the above forms.
[0060] The application can be used in many general or special computer system environments or configurations. For example: personal computers, server computers, handheld devices or portable devices, tablet devices, multi-processor systems, microprocessor-based systems, set-top boxes, programmable consumer electronics, network PCs, minicomputers, mainframe computers, distributed computing environments including any of the above systems or devices, and the like. The 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, and the like that perform specific tasks or implement specific abstract data types. The application can also be practiced in a distributed computing environment in which tasks are performed by remote processing devices connected by 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 embodiments of the application will be described in detail below with reference to the accompanying drawings:
[0062] Figure 1 This is an optional flowchart of the proposition method based on course knowledge graph and knowledge distillation provided in the embodiment of the present application. Figure 1 The method may include but is not limited to steps S101 to S106.
[0063] Step S110: Construct a course knowledge graph, wherein the course knowledge graph includes knowledge points and knowledge point labels;
[0064] Step S120: construct a target data set based on the knowledge point labels in the course knowledge graph, wherein the target data set includes multiple elements, including background materials, question labels, question types, questions to be applied, answers, and solutions to be applied;
[0065] Step S130: Using the target dataset, the knowledge distillation method is used to perform multi-stage training on the training problem generation model to obtain the target problem generation model;
[0066] Step S140: Perform proposition operation based on the target question generation model.
[0067] It is understandable that the core idea of the target question generation model of this embodiment is to combine knowledge points and materials and generate questions through reasonable integration. Specifically, this embodiment can regard the question as an organic combination of knowledge points and materials, thereby generating questions that not only meet the knowledge requirements but also can be integrated into the background of the materials. In which, the question is set to y, where the input of knowledge points and materials are represented by x respectively. 知识点 and x 材料 , then the question generation process can be expressed as the following formula:
[0068] y=f(x 知识点 ,x 材料 );
[0069] In the formula, f is a model representing the question generation function, which generates corresponding questions through a comprehensive understanding of knowledge points and materials.
[0070] Based on the above description, this embodiment first constructs a course knowledge graph. Specifically, the construction process of the course knowledge graph may include but is not limited to the following steps:
[0071] Step S210: extracting knowledge points and knowledge point labels of the target course;
[0072] Step S220: performing knowledge fusion on the extraction results to obtain a knowledge fusion result;
[0073] Step S230: Calculate the knowledge importance based on the knowledge fusion result to obtain a knowledge importance calculation result;
[0074] Step S240, according to the knowledge importance calculation result and the knowledge fusion result, generating a course knowledge graph corresponding to the knowledge point and the knowledge point label stored in the preset database.
[0075] It can be understood that in the knowledge extraction stage, the embodiment uses natural language processing (NLP) technology to extract knowledge point labels and knowledge points from the text of the target course. Specifically, the embodiment identifies knowledge point labels and specific knowledge points in the text by performing named entity recognition (NER) through spaCy. Among them, suppose the extracted label set is T = {t1, t2,..., t n}, and the knowledge point set is P = {p1, p2,..., P m}. Then in the extraction process, the similarity between the knowledge point label and the knowledge point is calculated to measure the preliminary correspondence between the knowledge point and the knowledge point label. In the embodiment, the following Cosine Similarity formula is used to measure the relationship between the knowledge point and the label in the text:
[0076]
[0077] In the formula, v p and v t represent the knowledge point vector and the knowledge point label vector respectively; v p · v t represents the dot product; ||v p || and ||v t || represent the norm of the vector.
[0078] By calculating the cosine similarity, the embodiment can help identify the correlation between the labels and knowledge points in the text and construct a preliminary mapping of knowledge points and labels.
[0079] It can be understood that in the knowledge fusion process, after calculating the first similarity of the knowledge point label in the knowledge extraction result, the embodiment fuses the knowledge point label according to the first similarity to obtain the knowledge point label fusion result; at the same time, after calculating the second similarity of the knowledge point in the knowledge extraction result, the knowledge point is fused according to the second similarity to obtain the knowledge point fusion result. Illustratively, the embodiment can use Cosine Similarity to calculate the similarity of the knowledge point label and the knowledge point to realize the merging of similar or repeated items in different data sources. Suppose the similarity calculation between knowledge point label t1 and knowledge point label t2 is as follows:
[0080]
[0081] When the calculated first similarity value is higher than a certain set threshold θ, the two labels are considered as the same label and merged. Similarly, for knowledge points p1 and p2, the similarity calculation is the same as the label calculation formula. If they belong to the same label and the similarity is high, it is considered that the two knowledge points are different expressions of the same knowledge point, and merging processing is performed.
[0082] The fused data of the embodiment guarantees the consistency and integrity of the course knowledge graph, and can eliminate repeated labels and knowledge points to improve the quality of the course knowledge graph.
[0083] Specifically, after obtaining the knowledge fusion result, the importance of the knowledge points can be calculated by the PageRank algorithm to determine which knowledge points are more critical to the learners. The PageRank value PR(v) is calculated by the following formula:
[0084]
[0085] In the formula, v is a node, M(v) is all nodes pointing to node v, N(u) is the neighbor node of node u, and d is a damping coefficient, usually taking a value of 0.85.
[0086] After determining the most important knowledge points in the graph by the PageRank calculation of the embodiment, the course knowledge graph corresponding to the knowledge points and knowledge point labels stored in the preset database is generated in combination with the knowledge fusion structure. The preset database of the embodiment can use a Neo4j graph database for storage and management. Specifically, the Neo4j graph database can efficiently store complex relationships between nodes and edges, and the nodes represent knowledge point labels and knowledge points, and the edges represent the relationships therebetween. Each node stores attribute information including label name, knowledge point description, etc., and each edge represents the correlation between labels or the subordinate relationship between labels and knowledge points. In order to speed up the query, the embodiment can also use the index function in Neo4j. When querying, the graph database is retrieved by the Cypher query language. Through Neo4j, complex query operations can be efficiently performed, greatly improving the access efficiency of the course knowledge graph.
[0087] It can be understood that, Figure 2 The course knowledge graph shown includes entities and relationships, and the entities include knowledge point labels and knowledge points. The knowledge point labels represent the main modules or themes of the course, and the knowledge points are specific learning content. The correlation between the knowledge point labels and the subordinate relationship between the labels and the knowledge points constitute the core content of the course knowledge graph. Specifically, assuming that the correlation between the knowledge point labels is R t,t′ where t and t' are two knowledge point labels, R t,t′is the correlation between label t and label t′. The subordinate 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 use the RDF (Resource Description Framework) standard to construct a course knowledge graph. The course knowledge graph includes multiple triples (subject, predicate, object), namely (label, relationship, knowledge point). The relationship between labels and knowledge points can be clearly expressed in the form of triples.
[0088] In this embodiment of the present application, in order to effectively train the model, this embodiment constructs a data set containing multiple question elements. Each question element includes material, label, question type, question, answer and analysis. Specifically, a question element set s is defined as follows:
[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] The set of all topic elements constitutes the overall target dataset S. The target task of the target dataset is as follows:
[0092] q = LLM(t, c);
[0093] The above formula represents the generation of the corresponding question q based on the label t and the material c through the large language model (LLM).
[0094] It is understandable that based on Figure 3 As shown in the processing flow, the process of constructing the above target dataset 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 library;
[0096] Step S320: Generate question tags based on the course knowledge graph using a large language model;
[0097] Step S330: Construct a label-knowledge mapping library based on the question label, wherein the target data set includes the question library and the label-knowledge mapping library.
[0098] In the embodiment of the present application, the questions in the obtained question data set are often mixed with the background materials, therefore, the embodiment separates the questions so as to extract the questions q and the background materials c. Specifically, after the question data set is preliminarily separated to obtain the question and background material set, the answer set and the analysis set, the large language model is used to separate the to-be-applied questions and the background materials in the question and background material set to obtain the question library.
[0099] It can be understood that, since the existing question data set often lacks labels for difficult questions, the embodiment generates question labels automatically by combining the course knowledge graph and using the large language model. Specifically, after the appropriate prompt words are written, the question and answer process (q and a) is combined with the analysis (e) to generate the corresponding question label. The process of generating the question label can be performed by the following formula:
[0100] t = LLM(q, a, e, CKG);
[0101] In the formula, q is the question, a is the answer, e is the analysis, CKG is the label system of the course knowledge graph, and t is the question label generated by the large language model.
[0102] The generation of the question label in the embodiment helps to improve the understanding and accuracy of the target question generation model for the knowledge points of the questions, so as to better generate questions that meet the requirements.
[0103] After obtaining the question label, the embodiment enriches and expands the question label. Specifically, the embodiment uses the course knowledge graph to obtain the knowledge points. The process of obtaining the knowledge points is as follows:
[0104] k = KG(t);
[0105] In the formula, KG is the course knowledge graph.
[0106] Next, a label-knowledge mapping library lib is constructed. The mapping-knowledge mapping library maps the label t and its corresponding knowledge points or content, so as to provide more context information to assist the question generation. Specifically, the label mapping process is as follows:
[0107] k = lib(t);
[0108] The label-knowledge mapping library after expansion in the embodiment enables the target question generation model to obtain more rich knowledge background, which helps it to better understand the combination relationship between the knowledge points and the materials, so as to generate more accurate and innovative questions.
[0109] It is understandable that after obtaining the target data set, this embodiment trains the question generation model using the target data set. The question generation model of this embodiment can perform question generation tasks 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 handling complex text generation tasks. Specifically, the encoder part is responsible for encoding the input knowledge points and materials and extracting their potential representations; while the decoder part is responsible for generating the question text based on these potential representations.
[0110] In this embodiment, the core of the question generation model architecture is based on the Transformer model, including encoders and decoders, and these structures are used to model different NLP tasks. The input of the question generation model is first encoded into tokens through a unified vocabulary, and the input form of all tasks is a text sequence. At the input end, the model appends the task information as a prefix to the input text. This method allows 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 contextual information, using a multi-head self-attention mechanism and a feedforward neural network. Through a multi-layer stacked structure, the encoder can learn the dependencies between the various parts of the input sequence.
[0111] The decoder structure can also adopt the Transformer decoder architecture, which not only processes the decoder's own self-attention, but also interacts with the encoder's output through a cross-attention layer, thereby better utilizing 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 of this embodiment is trained on a large number of knowledge points, materials and their corresponding question data 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 of the student model in the question generation model to be trained according to the target data set, the initial question is generated based on the trained student model, and then the student model in the question generation model to be trained according to the target data set and the initial question is multi-task trained. It can be seen that the model training process of 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, if Figure 4As shown, this embodiment designs a suitable prompt template and then performs multi-task training on the target dataset. The first stage includes two main tasks:
[0114] Task 1: The process of training the student model to generate prediction questions based on the knowledge points and background materials in the target dataset.
[0115] Task 2: Using the knowledge points and background materials in the target dataset as input for the student model, the student model is trained to generate prediction questions and prediction analysis.
[0116] In the first stage, the prediction output of the question generation model is compared with the target output in each of the two tasks, and the cross-entropy loss is calculated. The cross-entropy loss is used to measure the gap between the prediction 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 for 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, we calculate their losses loss1 and loss2 respectively. As shown in the following formula, these two losses are weighted by a weight coefficient α to obtain the total loss, thereby optimizing the parameters of the problem generation model:
[0120] loss=α×loss1+(1-α)×loss2;
[0121] In the formula, α is a hyperparameter used to adjust the relative importance of task one and task two.
[0122] This embodiment can update the parameters of the model by minimizing the total loss, making it perform more accurately in both tasks, thereby improving the generation quality of the model.
[0123] In the embodiment of the present application, after completing the initial training process of the question generation model, as shown in FIG. Figure 5As shown in the figure, the question generation model is retrained based on the initial training results, entering the improvement phase based on the teacher-student model. First, the student model trained in the first phase generates preliminary question text. Since the questions generated by the student model at this stage may still be incomplete or lack contextual relevance, to address these issues, the teacher model in this embodiment optimizes the questions generated by the student model, outputting questions and solutions that better meet the requirements.
[0124] Specifically, the teacher model uses the student model's questions and solutions as input and further optimizes them. The improved questions and solutions returned by the teacher model serve as training data for the student model. During this phase, the student model continues multi-task learning and receives the optimized results from the teacher model to further improve its performance.
[0125] Understandably, there are still two subtasks in the second phase:
[0126] Task 1: Generate questions based on knowledge points and background materials;
[0127] Task 2: Generate prediction questions and prediction analysis based on knowledge points, background materials and questions.
[0128] In the second stage, question generation is also calculated using cross entropy loss. For tasks 1 and 2, the corresponding losses loss1 and loss2 are calculated, and the total loss is calculated using the following formula based on the weighting coefficient α:
[0129] loss=α×loss1+(1-α)×loss2;
[0130] This embodiment implements knowledge distillation by guiding the student model through the teacher model. In this black-box distillation method, the teacher model generates hard labels, which are used as supervisory signals for the student model. The goal of the student model is to align its output with the output of the teacher model as much as possible, thereby improving the quality and innovation of the student model when generating questions through this direct label alignment. In this way, the student model can gradually improve its ability to generate questions under the guidance of the teacher model and effectively reduce the model size while maintaining good performance.
[0131] At the same time, this embodiment also introduces the idea of gradual distillation to further enhance the capabilities of the student model. The student model not only needs to generate questions, but also needs to output the reasons for generating the questions (i.e., the solutions). Through this multi-task learning method, the student model can learn the reasoning and logic of the generation process while generating questions, further improving its generation quality. Specifically, Figure 6As shown, the loss calculation is performed between the question and solution generated by the student model and the question and solution 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 not only effectively imitates the output of the teacher model, but also accumulates more knowledge on the task of generating reasons, thereby optimizing the effect and innovation of question generation.
[0132] Finally, after two stages of training, the target question generation model generated in this embodiment can generate diversified and innovative questions according to knowledge points and materials, and effectively combine background materials and problem requirements. Through multi-task learning and knowledge distillation, the target question generation model can achieve more efficient question generation while maintaining 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, this embodiment can generate more innovative and practical questions according to different knowledge backgrounds, material content and learning goals by combining knowledge points and materials to generate questions, rather than just covering simple knowledge points. This can meet the needs of students at different learning levels and needs.
[0135] Second, this embodiment can reduce manual intervention and improve automation. Specifically, this embodiment can automatically generate questions and solutions, reducing the workload of manually designing questions, saving the time of the question designer and reducing labor costs.
[0136] Third, this embodiment improves model effectiveness and personalized training of the model. Specifically, this embodiment can achieve personalized question generation based on the student's knowledge mastery through multi-task learning and collaborative training of teacher-student models, effectively improving learning effectiveness. The teacher model guides the student model based on the questions generated by the student model to help the student model improve its question generation ability and understanding ability.
[0137] Fourth, this embodiment can optimize computational efficiency. Specifically, this embodiment uses knowledge distillation technology to enable the student model to significantly reduce the consumption of computing resources while maintaining high accuracy. The student model improves learning efficiency and generation effect by acquiring knowledge from the teacher model, and has good computational performance.
[0138] Fifth, this embodiment has strong scalability. Specifically, this embodiment is not limited to question generation, but can be extended to other text generation fields, and has good flexibility and portability. It can be adjusted according to different needs and application scenarios.
[0139] Refer toFigure 7 The embodiment of the present application also provides a proposition device based on a course knowledge graph and knowledge distillation.
[0140] The first module 610 is configured to construct a course knowledge graph, wherein the course knowledge graph comprises knowledge points and knowledge point labels.
[0141] The second module 620 is configured to construct a target data set according to the knowledge point labels in the course knowledge graph, wherein the target data set comprises a plurality of elements, and the plurality of elements comprise background materials, question labels, question types, to-be-applied questions, answers and to-be-applied analyses.
[0142] The third module 630 is configured to perform multi-stage training on a to-be-trained question generation model by using the target data set and the knowledge distillation method, to obtain a target question generation model.
[0143] The fourth module 640 is configured to perform 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 present device embodiment, the present device embodiment specifically implements the functions of the above method embodiments, and achieves the same beneficial effects as the above method embodiments.
[0145] The embodiment of the present application also provides a computer device, which comprises a memory and a processor, the memory stores a computer program, and the processor implements the above method when executing the computer program. The computer device can be any intelligent terminal, such as a tablet computer or a vehicle-mounted computer.
[0146] It can be understood that the content in the above method embodiments is applicable to the present device embodiment, the present device embodiment specifically implements the functions of the above method embodiments, and achieves the same beneficial effects as the above method embodiments.
[0147] Please refer to Figure 8 , Figure 8 The hardware structure of the computer device of another embodiment is illustrated, which comprises:
[0148] The processor 710 can be implemented in the form of a general-purpose CPU (Central Processing Unit, central processor), a microprocessor, an ASIC (Application Specific Integrated Circuit, application specific integrated circuit), or one or more integrated circuits, and is used to execute related 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, and when the technical solutions provided by the embodiments of the present specification are implemented by software or firmware, the related program codes are stored in the memory 720 and are called and executed by the processor 710 to perform the above-mentioned methods of the embodiments of the present application;
[0150] The input / output interface 730 is configured to realize information input and output.
[0151] The communication interface 740 is configured to realize the communication interaction between the device and other devices, and can realize the communication through a wired manner (for example, a USB, a network cable, etc.) or a wireless manner (for example, a mobile network, WIFI, Bluetooth, etc.).
[0152] The bus 750 is configured to transmit information between various components (for example, the processor 710, the memory 720, the input / output interface 730, and the communication interface 740) of the device.
[0153] The processor 710, the memory 720, the input / output interface 730, and the communication interface 740 are connected to each other through the bus 750 to realize the communication connection between the device.
[0154] The embodiments of the present application also provide a computer readable storage medium, which stores a computer program. The computer program is executed by a processor to implement the above-mentioned method.
[0155] It can be understood that the contents in the above-mentioned method embodiments are all applicable to the present storage medium embodiments. The functions specifically implemented by the present storage medium embodiments are the same as those of the above-mentioned method embodiments, and the beneficial effects achieved by the present storage medium embodiments are also the same as those achieved by the above-mentioned method embodiments.
[0156] The memory is a non-transitory computer readable storage medium, which can be used to store non-transitory software programs and non-transitory computer executable programs. In addition, the memory can include a high-speed random access memory, and can also include a non-transitory memory, such as at least one magnetic disk storage device, a flash memory device, or other non-transitory solid-state memory device. In some embodiments, the memory can optionally include a memory remotely arranged relative to the processor, and these remote memories can be connected to the processor through a network. Examples of the above-mentioned network include but are not limited to the Internet, an intranet, a local area network, a mobile communication network, and a combination thereof.
[0157] The embodiments described in the specification are for more clearly illustrating 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 can know that, with the evolution of technology and the appearance of new application scenarios, the technical solutions provided by the embodiments of the present application are also 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 can include more or fewer steps than shown in the figures, or combine certain steps, or different steps.
[0159] The device embodiments described above are only schematic, and the units described as separate components can or can not be physically separate, that is, can be located in one place, or can be distributed on multiple network units. Part or all of the modules can be selected according to actual needs to achieve the purpose of the embodiments of the present application.
[0160] Those skilled in the art can understand that all or some of the steps in the above disclosed method, the function modules / units in the system and the device can be implemented as software, firmware, hardware and their appropriate combinations.
[0161] The terms "first", "second", "third", "fourth" and the like (if any) in the specification and above-described drawings of the present application are used to distinguish similar objects, and do not necessarily have 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 herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "include" and "have" and any variations thereof are intended to cover non-exclusive inclusion, for example, a process, method, system, product or device including a series of steps or units does not have to be limited to those steps or units clearly listed, but can 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 "plurality" means two or more. "And / or" is used to describe the association relationship of associated objects, indicating that three relationships may exist. For example, "A and / or B" can mean: only A exists, only B exists, and A and B exist at the same time, where A and B can be singular or plural. The character " / " generally indicates that the previous and next associated objects are in an "or" relationship. "At least one of the following items" or similar expressions refers to any combination of these items, including any combination of single items or plural items. For example, at least one 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, c can be single or multiple.
[0163] In the 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 schematic. For example, the division of the above-mentioned units is only a logical function division. In actual implementation, there may be other division methods, such as 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 mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0164] The units described above as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0165] In addition, the functional units in the various embodiments of the present application may be integrated into a single processing unit, or each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.
[0166] The integrated unit, if implemented in the form of a software function unit and sold or used as an independent product, can be stored in a computer readable storage medium. Based on such understanding, the technical solutions of the present application, essentially or in other words, the part that contributes to the prior art or the whole or part of the technical solutions can be embodied in the form of a software product. The computer software product is stored in a storage medium, and includes multiple instructions for causing a computer device (which can 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 aforementioned storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and various program storage media.
[0167] The preferred embodiments of the embodiments of the present application are described above with reference to the accompanying drawings, and are not limited to the scope 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 be within the scope of the embodiments of the present application.
Claims
1. A proposition method based on course knowledge graph and knowledge distillation, characterized by: The method comprises the following steps: Constructing a course knowledge graph, wherein the course knowledge graph includes knowledge points and knowledge point labels; Constructing a target data set according to the knowledge point labels in the course knowledge graph, wherein the target data set includes multiple elements, including background materials, question labels, question types, questions to be applied, answers, and solutions 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; Performing proposition operation based on the target question generation model; 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; performing knowledge importance calculation according to the knowledge fusion result to obtain a knowledge importance calculation result; Generate a course knowledge graph corresponding to the knowledge points and knowledge point labels stored in a preset database based on the knowledge importance calculation result and the knowledge fusion result; The extraction results are 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; fusing the knowledge point labels according to the first similarity to obtain a knowledge point label fusion result; Calculating a second similarity of the knowledge points in the knowledge extraction result; fusing the knowledge points according to the second similarity to obtain a knowledge point fusion result; The step of constructing a target dataset based on the knowledge point labels in the course knowledge graph includes: Separate the background materials and the problems to be applied in the problem dataset to obtain a problem library; Generate question tags based on the course knowledge graph using a large language model; Constructing a label-knowledge mapping library according to the question label, wherein the target data set includes the question library and the label-knowledge mapping library; The background material and the application questions 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; Separating the problem to be applied and the background materials in the problem and background material set by a large language model to obtain the problem library; The target dataset 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; Performing multi-task training on a student model in the to-be-trained problem generation model according to the target data set and the initial problem; The performing multi-task training on the student model in the to-be-trained problem generation model 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 input to the student model; The process of using the knowledge points and background materials in the target data set as the input of the student model and training the student model to generate prediction questions and prediction analysis.
2. A proposition device based on course knowledge graph and knowledge distillation, characterized by: 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 based on the knowledge point labels in the course knowledge graph, wherein the target data set includes multiple elements, including background materials, question labels, question types, questions to be applied, answers, and solutions to be applied; The third module is used to perform multi-stage training on the to-be-trained problem generation model using the target dataset and the knowledge distillation method to obtain a target problem generation model; A fourth module is used to perform proposition operations based on the target question generation model; 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; performing knowledge importance calculation according to the knowledge fusion result to obtain a knowledge importance calculation result; Generate a course knowledge graph corresponding to the knowledge points and knowledge point labels stored in a preset database based on the knowledge importance calculation result and the knowledge fusion result; The extraction results are 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; fusing the knowledge point labels according to the first similarity to obtain a knowledge point label fusion result; Calculating a second similarity of the knowledge points in the knowledge extraction result; fusing the knowledge points according to the second similarity to obtain a knowledge point fusion result; The step of constructing a target dataset based on the knowledge point labels in the course knowledge graph includes: Separate the background materials and the problems to be applied in the problem dataset to obtain a problem library; Generate question tags based on the course knowledge graph using a large language model; Constructing a label-knowledge mapping library according to the question label, wherein the target data set includes the question library and the label-knowledge mapping library; The background material and the application questions 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; Separating the problem to be applied and the background materials in the problem and background material set by a large language model to obtain the problem library; The target dataset 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; Performing multi-task training on a student model in the to-be-trained problem generation model according to the target data set and the initial problem; The performing multi-task training on the student model in the to-be-trained problem generation model 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 input to the student model; The process of using the knowledge points and background materials in the target data set as the input of the student model and training the student model to generate prediction questions and prediction analysis.
3. 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 claim 1 .
4. 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 claim 1 is implemented.
Citation Information
Patent Citations
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