Method and device for generating question solving model for solving plane geometry question
By using large language models and problem-solving models to generate explanation videos for plane geometry problems, the time-consuming and labor-intensive generation of explanation videos in the existing technology is solved, and fast and efficient video generation is achieved, reducing costs and improving efficiency.
Patent Information
- Application Number
- CN202411403903.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-09
- Publication Date
- 2025-01-03
- Estimated Expiration
- 2044-10-09
AI Technical Summary
The method of generating explanation videos in the prior art is time-consuming and labor-intensive, and requires manual recording, making it difficult to quickly generate explanation videos about plane geometry problems.
By obtaining the questions to be answered, using the large language model to generate solution information, building training data based on this information, training the problem-solving model to generate explanation video data, and then generating explanation videos about plane geometry problems.
It reduces the cost and time of generating explanation videos, improves the training efficiency of problem-solving models after training and the efficiency of generating explanation videos, and avoids the need for manual recording.
Smart Images

Figure CN119252086A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of this specification relate to the field of automation technology, and in particular to a method, device, equipment, medium and product for generating a problem-solving model for solving plane geometry problems. Background Art
[0002] With the rapid development of artificial intelligence and natural language technology, large language models and natural language processing can understand and generate natural language text, which can be used to assist teaching and generate detailed problem-solving steps and processes based on the problems in the teaching process. If explanations need to be given through videos, manual recording of explanation videos is required, which is time-consuming and labor-intensive.
[0003] Therefore, it is necessary to provide a method for generating explanation videos for explaining problems more quickly. 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 plane geometry problem. One or more embodiments of this specification also relate to a device for generating a problem-solving model for solving a plane geometry problem, a computing device, a computer-readable storage medium, and a computer program product 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 plane geometry problem is provided, comprising: Obtaining a number of questions to be answered; the questions to be answered are questions on plane geometry; Using the large language model, obtaining answer information of the plurality of questions to be answered; the answer information includes video data used to generate explanation videos of the questions to be answered; Based on the plurality of questions to be answered and the corresponding answer information including the video data, obtaining training data; The training data is used to train a problem-solving model to obtain a trained problem-solving model; the trained problem-solving model is used to generate explanation video data, and the explanation video data is used to generate an explanation video for explaining questions about plane geometry problems.
[0006] According to a second aspect of an embodiment of this specification, a method for answering a question is provided, comprising: Get the target questions to be answered about plane geometry problems; The target unanswered question is input into the trained problem-solving model to obtain target problem-solving information; the target problem-solving information includes target video data for generating an explanation video of the target unanswered question; the trained problem-solving model is obtained by training the problem-solving model with training data; the training data is generated by using the solution information of several unanswered questions obtained by the large model and the several unanswered questions; The target video data is rendered using a video rendering tool to obtain a target explanation video of the target question to be answered.
[0007] According to a third aspect of an embodiment of this specification, there is provided a device for generating a problem-solving model for solving a plane geometry problem, comprising: An acquisition module is configured to acquire a plurality of questions to be answered; the questions to be answered are questions on plane geometry problems; The answer information obtaining module is configured to obtain answer information of the plurality of questions to be answered by using a large language model; the answer information includes video data for generating explanation videos of the questions to be answered; A training data obtaining module is configured to obtain training data based on the plurality of questions to be answered and the corresponding answer information including the video data; The model training module is configured to use the training data to train the problem-solving model to obtain a trained problem-solving model; the trained problem-solving model is used to generate explanation video data, and the explanation video data is used to generate an explanation video for explaining questions about plane geometry problems.
[0008] According to a fourth aspect of the embodiments of this specification, there is provided a device for answering a question, comprising: A target unsolved problem acquisition module is configured to acquire a target unsolved problem related to a plane geometry problem; The answering module is configured to input the target unanswered question into the trained problem-solving model to obtain target problem-solving information; the target problem-solving information includes target video data for generating an explanation video of the target unanswered question; the trained problem-solving model is obtained by training the problem-solving model with training data; the training data is generated by using the solution information of several unanswered questions obtained by the large model and the several unanswered questions; The rendering module is configured to render the target video data using a video rendering tool to obtain a target explanation video of the target question to be answered.
[0009] According to a fifth 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 solution model for solving plane geometry problems or the steps of the method for solving problems are implemented.
[0010] According to the sixth aspect of the embodiments of this specification, a computer-readable storage medium is provided, which stores computer-executable instructions. When the computer-executable instructions are executed by a processor, the steps of the method for generating a solution model for solving plane geometry problems or the steps of the method for solving problems are implemented.
[0011] According to the seventh aspect of the embodiments of this specification, a computer program product is provided, including a computer program / instruction, which, when executed by a processor, implements the steps of the method for generating a solution model for solving plane geometry problems or the steps of the method for solving problems.
[0012] At least one embodiment provided in this specification can achieve the following beneficial effects: by processing a number of unanswered questions for plane geometry problems obtained through a large language model, answer information containing video data for generating explanation videos of the unanswered questions is obtained; based on the number of unanswered questions and the answer information, training data is obtained; the problem-solving model is trained using the training data to obtain a trained problem-solving model. Thus, a video can be generated based on the video code obtained from the large language model, so that the problem-solving model can be trained using the training data containing the video, thereby avoiding the need to manually record the corresponding explanation videos based on the unanswered questions to obtain the training data, reducing the cost of generating training data, and improving the training efficiency of the trained problem-solving model.
[0013] At least another embodiment provided by the present specification can achieve the following beneficial effects: by using the trained problem-solving model to solve the acquired target to-be-solved problem about plane geometry problems, the problem-solving information containing the target video data can be obtained, and the problem-solving information containing the target video data can be rendered using a video rendering tool to obtain the target explanation video corresponding to the target to-be-solved problem. Thus, an explanation video explaining the problem about geometry problems can be generated based on the trained problem-solving model, so as to avoid manually recording the corresponding explanation video, reduce the cost of generating the explanation video, and improve the efficiency of generating the explanation video explaining the problem about geometry problems. BRIEF DESCRIPTION OF THE DRAWINGS
[0014] Figure 1 It is a flowchart of a method for generating a problem-solving model for solving a plane geometry problem provided by an embodiment of the present specification; Figure 2 It is a flowchart of a method for answering a question provided by an embodiment of this specification; Figure 3 It is a structural schematic diagram of a device for generating a problem-solving model for solving a plane geometry problem provided by an embodiment of the present specification; Figure 4 It is a structural schematic diagram of a device for answering questions provided by an embodiment of this specification; Figure 5 It is a structural block diagram of a computing device provided by an embodiment of this specification. DETAILED DESCRIPTION
[0015] 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.
[0016] 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.
[0017] 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".
[0018] 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.
[0019] First, the terms involved in one or more embodiments of this specification are explained.
[0020] 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 association between words, so that they can perform a wide range of tasks.
[0021] GPT-4: GPT-4 is one of a series of generative pre-trained transform models (GPT) developed by OpenAI. It has been trained on a large amount of Internet text and is a large language model that can generate coherent sentences or paragraphs in a human style.
[0022] Semantic matching model: Semantic matching model is a natural language processing technology that can be used to determine the similarity of meaning between two or more text fragments. This model is critical to understanding and processing the complexity and diversity of human language.
[0023] Supervised Fine-Tuning (SFT): 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.
[0024] Plane geometry: a branch of mathematics that studies plane figures and their properties, such as studying the properties of geometric figures such as points, lines, angles, polygons, circles on the plane and the relationship between them, the problem-solving process of triangles, circles, polygons, etc.
[0025] Mathematical Animation Engine (Manim): is an open source Python library for creating high-quality mathematical animations. Manim allows users to precisely control the details of animations through programming, making it very suitable for education and popular science. Manim provides many internal classes such as Dot, VGroup, Brace, etc., which are very helpful for solving plane geometry problems by drawing.
[0026] 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.
[0027] Retrieval-Augmented Generation (RAG) technology: RAG technology is a technology that combines information retrieval and natural language processing. It aims to improve the quality of the model's answers by combining a large-scale external knowledge base with a generative model. RAG technology can retrieve relevant information from an external knowledge source before generating a response, and then use the retrieved content as context to generate a more accurate answer that contains the latest news. This can provide more reliable and targeted services, especially in the application scenario of answering plane geometry questions.
[0028] In this specification, a method for generating a solution model for solving plane geometry problems is provided. This specification also relates to an apparatus for generating a solution model for solving plane geometry problems, 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.
[0029] See also Figure 1 , Figure 1 The flowchart of a method for generating a problem-solving model for solving a plane geometry problem according to an embodiment of the present specification is shown. From a program perspective, the execution subject of the process can be a program installed on a server or a training platform. From a hardware perspective, the execution subject of the process can be a server or a training platform capable of model training. Figure 1 As shown, the specific steps include the following steps.
[0030] Step 102: Obtain a number of questions to be answered; the questions to be answered are questions on plane geometry.
[0031] The questions to be answered in the embodiments of this specification may be questions about plane geometry problems generated based on a large language model; they may also be questions about plane geometry problems obtained from a known question bank using a retrieval-augmented generation model (RAG); they may also be questions about plane geometry problems written based on expert experience; they may also be questions about plane geometry problems obtained through other models or processing methods. The method for obtaining the questions to be answered is not specifically limited here.
[0032] In the embodiments of this specification, plane geometry problems can be problems about lines, angles, polygons, circles and other geometric figures, and specifically can be problems about the position, size, shape, properties and relationship between geometric figures. Some typical plane geometry problems include calculating length, area or angle; proving that two lines are parallel or perpendicular; exploring the properties of triangles or quadrilaterals or other polygons; circle-related problems such as chords, tangents, arc lengths, and sector areas; proportion problems of similar figures; application of geometric transformations (translation, rotation, reflection); solving problems related to symmetry; solving problems using the Pythagorean theorem; solving geometric problems using coordinate geometry methods, etc.
[0033] In practical applications, in order to improve the accuracy of problem-solving model training, a large number of unsolved questions for plane geometry problems can be used to train the problem-solving model to obtain a trained problem-solving model that can accurately solve plane geometry problems. For example, the number of unsolved questions can be greater than or equal to 1000, or it can be 2000, 500, etc., and there is no specific limitation here.
[0034] Step 104: using the large language model, obtaining answer information for the plurality of questions to be answered; the answer information includes video data for generating explanation videos for the questions to be answered.
[0035] In the embodiments of this specification, the large language model can learn the grammatical structure of the language and the relationship between words, so that it can generate answer information for explaining the question to be answered based on the given question to be answered. The video data can represent a video code for generating an explanation video, data information capable of generating an explanation video, etc., or it can be an explanation video. In addition to the video data for generating an explanation video of the question to be answered, the answer information can also include at least one of the following information: step-by-step analysis information of the question to be answered, knowledge point information corresponding to the question to be answered, and answer information corresponding to the question to be answered. It can be understood that the answer information contains information related to the question to be answered and used to answer the question.
[0036] In practical applications, the answer information of the questions to be answered can also be obtained based on expert experience. For example, several questions to be answered can be answered manually to obtain answer information corresponding to the questions to be answered. Alternatively, a large language model and manual methods can be used to answer several questions to be answered to obtain answer information corresponding to the questions to be answered. There is no specific limitation on the method of obtaining the answer information of several questions to be answered.
[0037] In actual applications, you can input one question to be answered into the large language model at one time. After the large language model outputs the answer information, you can input another one until all the questions to be answered are input into the large language model and the answer information is output. You can also input multiple questions at one time, specifically, you can input several questions to be answered into the large language model at one time, or you can input multiple questions to be answered in batches multiple times until all the questions to be answered are input into the large language model and the answer information is obtained.
[0038] Step 106: Obtain training data based on the plurality of questions to be answered and the corresponding answer information including the video data.
[0039] In the embodiments of this specification, the training data may include questions to be answered and answer information corresponding to the questions to be answered. Specifically, the questions to be answered and the corresponding answer information may be spliced to generate training data. For example, the answer information containing video data obtained by the above method may be spliced in front of the questions to be answered, or the answer information containing video obtained by the above method may be spliced in the back of the questions to be answered to obtain a number of training data.
[0040] Step 108: Use the training data to train a problem-solving model to obtain a trained problem-solving model; the trained problem-solving model is used to generate explanation video data, and the explanation video data is used to generate an explanation video for explaining questions about plane geometry problems.
[0041] In the embodiments of this specification, during the training process, the problem-solving model can continuously adjust parameters through back propagation to minimize the difference between the generated code and the annotated code to improve the problem-solving ability of the problem-solving model. When the difference between the generated code and the annotated code meets the requirements, it can be determined that the training of the problem-solving model is completed.
[0042] In the embodiments of this specification, the problem-solving model can be a pre-trained model, such as the YunLLM 70B model, the BERT model, the RoBERTa model, the XLNet model, the Electra model, etc. These models are models that have been pre-trained with a large amount of data. In the embodiments of this specification, supervised fine-tuning can be used to fine-tune the problem-solving model. Specifically, the problem-solving model can be trained using plane geometry problem-solving data as described above to obtain a trained problem-solving model, so that the model can better adapt to the application scenarios of plane geometry problems.
[0043] In practical applications, training parameters such as learning rate, batch size, number of training rounds, etc. can be configured for supervised fine-tuning training. If there are multiple rounds of supervised fine-tuning training, the training data can be grouped, such as by random grouping, equal grouping, etc.; the training data of each round after grouping can contain the same training data or different amounts of training data, which is not specifically limited here. If there are 2,000 questions to be answered and 10 rounds of training are required, they can be evenly divided into 200 questions to be answered per round; or 300, 400, etc. questions to be answered can be randomly assigned to each round.
[0044] In practical applications, the problem-solving model can also be a model with a structural framework and not pre-trained, or it can be trained using a large amount of training data corresponding to plane geometry problems to obtain a trained problem-solving model, so that the trained problem-solving model can process plane geometry problems and obtain accurate problem-solving information, which can adapt well to plane geometry problem-solving scenarios.
[0045] In practical applications, a validation set evaluation model can also be used to evaluate a problem-solving model that has completed a preset training round. The data used for the evaluation can be randomly selected from the training data. Alternatively, part of the several training data obtained above can be used as test data to test the problem-solving model, and the remaining part can be used as training data to train the problem-solving model. Alternatively, a preset number of data obtained from a preset question bank can be used as test data to test the problem-solving model. Alternatively, new questions to be answered can be obtained, and the corresponding training data can be obtained according to the above method as test data to test the problem-solving model. If the test determines that the performance of the problem-solving model meets the requirements, the trained problem-solving model can be obtained. If the test determines that the performance of the problem-solving model does not meet the requirements, the problem-solving model can continue to be trained.
[0046] In the embodiment of this specification, a large language model is used to process several unanswered questions for plane geometry problems, and answer information containing video data for generating explanation videos of the unanswered questions is obtained; training data is obtained based on several unanswered questions and answer information; the problem-solving model is trained using the training data to obtain a trained problem-solving model. The training of the problem-solving model in this application requires the use of videos for training. Generally speaking, a common method used by technicians in this field is to find a way to collect videos that can be used as training data, and then use these videos to train the problem-solving model; but it is not easy to think of using information in another format to generate training data. The large language model can process the data to obtain information in text format, and it cannot directly generate a video. Therefore, it is even more difficult for technicians in this field to think of using a large language model to generate training data for training the problem-solving model. However, in this application, a large language model can be used to process the unanswered questions to generate information in text format, and this text format information can include explanation video data of the unanswered questions, and then the training data containing the explanation video data is used to train the problem-solving model, and it is no longer necessary to manually record the corresponding answer video based on the unanswered questions, which reduces the cost of generating training data and improves the training efficiency of the trained problem-solving model.
[0047] based on Figure 1 The method, the examples of this specification also provide some specific implementation plans of the method, which are described below.
[0048] In order to ensure that the large language model can output the solution information of the question to be answered more accurately and improve the accuracy of the training data, the embodiment of this specification can also provide the large language model with relevant reference examples so that the large language model can output more accurate solution information. Optionally, the method described in the embodiment of this specification can also include: For any of the plurality of questions to be answered, determine a reference example having the same characteristics as the question to be answered; the characteristics include at least one of the shape characteristics of the plane geometric image involved in the question, the number of questions included in the question, the number of answer results corresponding to the question, and the number of drawings required for the question; the reference example includes the title of the example and video data for generating an explanation video of the title of the example; The obtaining of the answer information of the plurality of questions to be answered by using the large language model may specifically include: The reference example question is provided to the large language model so that the large language model obtains answer information corresponding to any of the questions to be answered.
[0049] In the embodiments of this specification, for any of the questions to be answered, a preset number of reference examples with the same features as any of the questions to be answered can be obtained, so that the large language model can refer to the preset number of reference examples and corresponding answer information to answer any of the questions to be answered and obtain answer information, so as to improve the accuracy of the answer information, thereby improving the accuracy of the problem-solving model after training. The preset number can be set according to actual needs, such as 3, 4, 5, etc., and is not specifically limited here.
[0050] In the embodiments of this specification, features may represent the type of questions to be answered about plane geometry problems. Specific plane geometry types may be classified from different perspectives. For example, from the perspective of graphics, they may include types such as circles, rectangles, polygons, triangles, etc. From the perspective of question types, they may include types such as single questions, multiple questions, single situations, and multiple situations. From the perspective of the number of drawings, they may include types such as one drawing, multiple drawings, etc.
[0051] Features in the embodiments of this specification may also include the type of problem corresponding to the question, such as side length problems, area problems, angle problems, etc., and may also include other features, such as the knowledge points tested in the question, the number of problem-solving methods corresponding to the question, etc., which are not listed here one by one. The shape feature of the plane geometric image involved in the question can indicate that the question contains at least one shape such as a circle, a quadrilateral, a triangle, a polygon, a sector, etc. The feature of the number of questions contained in the question can indicate that the number of questions that need to be answered is one, two, three, etc. The feature of the number of solution results corresponding to the question can indicate that the answer to the question is one, two, three, etc. The feature of the number of drawings required for the question can indicate that the number of graphics that need to be drawn in the process of solving the question is one, two, three, etc.
[0052] Reference examples may also include plane geometry questions, knowledge points, analytical steps, graphics corresponding to the analytical steps, answers, video codes and other information.
[0053] The following is an example of a reference question:
topic
Knowledge Points
[0054]
Step-by-step analysis
[0055] The second step, according to the question, we know that the ratio of the side lengths of the two equilateral triangles is 3:2, so we can divide the total length of 15 meters into $3 + 2 = 5$ (portions), each portion is $15 \div 5 = 3$ (meters).
[0056] In the third step, the large equilateral triangle occupies 3 parts, so the perimeter of the large triangle is $3 \times 3 = 9$ (meters).
[0057] Step 4. The small equilateral triangle occupies 2 parts, so the perimeter of the small triangle is $2 \times 3 = 6$ (meters).
[0058] Step 5. The side length of the large triangle is $9 \div 3 = 3$ (meters), and the side length of the small triangle is $6 \div3 = 2$ (meters).
[0059]
Answer
Code
[0060] audio_text = "Let's draw a picture to show how to use a 15-meter-long steel bar to form two equilateral triangles." with self.voiceover(text=audio_text): # Since we need to draw two graphics at the same time, we need to reduce the zoom ratio by half scale / = 2 # Draw a large equilateral triangle with a side length of 3 triangle1 = Triangle(radius=3 * math.sqrt(3) / 3 * scale, color=RED) # The two graphics are arranged up and down, so the first graphic is translated upward by 3 triangle1.shift(UP * 3 * scale) self.play(Create(triangle1)) # Draw a small equilateral triangle with a side length of 2 triangle2 = Triangle(radius=2 * math.sqrt(3) / 3 * scale, color=BLUE) # The two graphics are arranged vertically, so the second graphic is translated downward by 2 triangle2.shift(DOWN * 2 * scale) self.play(Create(triangle2)) # Step 2. According to the question, we know that the ratio of the side lengths of the two equilateral triangles is 3:2, so we can divide the total length of 15 meters into $3 + 2 = 5$ (portions), each portion is $15 \div 5 = 3$ (meters).
[0061] audio_text = "According to the question, we can divide the total length of 15 meters into 3+2=5 parts, each part is 15÷5=3 meters." with self.voiceover(text=audio_text): # Mark the large equilateral triangle into 3 parts triangle1_text = self.create_text("3 copies").next_to(triangle1, direction=DOWN) self.play(Write(triangle1_text)) # Mark the small equilateral triangle as 2 parts triangle2_text = self.create_text("2 copies").next_to(triangle2, direction=DOWN) self.play(Write(triangle2_text)) self.play_text_left(r"How many copies are there in total: $3 + 2 = 5$ (copy)") self.play_text_left(r"Length of each portion: $15 \div 5 = 3$ (meters)") # Step 3. The large equilateral triangle occupies 3 parts, so the perimeter of the large triangle is $3 \times 3 = 9$ (meters).
[0062] audio_text = "The side length of the large equilateral triangle is 3, so the perimeter of the large equilateral triangle is 3×3=9 meters." with self.voiceover(text=audio_text): self.play_text_left(r"The perimeter of the large triangle: $3 \times 3 = 9$ (meters)") # Step 4. The small equilateral triangle occupies 2 parts, so the perimeter of the small triangle is $2 \times 3 = 6$(meters).
[0063] audio_text = "The side length of the small equilateral triangle is 2, so the perimeter of the small equilateral triangle is 2×3=6 meters." with self.voiceover(text=audio_text): self.play_text_left(r"The perimeter of the small triangle: $2 \times 3 = 6$ (meters)") # Step 5. The side length of the large triangle is $9 \div 3 = 3$ (meters), and the side length of the small triangle is $6 \div 3 = 2$ (meters).
[0064] audio_text = "The perimeter of the large equilateral triangle is 9 meters, so the side length of the large equilateral triangle is 9÷3=3 meters." with self.voiceover(text=audio_text): self.play_text_left(r"The side length of the large triangle: $9 \div 3 = 3$ (meters)") audio_text = "The perimeter of the small equilateral triangle is 6 meters, so the side length of the small equilateral triangle is 6÷3=2 meters." with self.voiceover(text=audio_text): self.play_text_left(r"The side length of the small triangle: $6 \div 3 = 2$ (meters)").
[0065] The reference examples described above may contain information such as questions, knowledge points, step-by-step analysis, answers, and codes, so that the large language model can understand the specific problem-solving process, so that the problem can be solved according to the solution method of the reference examples.
[0066] In practical applications, the few-shot learning in the prompt project can be used to guide the large model to generate solution information, avoiding the situation where a large number of reference examples cannot be obtained. Specifically, the solution information of the questions to be answered can be generated based on the reference examples in the form of prompt words. Prompt words can be used to guide the large model to generate text or sentences for specific responses; specifically, they can be text used to guide the large model to generate solution information for the questions to be answered. Prompt words can guide the large language model to better understand the user's needs, thereby facilitating the large language model to generate content that better meets the user's needs. Prompt words and the format of prompt words can be set according to actual needs, and are not specifically limited here.
[0067] In practical applications, prompt words may include system prompt words, reference examples, and information about questions to be answered, etc. 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.
[0068] The following is an example of a system prompt word: If you are an AI teacher, please use manim to write a code to make a math video for the following question. The requirements are as follows: *Create a `ProblemSolving` class, inherit `MyScene`, and write the `self.solve` method.
[0069] *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.
[0070] *For plane geometry problems, graphics can be used to assist calculations.
[0071] * Call `manim`'s built-in `Dot`, `VGroup`, `Brace`, etc. to draw graphics, and use `Brace` to add brackets on each `VGroup`.
[0072] * Call `self.create_text` to create a `Text` object, do not use the `Text` built-in in `manim`.
[0073] *Showing the answer to the question requires combining it with a graphic illustration.
[0074] *Only output [Question], [Knowledge Point], [Step-by-step Analysis], [Answer] and [Code], do not output other content.
[0075] 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 plane geometry problems, graphics can be used to assist calculations" can represent the content contained in the solution information used to solve the problem in the solution video; "*Call `manim`'s built-in `Dot`, `VGroup`, `Brace`, etc. to draw graphics, and use `Brace` to add brackets on each `VGroup`" can represent the information of the software tools used to draw the graphic objects in the problem.
[0076] In actual applications, based on the system prompts, you can add reference examples, questions to be answered, and other information to generate prompts. The large language model can output the answer information of the questions to be answered based on the content of the prompts. The answer information may include the question, knowledge points, step-by-step analysis, answer, and video code.
[0077] Reference examples may include a preset number of selected plane geometry questions and corresponding knowledge points, step-by-step analysis, answers, codes and other information. The question information of the question to be answered may include the question to be answered and the user's needs, such as: "Use a 15-meter-long steel bar to enclose two equilateral triangles with a side length ratio of 3:2. The side lengths of the large and small equilateral triangles are ( ) meters and ( ) meters respectively. (Fill in the larger one first, then the smaller one)", please generate [Question], [Knowledge Point], [Step-by-step Analysis], [Answer] and [Code] according to the above requirements.
[0078] In order to facilitate the understanding of the present solution, the embodiments of the present specification also provide specific contents regarding the above-mentioned determination of reference examples having the same characteristics as any of the questions to be answered.
[0079] Optionally, for any of the plurality of questions to be answered, determining a reference example having the same characteristics as any of the questions to be answered in the embodiments of this specification may specifically include: By using the semantic matching model, a preset number of target reference examples matching any of the questions to be answered are selected from the reference example set.
[0080] In the embodiments of this specification, the semantic matching model can match each reference example in the reference example set with any of the questions to be answered, obtain the corresponding similarity, randomly select a preset number of reference examples from the reference examples whose similarity is greater than a preset similarity threshold as target reference examples, or sort the reference examples from large to small based on the similarity, and select a preset number of reference examples ranked first as target reference examples. The semantic matching model can be a model for semantic recognition based on RAG technology, such as Word2Vec model, GloVe model, Sentence-BERT model, Siamese network model, twin tower model and other models.
[0081] In actual applications, each reference example in the reference example set can be matched with any of the questions to be answered in accordance with keyword matching, and a preset number of target reference examples with a higher degree of matching can be determined therefrom; predefined rules can be used for matching to select reference examples with a higher degree of matching as target reference examples; other methods can also be used to select target reference examples, such as n-gram models, deep learning methods, etc. The method for obtaining target reference examples is not specifically limited here.
[0082] The reference example question set may be a preset number of plane geometry questions and corresponding answer information selected by a preset method, specifically, typical elementary school plane geometry questions, typical middle school plane geometry questions, etc. The preset method may be manual selection, expert experience, model selection, etc., and the preset number may be 10, 20, 25, 30, etc.
[0083] Optionally, in the embodiments of this specification, obtaining training data based on the plurality of questions to be answered and the corresponding answer information including the video data may specifically include: The plurality of questions to be answered are classified according to question features to obtain a plurality of question sets; one of the question sets includes a plurality of questions of the same category; the question features include at least one of the following: a shape feature of a plane geometric image involved in the question, a feature of the number of questions included in the question, a feature of the number of answer results corresponding to the question, and a feature of the number of drawings required for the question; Selecting at least one question to be answered from each of the plurality of question sets; The selected questions to be answered and the corresponding answer information containing the video data are used as the training data.
[0084] In the embodiments of the present specification, at least one to-be-answered question and corresponding answer information can be selected from each classification of question sets as training data, so that the training data can include questions of various types, so that the problem-solving model can complete training based on various types of training data, improve the accuracy of the problem-solving model after training in answering various types of plane geometry problems, and avoid the problem-solving model after training being able to answer only a single type of plane geometry problem. The training data may include reference examples or may not include reference examples.
[0085] In the embodiments of this specification, a classification model, a clustering model or the like may be used to classify a number of questions to be answered, so that questions to be answered with the same characteristics may be classified into one category to obtain multiple question sets.
[0086] In practical applications, the questions to be answered may have one or more different features; the questions included in one question set and another question set may have an intersection or may be completely different, which is not specifically limited here.
[0087] In the embodiments of the present specification, at least one question to be answered is selected from each of the multiple question sets. Specifically, there may be multiple subcategories under each major category of question features. For example, shape features may also include multiple subcategories such as circle, square, polygon, triangle, etc. At least one question to be answered can be selected from each subcategory. If the selected question to be answered is contained in other major categories, the selected question to be answered can be eliminated, and then at least one question to be answered is selected from each subcategory of the next major category; or at least one question to be answered is selected from a major category. If the selected question to be answered is not contained in other major categories, the selected question to be answered can be eliminated, and then at least one question to be answered is selected from the next major category. Therefore, the questions to be answered and the corresponding answer information can be selected as training data in the above manner, avoiding repeated questions to be answered in the training data, making the plane geometry types contained in the training data more comprehensive, and improving the accuracy of model training.
[0088] Of course, the repeatability of the training data may be ignored, and a certain number of questions may be randomly selected from each question set as training data. This is not specifically limited here. In the embodiments of this specification, the training data may be data in a preset format obtained by processing answer information such as [question], [knowledge point], [step-by-step analysis], [answer], and [code]. As an implementation method, the training data in the preset format may include a role definition part, a question part, and a analysis part.
[0089] The role definition part includes information for defining the role played by the problem-solving model.
[0090] The question part includes information of the question to be answered.
[0091] 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.
[0092] In the embodiment of this specification, the training data in the preset 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 in 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.
[0093] In order to facilitate understanding of the training data in a preset format, the present specification provides an example of training data for a plane geometry problem, which can be specifically as follows: [SYSTEM] You are a math teacher. Please use manim to write a code to make a teaching video for the following question.
[0094] [USER] A 15-meter-long steel bar is used to form two equilateral triangles with a side length ratio of 3:2. The side lengths of the large and small equilateral triangles are ( ) meters and ( ) meters respectively. (Fill in the larger one first, then the smaller one).
[0095] [ASSISTANT] [Knowledge point] xxx, [Step-by-step analysis] xxx, [Answer information] xxx, and [Code information] xxx.
[0096] In order to make the training data more accurate, optionally, the method described in the embodiment of this specification may also include: Based on the video data corresponding to any one of the plurality of questions to be answered, generating an explanation video of the any one of the questions to be answered; Determine whether the explanation video meets the problem-solving requirements; The obtaining of training data based on the plurality of questions to be answered and the corresponding answer information including the video data specifically includes: If the explanation video meets the problem-solving requirements, any of the questions to be answered and the corresponding answer information are used as training data.
[0097] In the embodiments of this specification, if the explanation video does not meet the problem-solving requirements, it may indicate that the problem-solving information generated by the large language model is not accurate enough. In order to enable the trained model to solve problems more accurately, the training data of the explanation video that does not meet the problem-solving requirements may not be used. Among them, any of the questions to be answered and the corresponding answer information may be removed from the training data; or it may be determined whether to select the problem-solving information corresponding to the explanation video as training data based on whether the explanation video meets the problem-solving requirements. For example, if it meets the requirements, the question and the problem-solving information corresponding to the explanation video are selected as training data; if it does not meet the requirements, the question and the problem-solving information corresponding to the explanation video are not selected as training data.
[0098] Problem-solving requirements may be requirements related to the title, knowledge points, step-by-step analysis, and answers in the video, such as the correctness of the answer. In practical applications, manual annotation or model annotation can be used to explain whether the video meets the problem-solving requirements.
[0099] In practical applications, the video code can be rendered based on the audio and video rendering engine to generate an explanation video. The audio and video rendering engine can generate an explanation video containing audio explanations based on the video code. The audio synthesis engine and the video rendering engine can also be used to process the problem-solving code separately to generate an explanation video. Specifically, the video rendering engine can be used to convert the video code into a non-voice and visual initial video, including the drawing of geometric figures and the demonstration of steps; the audio synthesis engine can be used to obtain a voice explanation synchronized with the video based on the non-voice and visual initial video, and the voice explanation is synthesized with the initial video to generate an explanation video, so that the explanation video can contain not only a visual video, but also relevant explanation voices to enhance the vividness and intuitiveness of the problem-solving process.
[0100] In order to facilitate understanding of the present solution, the embodiments of this specification also provide specific contents regarding the above-mentioned problem-solving requirements.
[0101] Optionally, the determining whether the explanation video meets the problem-solving requirements in the embodiments of this specification may specifically include: Obtain the last frame image of the explanation video; Determine whether at least one of the following conditions exists in the last frame of image: The type of the geometric figure displayed in the last frame of image is inconsistent with the type of the geometric figure included in the question to be answered; There is no geometric figure in the last frame of image; There is overlap in the contents displayed in the last frame of image.
[0102] In the embodiments of this specification, if one or more of the above situations exist in the explanation video, it can be determined that the explanation video does not meet the problem-solving requirements.
[0103] In practical applications, it is possible to first determine whether the last frame of the image contains geometric figures. If so, it is possible to determine whether the type of the geometric figures displayed in the last frame of the image is consistent with that of the geometric figures contained in the question to be answered. If they are consistent, it is possible to determine whether there is overlap in the content displayed in the last frame of the image. It is possible to make judgments in other judgment orders, such as first determining whether the last frame of the image contains geometric figures. If so, it is possible to determine whether there is overlap in the content displayed in the last frame of the image. If there is no overlap, it is possible to determine whether the type of the geometric figures displayed in the last frame of the image is consistent with that of the geometric figures contained in the question to be answered. It is also possible to make judgments on these problem-solving requirements at the same time. If any one of them is not met, the judgment on other problem-solving requirements can be terminated. It is also possible to make judgments on a preset number of problem-solving requirements.
[0104] In the embodiments of this specification, models for processing images such as image recognition models, image segmentation models, and image semantic segmentation models can be used to judge whether the explanation video meets the problem-solving requirements. It can also be judged based on expert experience and can be set according to actual needs.
[0105] In actual applications, it is also possible to determine whether the answer in the image frame of the displayed answer is correct; it is also possible to determine whether the step-by-step analysis is logical based on each image frame; it is also possible to determine whether the knowledge point in the image frame displaying the knowledge point is the knowledge point to be tested in any of the questions to be answered; it is also possible to determine whether the content of the image frame matches the voice content; it is also possible to determine whether the schematic diagram displayed in the answer video is consistent with the problem-solving text information contained in the answer video; it is also possible to determine whether the graphics displayed in the video are consistent with the image object in the question; and judgments can also be made based on other problem-solving requirements, which are not listed here one by one.
[0106] In the embodiments of this specification, one or more models such as a semantic analysis model and a word vector model can be used to determine whether the explanation video meets the requirements for solving the problem.
[0107] Optionally, the explanation video described in the embodiments of this specification is a video including topic introduction, knowledge point introduction, topic explanation and conclusion.
[0108] The answer video in the embodiments of this specification may contain corresponding voice information and visual image information. For example, in the introduction section of the question, the video will display the question, and then be accompanied by voice: "Hi, I am Xiaoyuan AI smart teacher, let me explain the following question to you"; for the introduction of knowledge points, the video screen will display: "Knowledge point: XXX", and then be accompanied by voice: This question mainly tests XXX. The explanation of the question can be divided into two parts, the left side displays the blackboard, such as the calculation formula, and the right side draws a picture, such as the graphic object in the question, and then the formulas and graphics of each step are introduced with voice. The ending remarks can be displayed on the screen and announced by voice, such as "This question has been explained, classmates, have you learned it?" In the embodiments of this specification, the audio and video rendering engine can be optimized, so that the optimized audio and video rendering engine can reduce the difficulty of video generation for elementary school mathematics plane geometry problems, thereby improving the quality of video generation.
[0109] Based on the same idea, this manual also provides a method for solving problems using the above trained model. Figure 2 , taking the application of the method for solving problems provided in this specification in the scenario of plane geometry problems as an example, the method for solving problems is explained. Figure 2 A flowchart of a method for solving a problem provided by an embodiment of the present specification is shown. From a program perspective, the execution subject of the process may be a program in a server or a problem-solving terminal or a problem-solving platform. The server or the problem-solving terminal may be equipped with or may call a problem-solving model for solving plane geometry problems. From a hardware perspective, the execution subject may be a server or a problem-solving terminal or a problem-solving platform. The execution subject may be the same as or different from the execution subject of the above-mentioned embodiment. Figure 2 As shown, the specific steps include the following steps.
[0110] Step 202: Obtain target questions to be answered regarding plane geometry problems.
[0111] In the embodiments of this specification, the target question to be answered may be a target question to be answered input by the user through the user terminal. Specifically, it may be a text description of the target question to be answered; or it may be an uploaded image containing the target question to be answered, which may be uploaded locally or uploaded directly by the user. A large language model or a graphic recognition model may be used to identify the target question to be answered input by the user to determine the question to be answered. The target question to be answered may be a question related to plane geometry problems.
[0112] Step 204: input the target problem to be solved into the trained problem-solving model to obtain target problem-solving information.
[0113] Among them, the target problem-solving information includes target video data for generating an explanation video of the target question to be answered; the trained problem-solving model is obtained by training the problem-solving model with training data; the training data is generated by using the solution information of several questions to be answered obtained by using the large model and the several questions to be answered.
[0114] The trained problem-solving model used in the embodiments of this specification can be generated in the manner described in the above embodiments, which will not be described in detail here.
[0115] In practical applications, the training data can be obtained by cleaning and formatting several questions to be answered and the corresponding information to be answered, which can ensure the consistency and standardization of the data. Specifically, it can include word segmentation of text data, noise removal, and formatting of code data.
[0116] Step 206: Render the target video data using a video rendering tool to obtain a target explanation video of the target question to be answered.
[0117] In the embodiments of the present specification, the video rendering tool can generate a target explanation video containing voice explanation based on the target video code. Specifically, the target video code can be converted into a visual initial video, including the drawing of geometric figures and step demonstrations; based on the initial video, a voice explanation synchronized with the video is generated, and the voice explanation is synthesized with the initial video to obtain the target explanation video. The target explanation video can be displayed on the user terminal for the user to view.
[0118] The trained problem-solving model in the embodiment of the present specification can generate video codes for solutions to plane geometry problems. By using the trained problem-solving model to solve plane geometry problems, the video codes for solutions can be quickly obtained, which improves the efficiency of generating videos for solutions to plane geometry problems. In addition, by using the corresponding explanation videos to solve the problems to be solved, the vividness and intuitiveness of the problem-solving process can be enhanced, which helps users understand.
[0119] based on Figure 2 The method, the examples of this specification also provide some specific implementation plans of the method, which are described below.
[0120] Optionally, the target explanation video described in the embodiments of this specification may include images and voice synchronized with the images; the target explanation video includes video content that explains the problem-solving process step by step, and a part of the area of the video display page of the target explanation video is used to display the blackboard content, and another part of the area is used to display the drawing content.
[0121] In actual applications, the video can be divided into left and right partitions, with the blackboard content displayed on the left and the drawing content displayed on the right; or the drawing content displayed on the left and the blackboard content displayed on the right. The video can also be divided into upper and lower partitions, with the blackboard content displayed on the top and the drawing content displayed on the bottom; or the drawing content displayed on the top and the blackboard content displayed on the bottom. The blackboard content can include information such as formulas for calculations and annotations for explanations; the drawing content can include graphics involved in the question, auxiliary lines that need to be added in the process of solving the question, and numbers marked on the graphics. The blackboard content and the drawing content can also include other information, which can be displayed based on the actual question and explanation needs, and are not specifically limited here.
[0122] Corresponding to the above-mentioned method embodiment for generating a problem-solving model for solving a plane geometry problem, the present specification also provides an embodiment of a device for generating a problem-solving model for solving a plane geometry problem, Figure 3 FIG. 2 shows a schematic diagram of a device for generating a problem-solving model for solving a plane geometry problem provided by an embodiment of the present specification. Figure 3 As shown, the device comprises: The acquisition module 302 is configured to acquire a plurality of questions to be answered; the questions to be answered are questions on plane geometry problems; The answer information obtaining module 304 is configured to obtain answer information of the plurality of questions to be answered using a large language model; the answer information includes video data for generating explanation videos of the questions to be answered; A training data obtaining module 306 is configured to obtain training data based on the plurality of questions to be answered and the corresponding answer information including the video data; The model training module 308 is configured to use the training data to train the problem-solving model to obtain a trained problem-solving model; the trained problem-solving model is used to generate explanation video data, and the explanation video data is used to generate an explanation video for explaining questions about plane geometry problems.
[0123] based on Figure 3 The present specification also provides some specific implementation schemes of the method, which are described below.
[0124] Optionally, the device may further include a reference example question determination module, which may be configured to: For any of the plurality of questions to be answered, determine a reference example having the same characteristics as the question to be answered; the characteristics include at least one of the shape characteristics of the plane geometric image involved in the question, the number of questions included in the question, the number of answer results corresponding to the question, and the number of drawings required for the question; the reference example includes the title of the example and video data for generating an explanation video of the title of the example; The answer information obtaining module may be configured as follows: The reference example question is provided to the large language model so that the large language model obtains answer information corresponding to any of the questions to be answered.
[0125] Optionally, the device may further include a reference example question determination module, which may be configured to: By using the semantic matching model, a preset number of target reference examples matching any of the questions to be answered are selected from the reference example set.
[0126] Optionally, the training data acquisition module may be configured as follows: The plurality of questions to be answered are classified according to question features to obtain a plurality of question sets; one of the question sets includes a plurality of questions of the same category; the question features include at least one of the following: a shape feature of a plane geometric image involved in the question, a feature of the number of questions included in the question, a feature of the number of answer results corresponding to the question, and a feature of the number of drawings required for the question; Selecting at least one question to be answered from each of the plurality of question sets; The selected questions to be answered and the corresponding answer information containing the video data are used as the training data.
[0127] Optionally, the device may further include a problem-solving requirement determination module, which may be configured to: Based on the video data corresponding to any one of the plurality of questions to be answered, generating an explanation video of the any one of the questions to be answered; Determine whether the explanation video meets the problem-solving requirements; The training data acquisition module can be configured as follows: If the explanation video meets the problem-solving requirements, any of the to-be-solved questions and the corresponding solution information are used as training data.
[0128] Optionally, the device may be configured as: Obtain the last frame image of the explanation video; Determine whether at least one of the following conditions exists in the last frame of image: The type of the geometric figure displayed in the last frame of image is inconsistent with the type of the geometric figure included in the question to be answered; There is no geometric figure in the last frame of image; There is overlap in the contents displayed in the last frame of image.
[0129] Optionally, the answer information also includes at least one of step-by-step analysis information for answering the question to be answered step by step, knowledge point information corresponding to the question to be answered, and answer information of the question to be answered.
[0130] Optionally, the explanation video is a video including topic introduction, knowledge point introduction, topic explanation and conclusion.
[0131] The above is a schematic scheme of a device for generating a problem-solving model for solving plane geometry problems in this embodiment. It should be noted that the technical scheme of the device for generating a problem-solving model for solving plane geometry problems and the technical scheme of the method for generating a problem-solving model for solving plane geometry problems are of the same concept, and the details not described in detail in the technical scheme of the device for generating a problem-solving model for solving plane geometry problems can be found in the description of the technical scheme of the method for generating a problem-solving model for solving plane geometry problems.
[0132] Corresponding to the above-mentioned method embodiment for answering questions, this specification also provides an embodiment of a device for answering questions, Figure 4 FIG. 1 is a schematic diagram showing a structure of a device for answering questions provided by an embodiment of the present specification. Figure 4 As shown, the device comprises: The target unsolved problem obtaining module 402 is configured to obtain a target unsolved problem related to a plane geometry problem; The answer module 404 is configured to input the target unanswered question into the trained problem-solving model to obtain target problem-solving information; the target problem-solving information includes target video data for generating an explanation video of the target unanswered question; the trained problem-solving model is obtained by training the problem-solving model with training data; the training data is generated by using the solution information of several unanswered questions obtained by the large model and the several unanswered questions; The rendering module 406 is configured to render the target video data using a video rendering tool to obtain a target explanation video of the target question to be answered.
[0133] based on Figure 4 The present specification also provides some specific implementation schemes of the method, which are described below.
[0134] Optionally, the target explanation video includes images and voice synchronized with the images; the target explanation video includes video content that explains the problem-solving process step by step, and a part of the area of the video display page of the target explanation video is used to display the blackboard content, and another part of the area is used to display the drawing content.
[0135] The above is a schematic scheme of a device for solving a question in this embodiment. It should be noted that the technical scheme of the device for solving a question and the technical scheme of the method for solving a question belong to the same concept, and the details not described in detail in the technical scheme of the device for solving a question can be referred to the description of the technical scheme of the method for solving a question.
[0136] Figure 5 The block diagram of a computing device according to an embodiment of the present specification is shown. The components of the computing device 500 include but are not limited to a memory 510 and a processor 520. The processor 520 is connected to the memory 510 via a bus 530, and the database 550 is used to store data.
[0137] The computing device 500 also includes an access device 540 that enables the computing device 500 to communicate via one or more networks 560. 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)) that is 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).
[0138] In one embodiment of the present specification, the above components of the computing device 500 and Figure 5 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 5 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.
[0139] The computing device 500 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 500 may also be a mobile or stationary server.
[0140] The processor 520 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 plane geometry problems or the steps of the method for solving problems.
[0141] The above is a schematic scheme of a computing device of 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 plane geometry problems or the method for solving a problem belong to the same concept, and the details not described in detail in the technical scheme of the computing device can be referred to the description of the technical scheme of the method for generating a problem-solving model for solving plane geometry problems or the method for solving a problem.
[0142] An embodiment of the present specification also 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 solution model for solving a plane geometry problem or the steps of the method for solving a problem.
[0143] 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 problem-solving model for solving plane geometry problems or the method for solving a problem belong to the same concept, and the details not described in detail in the technical scheme of the storage medium can be referred to the description of the technical scheme of the method for generating a problem-solving model for solving plane geometry problems or the method for solving a problem.
[0144] An embodiment of the present specification also provides a computer program product, wherein when the computer program is executed in a computer, the computer is caused to execute the steps of the method for generating a solution model for solving a plane geometry problem or the steps of the method for solving a problem.
[0145] The above is a schematic scheme of a computer program product of this embodiment. It should be noted that the technical scheme of the computer program product and the technical scheme of the method for generating a problem-solving model for solving plane geometry problems or the method for solving a problem are of the same concept, and the details not described in detail in the technical scheme of the computer program can be referred to the description of the technical scheme of the method for generating a problem-solving model for solving plane geometry problems or the method for solving a problem.
[0146] 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.
[0147] 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.
[0148] 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.
[0149] 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.
[0150] 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 plane geometry problem, characterized in that: include: Get a number of questions to be answered; The questions to be answered are questions on plane geometry; Using the large language model, obtaining answer information of the plurality of questions to be answered; the answer information includes video data used to generate explanation videos of the questions to be answered; Based on the plurality of questions to be answered and the corresponding answer information including the video data, obtaining training data; Using the training data to train a problem-solving model to obtain a trained problem-solving model; The trained problem-solving model is used to generate explanation video data, and the explanation video data is used to generate an explanation video for explaining questions about plane geometry problems.
2. The method according to claim 1, characterized in that The method further comprises: For any of the plurality of questions to be answered, determine a reference example having the same characteristics as the question to be answered; the characteristics include at least one of the following: the shape characteristics of the plane geometric image involved in the question, the number of questions included in the question, the number of answer results corresponding to the question, and the number of drawings required for the question; the reference example includes the title of the example and video data for generating an explanation video of the title of the example; The method of using the large language model to obtain the answer information of the plurality of questions to be answered specifically includes: The reference example question is provided to the large language model so that the large language model obtains answer information corresponding to any of the questions to be answered.
3. The method according to claim 2, characterized in that The step of determining, for any of the plurality of questions to be answered, a reference example question having the same characteristics as the question to be answered specifically includes: By using the semantic matching model, a preset number of target reference examples matching any of the questions to be answered are selected from the reference example set.
4. The method according to claim 1, characterized in that Based on the plurality of questions to be answered and the corresponding answer information including the video data, training data is obtained, specifically including: The plurality of questions to be answered are classified according to question features to obtain a plurality of question sets; one of the question sets includes a plurality of questions of the same category; the question features include at least one of the following: a shape feature of a plane geometric image involved in the question, a feature of the number of questions included in the question, a feature of the number of answer results corresponding to the question, and a feature of the number of drawings required for the question; Selecting at least one question to be answered from each of the plurality of question sets; The selected questions to be answered and the corresponding answer information containing the video data are used as the training data.
5. The method according to claim 1, characterized in that The method further comprises: Based on the video data corresponding to any one of the plurality of questions to be answered, generating an explanation video of the any one of the questions to be answered; Determine whether the explanation video meets the problem-solving requirements; The obtaining of training data based on the plurality of questions to be answered and the corresponding answer information including the video data specifically includes: If the explanation video meets the problem-solving requirements, any of the questions to be answered and the corresponding answer information are used as training data.
6. The method according to claim 5, characterized in that The determining whether the explanation video meets the problem-solving requirements specifically includes: Obtain the last frame image of the explanation video; Determine whether at least one of the following conditions exists in the last frame of image: The type of the geometric figure displayed in the last frame of image is inconsistent with the type of the geometric figure included in the question to be answered; There is no geometric figure in the last frame of image; There is overlap in the content displayed in the last frame of image.
7. The method according to claim 1, characterized in that The answer information also includes at least one of step-by-step analysis information for answering the question to be answered step by step, knowledge point information corresponding to the question to be answered, and answer information of the question to be answered.
8. The method according to claim 1, characterized in that The explanation video is a video including topic introduction, knowledge point introduction, topic explanation and conclusion.
9. A method for solving a problem, characterized in that: include: Get the target questions to be answered about plane geometry problems; Inputting the target problem to be solved into the trained problem-solving model to obtain target problem-solving information; The target problem-solving information includes target video data for generating a video explaining the target problem to be solved; The trained problem-solving model is obtained by training the problem-solving model with training data; the training data is generated by using the solution information of a number of unanswered questions obtained by the large model and the number of unanswered questions; The target video data is rendered using a video rendering tool to obtain a target explanation video of the target question to be answered.
10. The method according to claim 9, characterized in that The target explanation video includes images and voice synchronized with the images; the target explanation video includes video content that explains the problem-solving process step by step, and a part of the area of the video display page of the target explanation video is used to display the blackboard content, and another part of the area is used to display the drawing content.
11. A device for generating a problem-solving model for solving a plane geometry problem, characterized in that: include: An acquisition module is configured to acquire a number of questions to be answered; The questions to be answered are questions on plane geometry; The answer information obtaining module is configured to obtain answer information of the plurality of questions to be answered by using a large language model; the answer information includes video data for generating explanation videos of the questions to be answered; A training data obtaining module is configured to obtain training data based on the plurality of questions to be answered and the corresponding answer information including the video data; 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 is used to generate explanation video data, and the explanation video data is used to generate an explanation video for explaining questions about plane geometry problems.
12. A device for solving a problem, characterized in that: include: A target unsolved problem acquisition module is configured to acquire a target unsolved problem related to a plane geometry problem; A solution module is configured to input the target problem to be solved into the trained problem-solving model to obtain target problem-solving information; The target problem-solving information includes target video data for generating a video explaining the target problem to be solved; The trained problem-solving model is obtained by training the problem-solving model with training data; the training data is generated by using the solution information of a number of unanswered questions obtained by the large model and the number of unanswered questions; The rendering module is configured to render the target video data using a video rendering tool to obtain a target explanation video of the target question to be answered.
13. 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 solution model for solving plane geometry problems described in any one of claims 1 to 8 or the steps of the method for solving problems described in any one of claims 9 to 10 are implemented.
14. 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 solution model for solving plane geometry problems as described in any one of claims 1 to 8 or the steps of the method for solving problems as described in any one of claims 9 to 10.
15. A computer program product, characterized in that It includes a computer program / instruction, which, when executed by a processor, implements the steps of the method for generating a solution model for solving a plane geometry problem as described in any one of claims 1 to 8 or the steps of the method for solving a problem as described in any one of claims 9 to 10.
Citation Information
Patent Citations
Chinese question solving video generation method and device, electronic equipment and storage medium
CN115114905A
Geometric question answering method and system and electronic equipment
CN116955419A
Corpus data construction method and device, equipment and storage medium
CN117973513A
Training method and device of question answering model, equipment and storage medium
CN117973529A
Calculation question answering and model training method and device, equipment and medium
CN118133009A
Cited By
Teaching note generation model training method and speaking question video generation method
CN120849944A
Multi-modal problem solving method, multi-modal problem solving system, computing device and medium
CN121279457A
Question solving large model training method, device, equipment, medium and product
CN121543674A
