Generation method and device of question solving model for solving queuing question, equipment and medium
By obtaining problem solving information about queued problems, generating training data and training problem-solving models, the problem of low generation efficiency of existing teaching videos is solved, and high-quality solution videos are quickly generated.
Patent Information
- Application Number
- CN202411403904.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-09
- Publication Date
- 2025-01-03
AI Technical Summary
Most of the existing teaching videos are handmade, which is time-consuming and labor-intensive, making it difficult to quickly generate explanation videos.
By obtaining the queued questions to be answered, determining their problem-solving information, generating training data, and using this data to train the problem-solving model, we obtain a problem-solving model that can generate the answer video code.
It realizes the rapid and accurate generation of answer video codes, reducing the process of manual writing and recording, and improving the efficiency of video generation.
Smart Images

Figure CN119254801A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present specification relate to the field of automation technology, and more particularly to a method, device, equipment and medium for generating a problem-solving model for solving a queuing problem. Background Art
[0002] With the development of artificial intelligence and big data technology, the use of computer technology to assist teaching has become a trend. In particular, using animations and videos to explain topics can greatly improve students' learning interest and comprehension ability. However, most existing teaching videos are handmade, which is time-consuming and labor-intensive.
[0003] Therefore, it is necessary to provide a method for quickly generating explanation videos. Summary of the invention
[0004] In view of this, an embodiment of this specification provides a method for generating a problem-solving model for solving a queuing problem. One or more embodiments of this specification also relate to a device for generating a problem-solving model for solving a queuing problem, a computing device, and a computer-readable storage medium to solve the technical defects existing in the prior art.
[0005] According to a first aspect of an embodiment of this specification, a method for generating a problem-solving model for solving a queuing problem is provided, comprising: Obtaining a question to be answered; the type of the question to be answered is a type of queuing problem; Determining the solution information of the question to be answered; the solution information includes a video code for the answer to the question to be answered; Generate training data based on the to-be-answered questions and the question-solving information; The training data is used to train a problem-solving model to obtain a trained problem-solving model; the trained problem-solving model can generate a video code for explaining a solution to a problem related to a queuing problem.
[0006] According to a second aspect of an embodiment of this specification, there is provided a device for generating a problem-solving model for solving a queuing problem, comprising: The first acquisition module is configured to acquire a question to be answered; the type of the question to be answered is a type of queuing question; A determination module is configured to determine the solution information of the to-be-solved question; the solution information includes a video code for the solution to the to-be-solved question; A data generation module is configured to generate training data based on the to-be-answered questions and the question-solving information; The model training module is configured to train the problem-solving model using the training data to obtain a trained problem-solving model; the trained problem-solving model can generate a video code for explaining a solution to a question about a queuing problem.
[0007] According to a third aspect of an embodiment of this specification, a computing device is provided, including: Memory and processor; The memory is used to store computer executable instructions, and the processor is used to execute the computer executable instructions. When the computer executable instructions are executed by the processor, the steps of the method for generating a problem-solving model for solving the queuing problem are implemented.
[0008] According to a fourth aspect of the embodiments of this specification, a computer-readable storage medium is provided, which stores computer-executable instructions, and when the instructions are executed by a processor, the steps of the method for generating a problem-solving model for solving the queuing problem are implemented.
[0009] A computer program product includes a computer program / instruction, which, when executed by a processor, implements the steps of the method for generating a problem-solving model for solving the queuing problem.
[0010] At least one embodiment provided in this specification can achieve the following beneficial effects: first, obtain the unanswered questions about the queuing problem, and determine the solution information of the unanswered questions, the solution information includes the solution video code for the unanswered questions; generate training data based on the unanswered questions and the solution information, and use the training data to train the problem-solving model; thereby obtaining a trained problem-solving model that can generate the solution video code for explaining the questions about the queuing problem. Then, the trained problem-solving model can be used to quickly and accurately generate the solution video code for explaining the questions, avoiding manual code writing and recording of the solution video, reducing manual operations, and improving the efficiency of generating the solution video. BRIEF DESCRIPTION OF THE DRAWINGS
[0011] Figure 1 It is a flow chart of a method for generating a problem-solving model for solving a queuing problem provided by an embodiment of this specification; Figure 2 It is a structural schematic diagram of a device for generating a problem-solving model for solving a queuing problem provided by an embodiment of the present specification; Figure 3 It is a structural block diagram of a computing device provided by an embodiment of this specification. DETAILED DESCRIPTION
[0012] Many specific details are described in the following description to facilitate a full understanding of this specification. However, this specification can be implemented in many other ways than those described herein, and those skilled in the art can make similar generalizations without violating the connotation of this specification, so this specification is not limited to the specific implementation disclosed below.
[0013] The terms used in one or more embodiments of this specification are only for the purpose of describing specific embodiments, and are not intended to limit one or more embodiments of this specification. The singular forms of "a", "said" and "the" used in one or more embodiments of this specification and the appended claims are also intended to include plural forms, unless the context clearly indicates other meanings. It should also be understood that the term "and / or" used in one or more embodiments of this specification refers to and includes any or all possible combinations of one or more associated listed items.
[0014] It should be understood that although the terms first, second, etc. may be used to describe various information in one or more embodiments of this specification, this information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of one or more embodiments of this specification, the first may also be referred to as the second, and similarly, the second may also be referred to as the first. Depending on the context, the word "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining".
[0015] In addition, it should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in one or more embodiments of this specification are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of the relevant countries and regions, and provide corresponding operation entrances for users to choose to authorize or refuse.
[0016] First, the terms involved in one or more embodiments of this specification are explained.
[0017] Large Language Model: Large Language Model (LLM), also known as large language model or large model, is a natural language processing technology based on deep learning. They can better understand natural language and generate high-quality text based on a given context. For example, models GPT-4, PaLMGalactica, and LaMA. Large language models can usually contain hundreds of billions (or more) of references, which are trained on a large amount of text data. Through training, large language models can learn the grammatical structure of the language and the relationship between words, so that they can perform a wide range of tasks.
[0018] GPT-4: GPT-4 is one of a series of text generation models based on GPT (Generative Pretrained Model) developed by OpenAI. It has been trained with a large amount of Internet text and is a large language model that can generate coherent sentences or paragraphs in a human style.
[0019] Supervised Fine-Tuning (SFT) of Large Models: SFT is a machine learning strategy. SFT mainly involves further parameter tuning of pre-trained models using labeled datasets that contain the correct answers or labels. During the SFT process, the parameters of some layers (or all layers) of the model will be updated based on this new task so that the model can perform this specific task better.
[0020] Queuing problems: Queuing problems are a classic type of problem in elementary school mathematics. This type of problem is usually in a real-life scenario, requiring students to use addition and subtraction operations to infer and calculate the total number of people in a line or the number of people between two lines, etc., mainly to cultivate students' logical thinking and problem-solving abilities. For example, "Students are lining up. There are 5 people in front of Xiaolan and 7 people behind her. How many people are there in this line?"
[0021] Manim (Mathematical Animation Engine): is an open source Python library for creating high-quality mathematical animations. Manim allows users to precisely control the details of animations through programming, which is very suitable for education and popular science. Manim provides many internal classes such as Dot, VGroup, Brace, etc., which are very helpful for solving queuing problems by drawing.
[0022] Few-Shot Learning: Few-Shot Learning is a term in the field of machine learning that refers to the ability to train a model with only a small amount of labeled data. This method is particularly suitable for scenarios where it is costly or infeasible to obtain a large amount of labeled data. It is one of the key methods to solve the problem of data scarcity and has promoted the application of machine learning technology in a wider range of fields, especially when data acquisition is limited.
[0023] In this specification, a method for generating a problem-solving model for solving a queuing problem is provided. This specification also relates to a device for generating a problem-solving model for solving a queuing problem, a computing device, and a computer-readable storage medium, which are described in detail one by one in the following embodiments.
[0024] See also Figure 1 , Figure 1 A flowchart of a method for generating a problem-solving model for solving a queuing problem provided according to an embodiment of the present specification is shown. From a program perspective, the execution subject of the process can be a program of a server or a training platform.
[0025] like Figure 1 As shown, the process may specifically include the following steps: Step 102: Obtain the questions to be answered; the type of the questions to be answered is the type of queuing problem.
[0026] In the embodiments of this specification, the problem to be solved may be one or more problems related to queuing problems in mathematical applications.
[0027] In practical applications, we can use the Retrieval-augmented Generation model (RAG) from a known question bank to obtain unanswered questions about queuing problems. We can also write unanswered questions based on expert experience. Of course, we can also generate unanswered questions based on a large language model. There is no specific limitation on the method of obtaining unanswered questions.
[0028] In practical applications, the obtained unanswered questions can be used to train the problem-solving model. In order to improve the accuracy of the problem-solving model training, the types and quantity of the obtained unanswered questions are usually as large as possible.
[0029] Step 104: determining the solution information of the question to be answered; the solution information includes a video code for the answer to the question to be answered.
[0030] In the embodiment of this specification, the to-be-solved video code contained in the problem-solving information is a code that can be used to generate an explanation video of the to-be-solved problem.
[0031] In practical applications, the problem-solving information may include not only the video code to be solved, but also one or more of the following: step-by-step analysis information of the problem to be solved, knowledge point information corresponding to the problem to be solved, and answer information corresponding to the problem to be solved.
[0032] The solution information of the question to be answered can be obtained based on expert experience, for example, it can be obtained by manually answering the question to be answered; the solution information can also be directly generated using a large model; the solution information can also be obtained by first using a large model to answer the question to be answered to obtain a preliminary solution result, and then adjusting the preliminary solution result manually or through preset rules. No specific limitations are made here.
[0033] Step 106: Generate training data based on the questions to be answered and the question-solving information.
[0034] In the embodiments of this specification, the questions to be answered and the information on the answers to the questions can be combined to generate training data. For example, the questions to be answered can be placed before the information on the answers to the questions, or the questions to be answered can be placed after the information on the answers to the questions.
[0035] Step 108: Use the training data to train a problem-solving model to obtain a trained problem-solving model; the trained problem-solving model can generate a video code for explaining a solution to a problem related to the queuing problem.
[0036] In the embodiments of this specification, supervised fine-tuning can be used to train the problem-solving model. During the training process, the problem-solving model can adjust its own hyperparameters according to the training data to complete the training.
[0037] In practical applications, multiple training data can be used to train the problem-solving model. For example, multiple questions to be answered can be obtained at one time, and multiple training data can be generated using the obtained multiple questions to be answered according to the above method of generating training data, and then the generated training data can be used to train the problem-solving model to obtain a trained problem-solving model.
[0038] For another example, you can obtain unanswered questions multiple times, and generate training data for each unanswered question obtained according to the contents shown in steps 102 to 106 above. Then, you can generate multiple training data based on the multiple unanswered questions obtained, and use the multiple training data to train the problem-solving model to obtain a trained problem-solving model.
[0039] The trained problem-solving model can generate video codes for explaining solutions to questions about queuing problems. By using the trained problem-solving model to solve problems, the video codes for solutions can be quickly obtained, thereby improving the efficiency of generating videos for solving problems.
[0040] On the other hand, since the trained model is obtained by training with questions about queuing problems, it is more targeted at answering queuing problems and can more accurately generate video codes for answers to queuing problems. Therefore, the quality of the video codes for answers can be guaranteed, and thus the quality and standardization of the generated explanation videos for queuing problems can be guaranteed.
[0041] The answer video code can be compiled to generate an explanation video. In practical applications, the answer video code output by the problem-solving model can be compiled using a compilation software to directly generate an explanation video of the question.
[0042] For example, when users such as online teaching institutions or book publishing organizations need to generate explanation videos for a large number of questions in the database, they can directly use the trained problem-solving model to output the answer video code for the queuing problem, and then generate the explanation video based on the answer video code, avoiding the tedious process of manually writing scripts and making animations, and improving the efficiency of answer video production.
[0043] In addition, when students, parents and other users use teaching software for online learning and need to obtain a video explanation of a queuing problem, the teaching software can be loaded with the above-mentioned trained problem-solving model or can call the above-mentioned trained problem-solving model. After the user enters a queuing problem in the teaching software, the teaching software can use the trained problem-solving model to generate an answer video code for the above problem. The teaching software can also use video compilation software to compile the answer video code to obtain an explanation video of the above problem, thereby avoiding long waiting times for users, improving problem-solving efficiency, and improving user experience.
[0044] based on Figure 1 The method, the examples of this specification also provide some specific implementation plans of the method, which are described below.
[0045] In order to ensure the accuracy of problem-solving model training, a large amount of training data is usually required. However, manually generating a large amount of training data is too cumbersome. To solve this problem, an embodiment of this specification provides a method for automatically generating problem-solving information for questions to be answered.
[0046] Optionally, determining the solution information of the question to be answered may specifically include: Based on the prompt word template, a prompt word for the question to be answered is generated; the prompt word is used to instruct the large model to generate solution information for the question to be answered according to preset requirements.
[0047] The prompt words are input into the large model, and the large model is used to generate solution information for the question to be answered.
[0048] The large model can be a large language model, specifically, a model of the GPT series, such as GPT-3.5, GPT-4, GPT-4o and other general large language models. Of course, the large model can also be a model of other series, such as the Tongyi Qianwen model, the Ant Bailing large model, etc., which is not limited here.
[0049] In Prompt Engineering, a prompt is a text or sentence that can be used to guide the big model to generate a specific response; in the embodiments of this specification, the prompt can specifically be a text used to guide the big model to generate solution information for the question to be answered. The prompt can guide the big model to better understand the user's needs, thereby facilitating the big model to generate content that better meets the user's needs. The prompt and the format of the prompt in the embodiments of this specification can be set according to actual needs and are not specifically limited here.
[0050] In the embodiments of this specification, the prompt words may include system prompt words, reference examples, and question information of questions to be answered, etc. Among them, the system prompt words may include description information for this task, which may specifically include one or more of the role information of the large model, task information indicating the completion of the large model, task requirement information, and output data format information.
[0051] After the prompt words of the questions to be answered are input into the big model, the big model can fully understand the user's needs and quickly output the solution information of the questions to be answered, thereby avoiding the tedious process of manually generating solution information including answer video codes, step-by-step analysis information, knowledge point information and answer information, thereby improving the efficiency of obtaining solution information of the questions to be answered, thereby improving the training efficiency of the problem-solving model.
[0052] A prompt word template is a structured text used to generate prompt words. Prompt words can be generated based on the prompt word template.
[0053] In order to facilitate understanding of the present solution, the embodiments of the present specification also provide specific contents of generating a prompt word template.
[0054] Optionally, the method may further include: Obtain several different types of reference examples about queuing problems; the reference examples include example questions and codes for generating solution videos of the example questions.
[0055] Based on the reference example question, the prompt word template is generated.
[0056] In the embodiments of this specification, the reference examples are also examples of queuing problems in mathematics. Specifically, several different types of reference examples about queuing problems can be extracted from a known question bank; several different types of reference examples about queuing problems can also be compiled based on expert experience; of course, the codes of the existing answer videos of questions about queuing problems can also be reverse engineered to extract the codes of the answer videos, so that the obtained questions and the codes of the answer videos can be used as reference examples. The specific method for obtaining different types of reference examples is not specifically limited here.
[0057] In the embodiment of this specification, the generated prompt word template includes reference examples.
[0058] In practical applications, the number of reference examples can be small, but the types of reference examples should cover all types of queuing problems as much as possible. In the embodiments of this specification, Few-Shot Learning in prompt engineering is used to guide the large model to generate problem-solving information, avoiding the situation where a large number of reference examples cannot be obtained.
[0059] Typically, in addition to the example questions and the solution video code used to generate the example questions, the reference examples may also include other content, so that the solution information output by the large model also includes the above-mentioned other content, thereby assisting teaching.
[0060] Optionally, the reference example question may also include at least one of step-by-step analysis information for answering the example question step by step, knowledge point information corresponding to the example question, and answer information corresponding to the example question.
[0061] and / or, The problem-solving information of the question to be answered generated by using the large model also includes at least one of step-by-step analysis information for solving the question to be answered step by step, knowledge point information corresponding to the question to be answered, and answer information corresponding to the question to be answered.
[0062] In the embodiments of this specification, when the reference example includes one or more of the step-by-step analysis information, knowledge point information, and answer information of the example question, the prompt words for the question to be answered include one or more of the step-by-step analysis information, knowledge point information, and answer information of the example question. Under the guidance of the prompt words, the solution information of the question to be answered generated by the large model will also include information corresponding to the information included in the reference example. This can meet the relevant requirements of step-by-step explanation, overall summary, etc. in the teaching process, and improve the teaching quality.
[0063] In the embodiments of this specification, a large model is used to automatically generate information including step-by-step analysis information, knowledge point information, answer information, answer video code, etc., which reduces the tedious process of manually writing the above content information, improves the efficiency of obtaining solution information for questions to be answered, and improves the effect of obtaining training data, thereby improving the training efficiency of the problem-solving model.
[0064] In order to facilitate understanding of the present solution, the embodiments of the present specification also provide specific contents of the system prompt word template.
[0065] Optionally, the prompt word template may also include at least one of role information of the large model, task information indicating the completion of the large model, task requirement information, and output data format information.
[0066] Among them, the task requirement information includes at least one of code type information of the answer video code, voice format information in the answer video, voice playback format information, information on a virtual image used to refer to an object in the question in the answer video, information on simplification of the object in the question, and information on a software tool used to draw a virtual image of the object in the question.
[0067] In the embodiments of this specification, the role information of the large model, the task information indicating the completion of the large model, the task requirement information, and the output data format information can be understood as system prompt words.
[0068] In the embodiments of the present specification, the system prompt words and reference examples may be combined to generate a prompt word template.
[0069] For ease of understanding, this specification provides an example of a prompt word template, which is as follows: You are a math teacher. Please use manim to write a code to make a tutorial video for the following topic.
[0070] The requirements are as follows: *Create a `ProblemSolving` class, inherit `MyScene`, and write the `self.solve` method.
[0071] *First, use `audio_text` to generate a spoken explanation. Then use `self.voiceover` to play the synthesized audio. Note that latex cannot be used in audio_text, and the formula needs to be converted into Chinese.
[0072] *For queuing problems, use dots to represent a person or object to build a line and show the calculation process.
[0073] * Call `manim`'s built-in `Dot`, `VGroup`, `Brace`, etc. to draw dot graphs, and use `Brace` to add brackets on each `VGroup`.
[0074] *When there are too many points, only the first three and the last three are drawn, and the ones in the middle are replaced by ellipsis.
[0075] * Call `self.create_text` to create a `Text` object, do not use the `Text` built-in in `manim`.
[0076] *Use `self.play_text_left` to display the formula, which needs to be combined with text description.
[0077] *Only output [Question], [Knowledge Point], [Step-by-step Analysis], [Answer] and [Code], do not output other content.
[0078] Reference Example 1:
topic
Knowledge Points
[0079]
Step-by-step analysis
[0080] The second step, according to the question, Xiaohong is the 5th from the front, so there are $5-1=$4 people in front of Xiaohong. We draw the 4 people in front of Xiaohong.
[0081] The third step is to count from the back and be the 8th person, so there are $8-1=$7 people behind Xiaohong. We then draw the 7 people behind Xiaohong.
[0082] Step 4. The total number of people is equal to the number of people in front of Xiaohong, plus Xiaohong herself, plus the number of people behind Xiaohong, which is $4+1+7=$12. So there are a total of 12 children in line, and we draw the total number of 12 people.
[0083]
Answer
[0084]
Code
topic
Knowledge Points
[0085]
Step-by-step analysis
Answer
[0086]
Code
topic
Knowledge Points
[0087]
Step-by-step analysis
Answer
Code
topic
[0088]
Knowledge Points
[0089]
Step-by-step analysis
Answer
Code
[0090] As shown above, "*Create a `ProblemSolving` class, inherit `MyScene`, and write a `self.solve` method." can represent the code type information of the solution video code; "*First use `audio_text` to generate a spoken explanation. Then use `self.voiceover` to play the synthesized audio." can represent the voice format information and voice playback format information in the solution video; "*For queuing problems, you can use dots to represent a person or object to build a team and show the calculation process" can represent the information of the virtual image used to refer to the objects in the question in the solution video; "*When the number of points is too large, only the first three and the last three are drawn, and the middle ones are replaced by ellipsis" can represent the information of simplifying the objects in the question; "*Call `manim`'s built-in `Dot`, `VGroup`, `Brace`, etc. to draw a dot graph, and use `Brace` to add brackets on each `VGroup`." Can represent the information of the software tool used to draw the virtual image of the object in the question.
[0091] The server or training platform can add the question to be answered to the prompt word template to obtain the prompt word of the question to be answered. Continuing with the above example, the prompt word template contains an area for filling in the question to be answered, such as the area after the answer video code of the last example question. The server or training platform can fill in the question to be answered, such as "18 children are queuing, there are 10 people behind Xiao Ming, how many people are in front?" to the prompt word template to obtain the prompt word.
[0092] In the embodiments of the present specification, the training data used to train the problem-solving model may be training data in a predetermined format, so that the problem-solving model can understand the content of the training data and improve the training efficiency and accuracy of the problem-solving model.
[0093] Optionally, generating training data based on the to-be-answered question and the question-solving information may specifically include: Based on the training data format, the to-be-answered questions and the problem-solving information are used to generate training data that conforms to the training data format.
[0094] In the embodiments of the present specification, the questions to be answered and the solution information of the questions to be answered can be spliced in a preset order to generate training data. Specifically, the questions to be answered can be placed in front of the solution information, and the questions to be answered and the solution information can be separated by a first preset character; a preset second preset character can also be set before the questions to be answered; so that the problem-solving model can better understand the content of the training data and improve the training efficiency and accuracy of the problem-solving model. Among them, the first preset character and the second preset character can be set according to actual needs and are not specifically limited here.
[0095] For ease of understanding, the training data format is specifically described in the embodiments of this specification.
[0096] Optionally, the training data format may include a role definition part, a question part and a parsing part.
[0097] The role definition part includes information for defining the role played by the problem-solving model.
[0098] The question part includes information of the question to be answered.
[0099] The analysis part includes knowledge point information corresponding to the question to be answered, step-by-step analysis information, answer information and code information of the answer video.
[0100] In the embodiment of this specification, the training data format may include multiple identifiers with different meanings, and the problem-solving model may learn the training data from different angles according to the identifiers. As an implementation method, the identifier may include a first identifier, such as [SYSTEM], which may be used to define the role of the model and explain the task of the model this time. The first identifier may be located at the starting position of the role definition part. The identifier may also include a second identifier, such as [USER], which may be a question raised by the user. The identifier may also include a third identifier, such as [ASSISTANT], which may be the parsing part of the question. Of course, the above identifiers may also be words or texts of other fields, which are not specifically limited here. Among them, the problem-solving model can understand the task of the model this time according to the content after the first identifier, so the first identifier can be used to distinguish different business scenarios. According to the first identifier, the problem-solving model can also clarify the identity of the model performing this task, for example, the problem-solving model is a math teacher. The second identifier and the third identifier can be understood as a set of dialogues, and the second identifier can be understood as the user asking questions as a user. It can be understood that the content after the second identifier is the content of the user's question. The third identifier can be understood as the answer of the problem-solving model as the assistant to the question asked by the user. It can be understood that the content after the third identifier is the assistant's answer; these three identifiers are spliced in order and can be used as training data to train the problem-solving model.
[0101] It can be understood that [ASSISTANT] can be understood as the first preset character in the above text; [USER] can be understood as the second preset character in the above text.
[0102] For example, the format and content of the training data can be as follows: [SYSTEM] You are a math teacher. Please use manim to write a code to make a teaching video for the following question.
[0103] [USER] is queuing up to buy tickets at the amusement park entrance. Xiaoli is the second person from the front and the sixth person from the back. How many people are there in the queue?
[0104] [ASSISTANT] [Knowledge point] xxx, [Step-by-step analysis] xxx, [Answer information] xxx, and [Code information] xxx.
[0105] Usually, we hope that the trained problem-solving model can output accurate solution information for the problem after obtaining the problem. Specifically, when using the training data to train the problem-solving model, the problem-solving model outputs prediction data based on the role definition part and the question part proposed by the user. The problem-solving model can also use the analysis part of the question as reference data to adjust the model parameters and obtain the trained problem-solving model.
[0106] It is understandable that the goal of training the problem-solving model is to minimize the difference between the reference data and the predicted data, that is, to reduce the loss between the reference data and the predicted data. The parameters of the problem-solving model can be continuously adjusted during the training process to reduce the loss. When the loss no longer decreases, it means that the problem-solving model training is complete.
[0107] The problem-solving model in the embodiments of this specification may be a network model, such as a YunLLM 70B model, a Multimodal-CoT or an Mixtral 8x7B model. To improve training efficiency, the problem-solving model in the embodiments of this specification may be a pre-trained network model, such as a pre-trained YunLLM 70B model, or other types of models, which are not specifically limited here.
[0108] In the embodiments of this specification, the obtained training data can be used to train the problem-solving model.
[0109] Assume that multiple training data are obtained, each training data may include questions, knowledge points, step-by-step analysis, answers, and corresponding video codes for solutions, etc. The training data should include various types of questions about queuing problems to improve the generalization ability of the problem-solving model.
[0110] After obtaining the training data, you can also clean and format the training data to ensure the consistency and standardization of the data. Specifically, this can include word segmentation and noise removal for text data, and formatting for code data. If the knowledge points, step-by-step analysis, answers, and corresponding video codes in the training data are generated using a large model, since the data generated by the large model is standardized and in a unified format, you do not need to clean and format the training data at this time.
[0111] At the beginning of training, you can first initialize the problem-solving model and set some training parameters. For example, load the pre-trained YunLLM 70B model and configure training parameters such as learning rate, batch size, and number of training rounds.
[0112] Then, the problem-solving model is fine-tuned using the training data. Specifically, the question can be used as input, and the generation of accurate knowledge points, step-by-step analysis, answers, and video code for the solution can be used as the goal. During the training process, the problem-solving model continuously adjusts parameters through backpropagation to minimize the difference between the generated code and the annotated code.
[0113] During the training process, you can also use the validation set to evaluate the model performance regularly or irregularly to adjust the problem-solving model parameters and training strategies to ensure the stability and efficiency of the problem-solving model.
[0114] After the training is completed, the model parameters and structure of the trained problem-solving model can be saved for subsequent use and deployment.
[0115] In practical applications, model evaluation is an important step in verifying the quality and reliability of the lecture video code generated by the trained problem-solving model. As an implementation method, the embodiment of this specification evaluates the performance of the trained problem-solving model through the following steps.
[0116] First, obtain a test set. Specifically, you can randomly select 100 questions from the test question bank and make sure that the test set questions do not overlap with the training data. In addition, the test set usually needs to ensure that the questions cover various types and complexities of queuing problems so that the performance of the problem-solving model can be fully evaluated.
[0117] Then, the trained problem-solving model is used to generate the corresponding answer video code for each question in the test set. The generation process is similar to the training stage. Specifically, the questions can be input into the trained problem-solving model, and the trained problem-solving model can output knowledge points, step-by-step analysis, and answer video code.
[0118] The generated answer video code is input into the video rendering engine to render the actual answer video.
[0119] Finally, the performance of the trained problem-solving model can be evaluated based on the solution videos.
[0120] Specifically, the generated answer video can be evaluated using pre-determined evaluation criteria. Among them, the evaluation criteria may include the accuracy of the video (whether the problem-solving steps and results are correct), intuitiveness (whether the video is clear and easy to understand), vividness (whether the explanation process is vivid and interesting), and technicality (whether the code generation is efficient and error-free). The generated video can also be evaluated using the method of judging whether the answer video is qualified in the previous article. Professional teachers and technical experts can also be organized to manually evaluate the generated video and record the evaluation results. Of course, the two can also be combined, and no specific restrictions are made here. Finally, the evaluation results are statistically analyzed to evaluate the performance of the trained model for questions of different types and complexities in the queuing problem. According to the analysis results, the advantages and disadvantages of the trained problem-solving model are determined, thereby providing a basis for further optimizing the problem-solving model.
[0121] Through the above evaluation steps, we ensure that the problem-solving model after training has the ability to generate high-quality solution video codes and provide reliable technical support for practical applications.
[0122] In the embodiments of this specification, in order to improve the accuracy of model training and to improve the accuracy of the problem-solving model in generating the answer video code, it is usually necessary to ensure that the training data is accurate.
[0123] Optionally, the method may further include: The video code of the answer video contained in the problem-solving information is compiled using video compilation software to obtain the answer video.
[0124] Determine whether the answer video meets the problem-solving requirements.
[0125] The generating of training data based on the to-be-answered question and the question-solving information may specifically include: If the answer video meets the problem-solving requirements, training data is generated based on the question to be answered and the problem-solving information.
[0126] By using video compilation software to compile the answer video code, an answer video can be obtained; since the answer video is generated by compiling the answer video code, whether the answer video code generated by the large model is qualified can be judged by judging whether the answer video is qualified. When the answer video is qualified, it can be said that the answer video code is qualified, so that it can be determined that the problem-solving information is qualified and meets the problem-solving requirements. In the embodiment of this specification, the problem-solving information that can generate the correct answer video and the corresponding question to be answered are used as training samples, which can reduce the interference of incorrect problem-solving data on the problem-solving model, so that the problem-solving model after training can more accurately answer questions about queuing problems.
[0127] It can be understood that after determining qualified problem-solving information based on the solution video, the corresponding question to be answered can be determined based on the problem-solving information, so that positive sample training data can be generated based on the problem-solving information and the question to be answered.
[0128] In the embodiments of the present specification, qualified problem-solving information can be screened out from a plurality of problem-solving information, and the qualified problem-solving information and the corresponding questions to be answered can be used to generate training data.
[0129] Of course, after using the above method to filter out qualified solution information from all solution information, you can also modify the answer video code in the unqualified analysis information to obtain the correct answer video code, and then use the modified correct solution information and the questions to be answered to generate positive sample training data.
[0130] For ease of understanding, the embodiments of this specification also provide specific content for determining whether the answer video is qualified.
[0131] Optionally, the determining whether the answer video meets the problem-solving requirements may specifically include: Determine whether the answer video has at least one of the following conditions: The solution video does not correctly answer the question.
[0132] The diagram is not shown in the solution video.
[0133] There are overlapping diagrams in the answer video.
[0134] The schematic diagram shown in the solution video is incomplete.
[0135] The schematic diagram displayed in the solution video is inconsistent with the problem-solving text information contained in the solution video.
[0136] The number of dots representing objects contained in the schematic diagram displayed in the answer video is inconsistent with the number described in the question to be answered.
[0137] The position of the diagram parameters contained in the schematic diagram displayed in the answer video does not conform to the preset position; the diagram parameters include at least one of numbers and brackets.
[0138] The drawing animation shown in the answer video is not synchronized with the voice explanation.
[0139] In the embodiments of this specification, one or more models such as semantic analysis models and word vector models can be used to analyze whether the question itself matches the answer content of the answer video, to determine whether the answer process of the question to be answered in the answer video is correct, to determine whether the answer result is correct, etc., to determine whether the answer to the question in the answer video is wrong. Specifically, each frame in the answer video can be identified, or one or more frames of images can be randomly selected from the answer video for identification, which is not specifically limited here.
[0140] For queuing problems in mathematics, it is usually necessary to explain them in combination with schematic diagrams so that users can understand the problem-solving process more clearly. In the embodiments of this specification, it is also possible to determine whether the answer video contains necessary schematic diagrams. Specifically, image recognition technology can be used to identify whether there are schematic diagrams in the video frames in the answer video. Queuing problems usually involve multiple people. People can be represented by specific symbols, such as dots. Therefore, when identifying whether there are schematic diagrams in the video frames in the answer video, it is also possible to identify whether the schematic diagram is an image containing a preset object, wherein the preset object can include one or more of dots, bracket marks, numbers and other characters.
[0141] In practical applications, in addition to ensuring that the answer video explains the question to be answered in conjunction with the schematic diagram, it is also necessary to ensure that the schematic diagram is qualified.
[0142] Specifically, one or more of a bounding box detection method, an image segmentation method, and a deep learning model can be used to detect whether there is overlap in the schematic diagrams in the video frames in the answer video, so as to determine whether the schematic diagrams are qualified.
[0143] The edge detection algorithm can also be used to detect the boundary of the image to identify whether the schematic diagram is complete. If the boundary information is incomplete or abnormal, it may indicate that the schematic diagram is incomplete; of course, other methods can also be used to identify whether the schematic diagram is complete, such as one or more of the contour detection algorithm and the hash algorithm, which are not specifically limited here.
[0144] In order to ensure that the answer video can be used for normal teaching in practical applications, it is also necessary to make the schematic diagram displayed during the problem-solving process correspond to the solution process. Specifically, a semantic recognition model can be used to identify whether the schematic diagram displayed during the problem-solving process is consistent with the solution process. At the same time, it is detected whether the number of dots used to represent the objects in the question to be answered is consistent with the number of objects in the question to be answered. Of course, other models or methods can also be used to detect and identify the above content, which is not specifically limited here.
[0145] In addition, key point matching and other methods can be used to identify the position of the numbers and bracket marks in the drawing, so as to determine whether the position relationship between the numbers and bracket marks is correct. Of course, other methods can also be used to identify the position relationship between the numbers and bracket marks in the drawing, so as to determine whether the position between the numbers and bracket marks is correct, which is not specifically limited here.
[0146] In practical applications, in order to ensure that the answer video can be used for normal teaching, it is also necessary to make the drawing animation displayed during the problem-solving process correspond to the audio explanation content to avoid affecting the user experience. Specifically, a model for determining whether the drawing animation and the audio explanation content are synchronized can be pre-trained, and then the trained model can be used to identify whether the drawing animation and the audio explanation content are synchronized. You can also use relevant video editing software or audio analysis tools to analyze the synchronization of video and audio.
[0147] Since the problem-solving information may include a variety of different information, such as step-by-step analysis information of the question to be answered, knowledge point information corresponding to the question to be answered, answer information corresponding to the question to be answered, etc., when it is necessary to generate an explanation video for the question to be answered, the solution video code needs to be filtered out from the problem-solving information.
[0148] Optionally, the method may further include: The solution video code contained in the problem-solving information is determined by using a regular expression.
[0149] In the embodiments of this specification, a regular expression is a tool for describing a string pattern, and a regular expression can be used to search, match and replace a specific string in a text. The regular expression in the embodiments of this specification is a regular expression that can extract the answer video code in the problem-solving information. For example, the regular expression can contain a code identification character, such as Python, which can start with the code identification character and extract the information after the code identification character. Common regular expressions in Python include if...print.
[0150] In order to facilitate understanding of the present solution, the embodiments of this specification also provide specific contents of generating explanation videos using answer video codes.
[0151] Optionally, the using of video compiling software to compile the answer video code contained in the problem-solving information may specifically include: Save the solution video code as a Python file.
[0152] Use the manim command to compile the Python file.
[0153] In the embodiments of this specification, the manim (Mathematical Animation Engine) command is a Python library for making animations; manim is used to compile Python files to generate explanation videos.
[0154] In the embodiments of this specification, since queuing problems in elementary school mathematics may involve many different types, in order to ensure that the trained problem-solving model can solve different types of questions in the application stage, different types of queuing problems can be obtained in the embodiments of this specification, so as to use different types of queuing problems to train the problem-solving model.
[0155] Optionally, the questions to be answered may include several different types of questions about queuing problems.
[0156] In the embodiments of this specification, the questions to be answered are training data used to train the problem-solving model. In order to ensure that the problem-solving model trained using the questions to be answered can accurately answer various types of questions involving queuing problems, the types of questions to be answered are as rich and comprehensive as possible.
[0157] As an implementation method, the server or training platform can select questions to be answered from the database according to type, thereby obtaining several different types of questions; then the different types of questions to be answered are input into the big model, and then the big model can be used to obtain different types of training data for queuing problems, so that the problem-solving model can be trained using different types of training data about queuing problems, and the trained problem-solving model can cope with various types of queuing problems. As another implementation method, the server or training platform can also randomly select questions to be answered from the database, and input the randomly selected questions to be answered into the big model, so that the big model outputs the solution information of the questions to be answered; then the qualified solution information is screened, and then different types of solution information are screened out from the qualified solution information, so as to use different types of solution information and the corresponding questions to be answered to generate training data for training the problem-solving model.
[0158] As another implementation, the questions to be answered may be questions of the same type including questions about queuing problems, and the trained problem-solving model obtained by training may be used to answer questions of this type about queuing problems. Different problem-solving models may be trained for different types of queuing problems to obtain different trained problem-solving models, and the trained problem-solving models may be used to answer questions of a certain type about queuing problems.
[0159] Correspondingly, when generating prompt word templates, prompt word templates can be generated for different types of queuing questions respectively, and then the corresponding prompt word template is determined according to the type of question to be answered to generate prompt words, and input them into the big model so as to use the big model to output solution information.
[0160] In order to facilitate understanding of the present solution, the types of questions to be answered are specifically described in the embodiments of this specification.
[0161] Optionally, the different types include at least one of the following types: Given the total number of people in the team and the position of the target object or the number of people in front of the target object, find the number of people behind the target object.
[0162] Given the total number of people in a team and the position of a target object or the number of people behind the target object, find the number of people behind the target object.
[0163] Given the position of the target object and the number of people in front and behind the target object, find the total number of people in the team where the target object is located.
[0164] Given the positions of two target objects in a team and the relative relationship between the two target objects, find the number of people between the two target objects.
[0165] Given the positions of two target objects in a team and the number of people between the two target objects, find the total number of people in the team.
[0166] In the embodiments of this specification, for questions of the type "given the total number of people in a team, the position of a target object, and the number of people in front of the target object, find the number of people behind the target object", a specific question may be a question of the form "25 children are queuing, there are 5 people in front of Xiaoli, how many people are behind Xiaoli?"
[0167] In the embodiments of this specification, for questions of the type "given the total number of people in a team, the position of a target object, and the number of people behind the target object, find the number of people in front of the target object", the specific question may be a question of the form "25 children are queuing, there are 7 people behind Xiaoli, how many people are behind Xiaoli?"
[0168] For questions of the type "given the position of the target object and the number of people in front and behind the target object, find the total number of people in the team where the target object is located", specific questions may be in the form of "a group of children are queuing, Xiaohong is the 5th from the front and the 8th from the back. How many children are there in the queue?"
[0169] For questions of the type "given the positions of two target objects in a queue and the relative relationship between the two target objects, find the number of people between the two target objects", specific questions may be in the form of "Xiaohong and Xiaoli are queuing to buy tickets. There are 3 people in front of Xiaohong, and 9 people in front of Xiaoli. How many people are between Xiaohong and Xiaoli?"
[0170] For questions of the type "given the positions of two target objects in a team and the number of people between the two target objects, find the total number of people in the team", specific questions may be of the form "the children are queuing up. Counting from the front, Yuanyuan is ranked 7th. Counting from the back to the front, Taotao is ranked 9th. Yuanyuan is in front of Taotao. There are 2 people between them. How many children are there in the team in total?"
[0171] Corresponding to the above method embodiment, this specification also provides an embodiment of a device for generating a problem-solving model for solving a queuing problem. Figure 2 FIG. 1 is a schematic diagram showing a structure of a device for generating a problem-solving model for solving a queuing problem provided by an embodiment of the present specification. Figure 2 As shown, the device comprises: The first acquisition module 202 is configured to acquire a question to be answered; the type of the question to be answered is a type of queuing question; The determination module 204 is configured to determine the solution information of the question to be solved; the solution information includes a video code for the solution to the question to be solved.
[0172] The data generation module 206 is configured to generate training data based on the questions to be answered and the question-solving information.
[0173] The model training module 208 is configured to train the problem-solving model using the training data to obtain a trained problem-solving model; the trained problem-solving model can generate a video code for explaining a solution to a problem related to the queuing problem.
[0174] based on Figure 2 The present specification also provides some specific implementation schemes of the method, which are described below.
[0175] Optionally, the determining module 204 may be specifically configured as follows: Based on the prompt word template, a prompt word for the question to be answered is generated; the prompt word is used to instruct the large model to generate solution information for the question to be answered according to preset requirements.
[0176] The prompt words are input into the large model, and the large model is used to generate solution information for the question to be answered.
[0177] Optionally, the data generation module 206 may be specifically configured as follows: Based on the training data format, the to-be-answered questions and the problem-solving information are used to generate training data that conforms to the training data format.
[0178] Optional, Figure 2 The device shown may also include: The video compiling module is used to compile the answer video code contained in the problem-solving information using video compiling software to obtain the answer video.
[0179] The judgment module is used to judge whether the answer video meets the problem-solving requirements.
[0180] Optionally, the data generation module 206 may be specifically configured as follows: If the answer video meets the problem-solving requirements, training data is generated based on the question to be answered and the problem-solving information.
[0181] Optionally, the judgment module may be specifically configured as follows: Determine whether the answer video has at least one of the following conditions: The solution video does not correctly answer the question.
[0182] The diagram is not shown in the solution video.
[0183] There are overlapping diagrams in the answer video.
[0184] The schematic diagram shown in the solution video is incomplete.
[0185] The schematic diagram displayed in the solution video is inconsistent with the problem-solving text information contained in the solution video.
[0186] The number of dots representing objects contained in the schematic diagram displayed in the answer video is inconsistent with the number described in the question to be answered.
[0187] The position of the diagram parameters contained in the schematic diagram displayed in the answer video does not conform to the preset position; the diagram parameters include at least one of numbers and brackets.
[0188] The drawing animation shown in the answer video is not synchronized with the voice explanation.
[0189] Optional, Figure 2 The device shown may also include: The second acquisition module is configured to acquire several different types of reference examples about queuing problems; the reference examples include example questions and codes for generating solution videos of the example questions.
[0190] The prompt word generation module is configured to generate the prompt word template based on the reference example question.
[0191] Optionally, the questions to be answered include several different types of questions about queuing problems.
[0192] Optionally, the different types include at least one of the following types: Given the location of a target object and the number of people in front of or behind the target object, find the number of people in front of or behind the target object.
[0193] Given the position of the target object and the number of people in front and behind the target object, find the total number of people in the team where the target object is located.
[0194] Given the positions of two target objects in a team and the relative relationship between the two target objects, find the number of people between the two target objects.
[0195] Given the positions of two target objects in a team and the number of people between the two target objects, find the total number of people in the team.
[0196] Optionally, the reference example question also includes at least one of step-by-step analysis information for answering the example question step by step, knowledge point information corresponding to the example question, and answer information corresponding to the example question.
[0197] and / or, The problem-solving information of the question to be answered generated by using the large model also includes at least one of step-by-step analysis information for solving the question to be answered step by step, knowledge point information corresponding to the question to be answered, and answer information corresponding to the question to be answered.
[0198] Optionally, the prompt word template also includes at least one of role information of the large model, task information indicating the completion of the large model, task requirement information, and output data format information.
[0199] Optionally, the training data format includes a role definition part, a question part and a parsing part.
[0200] The role definition part includes information for defining the role played by the problem-solving model.
[0201] The question part includes information of the question to be answered.
[0202] The analysis part includes knowledge point information corresponding to the question to be answered, step-by-step analysis information, answer information and code information of the answer video.
[0203] Optional, Figure 2 The device shown may also include: The third acquisition module is configured to use a regular expression to determine the answer video code contained in the problem-solving information.
[0204] Optionally, the video coding module may be specifically configured as follows: Save the solution video code as a Python file.
[0205] Use the manim command to compile the Python file.
[0206] The above is a schematic scheme of a device for generating a problem-solving model for solving a queuing problem in this embodiment. It should be noted that the technical scheme of the device for generating a problem-solving model for solving a queuing problem and the technical scheme of the method for generating a problem-solving model for solving a queuing problem are of the same concept, and the details of the technical scheme of the device for generating a problem-solving model for solving a queuing problem that are not described in detail can all be referred to the description of the technical scheme of the method for generating a problem-solving model for solving a queuing problem.
[0207] Figure 3 The block diagram of a computing device according to an embodiment of the present specification is shown. The components of the computing device 300 include but are not limited to a memory 310 and a processor 320. The processor 320 is connected to the memory 310 via a bus 330, and the database 350 is used to store data.
[0208] The computing device 300 also includes an access device 340 that enables the computing device 300 to communicate via one or more networks 360. Examples of these networks include a public switched telephone network (PSTN), a local area network (LAN), a wide area network (WAN), a personal area network (PAN), or a combination of communication networks such as the Internet. The access device 540 may include one or more of any type of network interface (e.g., a network interface card (NIC)) of wired or wireless, such as an IEEE 802.11 wireless local area network (WLAN) wireless interface, a world-wide interoperability for microwave access (Wi-MAX) interface, an Ethernet interface, a universal serial bus (USB) interface, a cellular network interface, a Bluetooth interface, and a near field communication (NFC).
[0209] In one embodiment of the present specification, the above components of the computing device 300 and Figure 3 Other components not shown in the figure may also be connected to each other, for example, via a bus. It should be understood that Figure 3 The computing device structure block diagram shown is only for the purpose of illustration, and is not intended to limit the scope of this specification. Those skilled in the art can add or replace other components as needed.
[0210] The computing device 300 may be any type of stationary or mobile computing device, including a mobile computer or mobile computing device (e.g., a tablet computer, a personal digital assistant, a laptop computer, a notebook computer, a netbook, etc.), a mobile phone (e.g., a smart phone), a wearable computing device (e.g., a smart watch, smart glasses, etc.), or other types of mobile devices, or a stationary computing device such as a desktop computer or a personal computer (PC). The computing device 300 may also be a mobile or stationary server.
[0211] The processor 320 is used to execute the following computer executable instructions, which, when executed by the processor, implement the steps of the method for generating a problem-solving model for solving the queuing problem.
[0212] The above is a schematic scheme of a device for generating a problem-solving model for solving a queuing problem in this embodiment. It should be noted that the technical scheme of the computing device and the technical scheme of the method for generating a problem-solving model for solving a queuing problem are of the same concept, and the details not described in detail in the technical scheme of the computing device can be found in the description of the technical scheme of the method for generating a problem-solving model for solving a queuing problem.
[0213] An embodiment of the present specification further provides a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, implement the steps of the method for generating a problem-solving model for solving the queuing problem.
[0214] The above is a schematic scheme of a computer-readable storage medium of this embodiment. It should be noted that the technical scheme of the storage medium and the technical scheme of the method for generating a solution model for solving a queuing problem are of the same concept, and the details not described in detail in the technical scheme of the storage medium can be found in the description of the technical scheme of the method for generating a solution model for solving a queuing problem.
[0215] An embodiment of the present specification also provides a computer program product, wherein when the computer program / instructions are executed in a computer, the computer is caused to execute the steps of the method for generating a problem-solving model for solving the queuing problem.
[0216] The above is a description of a specific embodiment of the 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 an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0217] The computer instructions include computer program codes, which may be in source code form, object code form, executable files or some intermediate forms, etc. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, USB flash drive, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signal, telecommunication signal and software distribution medium, etc. It should be noted that the content contained in the computer-readable medium may be appropriately increased or decreased according to the requirements of patent practice. For example, in some regions, according to patent practice, computer-readable media do not include electric carrier signals and telecommunication signals.
[0218] It should be noted that, for the above-mentioned method embodiments, for the sake of simplicity of description, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the embodiments of this specification are not limited by the order of the actions described, because according to the embodiments of this specification, some steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the embodiments of this specification.
[0219] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0220] The preferred embodiments of this specification disclosed above are only used to help explain this specification. The optional embodiments do not describe all the details in detail, nor do they limit the invention to only the specific implementation methods described. Obviously, many modifications and changes can be made according to the content of the embodiments of this specification. This specification selects and specifically describes these embodiments in order to better explain the principles and practical applications of the embodiments of this specification, so that technicians in the relevant technical field can well understand and use this specification. This specification is only limited by the claims and their full scope and equivalents.
Claims
1. A method for generating a problem-solving model for solving a queuing problem, characterized in that: include: Get the questions to be answered; The type of the question to be answered is the type of queuing problem; Determining solution information of the question to be answered; The problem-solving information includes a video code for the problem to be solved; Generate training data based on the to-be-answered questions and the question-solving information; Using the training data to train a problem-solving model to obtain a trained problem-solving model; The trained problem-solving model can generate solution video codes for explaining problems related to queuing issues.
2. The method according to claim 1, characterized in that The determining of the solution information of the to-be-solved question specifically includes: Based on the prompt word template, a prompt word for the question to be answered is generated; the prompt word is used to instruct the large model to generate solution information for the question to be answered according to preset requirements; The prompt words are input into the large model, and the large model is used to generate solution information for the question to be answered.
3. The method according to claim 1, characterized in that The generating of training data based on the to-be-answered questions and the question-solving information specifically includes: Based on the training data format, the to-be-answered questions and the problem-solving information are used to generate training data that conforms to the training data format.
4. The method according to claim 1, characterized in that , the method further comprises: Compiling the answer video code contained in the problem-solving information using video compiling software to obtain the answer video; Determine whether the answer video meets the problem-solving requirements; The generating of training data based on the to-be-answered questions and the question-solving information specifically includes: If the answer video meets the problem-solving requirements, training data is generated based on the question to be answered and the problem-solving information.
5. The method according to claim 4, characterized in that ,The judging whether the answer video meets the problem solving requirements specifically includes: Determine whether the answer video has at least one of the following conditions: The answer video does not correctly answer the question; The schematic diagram is not shown in the said answer video; There are overlapping schematic diagrams in the answer video; The schematic diagram shown in the said answer video is incomplete; The schematic diagram displayed in the answer video is inconsistent with the problem-solving text information contained in the answer video; The number of dots representing objects contained in the schematic diagram displayed in the answer video is inconsistent with the number described in the question to be answered; The position of the diagram parameter included in the schematic diagram displayed in the answer video does not conform to the preset position; the diagram parameter includes at least one of a number and a bracket; The drawing animation shown in the answer video is not synchronized with the voice explanation.
6. The method according to claim 2, characterized in that , the method further comprises: Obtaining several different types of reference examples about queuing problems; the reference examples include example questions and codes for generating video solutions to the example questions; Based on the reference example question, the prompt word template is generated.
7. The method according to claim 1, characterized in that ,The questions to be answered include several different types of questions about queuing problems.
8. The method according to claim 6 or 7, characterized in that , the different types include at least one of the following types: Given the total number of people in the team and the position of the target object or the number of people in front of the target object, find the number of people behind the target object; Given the total number of people in the team and the position of the target object or the number of people behind the target object, find the number of people in front of the target object; Given the position of the target object and the number of people in front and behind the target object, find the total number of people in the team where the target object is located; Given the positions of two target objects in a team and the relative relationship between the two target objects, find the number of people between the two target objects; Given the positions of two target objects in a team and the number of people between the two target objects, find the total number of people in the team.
9. The method according to claim 6, characterized in that , the reference example question also includes at least one of the following information: step-by-step analysis information for answering the example question step by step, knowledge point information corresponding to the example question, and answer information corresponding to the example question; and / or, The problem-solving information of the question to be answered generated by using the large model also includes at least one of step-by-step analysis information for solving the question to be answered step by step, knowledge point information corresponding to the question to be answered, and answer information corresponding to the question to be answered.
10. The method according to claim 2, characterized in that The prompt word template also includes at least one of the role information of the large model, task information indicating the large model to complete, task requirement information, and output data format information; Among them, the task requirement information includes at least one of code type information of the answer video code, voice format information in the answer video, voice playback format information, information on a virtual image used to refer to an object in the question in the answer video, information on simplification of the object in the question, and information on a software tool used to draw a virtual image of the object in the question.
11. The method according to claim 3, characterized in that The training data format includes a role definition part, a question part and a parsing part; The role definition part includes information for defining the role played by the problem-solving model; The question part includes information of the question to be answered; The analysis part includes knowledge point information corresponding to the question to be answered, step-by-step analysis information, answer information and code information of the answer video.
12. The method according to claim 4, characterized in that The step of compiling the video code of the solution contained in the problem-solving information using the video compiling software specifically includes: Save the video code as a Python file; Use the manim command to compile the Python file.
13. A device for generating a problem-solving model for solving a queuing problem, characterized in that: include: A first acquisition module is configured to acquire questions to be answered; The type of the question to be answered is the type of queuing problem; A determination module is configured to determine the solution information of the to-be-solved question; the solution information includes a video code for the solution to the to-be-solved question; A data generation module is configured to generate training data based on the to-be-answered questions and the question-solving information; A model training module is configured to train a problem-solving model using the training data to obtain a trained problem-solving model; The trained problem-solving model can generate solution video codes for explaining problems related to queuing issues.
14. A computing device, characterized in that include: Memory and processor; The memory is used to store computer-executable instructions, and the processor is used to execute the computer-executable instructions. When the computer-executable instructions are executed by the processor, the steps of the method for generating a problem-solving model for solving queuing problems as described in any one of claims 1 to 12 are implemented.
15. A computer-readable storage medium, characterized in that: It stores computer executable instructions, which, when executed by a processor, implement the steps of the method for generating a problem-solving model for solving queuing problems as described in any one of claims 1 to 12.
16. A computer program product, characterized in that The invention comprises a computer program / instruction, which, when executed by a processor, implements the steps of the method according to any one of claims 1 to 12.
