Topic generation method and device, electronic equipment and storage medium
By obtaining the question stem information and hierarchical knowledge point recognition, and using pre-adjusted question generation models to generate adapted questions, the problem of insufficient diversity of questions in the existing question bank was solved, and the diversity and accuracy of questions were improved.
Patent Information
- Application Number
- CN202410994317.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-23
- Publication Date
- 2024-11-26
AI Technical Summary
The lack of diversity and quantity of questions in the existing question bank, resulting in the lack of diversity and accuracy of the questions recommended to users.
By obtaining the question stem information of the original question, hierarchical knowledge points are identified, and a pre-adjusted question generation model is used to generate adapted questions, so as to achieve diversification and accuracy of questions.
The generated adapted questions are the same as the original questions’ knowledge points, which improves the diversity and accuracy of the questions and meets the diversity requirements of user needs.
Smart Images

Figure CN119026573A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a topic generation method, device, electronic device, and computer-readable storage medium. Background Art
[0002] The wrong question book and easy-to-make-wrong question recommendation system can recommend questions to users for their convenience. In the prior art, most of the questions recommended to users are based on the question bank, which extracts questions with similar knowledge points from the question bank and recommends them to users. Since the questions in the question bank are not diverse and the number is not sufficient, the generated questions are not diverse.
[0003] It can be seen that a new topic generation method is needed to generate topics recommended to users and meet the diversity of topics recommended to users. Summary of the invention
[0004] The embodiments of the present application provide a method and device for generating a topic, which are helpful in increasing the diversity of topics recommended to users.
[0005] In a first aspect, an embodiment of the present application provides a method for generating a topic, comprising:
[0006] Get the stem information of the original question;
[0007] Perform hierarchical knowledge point identification according to the question stem information to obtain hierarchical knowledge points matching the original question;
[0008] According to the question stem information and the hierarchical knowledge points, a pre-fine-tuned question generation model is used to generate an adapted question of the original question.
[0009] In a second aspect, an embodiment of the present application provides a question generating device, comprising:
[0010] A question stem information acquisition module, used to obtain the question stem information of the original question;
[0011] A hierarchical knowledge point acquisition module, used to identify hierarchical knowledge points according to the question stem information, and acquire hierarchical knowledge points matching the original question;
[0012] The question generation module is used to generate an adapted question of the original question based on the question stem information and the hierarchical knowledge points using a pre-fine-tuned question generation model.
[0013] In a third aspect, an embodiment of the present application further discloses an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the question generating method described in the embodiment of the present application when executing the computer program.
[0014] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium on which a computer program is stored, and when the program is executed by a processor, the steps of the question generating method disclosed in the embodiment of the present application are implemented.
[0015] The question generation method disclosed in the embodiment of the present application obtains the stem information of the original question, and then identifies the hierarchical knowledge points based on the stem information to obtain the hierarchical knowledge points matching the original question, and generates an adapted question of the original question based on the stem information and the hierarchical knowledge points using a pre-fine-tuned question generation model, thereby achieving the diversification of generated questions, and using a large language model to generate an adapted question based on the information in the original question, which has the same knowledge points as the original question, thereby improving the accuracy of generated questions.
[0016] The above description is only an overview of the technical solution of the present application. In order to more clearly understand the technical means of the present application, it can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of the present application more obvious and easy to understand, the specific implementation methods of the present application are listed below. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0018] Figure 1 is a flow chart of the topic generation method disclosed in the embodiment of the present application;
[0019] Figure 2 It is a session diagram for obtaining hierarchical knowledge points in the question generation method disclosed in the embodiment of the present application;
[0020] Figure 3 It is a schematic diagram of the process of adapting the original question with pictures in the question generation method disclosed in the embodiment of the present application;
[0021] Figure 4 Another flow chart of the topic generation method disclosed in the embodiment of the present application;
[0022] Figure 5 It is one of the structural schematic diagrams of the question generating device disclosed in the embodiment of the present application;
[0023] Figure 6 A block diagram schematically shows an electronic device for executing the method according to the present application; and
[0024] Figure 7 A storage unit for holding or carrying a program code for implementing the method according to the present application is schematically shown. DETAILED DESCRIPTION
[0025] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0026] Reference Figure 1 , a topic generation method disclosed in an embodiment of the present application includes: steps 110 to 130.
[0027] Step 110, obtaining the stem information of the original question.
[0028] The original topic described in the embodiments of the present application can be a topic of various subjects, for example, it can be a math topic, a Chinese topic, an English topic, etc., and can also be a topic of some social sciences. The subjects and contents of the principle topic are not limited in the embodiments of the present application.
[0029] In actual applications, some questions are described in pure text, that is, the stem information of the original question is expressed only in text carriers; while some questions are text combined with pictures, that is, the question information of the original question is expressed in two forms of carriers: text and pictures. When generating adapted questions based on the original questions, it is first necessary to obtain the stem information of the original question and describe the stem information in text form for subsequent classification and identification of hierarchical knowledge points.
[0030] In some optional embodiments, obtaining the stem information of the original question includes: when the original question does not contain a picture, obtaining a question description text used to describe the original question as the stem information of the original question; or, when the original question contains a picture, obtaining the question description text used to describe the original question and the picture contained in the original question as the stem information of the original question.
[0031] For original questions that only contain text, the stem text of the original question can be extracted, and the question description text in the extracted stem can be used as the stem information of the original question. Optionally, for original questions in streaming data, the stem data in the original question can be directly extracted to obtain the stem information. For original questions in image format, image processing is required to obtain the stem information in the original question. For example, in some optional embodiments, obtaining the question description text used to describe the original question as the stem information of the original question includes: using optical character recognition technology to recognize the image of the original question, and obtaining the text in the image as the stem information of the original question.
[0032] For original questions that include both text and images, the text and images in the questions need to be used together as question information. In some optional embodiments, for original questions that have been preprocessed in the question bank, their stem text and images can be directly obtained. In other optional embodiments, for the question image, the question image can first be subjected to target detection, and the image in the question can be located and cut according to the detection result. After that, for the area outside the image in the question image, optical character recognition technology is further used to perform text scanning and recognition, and the text used to describe the stem is extracted. Then, the image and the text obtained by scanning and recognition are used together as the stem information of the original question.
[0033] In other embodiments of the present application, other methods may be used to obtain the stem information of the original question, which are not listed in the embodiments of the present application. The present application does not limit the specific implementation method of obtaining the stem information of the original question.
[0034] Step 120, identify the hierarchical knowledge points according to the question stem information, and obtain the hierarchical knowledge points that match the original question.
[0035] In the embodiments of the present application, the hierarchical knowledge points are predefined according to the knowledge system to which the topic belongs in the specific application scenario. For example, taking the field of mathematics as an example, the hierarchical knowledge points involved in the topic may include: the highest level knowledge points - numbers and algebra, graphics and geometry, statistics and probability, and exploration rules. Each highest level knowledge point includes one or more secondary high-level knowledge points. For example, the next level of knowledge points of the knowledge point of numbers and algebra include: recognition of numbers, operations on numbers, expressions and equations, ratios and proportions, common quantities, and word problems. By analogy, according to the division of the mathematical knowledge system, several knowledge points with hierarchical relationships can be obtained, which are recorded as "hierarchical knowledge points" in the embodiments of the present application.
[0036] In an embodiment of the present application, it is necessary to obtain the hierarchical knowledge points that match the original question based on the question stem information. In some optional embodiments, the hierarchical knowledge points are identified based on the question stem information to obtain the hierarchical knowledge points that match the original question, including: using a knowledge point generation model obtained by pre-fine-tuning, and using a multi-round dialogue method to classify and identify the knowledge points layer by layer on the question stem information to obtain the hierarchical knowledge points that match the original question. For example, in the first round of conversation, the highest-level knowledge points corresponding to the original question are generated by the knowledge point generation model obtained by pre-fine-tuning. After that, in the second round of conversation, the second-highest-level knowledge points under the highest-level knowledge points corresponding to the original question are generated by the knowledge point generation model obtained by pre-fine-tuning. The identification is carried out layer by layer, and finally the lowest-level knowledge points matching the original question, that is, the most fine-grained knowledge points, are obtained.
[0037] In the embodiment of the present application, different knowledge point generation models are called to generate hierarchical knowledge points that match the original questions according to different forms of question stem information.
[0038] In some optional embodiments, the knowledge point generation model obtained by pre-fine-tuning includes: a first knowledge point generation model, wherein the knowledge point generation model obtained by pre-fine-tuning uses a multi-round dialogue method to classify and identify the knowledge points layer by layer on the stem information to obtain the hierarchical knowledge points matching the original question, including: when the original question does not contain a picture, using the first knowledge point generation model, using a multi-round dialogue method to classify and identify the knowledge points layer by layer on the stem information to obtain the hierarchical knowledge points matching the original question, wherein the first knowledge point generation model is fine-tuned based on the dialogue language model.
[0039] The fine-tuning method of the first knowledge point generation model is described below and will not be repeated here.
[0040] Taking the knowledge system of a math question in a certain field as an example, which includes three levels of knowledge points, a knowledge point generation model obtained through pre-fine-tuning uses a multi-round dialogue method to classify and identify knowledge points layer by layer on the question stem information to obtain the hierarchical knowledge points matching the original question. Figure 2 shown.
[0041] In the knowledge point reasoning stage, if the original question only includes stem information in text form, prompt words are generated according to the stem information according to the preset prompt word template, and then the first knowledge point generation model is triggered based on the prompt word, so that the first knowledge point generation model generates the highest-level knowledge point matching the stem information according to the requirements of the prompt word based on the understanding of the stem information. Then, according to the stem information and the secondary high-level knowledge points under the generated highest-level knowledge points, prompt words are generated according to the preset prompt word template, and then the first knowledge point generation model is triggered based on the prompt word, so that the first knowledge point generation model selects a secondary high-level knowledge point from the secondary high-level knowledge points in the question according to the requirements of the prompt word based on the understanding of the stem information. And so on, refine step by step until the lowest-level knowledge point matching the stem information is finally determined.
[0042] In some optional embodiments, the knowledge point generation model obtained by pre-fine-tuning includes: a second knowledge point generation model, wherein the knowledge point generation model obtained by pre-fine-tuning uses a multi-round dialogue method to classify and identify the knowledge points layer by layer on the stem information to obtain the hierarchical knowledge points matching the original question, including: when the original question contains a picture, using the second knowledge point generation model, using a multi-round dialogue method to classify and identify the knowledge points layer by layer on the stem information to obtain the hierarchical knowledge points matching the original question, wherein the second knowledge point generation model is fine-tuned based on the multimodal model.
[0043] Optionally, the second knowledge point generation model can be obtained by fine-tuning Clip (Contrastive Language-Image Pre-training, a contrastive image-language pre-training multimodal model proposed by OpenAI) using the Flip method, so that the fine-tuned second knowledge point generation model has multi-level and multi-feature classification capabilities.
[0044] The fine-tuning method of the second knowledge point generation model is described below and will not be repeated here.
[0045] In the knowledge point reasoning stage, if the original question includes both textual stem information and picture stem information, the text and picture in the question stem information are used as the text and picture input of the second knowledge point generation model respectively, and questions are asked through the first round of conversations to trigger the second knowledge point generation model (such as Clip model) to generate the highest level knowledge point matching the input text and picture. Afterwards, the text in the question stem information and the highest level knowledge point generated by the first round of conversations are spliced to obtain a spliced text, and the spliced text and the picture in the original question are used as the text and picture input of the second knowledge point generation model respectively, and questions are asked through the second round of conversations to trigger the second knowledge point generation model to generate the second highest level knowledge point matching the input text and picture (i.e., a knowledge point below the highest level knowledge point in the spliced text). Referring to the second round of conversations, the third round of conversations, the fourth round of conversations, and the fifth round of conversations are performed in sequence until the level knowledge point output by the second knowledge point generation model in the fifth round of conversations, i.e., the lowest level knowledge point, is obtained.
[0046] Step 130, based on the question stem information and the hierarchical knowledge points, a pre-fine-tuned question generation model is used to generate an adapted question of the original question.
[0047] After the hierarchical knowledge points matching the original question are generated through the above steps, the next step is to generate an adapted question of the original question based on the generated hierarchical knowledge points and with reference to the question stem information in the original question, using the pre-fine-tuned question generation model.
[0048] In a specific application scenario, the original question may contain only textual stem information, or may contain both textual stem information and picture stem information. In an embodiment of the present application, in order to increase the diversity of the generated modified questions, for an original question containing only textual stem information, an adapted question containing only textual stem information is generated, and for an original question containing both textual stem information and picture stem information, a modified question containing both textual stem information and picture stem information is generated.
[0049] Corresponding to the original topic containing topic information in different forms, in the embodiment of the present application, different topic generation processes are used to generate adapted topics. The following describes the corresponding adapted topic generation processes respectively.
[0050] In some optional embodiments, the question stem information includes: a question description text, the pre-fine-tuned question generation model includes: a first model, the pre-fine-tuned question generation model is used to generate an adapted question of the original question based on the question stem information and the hierarchical knowledge points, including: based on the question description text and the hierarchical knowledge points, an adapted question of the original question is generated by the first model, wherein the first model is fine-tuned based on a dialogue language model.
[0051] The fine-tuning method of the first model is described below and will not be repeated here.
[0052] For the first model obtained through fine-tuning, a question is generated in the form of a dialogue based on the question description text in the stem information of the original question and the hierarchical knowledge points generated in the above steps. The question requires the first model to generate a question of a specified hierarchical knowledge point based on the specified question description text. After that, the generated question is input into the first model. The first model generates the corresponding answer, i.e., the adapted question, based on the knowledge learned in the training and fine-tuning stages and the input question.
[0053] Taking the question description information as "X Primary School bought 72 books and divided them equally among 9 classes. How many books does each class get?", the question stem information is used to identify hierarchical knowledge points, and the hierarchical knowledge point matched with the original question is "the meaning and application of integer average". In the question generation stage, the question generated according to the question stem information and the hierarchical knowledge points can be described as: "According to the question stem and the knowledge points of the original question, imitate the original question and adapt a new question. The question stem is: X Primary School bought 72 books and divided them equally among 9 classes. How many books does each class get? Knowledge point: the meaning and application of integer average". The first model is called based on the above generated question, and the first model can output the following adapted question: "Question stem: Mom bought 8 peaches and divided them equally among 2 brothers and sisters. How many peaches can each person get?".
[0054] In some optional embodiments, the pre-fine-tuned question generation model includes: a first model and a second model, the question stem information includes: a question description text and a picture, and the pre-fine-tuned question generation model is used to generate an adapted question of the original question based on the question stem information and the hierarchical knowledge points, including: based on the question description text and the picture, using the second model to generate a picture description text of the picture; based on the question description text, the picture description text and the hierarchical knowledge points, using the first model to generate a text stem of the adapted question; based on the picture, an adapted question picture is obtained; based on the adapted question picture and the text stem of the adapted question, an adapted question of the original question is generated; wherein, the first model is fine-tuned based on a dialogue language model, and the second model is fine-tuned based on a multimodal model.
[0055] Optionally, obtaining an adapted title picture based on the picture includes: using the picture as the adapted title picture; or using artificial intelligence graph generation technology to generate the adapted title picture based on the picture.
[0056] Optionally, the second model can be obtained by fine-tuning the Clip model using the Flip method.
[0057] The fine-tuning method of the second model is described below and will not be repeated here.
[0058] For the original question containing stem information in the form of a picture, it is first necessary to obtain the description text of the picture, which is recorded as "picture description text" in the embodiment of the present application. The picture description text, as a supplement to the stem information in the form of text in the original question, can enhance the richness of the stem information. Optionally, the picture and text in the stem information of the original question are respectively input into the picture input end and the text input end of the multimodal model (i.e., the second model) for contrasting images and languages, and the second model outputs the description text of the picture, which is recorded as "picture description text" in the embodiment of the present application. Then, the picture description text and the question description text are fused to obtain a fused question description text. Afterwards, the three parts of the hierarchical knowledge points generated by the fusion question description text and the aforementioned steps are generated to generate a question, which requires the large language model to generate a question of a specified hierarchical knowledge point based on the specified fusion question description text. Next, the generated question is input into the first model, and the first model generates the corresponding answer, i.e., the text stem of the adapted question, based on the knowledge learned in the training and fine-tuning stages and combined with the input question.
[0059] Combine the following Figure 3 The conversation process shown is based on the description information of the original question: "As shown in the figure, this is a target paper. The numbers on the target paper represent the scores of the corresponding areas. Person A said: 'I shot 6 times, each shot hit the target, and I got 27 points.' Person B said: 'I shot 3 times, each shot hit the target, and I got 27 points.' Who of A and B must be lying? Please explain the reason." The hierarchical knowledge point matching the original question obtained by performing hierarchical knowledge point recognition on the question stem information is "Simple application of multiplication" as an example to illustrate the generation process of the adapted question.
[0060] First, the above-mentioned question description information is used as the text input of the second model, and the target paper picture of the original question is used as the image input of the second model. The second model generates the description text of the target paper picture, that is, the picture description text. For example, the second model can output the following picture description text: "There is a target in the picture. There are 5 kinds of scores on the target, 1, 3, 5, 7, and 9 respectively."
[0061] Then, according to the question description text in the stem information of the original question, the picture description text output by the second model, and the hierarchical knowledge points obtained in the above steps, the text is assembled according to the preset template to generate the question. For example, the following question can be obtained: "According to the stem and the knowledge points of the original question, imitate the original question to adapt a new question. The stem is: As shown in the figure, this is a target paper. There are 5 scores on the target, 1, 3, 5, 7, and 9. The numbers on the target paper represent the scores of the corresponding areas. A said: 'I shot 6 times, each shot hit the target, and I got 27 points'. B said: 'I shot 3 times, each shot hit the target, and I got 27 points'. Who of A and B must be lying? Please explain the reason. Knowledge point: simple application of multiplication".
[0062] Based on the above generated question, the first model is called, and the first model can output the following text stem of the adapted question: "Stem: As shown in the figure, this is a target paper. There are 5 scores on the target, 1, 3, 5, 7, and 9. The numbers on the target paper represent the scores of the corresponding areas. Person A said: 'I fired 8 shots, each shot hit the target, and I got 27 points.' Person B said: 'I fired 5 shots, each shot hit the target, and I got 35 points.' Who of A and B must be lying?"
[0063] On the other hand, the adapted title picture can be generated based on the picture of the original title by using the picture-to-picture technology, or the picture of the original title can be directly used as the adapted title picture.
[0064] Finally, an adapted title of the original title is generated according to the text stem of the adapted title and the adapted title image.
[0065] At this point, the process of generating adapted questions based on the original questions is completed.
[0066] In order to make the question generation method disclosed in the embodiment of the present application clearer, the first knowledge point generation model, the second knowledge point generation model, and the fine-tuning method of the first model and the second model are illustrated below.
[0067] Reference Figure 4 Optionally, before performing hierarchical knowledge point identification according to the question stem information and obtaining the hierarchical knowledge points matching the original question, it also includes: step 100.
[0068] Step 100, respectively fine-tune the pre-trained dialogue language model to obtain the first knowledge point generation model and the first model, and respectively fine-tune the contrast image-language multimodal model to obtain the second knowledge point generation model and the second model.
[0069] Optionally, the first knowledge point generation model is fine-tuned by the following method: constructing sub-datasets corresponding to knowledge points at each level according to the picture-free question dataset and the knowledge points covered by the question dataset; based on the sub-datasets, fine-tuning the pre-trained dialogue language models respectively to obtain the first knowledge point generation model corresponding to the knowledge points at the corresponding level.
[0070] In some embodiments of the present application, the first knowledge point generation model can use ChatGLM3 as the basic model. For example, the QLoRA method (a model quantization method) can be used to fine-tune ChatGLM3 to obtain the first knowledge point generation model. Among them, the data set used to fine-tune ChatGLM3 can be a question that only contains a text form question stem, and the hierarchical knowledge points are annotated for these questions. In the prior art, there are many knowledge points in the hierarchical knowledge point system of certain fields, and the data set is not sufficient, and the effect of using the traditional feature classification model is not good. In the embodiment of the present application, the total classification task of all knowledge points is decomposed into multiple subtasks, and each subtask judges the corresponding first-level knowledge points respectively, so as to gradually output the final knowledge point classification. In the model fine-tuning stage, the sub-datasets corresponding to each subtask (i.e., each level of knowledge point) are generated according to the question data set, such as the sub-dataset corresponding to the highest level of knowledge points, the sub-dataset corresponding to the second-highest level of knowledge points, etc., and then, ChatGLM3 is fine-tuned based on each sub-dataset to obtain the first knowledge point generation model corresponding to the level of knowledge points.
[0071] In some embodiments of the present application, a training script in the form of a multi-round conversation can also be constructed based on the question data set. After that, ChatGLM3 is asked questions in a multi-round questioning method to make it classify and judge the knowledge points step by step. When the question reaches the lowest level, ChatGLM3 completes the classification learning of a question data. After learning the question data in the data set, ChatGLM3 learns the ability to classify the question data into hierarchical knowledge points, and the fine-tuned ChatGLM3 can be used as the first knowledge point generation model.
[0072] Optionally, the second knowledge point generation model is fine-tuned by the following method: constructing sub-datasets corresponding to the knowledge points of each level according to the picture-based question dataset and the knowledge points covered by the question dataset; based on the sub-datasets, fine-tuning the pre-trained comparative image-language multimodal model to obtain the second knowledge point generation model corresponding to the knowledge points of the corresponding level.
[0073] In some embodiments of the present application, the second knowledge point generation model can use Clip as the basic model. For a question data set consisting of questions containing pictures, the model Clip is fine-tuned, and the Image Encoder (image encoder) and Text Encoder (text encoder) in the Clip are fine-tuned in the same way through multiple rounds of dialogue, and the knowledge points that match the questions are jointly judged through the text in the picture and the question stem. For example, a sub-dataset corresponding to each subtask (i.e., each level of knowledge point) can be generated according to the picture-containing question data set, such as a sub-dataset corresponding to the highest level of knowledge points, a sub-dataset corresponding to the second-highest level of knowledge points, etc., and then, Clip is fine-tuned based on each sub-dataset to obtain a second knowledge point generation model corresponding to the knowledge point at this level. Optionally, the Clip model can be fine-tuned using the FLip method to improve the efficiency of model fine-tuning.
[0074] Optionally, the first model is fine-tuned by the following method: constructing similar question-answer pairs consisting of original questions and adapted questions based on the non-picture question data; using the original questions in the similar question-answer pairs as inputs to the dialogue language model, using the adapted questions as outputs of the dialogue language model, and fine-tuning the dialogue language model to obtain the first model. For example, constructing similar question-answer pairs consisting of original questions and adapted questions based on the non-picture question data, and fine-tuning ChatGLM3 in the form of questions and answers to obtain the first model.
[0075] Optionally, the second model is obtained by fine-tuning the following method: constructing a training sample including title information and text description based on the picture title data; training a multimodal model of contrastive image-language based on the training sample to obtain the second model. For example, the title description text and picture of the picture title can be used as the input of Clip, and the description text of the picture can be used as the output to train the Clip model's ability to describe the picture, thereby obtaining the second model.
[0076] The above training method of the first knowledge point generation model, the second knowledge point generation model, the first model and the second model is only a feasible model training method. During specific implementation, other methods can also be used to train the above models. The embodiments of the present application do not limit the training method of the first knowledge point generation model, the second knowledge point generation model, the first model and the second model.
[0077] In summary, the question generation method disclosed in the embodiment of the present application obtains the stem information of the original question, and then identifies the hierarchical knowledge points according to the stem information, obtains the hierarchical knowledge points matching the original question, and generates the adapted question of the original question using the pre-fine-tuned question generation model according to the stem information and the hierarchical knowledge points, thereby achieving the diversification of generated questions, and using the large language model to generate the adapted question based on the information in the original question, which has the same knowledge points as the original question, thereby improving the accuracy of the generated question. Furthermore, this method adopts a multi-layer classification mechanism to enable the question generation model to classify the final knowledge point features layer by layer, thereby further improving the matching degree between the adapted question and the original question.
[0078] Furthermore, the question generation method disclosed in the embodiment of the present application can generate an adapted question by combining the picture content in the original question, and can make full use of the stem information of the original question to improve the accuracy of the generated question. In addition, a question with a picture can be generated.
[0079] Reference Figure 5 The present application also discloses a question generating device, which includes:
[0080] The question stem information acquisition module 510 is used to acquire the question stem information of the original question;
[0081] A hierarchical knowledge point acquisition module 520 is used to identify hierarchical knowledge points according to the question stem information and acquire hierarchical knowledge points matching the original question;
[0082] The question generation module 530 is used to generate an adapted question of the original question based on the question stem information and the hierarchical knowledge points using a pre-fine-tuned question generation model.
[0083] Optionally, the question stem information acquisition module 510 is further used to:
[0084] In the case that the original question does not contain a picture, obtaining a question description text for describing the original question as the question stem information of the original question; or
[0085] In the case where the original question includes a picture, a question description text for describing the original question and the picture included in the original question are obtained as the stem information of the original question.
[0086] Optionally, the hierarchical knowledge point acquisition module 520 is further used to:
[0087] By using the knowledge point generation model obtained through pre-fine-tuning, the question stem information is classified and identified layer by layer through a multi-round dialogue method to obtain the hierarchical knowledge points matching the original question.
[0088] Optionally, the knowledge point generation model obtained by pre-fine-tuning includes: a first knowledge point generation model, wherein the knowledge point generation model obtained by pre-fine-tuning classifies and identifies knowledge points layer by layer on the question stem information in a multi-round dialogue manner to obtain hierarchical knowledge points matching the original question, including:
[0089] When the original question does not contain a picture, the first knowledge point generation model is used to classify and identify the knowledge points layer by layer of the question information through multiple rounds of dialogue to obtain hierarchical knowledge points matching the original question, wherein the first knowledge point generation model is fine-tuned based on the dialogue language model.
[0090] Optionally, the knowledge point generation model obtained by pre-fine-tuning includes: a second knowledge point generation model, wherein the knowledge point generation model obtained by pre-fine-tuning classifies and identifies knowledge points layer by layer on the question stem information in a multi-round dialogue manner to obtain hierarchical knowledge points matching the original question, including:
[0091] When the original question contains a picture, the second knowledge point generation model is used to classify and identify the knowledge points layer by layer of the question stem information through multiple rounds of dialogue to obtain hierarchical knowledge points matching the original question, wherein the second knowledge point generation model is fine-tuned based on the multimodal model.
[0092] Optionally, the question stem information includes: a question description text, the pre-fine-tuned question generation model includes: a first model, and the question generation module 530 is further used to:
[0093] Based on the topic description text and the hierarchical knowledge points, an adapted topic of the original topic is generated through the first model, wherein the first model is fine-tuned based on a dialogue language model.
[0094] Optionally, the pre-fine-tuned question generation model includes: a first model and a second model, the question stem information includes: a question description text and a picture, and the question generation module 530 is further used to:
[0095] Based on the title description text and the picture, using the second model to generate a picture description text of the picture;
[0096] Based on the title description text, the picture description text and the hierarchical knowledge points, using the first model to generate a text stem of the adapted title;
[0097] Based on the picture, an adapted title picture is obtained;
[0098] An adapted title of the original title is generated according to the adapted title image and the text stem of the adapted title; wherein the first model is fine-tuned based on a dialogue language model, and the second model is fine-tuned based on a multimodal model.
[0099] The question generating device disclosed in the embodiment of the present application is used to implement the question generating method described in the embodiment of the present application. The specific implementation methods of each module of the device will not be repeated here. Please refer to the specific implementation methods of the corresponding steps in the method embodiment.
[0100] The title generation device disclosed in the embodiment of the present application obtains the stem information of the original title, and then identifies the hierarchical knowledge points based on the stem information to obtain the hierarchical knowledge points that match the original title, and generates the adapted title of the original title based on the stem information and the hierarchical knowledge points using the pre-fine-tuned title generation model, thereby achieving the diversification of generated titles, and using the large language model to generate the adapted title based on the information in the original title, which has the same knowledge points as the original title, thereby improving the accuracy of the generated title. Furthermore, the device adopts a multi-layer classification mechanism to enable the title generation model to classify the final knowledge point features layer by layer, thereby further improving the matching degree between the adapted title and the original title.
[0101] Furthermore, the question generation device disclosed in the embodiment of the present application can generate adapted questions in combination with the picture content in the original question, and can make full use of the stem information of the original question to improve the accuracy of the generated question. In addition, questions with pictures can be generated.
[0102] Each embodiment in this specification is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0103] The above is a detailed introduction to a method and device for generating a topic provided by the present application. Specific examples are used herein to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and a core idea thereof. At the same time, for a person skilled in the art, according to the idea of the present application, there may be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.
[0104] The device embodiments described above are merely illustrative, wherein the units described 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 may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.
[0105] The various component embodiments of the present application can be implemented in hardware, or in software modules running on one or more processors, or in a combination thereof. It should be understood by those skilled in the art that a microprocessor or digital signal processor (DSP) can be used in practice to implement some or all functions of some or all components in the electronic device according to the embodiment of the present application. The present application can also be implemented as a device or apparatus program (e.g., computer program and computer program product) for executing part or all of the methods described herein. Such a program implementing the present application can be stored on a computer-readable medium, or can have the form of one or more signals. Such a signal can be downloaded from an Internet website, or provided on a carrier signal, or provided in any other form.
[0106] For example, Figure 6 An electronic device that can implement the method according to the present application is shown. The electronic device can be a PC, a mobile terminal, a personal digital assistant, a tablet computer, etc. The electronic device traditionally includes a processor 610 and a memory 620 and a program code 630 stored on the memory 620 and can be run on the processor 610, and the processor 610 implements the method described in the above embodiment when executing the program code 630. The memory 620 can be a computer program product or a computer-readable medium. The memory 620 can be an electronic memory such as a flash memory, an EEPROM (electrically erasable programmable read-only memory), an EPROM, a hard disk or a ROM. The memory 620 has a storage space 6201 for the program code 630 of a computer program for executing any method step in the above method. For example, the storage space 6201 for the program code 630 can include various computer programs for implementing the various steps in the above method respectively. The program code 630 is a computer-readable code. These computer programs can be read from one or more computer program products or written into the one or more computer program products. These computer program products include program code carriers such as hard disks, compact disks (CDs), memory cards or floppy disks. The computer program includes a computer readable code, and when the computer readable code is executed on an electronic device, the electronic device is caused to execute the method according to the above embodiment.
[0107] The embodiment of the present application also discloses a computer-readable storage medium on which a computer program is stored. When the program is executed by a processor, the steps of the question generating method described in the embodiment of the present application are implemented.
[0108] Such a computer program product may be a computer-readable storage medium, which may have a computer-readable storage medium having a Figure 6 The memory 620 in the electronic device shown in the figure is similar to the storage segment, storage space, etc. The program code can be compressed and stored in the computer-readable storage medium in an appropriate form. The computer-readable storage medium is generally as shown in the reference Figure 7 The portable or fixed storage unit. Generally, the storage unit includes computer readable code 630', which is a code read by a processor. When the code is executed by the processor, each step in the method described above is implemented.
[0109] The term "one embodiment", "embodiment" or "one or more embodiments" herein means that a particular feature, structure or characteristic described in conjunction with the embodiment is included in at least one embodiment of the present application. In addition, please note that the examples of the term "in one embodiment" here do not necessarily all refer to the same embodiment.
[0110] In the description provided herein, a large number of specific details are described. However, it is understood that the embodiments of the present application can be practiced without these specific details. In some instances, well-known methods, structures and techniques are not shown in detail so as not to obscure the understanding of this description.
[0111] In the claims, any reference signs placed between brackets shall not be construed as limiting the claims. The word "comprising" does not exclude the presence of elements or steps not listed in the claims. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. The present application may be implemented by means of hardware comprising several different elements and by means of a suitably programmed computer. In a unit claim enumerating several means, several of these means may be embodied by the same item of hardware. The use of the words first, second, and third etc. does not indicate any order. These words may be interpreted as names.
[0112] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit it. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application.
Claims
1. A method for generating a topic, characterized in that: The method comprises: Get the stem information of the original question; Perform hierarchical knowledge point identification according to the question stem information to obtain hierarchical knowledge points matching the original question; According to the question stem information and the hierarchical knowledge points, a pre-fine-tuned question generation model is used to generate an adapted question of the original question.
2. The method according to claim 1, characterized in that: The obtaining of the stem information of the original question includes: In the case that the original question does not contain a picture, obtaining a question description text for describing the original question as the question stem information of the original question; or In the case where the original question includes a picture, a question description text for describing the original question and the picture included in the original question are obtained as the stem information of the original question.
3. The method according to claim 1, characterized in that The step of identifying hierarchical knowledge points according to the question stem information to obtain hierarchical knowledge points matching the original question includes: By using the knowledge point generation model obtained through pre-fine-tuning, the question stem information is classified and identified layer by layer through a multi-round dialogue method to obtain the hierarchical knowledge points matching the original question.
4. The method according to claim 3, characterized in that The knowledge point generation model obtained by pre-fine-tuning includes: a first knowledge point generation model, wherein the knowledge point generation model obtained by pre-fine-tuning classifies and identifies knowledge points layer by layer on the question stem information in a multi-round dialogue manner to obtain hierarchical knowledge points matching the original question, including: When the original question does not contain a picture, the first knowledge point generation model is used to classify and identify the knowledge points layer by layer of the question information through multiple rounds of dialogue to obtain hierarchical knowledge points matching the original question, wherein the first knowledge point generation model is fine-tuned based on the dialogue language model.
5. The method according to claim 3, characterized in that: The knowledge point generation model obtained by pre-fine-tuning includes: a second knowledge point generation model, wherein the knowledge point generation model obtained by pre-fine-tuning classifies and identifies knowledge points layer by layer on the question stem information in a multi-round dialogue manner to obtain hierarchical knowledge points matching the original question, including: When the original question contains a picture, the second knowledge point generation model is used to classify and identify the knowledge points layer by layer of the question stem information through multiple rounds of dialogue to obtain hierarchical knowledge points matching the original question, wherein the second knowledge point generation model is fine-tuned based on the multimodal model.
6. The method according to claim 1, characterized in that The question stem information includes: a question description text, the pre-fine-tuned question generation model includes: a first model, the pre-fine-tuned question generation model is used to generate a modified question of the original question according to the question stem information and the hierarchical knowledge points, including: Based on the topic description text and the hierarchical knowledge points, an adapted topic of the original topic is generated through the first model, wherein the first model is fine-tuned based on a dialogue language model.
7. The method according to claim 1, characterized in that The pre-fine-tuned question generation model includes: a first model and a second model, the question stem information includes: a question description text and a picture, and the pre-fine-tuned question generation model is used to generate a modified question of the original question according to the question stem information and the hierarchical knowledge points, including: Based on the title description text and the picture, using the second model to generate a picture description text of the picture; Based on the title description text, the picture description text and the hierarchical knowledge points, using the first model to generate a text stem of the adapted title; Based on the picture, an adapted title picture is obtained; An adapted title of the original title is generated according to the adapted title image and the text stem of the adapted title; wherein the first model is fine-tuned based on a dialogue language model, and the second model is fine-tuned based on a multimodal model.
8. A question generating device, characterized in that: The device comprises: A question stem information acquisition module, used to obtain the question stem information of the original question; A hierarchical knowledge point acquisition module, used to identify hierarchical knowledge points according to the question stem information, and acquire hierarchical knowledge points matching the original question; The question generation module is used to generate an adapted question of the original question based on the question stem information and the hierarchical knowledge points using a pre-fine-tuned question generation model.
9. An electronic device comprising a memory, a processor, and a program code stored in the memory and executable on the processor, wherein: When the processor executes the program code, the method according to any one of claims 1 to 7 is implemented.
10. A computer-readable storage medium having a program code stored thereon, characterized in that: When the program code is executed by a processor, the steps of the method described in any one of claims 1 to 7 are implemented.
Citation Information
Cited By
Clinical examination content generation method and system based on multi-modal technology
CN119809454A
