Training method and device of mathematical question and answer model, equipment and medium

By enhancing the training corpus of existing mathematical Q&A models, the problem of low accuracy in model generation response answers is solved, and more accurate mathematical Q&A capabilities and user satisfaction are achieved.

CN119990355APending Publication Date: 2025-05-13CHINA UNITED NETWORK COMM GRP CO LTD +2
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311480774.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-11-08
Publication Date
2025-05-13

Smart Images

  • Figure CN119990355A_ABST
    Figure CN119990355A_ABST
Patent Text Reader

Abstract

The invention provides a mathematical question and answer model training method and device, equipment and a medium. Comprising the steps of obtaining a mathematical question statement and corresponding answer information thereof, and a question and answer result output by an initial mathematical question and answer model to a mathematical question statement model; comparing the answer information with a question and answer result output by the model, and determining a to-be-trained question according to a comparison result; determining data information related to the to-be-trained question according to the question type of the to-be-trained question; replacing the to-be-trained questions based on the data information to obtain a preset number of training questions and corresponding training answer information; and training the initial mathematical question and answer model according to the training question and the training answer information. Through the method, the mathematical question-answering ability of the mathematical question-answering model is enhanced, and the correctness of the answer output by the model is improved, so that the model answer meeting the user requirement is provided, and the satisfaction degree of the user to the model is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of intelligent question-answering models, and in particular to a training method, device, equipment and medium for a mathematical question-answering model. Background Art

[0002] The application of artificial intelligence big models in the field of natural language processing is becoming more mature, and language processing tools driven by artificial intelligence technology have made significant progress in language understanding and text generation capabilities.

[0003] In the current solution, the chatbot based on the large artificial intelligence model adopts the GPT-3.5 neural network architecture. The model is trained by connecting a large corpus. The model can provide answer information that meets user needs based on the input questions about math questions and answers.

[0004] However, existing model training methods have the problem that the generated responses are not very accurate. Summary of the invention

[0005] The present application provides a training method, device, equipment and medium for a mathematical question-answering model, so as to solve the problem that the accuracy of the generated reply answers in the existing model training methods is not high.

[0006] In a first aspect, the present application provides a method for training a mathematical question-answering model, the method comprising:

[0007] Obtaining a math question statement and its corresponding answer information, as well as a question-answering result output by the initial math question-answering model for the math question statement;

[0008] Compare the answer information with the question-and-answer results output by the model, and determine the questions to be trained based on the comparison results;

[0009] According to the type of the problem to be trained, determine the data information involved in the problem to be trained;

[0010] The training questions are replaced based on the data information to obtain a preset number of training questions and corresponding training answer information;

[0011] The initial math question answering model is trained based on the training questions and training answer information.

[0012] In the embodiment of the present application, the answer information is compared with the question and answer result output by the model, and the question to be trained is determined according to the comparison result, including:

[0013] Determine the comparison result between the answer information and the question-answering result output by the model;

[0014] If the comparison result is that the answer information and the question and answer result output by the model are inconsistent, the mathematical problem is determined to be a problem to be trained.

[0015] In the embodiment of the present application, according to the type of the problem to be trained, the data information involved in the problem to be trained is determined, including:

[0016] Decomposing the corpus of the training questions according to the types of the training questions to obtain multiple information segments of the training questions;

[0017] Determine the data information from the problem information segment to be trained.

[0018] In the embodiment of the present application, the training questions are replaced based on the data information to obtain a preset number of training questions and corresponding training answer information, including:

[0019] generating a preset amount of replacement data information;

[0020] Replace the data information in the training problem according to the replacement data information to obtain a preset number of training problems;

[0021] According to the training questions, the corresponding training answer information is determined.

[0022] In the embodiment of the present application, the corresponding training answer information is determined according to the training question, including:

[0023] According to the type of the problem to be trained, determine the calculation rules corresponding to the problem type;

[0024] Determine the calculation rule as the target calculation rule corresponding to the training problem;

[0025] According to the data information and target calculation rules in the training problem, the training answer information corresponding to the training problem is determined.

[0026] In the embodiment of the present application, according to the type of the problem to be trained, the calculation rule corresponding to the problem type is determined, including:

[0027] Determine a preset calculation rule repository;

[0028] According to the problem type of the problem to be trained, a calculation rule having an index relationship with the problem type is determined from a calculation rule repository.

[0029] In the embodiment of the present application, the initial mathematical question-answering model is trained according to the training questions and the training answer information, including:

[0030] According to the training questions, the question-answering results of the initial mathematical question-answering model for the training questions are obtained;

[0031] Compare the question-answering results output by the model with the training answer information to obtain the comparison results;

[0032] The model parameters of the initial mathematical question-answering model are trained according to the comparison results to obtain the target mathematical question-answering model, so that the question-answering results output by the target mathematical question-answering model are consistent with the training answer information.

[0033] In a second aspect, the present application provides a training device for a mathematical question-answering model, the device comprising:

[0034] An information acquisition module, used to acquire mathematical question statements and their corresponding answer information, as well as the question-answering results output by the initial mathematical question-answering model for the mathematical question statements;

[0035] An information comparison module is used to compare the answer information with the question and answer results output by the model, and determine the questions to be trained based on the comparison results;

[0036] An information determination module determines the data information involved in the problem to be trained according to the type of the problem to be trained;

[0037] A question replacement module is used to replace the training questions based on the data information to obtain a preset number of training questions and corresponding training answer information;

[0038] The model training module is used to train the initial math question-answering model based on training questions and training answer information.

[0039] In a third aspect, the present application provides a device, comprising: a processor, and a memory communicatively connected to the processor;

[0040] Memory stores computer-executable instructions;

[0041] The processor executes the computer-executable instructions stored in the memory to implement the method of the present application.

[0042] In a fourth aspect, the present application provides a computer-readable storage medium, in which computer-executable instructions are stored. When the computer-executable instructions are executed by a processor, they are used to implement the method of the present application.

[0043] The training method, device, equipment and medium of the mathematical question-answering model provided in the present application obtain mathematical question statements and their corresponding answer information, as well as the question-answering results of the model output of the initial mathematical question-answering model for the mathematical question statements; compare the answer information and the question-answering results output by the model, and determine the questions to be trained based on the comparison results; determine the data information involved in the questions to be trained based on the question types of the questions to be trained; replace the questions to be trained based on the data information to obtain a preset number of training questions and corresponding training answer information; and train the initial mathematical question-answering model based on the training questions and the training answer information.

[0044] In this way, the model can be used to answer questions about mathematical problems, and corresponding types of mathematical problems and corresponding answer sets can be provided as new corpus for these problems to supplement the original model corpus. The model can be trained based on the new model corpus obtained after the supplement to enhance the mathematical question-answering ability of the model. In this way, a mathematical question-answering model with strong mathematical question-answering ability is obtained, which can output accurate answers when users input mathematical question-answering problems that need to be solved, thereby improving user satisfaction. BRIEF DESCRIPTION OF THE DRAWINGS

[0045] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.

[0046] Figure 1 A flowchart of a method for training a mathematical question-answering model provided in an embodiment of the present application;

[0047] Figure 2 A schematic diagram of the structure of a training device for a mathematical question-answering model provided in an embodiment of the present application;

[0048] Figure 3 This is a structural block diagram of a device for executing a training method for a mathematical question-answering model according to an embodiment of the present application.

[0049] The above-mentioned drawings have shown clear embodiments of the present application, which will be described in more detail below; these drawings and textual descriptions are not intended to limit the scope of the concept of the present application in any way, but to illustrate the concept of the present application to those skilled in the art by referring to specific embodiments. DETAILED DESCRIPTION

[0050] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application. Instead, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims.

[0051] The initial math question-answering model in the prior art has the problem of inaccuracy in the output of math question-answering results. After training, the initial math question-answering model can improve the accuracy of the question-answering results output by the model; the math question-answering model can be a model using various neural network architectures, such as a GPT-3.5 neural network architecture, an artificial intelligence large model obtained by connecting a large number of corpora for training, or other intelligent models. As long as it can output the answer corresponding to the math problem based on the sentence of the input math problem, this embodiment does not limit this.

[0052] The question type is the math question type corresponding to the math question statement, such as decimal addition, fraction multiplication, first-order logic question, etc.

[0053] The data information is the data information involved in the mathematical problem, which may be the numerical information in the mathematical problem statement or other data information.

[0054] In the prior art, when users ask questions related to math questions and answers, the existing models perform poorly and often output wrong information. They perform poorly in question-and-answer systems with strict formality such as mathematics or first-order logic. The output model answers have a low accuracy rate and cannot meet user needs, resulting in a poor user experience. In addition, the existing models lack the ability of semantic understanding and contextual learning, and perform poorly in actual human-computer interaction scenarios.

[0055] In order to solve the above problems, an embodiment of the present application provides a training method for a mathematical question and answer model. By inputting mathematical problems and comparing the mathematical question and answer results output by the model, the types of mathematical problems that the mathematical question and answer model answers incorrectly can be found; the incorrectly answered questions and their corresponding correct answers are combined into an input, and a sufficient number of training questions and corresponding answers are generated for these question-answer combinations; a new training corpus is formed by these training questions and corresponding answers, which includes various types of problems that the mathematical question and answer model has problems with in mathematical question and answering; the new training corpus obtained as above is added to the huge corpus of the mathematical question and answer model, so as to train the mathematical question and answer model and enhance the mathematical question and answer model.

[0056] The technical solution of the present application and how the technical solution of the present application solves the above-mentioned technical problems are described in detail below with specific embodiments. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of the present application will be described below in conjunction with the accompanying drawings.

[0057] Figure 1 A flow chart of a method for training a mathematical question-answering model provided in an embodiment of the present application. Figure 1As shown, the training method of the mathematical question answering model may include the following steps:

[0058] S110, obtaining a mathematical question statement and its corresponding answer information, as well as a question-answering result output by the initial mathematical question-answering model for the mathematical question statement.

[0059] Among them, the method of obtaining mathematical problem statements can be to determine the mathematical problems that the model has previously answered incorrectly from the historical data of the initial mathematical model, or to provide a large number of mathematical problems to the model through web crawling, computer program generation, etc. This embodiment does not limit this.

[0060] The answer information is the answer corresponding to the math problem. The answer information can be obtained by generating the answer through a computer program, crawling the web to obtain the answer corresponding to the math problem, etc. This embodiment also does not limit this.

[0061] The question-and-answer result output by the model is the answer information output by the model based on the question statement after the mathematical question statement is input into the initial mathematical model.

[0062] Based on this, by obtaining mathematical question statements and their corresponding answers, and inputting the mathematical question statements into the initial mathematical model to obtain the question and answer results output by the model, the problems existing in the model in mathematical question and answering can be determined based on the corresponding answers and the question and answer results output by the model.

[0063] S120, comparing the answer information with the question and answer results output by the model, and determining the questions to be trained based on the comparison results.

[0064] Among them, the comparison can be carried out through a computer program using a comparison method such as semantic recognition to determine the numerical answers in the question and answer results output by the model and the numerical answers in the answer information, and to compare whether the numerical answers in the question and answer results output by the model and the numerical answers in the answer information are the same, thereby determining the question information to be trained based on the comparison results.

[0065] The problem to be trained represents that the initial mathematical model has a low accuracy in answering a certain type of mathematical question and answering problem, that is, the initial mathematical model is prone to make mistakes when answering the problem to be trained. The type of problem to be enhanced by the initial mathematical model is determined according to the problem to be trained, so that the initial mathematical model can be trained according to the problem, which can improve the accuracy of the initial mathematical model in mathematical question and answering.

[0066] Based on this, by comparing the answer information and the question-and-answer results output by the model, the questions to be trained for which the initial mathematical model needs to be enhanced can be determined, so that the initial mathematical model can be further trained based on the questions to be trained.

[0067] S130: Determine data information involved in the problem to be trained according to the problem type of the problem to be trained.

[0068] The data information is the numerical information used to calculate the answer in the question statement of the problem to be trained. For example, if the question to be trained is "What is 1.2 plus 3.4?", the data information is "1.2" and "2.4".

[0069] Based on this, the data information in the problem to be trained is determined by the problem type to be trained, so that model training data can be generated according to the data information of the problem to be trained to train the initial mathematical model.

[0070] S140. Replace the training questions based on the data information to obtain a preset number of training questions and corresponding training answer information.

[0071] The preset number is a pre-set number of training questions, which may be a default setting or a number set by the user.

[0072] The training problems are mathematical problems generated based on the problems to be trained and used to train the initial mathematical model. The problems to be trained represent the mathematical problems in which the initial mathematical model has problems in a certain mathematical question and answer. The training problems generated based on the problems to be trained can be used to train the problems of the initial mathematical model, thereby improving the mathematical ability of the model.

[0073] Replacement means replacing the data information in the problem to be trained with other data information, while the text of the problem remains unchanged; for example, if the problem to be trained is "calculate 3.5 plus 2.6 equals to what?", after replacement, the problem can be "calculate 4.6 plus 7.2 equals to what?"

[0074] Based on this, by replacing the data information in the training problem, a training problem and a corresponding training answer are generated, so that the initial mathematical model can be trained according to the training problem and the answer.

[0075] S150: training the initial mathematical question-answering model according to the training questions and training answer information.

[0076] Based on this, the initial mathematical question-answering model is trained through training questions and training answer information, so as to improve the initial mathematical model in mathematical question-answering problems, thereby improving the accuracy of the model's question-answering responses and better meeting user needs.

[0077] In this embodiment, in order to achieve the accuracy of the mathematical question and answer model in mathematical question and answering and better output answer information that satisfies mathematical problems, the problems to be trained of the initial mathematical model, that is, the problems that exist in the model, are determined, and then training questions and corresponding training answers are generated based on the data information in the problems to be trained, and the initial mathematical model is trained through the training questions and answers, thereby achieving the enhancement of the mathematical question and answer model.

[0078] On the basis of the above embodiment, the present application further provides a feasible implementation of S120, specifically, comparing the answer information and the question and answer result output by the model, and determining the question to be trained according to the comparison result, including:

[0079] Determine the comparison result between the answer information and the question-answering result output by the model;

[0080] If the comparison result is that the answer information and the question and answer result output by the model are inconsistent, the mathematical problem is determined to be a problem to be trained.

[0081] Based on this, by determining the comparison results, if the result is that the answer information and the question and answer results output by the model are inconsistent, it can be determined that the initial mathematical model has problems in responding to such mathematical questions and needs enhanced training. Therefore, the mathematical problems input to the model can be determined as problems to be trained, so that training questions and corresponding training answers can be generated based on the problems to be trained, and the model can be enhanced trained.

[0082] On the basis of the above embodiment, the present application further provides a feasible implementation of S130, specifically, according to the type of the problem to be trained, determining the data information involved in the problem to be trained, including:

[0083] Decomposing the corpus of the training questions according to the types of the training questions to obtain multiple information segments of the training questions;

[0084] Determine the data information from the problem information segment to be trained.

[0085] The corpus decomposition is to divide a given sentence according to semantics, so as to obtain segmented sentence segments; the corpus decomposition can be performed by a corresponding decomposition model, or the sentence can be decomposed according to other methods.

[0086] Based on this, the semantics of the question sentence is determined by the question type of the question to be trained, so as to perform corpus decomposition on the question sentence, and determine the data information of the question to be trained from the obtained information segment of the question to be trained, so as to generate training questions and corresponding training answers based on the data information of the question to be trained.

[0087] On the basis of the above embodiments, the present application further provides a feasible implementation of S140, specifically, replacing the training questions based on the data information to obtain a preset number of training questions and corresponding training answer information, including:

[0088] generating a preset amount of replacement data information;

[0089] Replace the data information in the training problem according to the replacement data information to obtain a preset number of training problems;

[0090] According to the training questions, the corresponding training answer information is determined.

[0091] Among them, the replacement data is data used to replace the data information in the problem to be trained, and the replacement data meets the problem requirements of the problem to be trained. For example, if the data information in the problem to be trained is a positive integer, the generated replacement data information is also a positive integer. The replacement data can be generated by a computer program or by other means.

[0092] The training problem is a problem obtained by replacing the data information of the training problem, and is used to train the initial mathematical model; the text sentences of the training problem and the problem to be trained are consistent, but the problem data and the corresponding answers are different.

[0093] Based on this, the data information in the training problem is replaced by generating replacement data information, thereby generating a training problem, and generating corresponding training answers based on the training problem, so that the model can be trained based on the training problem and the corresponding answers.

[0094] In this feasible implementation, it should be noted that the corresponding calculation rules can be determined according to the problem type of the mathematical problem, and the answer corresponding to the mathematical problem can be obtained by substituting the problem data into the calculation rules. Therefore, since the problem type of the to-be-trained problem is the same as that of the training problem, and the corresponding calculation rules are also the same, the calculation rules corresponding to the training problem can be determined by determining the calculation rules corresponding to the to-be-trained problem, and then the answer information of the training problem can be determined; specifically, according to the training problem, the corresponding training answer information is determined, including:

[0095] According to the type of the problem to be trained, determine the calculation rules corresponding to the problem type;

[0096] Determine the calculation rule as the target calculation rule corresponding to the training problem;

[0097] According to the data information and target calculation rules in the training problem, the training answer information corresponding to the training problem is determined.

[0098] The calculation rules are rules corresponding to math problems and used to calculate answers to problems based on problem data, such as calculation formulas corresponding to math problems. By substituting problem data into the calculation formula, the answer corresponding to the problem can be obtained.

[0099] Based on this, by determining the calculation rules corresponding to the problem to be trained, the calculation rules corresponding to the training problem can be determined, and according to the data information and calculation rules of the training problem, the training answer information corresponding to the training problem can be determined.

[0100] In this feasible implementation, it should be noted that by predetermining the calculation rules corresponding to the problem type of the mathematical problem, the problem type of the problem to be trained can be determined and the calculation rules corresponding to the problem type can be determined. Therefore, the calculation rules corresponding to the problem to be trained can be determined through the preset calculation rule repository; specifically, according to the problem type of the problem to be trained, the calculation rules corresponding to the problem type are determined, including:

[0101] Determine a preset calculation rule repository;

[0102] According to the problem type of the problem to be trained, a calculation rule having an index relationship with the problem type is determined from a calculation rule repository.

[0103] Among them, the preset calculation rule repository is a pre-set information database that stores calculation rules corresponding to the problem types of mathematical problems. The calculation rule repository can be obtained by storing the calculation rules corresponding to the problem types of mathematical problems in the information database and establishing an index relationship between the problem types and the corresponding calculation rules.

[0104] Based on this, by determining the calculation rules with an index relationship with the problem type of the problem to be trained in the calculation rule repository, the calculation rules corresponding to the problem to be trained, that is, the calculation rules corresponding to the training problem, can be determined to obtain the training answer to the training problem.

[0105] On the basis of the above embodiments, the present application further provides a feasible implementation of S150, specifically, training the initial mathematical question-answering model according to the training questions and training answer information, including:

[0106] According to the training questions, the question-answering results of the initial mathematical question-answering model for the training questions are obtained;

[0107] Compare the question-answering results output by the model with the training answer information to obtain the comparison results;

[0108] The model parameters of the initial mathematical question-answering model are trained according to the comparison results to obtain the target mathematical question-answering model, so that the question-answering results output by the target mathematical question-answering model are consistent with the training answer information.

[0109] Among them, the training questions and the corresponding training answers can be added to the corpus of the mathematical question-answering model, and the model can be trained by updating the supplemented corpus. Other training methods can also be used.

[0110] Based on this, by inputting training questions into the initial mathematical model and comparing the model output results with the training answer information, the model parameters are updated and iterated according to the comparison results to obtain the enhanced target mathematical question-answering model.

[0111] In this embodiment, by inputting a mathematical question statement into the initial mathematical question-and-answer model, the question-and-answer result output by the model is obtained, and the question-and-answer result is compared with the answer corresponding to the mathematical question, so as to determine the problem to be trained of the model, so as to perform targeted enhanced training on the problem of the model; by replacing the data information in the problem to be trained to obtain the training problem, the training problem and the problem to be trained have the same problem type and the corresponding calculation rules are also the same, and by determining the calculation rule corresponding to the problem to be trained from a preset calculation rule repository, the training answer corresponding to the training problem can be determined, so that the training problem and the training answer are used as enhanced data to perform enhanced training on the initial mathematical model, so as to enhance the mathematical question-and-answer ability of the model; thereby, a mathematical question-and-answer model with strong mathematical question-and-answer ability is obtained, which can output accurate answers when the user inputs a mathematical question-and-answer problem to be solved, thereby improving the user's satisfaction.

[0112] Figure 2 A schematic diagram of a training device 200 for a mathematical question-answering model provided in an embodiment of the present application is shown in FIG. Figure 2 As shown, the training device 200 of the mathematical question-answering model includes: an information acquisition module 210, an information comparison module 220, an information determination module 230, a question replacement module 240 and a model training module 250.

[0113] The information acquisition module 210 is used to acquire the mathematical question statement and its corresponding answer information, as well as the question-answering result output by the initial mathematical question-answering model for the mathematical question statement;

[0114] An information comparison module 220 is used to compare the answer information with the question and answer results output by the model, and determine the questions to be trained based on the comparison results;

[0115] An information determination module 230 determines data information related to the problem to be trained according to the problem type of the problem to be trained;

[0116] A question replacement module 240 is used to replace the training questions based on the data information to obtain a preset number of training questions and corresponding training answer information;

[0117] The model training module 250 is used to train the initial math question-answering model based on training questions and training answer information.

[0118] In the embodiment of the present application, the information comparison module 220 may also be specifically used for:

[0119] Determine the comparison result between the answer information and the question-answering result output by the model;

[0120] If the comparison result is that the answer information and the question and answer result output by the model are inconsistent, the mathematical problem is determined to be a problem to be trained.

[0121] In the embodiment of the present application, the information determination module 230 may also be specifically used for:

[0122] Decomposing the corpus of the training questions according to the types of the training questions to obtain multiple information segments of the training questions;

[0123] Determine the data information from the problem information segment to be trained.

[0124] In the embodiment of the present application, the question replacement module 240 may also be specifically used for:

[0125] generating a preset amount of replacement data information;

[0126] Replace the data information in the training problem according to the replacement data information to obtain a preset number of training problems;

[0127] According to the training questions, the corresponding training answer information is determined.

[0128] In the embodiment of the present application, the question replacement module 240 may also be specifically used for:

[0129] Read the information management table in the FLASH memory to obtain the storage address and storage capacity of the component;

[0130] The components are installed in the FLASH memory according to the storage address and storage capacity of the components.

[0131] In the embodiment of the present application, the question replacement module 240 may also be specifically used for:

[0132] Determine a preset calculation rule repository;

[0133] According to the problem type of the problem to be trained, a calculation rule having an index relationship with the problem type is determined from a calculation rule repository.

[0134] In the embodiment of the present application, the model training module 250 may also be specifically used for:

[0135] According to the training questions, the question-answering results of the initial mathematical question-answering model for the training questions are obtained;

[0136] Compare the question-answering results output by the model with the training answer information to obtain the comparison results;

[0137] The model parameters of the initial mathematical question-answering model are trained according to the comparison results to obtain the target mathematical question-answering model, so that the question-answering results output by the target mathematical question-answering model are consistent with the training answer information.

[0138] Figure 3 This is a schematic diagram of the structure of the device provided in the embodiment of the present application. Figure 3 As shown, the device 300 includes:

[0139] The device 300 may include a processor 301 with one or more processing cores, a memory 302 with one or more computer-readable storage media, a communication component 303 and other components. The processor 301 , the memory 302 and the communication component 303 are connected via a bus 304 .

[0140] In a specific implementation process, at least one processor 301 executes the computer execution instructions stored in the memory 302, so that at least one processor 301 executes the above message processing method.

[0141] The specific implementation process of the processor 301 can be found in the above method embodiment, and its implementation principle and technical effect are similar, so this embodiment will not be repeated here.

[0142] In the above Figure 3 In the illustrated embodiment, it should be understood that the processor may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), etc. A general-purpose processor may be a microprocessor or any conventional processor. The steps of the method disclosed in the present application may be directly implemented as being executed by a hardware processor, or may be executed by a combination of hardware and software modules in the processor.

[0143] The memory may include a high-speed memory (Random Access Memory, RAM), and may also include a non-volatile memory (Non-volatile Memory, NVM), such as at least one disk memory.

[0144] The bus may be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, the bus in the drawings of the present application is not limited to only one bus or one type of bus.

[0145] In some embodiments, a computer program product is also proposed, including a computer program or instructions, which, when executed by a processor, implement the steps in any of the above-mentioned training methods for the mathematical question-answering model.

[0146] The specific implementation of the above operations can be found in the previous embodiments, which will not be described in detail here.

[0147] A person of ordinary skill in the art will appreciate that all or part of the steps in the various methods of the above embodiments may be completed by instructions, or by controlling related hardware through instructions. The instructions may be stored in a computer-readable storage medium and loaded and executed by a processor.

[0148] To this end, an embodiment of the present application provides a computer-readable storage medium, which stores a plurality of computer execution instructions, and the computer execution instructions can be loaded by a processor to execute the steps in any one of the training methods for a mathematical question-answering model provided in the embodiment of the present application.

[0149] The storage medium may include: a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.

[0150] According to one aspect of the present application, a computer program product or a computer program is provided. The computer program product or the computer program comprises computer instructions stored in a computer-readable storage medium.

[0151] Since the instructions stored in the storage medium can execute the steps in the training method of any mathematical question and answer model provided in the embodiments of the present application, the beneficial effects that can be achieved by the training method of any mathematical question and answer model provided in the embodiments of the present application can be achieved. Please refer to the previous embodiments for details and will not be repeated here.

[0152] Those skilled in the art will readily appreciate other embodiments of the present application after considering the specification and practicing the invention disclosed herein. The present application is intended to cover any modification, use or adaptation of the present application, which follows the general principles of the present application and includes common knowledge or customary techniques in the art that are not disclosed in the present application. The specification and examples are intended to be exemplary only, and the true scope and spirit of the present application are indicated by the following claims.

[0153] It should be understood that the present application is not limited to the precise structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present application is limited only by the appended claims.

Claims

1. A training method for a mathematical question-answering model, characterized in that: The method comprises: Acquire a mathematical question statement and its corresponding answer information, and a question-answering result output by an initial mathematical question-answering model for the mathematical question statement; Comparing the answer information with the question-answer result output by the model, and determining the question to be trained according to the comparison result; Determining data information related to the problem to be trained according to the problem type of the problem to be trained; The training questions are replaced based on the data information to obtain a preset number of training questions and corresponding training answer information; The initial mathematical question-answering model is trained according to the training questions and training answer information.

2. The method according to claim 1, characterized in that: The comparing the answer information with the question-answer result output by the model, and determining the question to be trained according to the comparison result, includes: Determine a comparison result between the answer information and the question-answer result output by the model; If the comparison result is that the answer information and the question and answer result output by the model are inconsistent, the mathematical problem is determined to be the problem to be trained.

3. The method according to claim 1, characterized in that The step of determining data information related to the problem to be trained according to the problem type of the problem to be trained includes: Decomposing the corpus of the question to be trained according to the question type of the question to be trained to obtain multiple information segments of the question to be trained; The data information is determined from the problem information segment to be trained.

4. The method according to claim 1, characterized in that The replacing the to-be-trained questions based on the data information to obtain a preset number of training questions and corresponding training answer information includes: generating a preset amount of replacement data information; Replacing the data information in the to-be-trained problem according to the replacement data information to obtain the preset number of training problems; According to the training question, the corresponding training answer information is determined.

5. The method according to claim 4, characterized in that The step of determining the corresponding training answer information according to the training question includes: According to the problem type of the problem to be trained, determining a calculation rule corresponding to the problem type; Determining the calculation rule as the target calculation rule corresponding to the training problem; The training answer information corresponding to the training problem is determined according to the data information in the training problem and the target calculation rule.

6. The method according to claim 5, characterized in that The step of determining a calculation rule corresponding to the problem type according to the problem type to be trained includes: Determine a preset calculation rule repository; According to the question type of the to-be-trained question, a calculation rule having an index relationship with the question type is determined from the calculation rule repository.

7. The method according to claim 1, characterized in that The training of the initial mathematical question-answering model according to the training questions and the training answer information includes: According to the training question, obtaining a question-answering result output by the initial mathematical question-answering model for the training question; Comparing the question-answer result output by the model with the training answer information to obtain a comparison result; The model parameters of the initial mathematical question-answering model are trained according to the comparison results to obtain a target mathematical question-answering model, so that the question-answering result output by the model of the target mathematical question-answering model is consistent with the training answer information.

8. A training device for a mathematical question-answering model, characterized in that: The device comprises: An information acquisition module, used to acquire a mathematical question statement and its corresponding answer information, as well as a question-answering result output by an initial mathematical question-answering model for the mathematical question statement; An information comparison module, used to compare the answer information with the question and answer result output by the model, and determine the question to be trained according to the comparison result; An information determination module, which determines the data information involved in the problem to be trained according to the problem type of the problem to be trained; A question replacement module, used to replace the to-be-trained questions based on the data information to obtain a preset number of training questions and corresponding training answer information; The model training module is used to train the initial mathematical question-answering model according to the training questions and training answer information.

9. A device, characterized in that: include: one or more processors; Memory; One or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, and the one or more programs are configured to execute the method according to any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, and the computer-executable instructions can be called by a processor to execute the method according to any one of claims 1 to 7.