Related method and apparatus for automatically solving mathematical problem

By dividing the natural language of mathematical problems into two parts for formal transformation, the problems of large requirements for rule knowledge bases, large depth of semantic analytical trees and insufficient understanding ability in deep learning are solved in the existing technology, and simpler and more accurate mathematics is achieved Question representation and more efficient automatic solution capabilities.

CN119398056APending Publication Date: 2025-02-07SHANGHAI PROCESSOR TECH INNOVATION CENT +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311220587.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-09-20
Publication Date
2025-02-07

AI Technical Summary

Technical Problem

The existing methods for automatically solving mathematical problems have problems such as large reserve requirements for rule knowledge bases, weak scalability, large depth of semantic analytical trees and many ambiguities, and insufficient understanding and reasoning ability of deep learning technology for complex problems.

Method used

By dividing the natural language of mathematical problems into two parts, first converting the normative expression into the first part formal language using semantic analysis, then converting the preprocessed natural language into the second part formal language using deep learning technology, and finally Combining two parts to form a transformed formal language.

Benefits of technology

It realizes simpler and more precisely constructs easy-to-machine representations for mathematical problems, improves the ability to understand and reason for complex mathematical problems, and enhances the accuracy and efficiency of automatic solutions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119398056A_ABST
    Figure CN119398056A_ABST
Patent Text Reader

Abstract

The disclosure discloses a related method and apparatus for automatically solving mathematical problems. Some embodiments of the present disclosure can more simply and accurately construct representations for mathematical questions that are easily understood by machines by dividing natural languages for mathematical questions into two parts to convert them into formalized languages in different ways in succession. The converted formalized language, in turn, is analyzed by some embodiments of the present disclosure by using a generic artificial intelligence large model, may geographically solve questions more easily and accurately, thereby facilitating automatic solution of questions by the large model.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] Non-limiting and exemplary embodiments of the present disclosure generally relate to deep learning, and specifically to methods for training a conversion model including a deep learning component, methods for automatically solving math problems using the conversion model, and related apparatus. Background Art

[0002] Understanding and reasoning about math problems is a very important part of daily life and various fields, especially for industries such as physics and finance. Using machines to automatically solve math problems has been widely studied in recent years. This process requires machines to read the text of the math problem, learn and understand the semantics, and perform logical reasoning like humans.

[0003] Existing methods for automatically solving math problems are generally divided into three categories: rule-based methods, semantic parsing methods, and statistical learning methods.

[0004] In the rule-based method, based on rules manually constructed by humans, template matching is performed when similar text and title templates are encountered, and reasoning steps are generated using artificial rules.

[0005] In the method based on semantic parsing, the math problem text is parsed into a tree structure, and a logical expression is generated through the structural information of the semantic parsing tree. Then, the answer and steps of the problem are deduced from the logical expression through reasoning.

[0006] In statistical learning methods, based on deep learning technology, such as through end-to-end algorithms (for example, Seq2Seq, S2S+Attention, S2S+COPY, S2S+PO-GEN, etc.), we learn the mapping relationship from math problems to expressions and answers to achieve understanding and reasoning of the problems. Summary of the invention

[0007] The inventors of the present disclosure recognize that the above automatic solution methods all have specific technical problems. For example, the rule-based method requires a very large reserve of rule knowledge bases and a very large amount of human resources to annotate and construct rules, and the scalability is very weak; the semantic parsing tree generated by the semantic parsing method for more complex math problems is very deep, with many leaf nodes and certain ambiguity, requiring a certain ability to resolve references, and thus can only solve relatively simple basic operations such as addition, subtraction, multiplication and division; the deep learning technology used in the statistical learning method does not have sufficient understanding of the meaning of more complex math problems, which in turn affects its logical reasoning ability for math problems. Therefore, many current studies on this method only stay on how to apply deep learning to achieve automatic solution of simple math problem data sets such as math word problems MWP (Math Word Problems), GSM8K, and Ape210K.

[0008] One object of the present disclosure is to eliminate or alleviate the above-mentioned technical problems.

[0009] In order to achieve the above purpose, the inventor of the present disclosure has thought of dividing the natural language of the math problem into two parts and converting them into formal language in different ways successively, so that it is simpler and more accurate to construct a representation that is easy for machines to understand for the math problem. Specifically, the inventor of the present disclosure has noticed that math problems generally contain normative expressions such as mathematical expressions, and these normative expressions themselves are already logical. Then, the inventor of the present disclosure has thought of first preprocessing the natural language of the math problem, so as to convert the normative expressions therein into a part of formal language through, for example, semantic parsing and delete them from the natural language, and also delete the expressions that do not affect the logic of the natural language from the natural language, and then use deep learning technology to convert the preprocessed natural language into the second part of formal language, and finally combine these two parts of formal language to form a converted formal language. Since the normative expressions in math problems can be easily preprocessed and converted into formal language, and deep learning technology only converts the preprocessed natural language of math problems, compared with the rule-based methods in the prior art that construct a large number of rules for the natural language of math problems and the semantic parsing-based methods that generate complex semantic parsing trees, the scheme disclosed in the present invention can more simply and accurately achieve the construction of machine-understandable representations for math problems.

[0010] In order to achieve this purpose, the inventors of the present disclosure also thought of converting the natural language of the math problem into a formal language, and then using a general artificial intelligence big model to analyze the converted formal language to find the solution to the math problem. Formal language (such as a logical expression) is a collection of symbol strings, which include predefined symbols and are formed according to certain rules. Formal language is more logical and standardized than natural language. Since the big model only needs to analyze the formal language representing the math problem, compared with the statistical learning method in the prior art that directly understands the natural language of the math problem, the scheme disclosed in the present disclosure can understand the meaning of the problem more easily and accurately, thereby promoting the automatic solution of the problem by the big model.

[0011] According to the first aspect of the present disclosure, the above-mentioned purpose is achieved by a method for training a conversion model. The conversion model is used to convert the natural language of a math problem into a formal language and includes a preprocessing component, a deep learning component, and a combining component. The method ends when it is determined that there is no conversion difference, and includes the following steps: obtaining a formal language that is manually annotated for the natural language of a randomly selected math problem; using the preprocessing component to preprocess the natural language to obtain a first part of the formal language; using the deep learning component to convert the preprocessed natural language into a second part of the formal language; using the combining component to combine the first part of the formal language and the second part of the formal language to form a converted formal language; determining whether there is a conversion difference between the converted formal language and the manually annotated formal language; and optimizing the deep learning component in response to determining that there is a conversion difference and triggering the repeated execution of all the above steps.

[0012] According to a second aspect of the present disclosure, the above objective is achieved by a method for automatically solving a math problem. The method comprises: using a conversion model trained according to the method of the first aspect to convert the natural language of the math problem into a formal language; and using a general artificial intelligence big model to analyze the converted formal language to find a solution to the math problem.

[0013] According to a third aspect of the present disclosure, the above object is achieved by a device for training a conversion model, wherein the conversion model is used to convert the natural language of a mathematical problem into a formal language and includes a preprocessing component, a deep learning component, and a combination component. The device includes: a processor; and a memory having stored instructions, wherein the instructions, when executed by the processor, cause the device to perform the method according to the first aspect.

[0014] According to a fourth aspect of the present disclosure, the above object is achieved by a machine-readable storage medium having stored therein instructions, wherein when the instructions are executed on a device, the device executes the method according to the first aspect.

[0015] According to a fifth aspect of the present disclosure, the above object is achieved by a device for automatically solving math problems, wherein the device comprises: a processor; and a memory storing instructions, wherein the instructions, when executed by the processor, cause the device to perform the method according to the second aspect.

[0016] According to a sixth aspect of the present disclosure, the above object is achieved by a machine-readable storage medium having stored therein instructions, wherein when the instructions are executed on a device, the device executes the method according to the second aspect.

[0017] By means of the method, device and machine-readable storage medium for training the conversion model as provided above, some embodiments of the present disclosure can more simply and accurately construct a representation for the mathematical problem that is easy for the machine to understand by dividing the natural language of the mathematical problem into two parts and converting them into formal language in different ways. Further, by means of the method, device and machine-readable storage medium for automatically solving mathematical problems as provided above, some embodiments of the present disclosure can more easily and accurately understand the meaning of the problem by making the general artificial intelligence big model analyze the formal language representing the mathematical problem more logically and normatively, thereby promoting the automatic solution of the problem by the big model. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] The above and other aspects, features and benefits of the present disclosure will become more apparent from the following detailed description with reference to the accompanying drawings. In the accompanying drawings, the same reference numerals or letters are used to represent the same or equivalent elements. The accompanying drawings are shown to facilitate a better understanding of the embodiments of the present disclosure and are not necessarily drawn to scale, wherein:

[0019] Figure 1 is a flowchart of a method for training a conversion model according to an embodiment of the present disclosure;

[0020] Figure 2 An example architecture of a transformation model according to an embodiment of the present disclosure is shown;

[0021] Figure 3 exist Figure 2 An example of language conversion is shown on the example architecture of the conversion model;

[0022] Figure 4 is a flow chart of a method for automatically solving math problems according to an embodiment of the present disclosure;

[0023] Figure 5 is a schematic block diagram of an apparatus for training a conversion model according to an embodiment of the present disclosure;

[0024] Figure 6It is a schematic block diagram of a device for automatically solving math problems according to an embodiment of the present disclosure. DETAILED DESCRIPTION

[0025] The embodiments of the present invention will be described more fully below with reference to the accompanying drawings. However, the embodiments of the present invention may be implemented in many different forms and should not be construed to limit the scope of the appended claims.

[0026] The terms used herein are only used for the purpose of describing specific embodiments and are not intended to be limiting. As used herein, a noun indicating an object may refer to a singular object or to a plural object, unless the context clearly indicates otherwise. It will be further understood that the terms "include," "comprise," and / or "contain" when used herein specify the presence of the features, steps, operations, elements, and / or components, but do not exclude the presence or addition of one or more other features, steps, operations, elements, components, and / or combinations thereof.

[0027] In addition, the use of ordinal numbers such as "first", "second" and "third" to modify objects in this document does not itself imply any priority, precedence or order of one object relative to another object, nor does it imply the temporal order in which the actions of the method are performed, but is merely used as a label to distinguish one object with a specific name from another object with the same name to distinguish these objects.

[0028] Unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as generally understood. It will be further understood that the terms used herein should be interpreted as having the same meaning as in the context of this specification and the relevant technical field, and should not be interpreted in a limiting sense unless explicitly defined as such in this article.

[0029] Figure 1It is a flowchart of a method 100 for training a conversion model according to an embodiment of the present disclosure, wherein the conversion model is used to convert the natural language of a math problem into a formal language and includes a preprocessing component, a deep learning component, and a combining component. The method 100 ends when it is determined that there is no conversion difference, and includes the following steps: a step 101 of obtaining a formal language that is manually annotated for the natural language of a randomly selected math problem; a step 102 of preprocessing the natural language using a preprocessing component to obtain a first part of the formal language; a step 103 of converting the preprocessed natural language into a second part of the formal language using a deep learning component; a step 104 of combining the first part of the formal language and the second part of the formal language using a combining component to form a converted formal language; a step 105 of determining whether there is a conversion difference between the converted formal language and the manually annotated formal language; and a step 106 of optimizing the deep learning component and triggering repeated execution of all the above steps in response to determining that there is a conversion difference.

[0030] In one embodiment, obtaining the artificially annotated formal language means that professionals mark the natural language of the math problem as the formal language according to the rules of the formal language to be converted. For example, professionals with formal language knowledge mark the natural language of the math problem as the formal language according to the rules in the prescribed annotation document, and pass the expert acceptance. In another embodiment, a data source (e.g., a database) has saved data of the formal language of the natural language of multiple math problems that are artificially annotated, and obtaining the artificially annotated formal language means obtaining the data from the data source. The scheme disclosed herein has no restrictions on how to obtain the artificially annotated formal language. In addition, those skilled in the art fully understand that, for the purpose of correctly training the model, the artificial annotation is obviously a meaningful annotation of the natural language of the math problem by professionals that conforms to the rules of the formal language, rather than a random annotation made by people without such professional ability.

[0031] Although the above steps 102-104 are listed in the method 100 for training the conversion model, they are also conversion steps performed by the conversion model after training, which are used to convert the natural language of the mathematical problem into a formal language. Figure 2 An example architecture of the conversion model 200 according to an embodiment of the present disclosure is shown. Figure 2The components of the conversion model and their execution of the conversion steps can be seen. Specifically, as shown in the figure, the conversion model 200 includes a preprocessing component 201, a deep learning component 202 and a combining component 203, wherein the preprocessing component 201 preprocesses the natural language 204 of the mathematical problem input into the conversion model 200 to obtain a first part of the formal language 205, and then the preprocessing component 201 inputs the preprocessed natural language 206 into the deep learning component 202 so as to be converted into a second part of the formal language 207, and finally the combining component 203 combines the first part of the formal language 205 and the second part of the formal language 207 to form a converted formal language 208 as the output of the conversion module 200.

[0032] The pre-processing is arranged in the scheme of the present disclosure based on the following fact: relative to the general natural language in daily life, the natural language of mathematical problems will have more normative expressions (e.g., mathematical expressions), and these normative expressions are very logical in themselves, so that they can be easily converted into formalized language. Thus, the inventor of the present disclosure thinks that when the natural language of mathematical problems is converted into formalized language, the natural language can be pre-processed by first converting those normative expressions into formalized language. The normative expressions that have been converted can be deleted from the natural language, and the wording that does not affect the logic of the natural language can also be deleted from the natural language, thereby reducing the difficulty of subsequent conversion. It is fully understood by those skilled in the art that this pre-processing can adopt a variety of technical means, and is not limited to the technical means described in the following embodiments. It can also be understood by those skilled in the art that this pre-processing can be directed to any normative expression that is easily converted into formalized language in the natural language of mathematical problems, and is not limited to the expression described in the following embodiments.

[0033] For the convenience of preprocessing, the inventors of the present disclosure define expressions in math problems into two types: (1) dependent expressions and (2) independent expressions. A dependent expression is defined as an expression that serves as a subject or object in a sentence. For example, the expression "△ABC" as the subject in the question "What is the area of ​​△ABC?" is considered a dependent expression. An independent expression is an expression as a whole. For example, in the sentence "AB=CD, what are the coordinates of A?", the expression "AB=CD" acts alone. It does not define a new individual used later, nor does it serve as a specific subject or object, and is therefore considered an independent expression. In addition, as can be seen from the above definition, an independent expression may include a dependent expression.

[0034] In one embodiment, using the preprocessing component to preprocess the natural language to obtain the first part of the formal language means replacing the dependent expressions in the natural language with special symbols corresponding to the formal language of the dependent expressions, semantically parsing the independent expressions in the natural language into the first part of the formal language, and deleting the independent expressions and expressions that do not affect the logic of the natural language from the natural language, and wherein using the combining component to combine the first part of the formal language and the second part of the formal language to form the transformed formal language also includes: replacing the special symbols in the first part of the formal language and the second part of the formal language with the corresponding formal language of the dependent expressions.

[0035] Next, various embodiments of method 100 will be specifically described in conjunction with an example of a high school conic section problem. It is understandable that, although the description of the embodiment relates to an example of a high school conic section problem, the math problems to which method 100 is applicable are not limited to high school conic section problems, but can cover any meaningful math problems. The scheme of the present disclosure is not limited in this respect. In addition, although the formal language used in the example is an assertion logic expression, the formal language that method 100 can adopt can be any formal language suitable for a general artificial intelligence large model to understand and reason. The scheme of the present disclosure is not limited in this respect.

[0036] Figure 3 exist Figure 2An example of language conversion is shown on the example architecture of the conversion model 200. In this example, the natural language 204 of a high school conic section problem input into the conversion model 200 is "It is known that the eccentricity of the hyperbola C is 5 / 2, the left and right foci are F1 and F2, and point A is on C. If |F1A|=2|F2A|, then cos angle AF2F1=?", wherein the dependent expressions are "C", "5 / 2", "F1", "F2" and "A" according to the above definition, and the independent expressions are "|F1A|=2|F2A|" and "cos angle AF2F1=?" according to the above definition. Therefore, in this example, the preprocessing according to the above embodiment includes replacing the dependent expressions "C", "5 / 2", "F1", "F2" and "A" in the natural language of the problem with special symbols, such as "[[1]]", "[[2]]", "[[3]]", "[[4]]" and "[[5]]". These special symbols can be customized by technicians using the disclosed solution, as long as a corresponding relationship is established with the formal language of the dependency expression. The purpose of replacing the dependency expression with special symbols is to facilitate subsequent processing. After this replacement, the natural language in this example becomes "It is known that the eccentricity of the hyperbola [[1]] is [[2]], the left and right foci are [[3]] and [[4]], and the point [[5]] is on [[1]]. If |[[3]][[5]]|=2|[[4]][[5]]|, then cos angle [[5]][[4]][[3]]=?". It can be seen that since the independent expressions “|F1A|=2|F2A|” and “cos angle AF2F1=?” contain the dependent expressions “F1”, “F2” and “A”, these independent expressions become “|[[3]][[5]]|=2|[[4]][[5]]|” and “cos angle[[5]][[4]][[3]]=?” after the replacement.

[0037] In this example, the preprocessing according to the above embodiment also includes semantically parsing the independent expressions "|[[3]][[5]]|=2|[[4]][[5]]|" and "cos angle[[5]][[4]][[3]]=?" into the first part of the formal language 205, which is the following assertion logic expression in this example: "Abs(LineSegmentOf([[3]],[[5]]))=2*Abs(LineSegmentOf([[4]],[[5]]))Cos(AngleOf([[5]],[[4]],[[3]]))=?", and deleting the independent expressions and the expressions that do not affect the logic of the natural language from the natural language. The purpose of this deletion is to simplify the subsequent conversion processing of the deep learning component. For this example, the expressions that do not affect the logic of the natural language include "known", "if" and "then". Those skilled in the art can easily find which expressions in the natural language of the mathematical problem do not affect the logic of the natural language.

[0038] Therefore, the natural language 206 after preprocessing is "the eccentricity of the hyperbola [[1]] is [[2]], the left and right foci are [[3]] and [[4]], and the point [[5]] is on [[1]]."

[0039] The preprocessing component 201 inputs the preprocessed natural language 206 into the deep learning component 202 so as to be converted into a second part of the formal language 207, which in this example is the following assertion logic expression: "[[1]]: Hyperbola; [[3]]: Point; [[5]]: Point; [[4]]: Point; Eccentricity([[1]])=[[2]]; LeftFocus([[1]])=[[3]]; RightFocus([[1]])=[[4]]; PointOnCurve([[5]],[[1]])".

[0040] Finally, the combining component 203 combines the first part of the formal language 205 and the second part of the formal language 207 to form the following assertion logic expression "[[1]]:Hyperbola; [[3]]:Point; [[5]]:Point; [[4]]:Point; Eccentricity([[1]])=[[2]]; LeftFocus([[1]])=[[3]]; RightFocus([[1]])=[[4]]; PointOnCurve([[5]],[[1]]); Abs(LineSegmentOf([[3]],[[5]]))=2*Abs(LineSegmentOf([[4]],[[5]]))Cos(AngleOf([[5]],[[3]],[[4]]))=?".

[0041] Since the first and second parts of the formal language also contain special symbols, the combining component 203 will also replace these special symbols with the formal language of the corresponding dependency expression (in this example, the assertion logic expression). Figure 3 is shown in .

[0042] After the combining step including the replacement operation, the combined first and second partial formal languages ​​form a transformed formal language 208 as the output of the transformation module 200 .

[0043] In the above example, the preprocessing according to the aforementioned embodiment is adopted, and the expressions involved include dependent expressions and independent expressions. However, in other embodiments, the expressions involved in the preprocessing may include only independent expressions, but not dependent expressions. For example, in one embodiment, using the preprocessing component to preprocess the natural language to obtain the first part of the formal language means that the independent expressions in the natural language are semantically parsed into the first part of the formal language, and the independent expressions and the expressions that do not affect the logic of the natural language are deleted from the natural language. Compared with the previous preprocessing, this preprocessing does not replace the special symbols of the dependent expressions, which makes the subsequent processing slightly more complicated, but the overall performance of constructing machine-understandable representations for mathematical problems is still better than the prior art.

[0044] In one embodiment, the dependent expression and the independent expression are LaTex expressions. In practice, the expressions of math problems (especially math problems in school examination papers) are written using LaTex expressions to facilitate typesetting and printing. For example, in the case of using LaTex expressions, the natural language of the math problem in the above example "It is known that the eccentricity of the hyperbola C is 5 / 2, the left and right foci are F1 and F2, and point A is on C. If |F1A|=2|F2A|, then cos angle AF2F1=?" will be written as "It is known that the eccentricity of the hyperbola $C$ is $\frac{5}{2}$, the left and right foci are $F_{1}$ and $F_{2}$, and point $A$ is on $C$. If $|F_{1}A|=2|F_{2}A|$, then $\\cos\\angle AF_{2}F_{1}$=?". However, the natural language of the math problem with LaTex expressions does not affect the application of the scheme disclosed herein at all. In fact, the disclosed solution can be applied to mathematical problems with any regular expressions.

[0045] As mentioned above, the above example uses assertion logic expressions as the formal language. Assertion logic expressions may contain concepts, individuals and operators. For example, in the assertion logic expression “Cos(AngleOf([[5]],[[4]],[[3]]))=?”, “Cos” and “Angleof” are operators, “[[5]]”, “[[4]]” and “[[3]]” are individuals; in the assertion logic expression “[[1]]:Hyperbola”, “[[1]]” is an individual and “Hyperbola” is a concept. Assertion logic expressions can be classified into statements, queries and facts, where statements define new individuals based on concepts, queries describe what kind of answers are needed for individuals, and facts connect individuals through operators.

[0046] The inventors of the present disclosure have discovered that by corresponding the three categories of assertion logic expressions, namely, declaration, fact and query, to the variable declaration, conditional description and inquiry in the math problem, respectively, the assertion logic expressions can better represent the logic of the math problem. For example, in the above example, the declaration assertion logic expression, the fact assertion logic expression and the query assertion logic expression are respectively “[[1]]:Hyperbola”, “Abs(LineSegmentOf([[3]],[[5]]))=2*Abs(LineSegmentOf([[4]],[[5]]))” and “Cos(AngleOf([[5]],[[3]],[[4]]))=?”, which respectively correspond to the variable declaration “Hyperbola C”, the conditional description “|F1A|=2|F2A|” and the inquiry “cos angleAF2F1=?” in the math problem. Therefore, in one embodiment, the statement assertion logic expression, the fact assertion logic expression and the query assertion logic expression in the assertion logic expression correspond to the variable declaration, the condition description and the query in the math problem, respectively.

[0047] In one embodiment, the deep learning component is a neural network, such as a convolutional neural network CNN, an artificial neural network ANN, or a recurrent neural network RNN. However, the deep learning component can also be any other deep learning component suitable for performing the language conversion. The disclosed solution is not limited in this respect.

[0048] The conversion model trained according to the above method 100 can accurately convert the natural language of the mathematical problem into a formal language according to the above conversion steps 102-104, and the formal language further helps to reason and solve the mathematical problem. Therefore, the present disclosure also provides a method for automatically solving mathematical problems using the conversion model.

[0049] Figure 4 4 is a flow chart of a method 400 for automatically solving a math problem according to an embodiment of the present disclosure. The method 400 comprises: a step 401 of converting the natural language of the math problem into a formal language using a conversion model trained according to any embodiment of the method 100; and a step 402 of analyzing the converted formal language using a general artificial intelligence big model to find a solution to the math problem.

[0050] In one embodiment, the solution comes with corresponding reasoning steps.

[0051] In one embodiment, the general artificial intelligence big model is a pre-trained language model based on deep learning and Transformer architecture.

[0052] Since the input to the general artificial intelligence big model is a formal language with normativeness and logic, and the general artificial intelligence big model itself has strong logical reasoning ability, the technicians in this field only need to fine-tune or prompt this big model to enable the big model to find the solution to the math problem. For example, in order to train the big model to automatically solve math problems, the big model smaller than 4B can be fully fine-tuned, the LoRA and 8-bit quantization parameters of the big model between 4B and 7B can be fine-tuned, and the zero-sample CoT prompt can be performed for the big model between 7B and 13B, where AdamW can be used as the optimizer. Those skilled in the art fully understand how to train and use the general artificial intelligence big model, so this disclosure does not discuss these aspects in depth. In short, the embodiments of the present disclosure can more easily and accurately understand the meaning of the problem by making the general artificial intelligence big model analyze the formal language that represents the math problem more logically and normatively, thereby promoting the automatic solution of the problem by the big model.

[0053] It should be understood that the blocks of the block diagrams and / or flowcharts of the present application and the combination of blocks in the block diagrams and / or flowcharts can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer and / or other programmable data processing device, so that the instructions executed via the processor of the computer and / or other programmable data processing device create components for implementing the functions / actions specified in the blocks of the block diagrams and / or flowcharts.

[0054] It should also be understood that the functions / actions shown in the blocks of the flow chart may not occur in the order shown in the diagram. For example, depending on the functions / actions involved, two blocks shown in succession may actually be executed substantially simultaneously, or the blocks may sometimes be executed in reverse order. Although some figures may include arrows on communication paths to illustrate the primary direction of communication, it should be understood that communication may occur in the direction opposite to the arrows depicted.

[0055] In addition, the disclosed solutions may take the form of a computer program on a memory having a computer usable or computer readable program code implemented in a medium for use by or in conjunction with an instruction execution system. In the context of this document, a memory may be any medium that can contain, store, or be suitable for transmitting a program for use by or in conjunction with an instruction execution system, device, or apparatus.

[0056] Therefore, this disclosure also provides Figure 5The device 500 for training a conversion model shown includes a processor 501 and a memory 502, wherein the conversion model is used to convert the natural language of a math problem into a formal language and includes a preprocessing component, a deep learning component, and a combination component. In the device 500, the memory 502 stores instructions that, when executed by the processor 501, cause the device 500 to perform the method for training a classification model described in conjunction with the above embodiments.

[0057] The present disclosure also provides a machine-readable storage medium (not shown) having instructions stored thereon, which, when executed on a device, causes the device to execute the method for training the conversion model described in combination with the above embodiments.

[0058] This disclosure also provides Figure 6 The device 600 for automatically solving math problems shown in the figure includes a processor 601 and a memory 602. In the device 600, the memory 602 stores instructions, which, when executed by the processor 601, enable the device 600 to execute the method for automatically solving math problems described in conjunction with the above embodiments.

[0059] The present disclosure also provides a machine-readable storage medium (not shown) having instructions stored thereon, which, when executed on a device, causes the device to execute the method for automatically solving math problems described in conjunction with the above embodiments.

[0060] Although this specification contains many specific implementation details, these details should not be interpreted as limitations on the scope of any implementation or what may be claimed, but rather as descriptions of features of specific embodiments that may be specific to a particular implementation. Certain features described in this specification in the context of various embodiments may also be implemented in combination in a single embodiment. Conversely, the various features described in the context of a single embodiment may also be implemented in multiple embodiments individually or in any suitable sub-combination. In addition, although features may be described above as working in certain combinations, even when originally claimed, in some cases, one or more features from the claimed combination may be deleted from the combination, and the claimed combination may be directed to a sub-combination or a variant of a sub-combination.

[0061] It will be apparent to those skilled in the art that, as technology advances, the inventive concept may be implemented in a variety of ways. The above embodiments are provided to illustrate rather than limit the present disclosure, and it should be understood that modifications and variations may be made without departing from the spirit and scope of the present disclosure, as will be readily appreciated by those skilled in the art. Such modifications and variations are considered to be within the scope of the present disclosure and the appended claims. The scope of protection of the present disclosure is defined by the appended claims.

Claims

1. A method for training a conversion model, the conversion model is used to convert the natural language of a mathematical problem into a formal language and includes a preprocessing component, a deep learning component and a combining component, the method ends when it is determined that there is no conversion difference, and includes the following steps: Obtain a formal language for manually annotating the natural language of randomly selected mathematical problems; Preprocess the natural language using the preprocessing component to obtain a first portion of formalized language; Using the deep learning component to convert the preprocessed natural language into a second part of formalized language; Combining the first part of the formal language with the second part of the formal language using the combining component to form a transformed formal language; Determining whether there is a conversion difference between the converted formal language and the manually annotated formal language; and In response to determining that there is a conversion difference, the deep learning component is optimized and repeated execution of all the above steps is triggered.

2. The method of claim 1, wherein: Using the preprocessing component to preprocess the natural language to obtain the first part of the formal language means replacing the dependent expressions in the natural language with special symbols corresponding to the formal language of the dependent expressions, semantically parsing the independent expressions in the natural language into the first part of the formal language, and deleting the independent expressions and the expressions that do not affect the logic of the natural language from the natural language, and Wherein, using the combining component to combine the first part of the formal language and the second part of the formal language to form a transformed formal language further comprises: replacing the special symbols in the first part of the formal language and the second part of the formal language with the corresponding formal language of the dependency expression.

3. The method of claim 1, wherein: Using the preprocessing component to preprocess the natural language to obtain the first part of the formal language means semantically parsing independent expressions in the natural language into the first part of the formal language, and deleting the independent expressions and expressions that do not affect the logic of the natural language from the natural language.

4. The method according to any one of claims 2 to 3, wherein: The dependent expression and the independent expression are LaTex expressions.

5. The method according to any one of claims 1 to 4, wherein: The formal language is an assertion logic expression.

6. The method of claim 5, wherein: The statement assertion logic expression, fact assertion logic expression and query assertion logic expression in the assertion logic expression correspond to the variable declaration, condition description and inquiry in the math problem respectively.

7. A method for automatically solving math problems, comprising: Using the conversion model trained by the method according to any one of claims 1 to 6, converting the natural language of the math problem into formal language; A general artificial intelligence big model is used to analyze the converted formal language to find the solution to the mathematical problem.

8. The method of claim 7, wherein the solution is accompanied by a corresponding reasoning step.

9. The method according to any one of claims 7-8, wherein the general artificial intelligence large model is a pre-trained language model based on deep learning and Transformer architecture.

10. A device for training a conversion model, the conversion model is used to convert the natural language of a mathematical problem into a formal language and includes a preprocessing component, a deep learning component and a combining component, the device comprising: processor; as well as A memory having stored therein instructions, wherein the instructions, when executed by the processor, cause the apparatus to perform the method according to any one of claims 1 to 6.

11. A machine-readable storage medium having stored thereon a program code for training a conversion model, wherein the conversion model is used to convert the natural language of a mathematical problem into a formal language and includes a preprocessing component, a deep learning component, and a combination component, and when the program code is executed by a processor, the method as described in any one of claims 1 to 8 is implemented.

12. A device for automatically solving math problems, comprising: processor; as well as A memory having stored therein instructions, wherein the instructions, when executed by the processor, cause the apparatus to perform the method as claimed in any one of claims 7 to 9.

13. A machine-readable storage medium having stored thereon a program code for automatically solving math problems, wherein when the program code is executed by a processor, the method according to any one of claims 7 to 9 is implemented.