Question processing model training method and device
By training a mathematical calculation problem processing model, the problem of incomplete or disorganized problem content in the learning platform was solved, generating structured problems and improving user experience and grading accuracy.
Patent Information
- Application Number
- CN202511693205.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-18
- Publication Date
- 2026-02-17
AI Technical Summary
The math calculation problems on existing learning platforms are incomplete or disorganized, resulting in a poor user experience and a high error rate in automated grading.
By acquiring sample questions and their tagged questions, and using preset prompts, an initial question processing model is trained to generate structured text until the model training stops, thus obtaining the target question processing model.
Generate complete and well-organized structured questions to improve user experience and the accuracy and efficiency of automated grading.
Smart Images

Figure CN121543675A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] Embodiments of the present specification relate to the technical field of artificial intelligence, and in particular to a question processing model training method. Also related to a question processing model training apparatus, a computing device, a computer-readable storage medium, and a computer program product. BACKGROUND
[0002] With the development of technology, artificial intelligence technology is widely used in the field of education. With the emergence of various learning platforms, users can conveniently learn through the learning platforms. Generally, there are many questions in the question bank of the learning platform, and each question contains question stem, answer and analysis, etc. These questions can be used to display to users for users to answer or check answers, or can be used to automatically correct, etc.
[0003] However, the content of some questions is incomplete or scattered, that is, the question stem, formula, answer, calculation process, and analysis corresponding to the question may be missing or interlaced with each other, for example, only the answer is missing, or the answer may exist in the calculation process or in the analysis. As a result, not only does it cause inconvenience for users to read, reducing user experience, but it also causes errors in automatic correction using the question. Therefore, there is an urgent need to provide a solution to the above technical problems. SUMMARY
[0004] Therefore, the embodiments of the present specification provide a question processing model training method. One or more embodiments of the present specification also relate to a question processing method, a question processing model training apparatus, a computing device, a computer-readable storage medium, and a computer program product to solve the technical defects in the prior art.
[0005] According to a first aspect of the embodiments of the present specification, a question processing model training method is provided, comprising: obtaining a sample question and a label question corresponding to the sample question, wherein the sample question includes question stem information, answer information, and analysis information, and the label question is a structured text corresponding to the sample question; inputting a preset prompt information and the sample question into an initial question processing model to obtain a predicted question output by the initial question processing model, wherein the predicted question is determined according to a question type of the sample question and a first task target in the preset prompt information, the question type is determined according to question type description information in the preset prompt information, and the first task target is used to prompt the initial question processing model to generate a structured text corresponding to the question type; According to the predicted question and the label question, the initial question processing model is trained until a model training stop condition is reached, and a question processing model is obtained.
[0006] According to a second aspect of the embodiments of the present specification, a question processing method is provided, including: Obtaining a to-be-processed question, wherein the to-be-processed question includes stem information, answer information, and analysis information; Inputting the to-be-processed question and preset prompt information into a question processing model to obtain a question output by the question processing model, wherein the question is a structured text corresponding to the to-be-processed question, and the question processing model is trained by the question processing model training method.
[0007] According to a third aspect of the embodiments of the present specification, a question processing model training apparatus is provided, including: A first obtaining module configured to obtain a sample question and a label question corresponding to the sample question, wherein the sample question includes stem information, answer information, and analysis information, and the label question is a structured text corresponding to the sample question; A first input module configured to input a preset prompt template and the sample question into an initial question processing model to obtain a predicted question output by the initial question processing model, wherein the predicted question is determined according to a question type of the sample question and a task target in the preset prompt template, the question type is determined according to a preset prompt module, and the task target is used to prompt the initial question processing model to generate a structured text corresponding to the question type; A training module configured to train the initial question processing model according to the predicted question and the label question until a model training stop condition is reached, and obtain a question processing model.
[0008] According to a fourth aspect of the embodiments of the present specification, a computing device is provided, including: A memory and a processor; The memory is used to store computer programs / instructions, and the processor is used to execute the computer programs / instructions, which realize the steps of the above method when executed by the processor.
[0009] According to a fifth aspect of the embodiments of the present specification, a computer readable storage medium is provided, which stores computer programs / instructions, which realize the steps of the above method when executed by the processor.
[0010] According to a sixth aspect of an embodiment of the present specification, a computer program product is provided, comprising computer programs / instructions which, when executed by a processor, implement the steps of the above method.
[0011] One embodiment of the present specification can obtain a sample question and a label question corresponding to the sample question, wherein the sample question includes stem information, answer information, and analysis information, and the label question is a structured text corresponding to the sample question; input preset prompt information and the sample question into an initial question processing model to obtain a predicted question output by the initial question processing model, wherein the predicted question is determined according to a question type of the sample question and a first task target in the preset prompt information, the question type is determined according to question type description information in the preset prompt information, and the first task target is used to prompt the initial question processing model to generate a structured text corresponding to the question type; train the initial question processing model according to the predicted question and the label question until a model training stop condition is reached to obtain a question processing model.
[0012] The question processing model trained in the above manner can generate a structured question with complete and orderly content according to a question with chaotic content, thereby ensuring the completeness and orderliness of the question data, facilitating user review, improving user experience, and facilitating subsequent automatic correction through the structured question, thereby improving correction efficiency and accuracy. BRIEF DESCRIPTION OF DRAWINGS
[0013] Figure 1 FIG. 1 is a flowchart of a question processing model training method according to one embodiment of the present specification; Figure 2 FIG. 2 is a process flowchart of a question processing method according to one embodiment of the present specification; Figure 3 FIG. 3 is a structural schematic diagram of a question processing model training device according to one embodiment of the present specification; Figure 4 FIG. 4 is a structural schematic diagram of a question processing device according to one embodiment of the present specification; Figure 5 FIG. 5 is an architecture diagram of a question processing model training system according to one embodiment of the present specification; Figure 6 FIG. 6 is a structural block diagram of a computing device according to one embodiment of the present specification. DETAILED DESCRIPTION
[0014] In the following description, numerous specific details are set forth in order to provide a thorough understanding of the present description. However, the present description can be practiced without the specific details. In other instances, well-known methods, procedures, components, and circuits have not been described in detail so as not to obscure the present description. Some portions of the following description are presented in terms of algorithms, symbolic representations of operations on data bits or binary digital signals stored as electronic potential
[0015] The terminology used in this description is for the purpose of describing particular embodiments only and is not intended to be limiting of one or more embodiments of the present description. As used in this description and the appended claims, the singular forms "a," "an" and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It will also be understood that the term "and / or" as used herein refers to and encompasses any and all possible combinations of one or more of the associated listed items.
[0016] It will be understood that, although the terms first, second, etc. can be used herein to describe various information, these terms are not intended to denote
[0017] It should be noted that the user information (including but not limited to user equipment information, user personal information, etc.) and data (including but not limited to data for analysis, stored data, displayed data, etc.) involved in the present description are all information and data authorized by the user or authorized by all parties, and the collection, use and processing of related data need to comply with relevant laws, regulations and standards in relevant regions, and provide corresponding operation portal for user to choose authorization or refusal.
[0018] The technical solutions provided by the embodiments of the present application can adopt a deep learning model with relatively large model parameter scale, wherein the large model is only an example of the model, and the embodiments of the present application do not limit the number of model parameters supported by the deep learning model adopted to meet the actual demand. The deep learning model involved in the embodiments of the present application can be a language model (Language Model, LM) or a multimodal model (Multimodal Model, MM) based on artificial intelligence.
[0019] First, the nomenclature involved in the one or more embodiments of the present description is explained.
[0020] Large Language Model (LLM): A Large Language Model is a deep learning model trained on a large amount of text data, with the ability to generate natural language text, understand and generate language. During training, the Large Language Model learns the grammar, semantics and context information of language, so as to be able to complete various language tasks such as text generation, text classification, translation, question and answer system and dialogue generation. Modern Large Language Models, such as GPT (Generative Pre-trained Transformer), have powerful text understanding and generation capabilities and are widely used in the field of Natural Language Processing (NLP).
[0021] Calculation question structuring: Calculation question structuring is a process of converting unstructured calculation questions into an organized and clearly defined format. In this specification, calculation question types include horizontal, vertical, detached, equation solving, and most question answers, calculation processes and analysis are mixed. The question processing model can process calculation questions to structure various calculation questions. This structured representation usually includes the following parts: question stem, formula, answer, calculation process, analysis, each part can be a mixed form of text and latex.
[0022] With the rapid development of information technology and artificial intelligence, intelligent technology is increasingly used in the field of education to improve teaching quality and efficiency. Among them, automatic correction and structured display of mathematical calculation questions are key links. However, mathematical calculation questions are not structured, that is, the question stem, formula, answer, calculation process and analysis of the question may not exist or cross each other, for example, the answer may exist in the calculation process or in the analysis. At the same time, there are many latex formulas in each element, which need to be structured.
[0023] In practical applications, the traditional learning platform usually uses template matching and rule definition based method to structure the mathematical calculation questions. This method has obvious limitations in dealing with diversified and complex calculation questions. Since the format of most mathematical calculation questions is unknown, the coverage of the template matching and rule definition based method is low. At the same time, manual rule setting and maintenance is a heavy work, which is prone to errors and omissions.
[0024] In addition, the current mathematical calculation questions can also be processed based on machine learning method. However, using machine learning algorithm to analyze and structure the calculation questions, such as using classifier to classify the questions, and then using specific processing method for different categories. The aforementioned machine learning based method is limited by the size, quality and complexity of feature engineering of training data.
[0025] Based on this, the application provides a question processing model training method, which can realize structured processing of mathematical calculation questions. The trained question processing model can generate structured questions with complete and orderly content from questions with chaotic content, ensuring the completeness and orderliness of the question data, facilitating user review, improving user experience, and facilitating subsequent automatic correction through structured questions, improving correction efficiency and accuracy.
[0026] In the present specification, a question processing model training method is provided, and the present specification also relates to a question processing model training device, a computing device, a computer-readable storage medium, and a computer program product, which are described in detail one by one in the following embodiments.
[0027] Referring to Figure 1 , Figure 1 A flowchart of a question processing model training method according to one embodiment of the present specification is shown, which specifically includes the following steps.
[0028] Step 102: Obtain a sample question and a label question corresponding to the sample question, wherein the sample question includes stem information, answer information, and analysis information, and the label question is a structured text corresponding to the sample question.
[0029] It should be noted that the execution subject of the question processing model training method can be any computing device with computing capability, such as a server, a terminal, and the like. In order to facilitate the description, the execution subject of the question processing model training method is taken as a server for the description of the technical solutions of the present specification.
[0030] In one or more embodiments of the present specification, the server can first obtain a sample question and a label question corresponding to the sample question. When obtaining the label question corresponding to the sample question, the label question corresponding to the sample question can be determined by an artificial method, and the label question is a structured text or a structured question corresponding to the sample question.
[0031] The structured text corresponding to the sample question can be in the form of a JSON format text.
[0032] In one or more embodiments of the present specification, obtaining the label question corresponding to the sample question includes: inputting the sample question into a text question classification model to obtain a question type corresponding to the sample question output by the text question classification model; determining the label question corresponding to the sample question according to the question type and the sample question.
[0033] In actual application, since the sample data quantity is relatively large, that is, the sample question quantity is relatively large, and the sample question types are different, in order to improve the efficiency of generating the label question corresponding to the sample question, the sample question can be input into the text question classification model, and the question type of each sample question is determined through an automatic mode, so that the label question corresponding to the sample question can be determined according to the question type of each sample question.
[0034] When the label question corresponding to the sample question is determined according to the sample question and the question type of the sample question, the label question can be determined through an artificial mode, or can be determined through other automatic modes, for example, a rule-based or template matching method, so as to reduce the consumption of human resources. Of course, other modes can also be used, and the present specification does not limit how to determine the label question.
[0035] The text question classification model can usually use a lightweight model, for example, Fast Text, a distilled BERT variant, and the like, so as to achieve a balance between classification efficiency and classification accuracy.
[0036] In one or more embodiments of the present specification, the question is a mathematical calculation question, and the question type includes four types of horizontal, vertical, detached, and equation solving. Of course, in actual application, the question can also be a Chinese question, an English question, and the like, the question type of the Chinese question can include Chinese reading comprehension questions, Chinese fill-in-the-blank questions, and the like, the question type of the English question can include English fill-in-the-blank questions, English judgment questions, and the like, which can be determined according to actual conditions. The following is described by taking the sample question as a sample calculation question as an example.
[0037] In one or more embodiments of the present specification, for the mathematical calculation question, the question contains stem information, answer information, analysis information, calculation process, and formula. That is, the sample question is a sample mathematical calculation question, and the content of the sample question includes stem information, answer information, analysis information, calculation process, and formula, and the label question is a structured form of the sample mathematical calculation question.
[0038] When the label question corresponding to the sample mathematical calculation question is determined, since there is a formula in the mathematical calculation question, in order to distinguish the formula from other text content, the formula part can be marked. Therefore, in one or more embodiments of the present specification, the label question corresponding to the sample question is obtained, including: In the case that the formula exists in the sample question, determining an identifier corresponding to the formula; Generating a label question containing the identifier corresponding to the formula.
[0039] The identifier corresponding to the formula can be a letter, a symbol, etc., or can be any text different from other text content in the mathematical calculation question. The identifier is used to mark the formula area in the mathematical calculation question to facilitate subsequent processing, so that when the mathematical calculation question is rendered and displayed, the formula marked by the identifier can be rendered using the latex rendering mode corresponding to the formula, and the other part of the text not marked can be rendered using the standard text rendering mode.
[0040] In actual application, in the case where the sample question contains a formula, for example, the sample question is a sample mathematical calculation question, and when generating the label question, the identifier corresponding to the formula needs to be determined first, and then the formula part can be marked using the identifier, so as to obtain the label question containing the identifier corresponding to the formula. In one or more embodiments of the present specification, the identifier can be added at the start text and the end text of the formula, so as to generate the label question carrying the identifier.
[0041] It should be noted that when each formula in the sample question is marked using the identifier corresponding to the formula, the identifiers of different formulas can be the same or different.
[0042] Step 104: inputting the preset prompt information and the sample question into an initial question processing model to obtain a predicted question output by the initial question processing model, wherein the predicted question is determined according to a question type of the sample question and a first task target in the preset prompt information, the question type is determined according to question type description information in the preset prompt information, and the first task target is used to prompt the initial question processing model to generate a structured text corresponding to the question type.
[0043] In one or more embodiments of the present specification, the server can input the sample mathematical calculation question and the preset prompt information into the initial question processing model, the initial question processing model can determine the question type of the sample mathematical calculation question according to the question type description information in the preset prompt information, and can generate a structured text corresponding to the question type based on the question type and the first task target in the preset prompt information.
[0044] The preset prompt information is prompt information for prompting the initial question processing model. The preset prompt information includes question type description information and a first task target. The question type description information refers to a description text of the question type corresponding to the mathematical calculation question, which indicates that each type of mathematical calculation question has various characteristics, so as to prompt the question processing model to determine the question type of the input sample mathematical calculation question.
[0045] In practical applications, the question type description information corresponding to the mathematical calculation question can be: horizontal calculation generally only needs one step of calculation to obtain the result, and the stem usually has related descriptions such as mental calculation, direct writing of numbers, etc. Vertical calculation generally writes the calculation process of addition, subtraction, multiplication or division in a vertical column, and calculates step by step, which is more convenient for processing multi-digit calculation. The calculation of the equation generally calculates the numerical value of the unknown number, so that the left and right sides of the equation are equal.
[0046] By setting the question type description information in the preset prompt information, the initial question processing model can understand each type of mathematical calculation question, thereby more accurately performing structured processing and generating more reasonable and accurate structured text.
[0047] In addition, corresponding to the foregoing step 102, in the case where the sample question contains an expression, the preset prompt information can include attention information, which is used to prompt the initial question processing model to generate a predicted question containing an identifier corresponding to the expression. That is, when the preset prompt information and the sample question are input into the initial question processing model to obtain the predicted question output by the initial question processing model, the initial question processing model can determine, according to the attention information contained in the preset prompt information, that the sample question contains an expression, and generate a predicted question containing an identifier corresponding to the expression.
[0048] In one or more embodiments of the present specification, the first task target refers to the task target of generating structured text corresponding to the question type of the sample question. Specifically, it can refer to splitting the sample mathematical calculation question into the stem, expression, answer, calculation process and analysis according to the type of the sample mathematical question, that is, the sample question in the present specification contains five parts of content: stem, expression, answer, calculation process and analysis. The stem is the explanatory text of the sample question and does not contain the expression. The expression is a mathematical calculation question without an answer. The answer is the answer to the expression. The calculation process is the operation process of the expression. The analysis is the thinking when calculating the sample question.
[0049] In one or more embodiments of the present specification, the sample mathematical calculation question can contain a plurality of sample sub-calculations, so that the preset prompt information and the sample question are input into the initial question processing model to obtain the predicted question output by the initial question processing model, which includes: The preset prompt information and the sample question are input into the initial question processing model to obtain the sub-predicted question corresponding to each sample sub-calculations output by the initial question processing model.
[0050] That is, for each sample sub-calculations, a corresponding sub-predicted question, i.e., a sub-structured text, is generated.
[0051] In addition, in one or more embodiments of the present specification, the sample question is a sample calculation question, there is an equation in the sample calculation question, and the prompt information includes an equation generation rule. The equation generation rule is used to prompt the initial question processing model to generate a predicted equation using the equation generation rule to generate a predicted question containing the predicted equation.
[0052] The equation generation rule is to generate an equation in latex format. Generating an equation in latex format facilitates subsequent rendering and display of the equation.
[0053] Further, in actual applications, since there is also a content missing problem in the sample mathematical calculation question, such as missing calculation process, when generating the structured question, the missing content also needs to be completed. Therefore, in one or more embodiments of the present specification, the preset prompt information includes a second task objective, and the second task objective is used to prompt the initial question processing model to supplement the missing information in the structured text corresponding to the question type.
[0054] When the preset prompt information and the sample question are input into the initial question processing model, and the predicted question output by the initial question processing model is obtained, the initial question processing model can generate the missing content according to the second task objective in the preset prompt information, and specifically, the missing content can be predicted using other content in the sample mathematical calculation question, so as to generate the structured text after the missing content is supplemented.
[0055] In actual applications, the second task objective can be: if there is no calculation process, please generate the corresponding calculation process. Or, if there is no answer, please generate the corresponding answer, etc. The second task objective is used to prompt the initial question processing model to supplement the missing content, that is, the second task objective refers to supplementing the missing content in the calculation question.
[0056] In one or more embodiments of this specification, a specific form of preset prompt information is provided, which may be: You are an excellent math teacher, you are proficient in LaTeX format, please extract and structure the calculation problem. There are four types of calculation problems, including horizontal calculation, vertical calculation, step-by-step calculation, and equation solving. The requirements are: according to the given calculation problem type, please break down the problem stem, the formula for each sub-calculation problem, the answer, the calculation process, and the explanation. The problem stem is the description text of the problem (without a formula), the formula is the calculation problem without an answer, the result in the answer is the calculation result of the calculation problem, the calculation process is the operation process of the formula, and the explanation must be consistent with the original explanation. If there is no calculation process, please generate the corresponding calculation process. Please note that horizontal, vertical, and step-by-step formulas must end with an equal sign. LaTeX formulas need to be enclosed in $, such as $x=1$. Of course, in practical applications, the preset prompt information can also take other forms and include other information, which can be set according to actual needs.
[0057] Step 106: Based on the predicted question and the labeled question, train the initial question processing model until the model training stops, and obtain the target question processing model.
[0058] Finally, the loss can be calculated based on the predicted and labeled questions, and the initial question processing model can be trained based on the loss until the model training stops, thus obtaining the target question processing model.
[0059] The model training can stop if the number of mathematical calculation problems used in the sample is greater than the preset number, the calculated loss is less than the preset number, the number of iterations reaches the preset number, etc. This manual does not impose specific restrictions.
[0060] In one or more embodiments of this specification, the initial question processing model may be a pre-trained large language model, which may be fine-tuned based on the predicted question and the labeled question to obtain the target large language model.
[0061] It should be noted that the loss can be calculated using a loss function formula based on the predicted and labeled questions. This manual does not impose specific restrictions on how to design the loss function formula; it can be determined according to actual needs. When training the initial question processing model, the objective should be to minimize the difference between the predicted and labeled questions.
[0062] Based on the above-described question processing model training method, sample questions and corresponding tagged questions can be obtained. The sample questions include question stem information, answer information, and explanation information, while the tagged questions are the structured text corresponding to the sample questions. Preset prompts and the sample questions are input into an initial question processing model to obtain predicted questions output by the initial model. The predicted questions are determined based on the question type of the sample questions and the first task objective in the preset prompts. The question type is determined based on the question type description information in the preset prompts. The first task objective is used to prompt the initial question processing model to generate structured text corresponding to the question type. The initial question processing model is trained based on the predicted questions and the tagged questions until the model training stops, thus obtaining the target question processing model.
[0063] The target question processing model trained in the above manner can generate complete and orderly structured questions from disordered questions, ensuring the integrity and orderliness of the question data, making it easier for users to view and improving the user experience. It also facilitates subsequent automated grading through structured questions, improving grading efficiency and accuracy.
[0064] In practical applications, the target question processing model can be used to process calculation problems. For example, a learning platform can call the target question processing model to process the calculation problems in its question bank, ensuring that all problems are structured and complete. When users practice calculation problems through the learning platform, the platform can generate a question sheet where users can fill in their answers. Users can also upload the question sheet containing their answers to the learning platform. The learning platform can then automatically grade the question sheets containing answers based on the calculation problems processed by the target question processing model, obtaining the grading results and returning them to the user.
[0065] Because the calculation problems in the question bank are structured and complete after being processed by the target question processing model, problems such as missing answers, failed answer searches, or incorrect question matching during automated grading can be avoided, thus improving the accuracy and efficiency of automated grading. Furthermore, the calculation problems can be displayed to users, providing them with the structured and complete calculation problems processed by the target question processing model for easy access and enhancing the user experience.
[0066] The following is in conjunction with the appendix Figure 2 Taking the application of the target question processing model provided in this specification in a question processing scenario as an example, the training method of the question processing model will be further explained. Among them, Figure 2The present specification shows a flowchart of a problem-solving method according to an embodiment, which includes the following steps.
[0067] Step 202: Obtain the questions to be processed, wherein the questions to be processed include question stem information, answer information, and analysis information.
[0068] The entity executing the question processing method can be the same as or different from the entity executing the question processing model training method described above. For ease of description, we will use the learning platform as an example here.
[0069] In practical applications, the learning platform can deploy a target question processing model, or have the ability to invoke the target question processing model.
[0070] The learning platform can obtain questions to be processed. These questions can be from the platform's question bank or uploaded by users. As mentioned earlier, these questions can be mathematical calculation problems.
[0071] Among them, the questions to be processed can be unstructured, scattered, or incomplete.
[0072] In practical applications, after obtaining the target question processing model, the target question processing model can be deployed and put online, and the structured question content can be obtained through the corresponding calculation question structured interface of the learning platform.
[0073] Step 204: Input the question to be processed and the preset prompt information into the target question processing model to obtain the target question output by the target question processing model, wherein the target question is the structured text corresponding to the question to be processed, and the target question processing model is trained by the question processing model training method described above.
[0074] Then, the question to be processed and the preset prompt information can be input into the target question processing model. The target question processing model can generate the target question according to the prompt information. Corresponding to the above, the target question is the structured text corresponding to the question to be processed.
[0075] Since the target question processing model is trained using the above question processing model training method, it has the ability to perform structured processing and completion processing on the questions to be processed, thus generating complete and orderly structured questions and realizing the organization of questions.
[0076] The target question processing model can process the questions to be processed, and can structure the messy question stem information, answer information and analysis information in the questions to generate complete and orderly target questions for users to view or for subsequent automated grading, thereby improving user experience and grading efficiency and accuracy.
[0077] Furthermore, after obtaining the target question, the target question can be rendered or displayed to the user. Therefore, in one or more embodiments of this specification, when a rendering request is obtained, if it is determined that there is an identifier corresponding to a formula in the target question, the first method can be used to render the content of the target question other than the formula, and the second method can be used to render the content of the formula in the target question, so as to complete the rendering request.
[0078] Corresponding to the above, the first method can be the rendering method corresponding to the LaTeX format, and the second method is the standard text rendering method, which can correctly render and display the formulas in the target problem and improve rendering efficiency.
[0079] Corresponding to the above method embodiments, this specification also provides an embodiment of a problem processing model training device. Figure 3 A schematic diagram of a problem-solving model training device according to one embodiment of this specification is shown. Figure 3 As shown, the device includes: The first acquisition module 302 is configured to acquire sample questions and tag questions corresponding to the sample questions, wherein the sample questions include question stem information, answer information and analysis information, and the tag questions are structured text corresponding to the sample questions; The first input module 304 is configured to input a preset prompt template and the sample question into an initial question processing model to obtain a predicted question output by the initial question processing model. The predicted question is determined based on the question type of the sample question and the task objective in the preset prompt template. The question type is determined based on the preset prompt module. The task objective is used to prompt the initial question processing model to generate structured text corresponding to the question type. Training module 306 is configured to train the initial question processing model based on the predicted question and the labeled question until the model training stops, thereby obtaining the target question processing model.
[0080] Optionally, the first acquisition module 302 is further configured to input the sample question into a text question classification model to obtain the question type corresponding to the sample question output by the text question classification model; Based on the question type and the sample questions, determine the tag questions corresponding to the sample questions.
[0081] Optionally, the sample questions are sample calculation questions, and the sample calculation questions include sample sub-calculation questions; The first input module 304 is further configured to input the preset prompt information and the sample questions into the initial question processing model to obtain the sub-predicted questions corresponding to each sample sub-calculation question output by the initial question processing model.
[0082] Optionally, the first acquisition module 302 is further configured to determine the identifier corresponding to the formula if the sample question contains a formula; Generate a tagged question containing the identifier corresponding to the formula; Accordingly, the preset prompt information includes attention information, which is used to prompt the initial question processing model to generate a predicted question containing the identifier corresponding to the formula.
[0083] Optionally, the sample question is a sample calculation question, which contains a formula, and the prompt information includes formula generation rules; The formula generation rule is used to prompt the initial question processing model to use the formula generation rule to generate a prediction formula, so as to generate a prediction question containing the prediction formula.
[0084] Optionally, the preset prompt information includes a second task objective, which is used to prompt the initial question processing model to supplement the missing information in the structured text corresponding to the question type.
[0085] Based on the above-described question processing model training method, sample questions and corresponding tagged questions can be obtained. The sample questions include question stem information, answer information, and explanation information, while the tagged questions are the structured text corresponding to the sample questions. Preset prompts and the sample questions are input into an initial question processing model to obtain predicted questions output by the initial model. The predicted questions are determined based on the question type of the sample questions and the first task objective in the preset prompts. The question type is determined based on the question type description information in the preset prompts. The first task objective is used to prompt the initial question processing model to generate structured text corresponding to the question type. The initial question processing model is trained based on the predicted questions and the tagged questions until the model training stops, thus obtaining the target question processing model.
[0086] The target question processing model trained in the above manner can generate complete and orderly structured questions from disordered questions, ensuring the integrity and orderliness of the question data, making it easier for users to view and improving the user experience. It also facilitates subsequent automated grading through structured questions, improving grading efficiency and accuracy.
[0087] The above is a schematic scheme of a problem processing model training device according to this embodiment. It should be noted that the technical solution of this problem processing model training device and the technical solution of the problem processing model training method described above belong to the same concept. For details not described in detail in the technical solution of the problem processing model training device, please refer to the description of the technical solution of the problem processing model training method described above.
[0088] Corresponding to the above method embodiments, this specification also provides an embodiment of a question processing device. Figure 4 A schematic diagram of a problem-solving apparatus according to one embodiment of this specification is shown. Figure 4 As shown, the device includes: The second acquisition module 402 is configured to acquire a question to be processed, wherein the question to be processed includes question stem information, answer information and analysis information; The second input module 404 is configured to input the question to be processed and the preset prompt information into the target question processing model to obtain the target question output by the target question processing model, wherein the target question is the structured text corresponding to the question to be processed, and the target question processing model is trained by the above-mentioned question processing model training method.
[0089] Optionally, the question processing device further includes a rendering module; The rendering module is configured to, when it is determined that there is an identifier corresponding to a formula in the target question, render the content of the target question other than the formula in a first manner, and render the content of the formula in the target question in a second manner.
[0090] The target question processing model can process the questions to be processed, and can structure the messy question stem information, answer information and analysis information in the questions to generate complete and orderly target questions for users to view or for subsequent automated grading, thereby improving user experience and grading efficiency and accuracy.
[0091] The above is an illustrative scheme of a question processing device according to this embodiment. It should be noted that the technical solution of this question processing device and the technical solution of the question processing method described above belong to the same concept. For details not described in detail in the technical solution of the question processing device, please refer to the description of the technical solution of the question processing method described above.
[0092] See Figure 5 , Figure 5 This specification illustrates an architecture diagram of a problem-solving model training system according to an embodiment of the present specification. The problem-solving model training system may include a client 100 and a server 200. Client 100 is used to send a sample question and a tag question corresponding to the sample question to server 200. The sample question includes question stem information, answer information and analysis information, and the tag question is the structured text corresponding to the sample question. Server 200 is used to input preset prompt information and the sample questions into an initial question processing model to obtain predicted questions output by the initial question processing model. The predicted questions are determined based on the question type of the sample questions and a first task objective in the preset prompt information. The question type is determined based on the question type description information in the preset prompt information. The first task objective is used to prompt the initial question processing model to generate structured text corresponding to the question type. Based on the predicted questions and the tagged questions, the initial question processing model is trained until a model training stop condition is met to obtain a target question processing model. The model parameters of the target question processing model are sent to client 100. Client 100 is also used to receive model parameters of the target question processing model sent by server 200.
[0093] The target question processing model trained using the embodiments of this specification can generate complete and orderly structured questions from disordered questions, ensuring the integrity and orderliness of the question data, making it easier for users to view and improving user experience. It also facilitates subsequent automated grading through structured questions, improving grading efficiency and accuracy.
[0094] The problem-solving model training system may include multiple clients 100 and a server 200. Clients 100 can be referred to as edge devices, and server 200 can be referred to as cloud devices. Multiple clients 100 can establish communication connections through server 200. In the problem-solving model training scenario, server 200 is used to provide problem-solving model training services between multiple clients 100. Each client 100 can act as a sender or receiver, communicating through server 200.
[0095] Users can interact with server 200 through client 100 to receive data sent by other clients 100, or send data to other clients 100, etc. In the scenario of training a question processing model, users can publish data streams to server 200 through client 100, and server 200 can generate model parameters of the target question processing model based on the data stream, and push the model parameters of the target question processing model to other clients that have established communication.
[0096] In this system, client 100 and server 200 establish a connection via a network. The network provides the medium for communication between client 100 and server 200. The network can include various connection types, such as wired or wireless communication links or fiber optic cables. Data transmitted by client 100 may need to undergo encoding, transcoding, compression, or other processing before being published to server 200.
[0097] Client 100 can be a browser, an app (application), a web application such as an H5 (HyperText Markup Language 5) application, a lightweight application (also known as a mini-program), or a cloud application. Client 100 can be developed based on the software development kit (SDK) of the corresponding service provided by server 200, such as a real-time communication (RTC) SDK. Client 100 can be deployed on a computing device and depends on the device or certain apps on the device to run. The computing device may have a display screen and support information browsing, such as a personal mobile terminal like a mobile phone, tablet, or personal computer. Various other types of applications can also be configured on the computing device, such as human-computer interaction applications, model training applications, text processing applications, web browser applications, shopping applications, search applications, instant messaging tools, email clients, and social media platform software.
[0098] Server 200 may include servers providing various services, such as servers providing communication services to multiple clients, servers supporting backend training of models used on clients, and servers processing data sent by clients. It should be noted that server 200 can be implemented as a distributed server cluster composed of multiple servers, or as a single server. The server can also be a server in a distributed system, or a server integrated with blockchain. The server can also be 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, content delivery networks (CDNs), and big data and artificial intelligence platforms, or an intelligent cloud computing server or intelligent cloud host with artificial intelligence technology.
[0099] It is worth noting that the problem processing model training method and problem processing method provided in the embodiments of this specification are generally executed by the server. However, in other embodiments of this specification, the client may also have similar functions to the server, thereby executing the problem processing model training method and problem processing method provided in the embodiments of this specification. In other embodiments, the problem processing model training method and problem processing method provided in the embodiments of this specification may also be executed jointly by the client and the server.
[0100] Figure 6 A structural block diagram of a computing device 600 according to an embodiment of this application is shown. The components of the computing device 600 include, but are not limited to, a memory 610 and a processor 620. The processor 620 is connected to the memory 610 via a bus 630, and a database 650 is used to store data.
[0101] The computing device 600 also includes an access device 640, which enables the computing device 600 to communicate via one or more networks 660. Examples of these networks include Public Switched Telephone Network (PSTN), Local Area Network (LAN), Wide Area Network (WAN), Personal Area Network (PAN), or combinations of communication networks such as the Internet. The access device 640 may include one or more of any type of wired or wireless network interface (e.g., a network interface card (NIC)), such as an IEEE 802.11 Wireless Local Area Network (WLAN) wireless interface, a Wi-MAX (Worldwide Interoperability for Microwave Access) interface, an Ethernet interface, a Universal Serial Bus (USB) interface, a cellular network interface, a Bluetooth interface, a Near Field Communication (NFC) interface, and so on.
[0102] In one embodiment of this application, the aforementioned components of the computing device 600 and Figure 6 Other components, not shown, can also be connected to each other, for example, via a bus. It should be understood that... Figure 6 The block diagram of the computing device shown is for illustrative purposes only and is not intended to limit the scope of this application. Those skilled in the art can add or replace other components as needed.
[0103] The computing device 600 can be any type of stationary or mobile computing device, including mobile computers or mobile computing devices (e.g., tablet computers, personal digital assistants, laptop computers, notebook computers, netbooks, etc.), mobile phones (e.g., smartphones), wearable computing devices (e.g., smartwatches, smart glasses, etc.) or other types of mobile devices, or stationary computing devices such as desktop computers or personal computers (PCs). The computing device 600 can also be a mobile or stationary server.
[0104] The processor 620 is used to execute the following computer program / instruction, which, when executed by the processor, implements the steps of the above-mentioned problem processing model training method and problem processing method.
[0105] The above is an illustrative scheme of a computing device according to this embodiment. It should be noted that the technical solution of this computing device belongs to the same concept as the above-mentioned problem processing model training method and problem processing method. For details not described in detail in the technical solution of the computing device, please refer to the description of the above-mentioned problem processing model training method and problem processing method.
[0106] An embodiment of this specification also provides a computer-readable storage medium storing a computer program / instructions that, when executed by a processor, implement the steps of the above-described problem-solving model training method and problem-solving method.
[0107] The various embodiments in this specification are described in a progressive manner. Similar or identical parts between embodiments can be referred to interchangeably. Each embodiment focuses on describing the differences from other embodiments. In particular, the computer-readable storage medium embodiment is described simply because it is substantially similar to the problem-solving model training method and the problem-solving method embodiment. Relevant details can be found in the descriptions of the problem-solving model training method and the problem-solving method embodiment.
[0108] An embodiment of this specification also provides a computer program product, including a computer program / instruction, which, when executed by a processor, implements the steps of the above-described problem processing model training method and problem processing method.
[0109] The above is an illustrative scheme of a computer program product according to this embodiment. It should be noted that the technical solution of this computer program product belongs to the same concept as the above-mentioned problem processing model training method and problem processing method. For details not described in detail in the technical solution of the computer program product, please refer to the description of the above-mentioned problem processing model training method and problem processing method.
[0110] The foregoing has described specific embodiments of this specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims may be performed in a different order than that shown in the embodiments and may still achieve the desired result. Furthermore, the processes depicted in the drawings do not necessarily require the specific or sequential order shown to achieve the desired result. In some embodiments, multitasking and parallel processing are possible or may be advantageous.
[0111] The computer instructions include computer program code, which may be in the form of source code, object code, executable file, or certain intermediate forms. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording media, USB flash drive, portable hard drive, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signals, telecommunication signals, and software distribution media, etc. It should be noted that the content included in the computer-readable medium may be appropriately added or removed according to the requirements of patent practice. For example, in some regions, according to patent practice, computer-readable media may not include electrical carrier signals and telecommunication signals.
[0112] It should be noted that the above description describes specific embodiments of this specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in a different order than that shown in the embodiments and still achieve the desired results. Furthermore, the processes depicted in the drawings do not necessarily require a specific or sequential order to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous. Secondly, those skilled in the art should also understand that the embodiments described in the specification are preferred embodiments, and the actions and modules involved are not necessarily essential to the embodiments of this specification.
[0113] In the above embodiments, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments.
[0114] The preferred embodiments disclosed above are merely illustrative of this specification. The optional embodiments do not exhaustively describe all details, nor do they limit the invention to the specific implementations described. Clearly, many modifications and variations can be made based on the embodiments described herein. These embodiments are selected and specifically described in this specification to better explain the principles and practical applications of the embodiments, thereby enabling those skilled in the art to better understand and utilize this specification. This specification is limited only by the claims and their full scope and equivalents.
Claims
1. A method for training a problem-solving model, characterized in that, The method comprises: obtaining a sample question and a label question corresponding to the sample question, wherein the sample question comprises stem information, answer information and analysis information, and the label question is a structured text corresponding to the sample question; inputting preset prompt information and the sample question into an initial question processing model to obtain a predicted question output by the initial question processing model, wherein the predicted question is determined according to a question type of the sample question and a first task target in the preset prompt information, the question type is determined according to question type description information in the preset prompt information, and the first task target is used to prompt the initial question processing model to generate a structured text corresponding to the question type; training the initial question processing model according to the predicted question and the label question until a model training stop condition is reached to obtain a question processing model.
2. The method of claim 1, wherein, The method comprises: inputting the sample question into a text question classification model to obtain a question type corresponding to the sample question output by the text question classification model; determining the label question corresponding to the sample question according to the question type and the sample question.
3. The method of claim 1, wherein, The sample question is a sample calculation question, and the sample calculation question comprises a sample sub-calculation question; inputting preset prompt information and the sample question into an initial question processing model to obtain a predicted question output by the initial question processing model, comprising: inputting preset prompt information and the sample question into an initial question processing model to obtain a sub-predicted question corresponding to each sample sub-calculation question output by the initial question processing model.
4. The method of claim 1, wherein, The method comprises: in a case where an algorithmic expression exists in the sample question, determining an identifier corresponding to the algorithmic expression; generating a label question comprising the identifier corresponding to the algorithmic expression; correspondingly, the preset prompt information comprises attention information, and the attention information is used to prompt the initial question processing model to generate a predicted question comprising the identifier corresponding to the algorithmic expression.
5. The method of claim 1, wherein, The sample question is a sample calculation question, and the sample calculation question comprises an algorithmic expression, and the prompt information comprises an algorithmic expression generation rule; the algorithmic expression generation rule is used to prompt the initial question processing model to generate a predicted algorithmic expression by using the algorithmic expression generation rule, so as to generate a predicted question comprising the predicted algorithmic expression.
6. The method of claim 1, wherein, The preset prompt information comprises a second task target, and the second task target is used to prompt the initial question processing model to supplement missing information in the structured text corresponding to the question type.
7. A subject processing method characterized by, The method comprises: obtaining a to-be-processed question, wherein the to-be-processed question comprises stem information, answer information and analysis information; inputting the to-be-processed question and preset prompt information into a question processing model to obtain a question output by the question processing model, wherein the question is a structured text corresponding to the to-be-processed question, and the question processing model is trained by the question processing model training method in any one of claims 1 to 6.
8. The method of claim 7, wherein, The method further comprises: In a case where it is determined that the identifier corresponding to the formula exists in the target title, content in the target title except the formula is rendered in a first mode, and content of the formula in the target title is rendered in a second mode. 9.A subject processing model training apparatus, characterized by comprising: The method comprises the following steps: The first obtaining module is configured to obtain a sample question and a label question corresponding to the sample question, wherein the sample question comprises stem information, answer information and analysis information, and the label question is a structured text corresponding to the sample question; The first input module is configured to input a preset prompt template and the sample question into an initial question processing model to obtain a predicted question output by the initial question processing model, wherein the predicted question is determined according to a question type of the sample question and a task target in the preset prompt template, the question type is determined according to a preset prompt module, and the task target is used to prompt the initial question processing model to generate a structured text corresponding to the question type; The training module is configured to train the initial question processing model according to the predicted question and the label question until a model training stop condition is reached to obtain a question title processing model.
10. A computing device, comprising: The method comprises the following steps: A memory and a processor; The memory is used for storing computer programs / instructions, and the processor is used for executing the computer programs / instructions, and the computer programs / instructions realize the steps of the method in any one of claims 1 to 8 when executed by the processor.
11. A computer readable storage medium, characterized in that, The computer program / instruction stored in the memory realizes the steps of the method in any one of claims 1 to 8 when executed by the processor.
12. A computer program product, characterised in that, The computer program / instruction realizes the steps of the method in any one of claims 1 to 8 when executed by the processor.