Method, server and system for solving mathematical problem by machine

By decomposing and transforming mathematical problem sentences, establishing formula association graphs, and utilizing neural networks and knowledge graphs to calculate variable values, this approach solves the problem that large language models cannot solve mathematical problems, achieving interpretable and reliable automatic problem-solving and interactive teaching.

CN120929560APending Publication Date: 2025-11-11ASIA UNIVERSITY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411675450.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Priority Date
2024-05-10
Filing Date
2024-11-21
Publication Date
2025-11-11

AI Technical Summary

Technical Problem

Existing large-scale language models are unable to effectively understand and solve mathematical problems with fixed answers, lacking logical reasoning ability, resulting in unexplainable and unreliable problem-solving processes.

Method used

By receiving math problems, breaking down sentences, identifying formulaic sentences and converting them into formulas, building formula association graphs, calculating variable values, providing interactive explanations and teaching, utilizing neural network-like models and knowledge graphs for sentence classification and reasoning, solving the ever-changing sentence representation methods, employing recursive methods to calculate variable values, and using simultaneous equations to handle simultaneous problems.

Benefits of technology

It enables automatic solutions to interpretable and reliable math problems, expands the range of problems, provides interactive teaching, and enhances students' understanding of the problem-solving process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120929560A_ABST
    Figure CN120929560A_ABST
Patent Text Reader

Abstract

The invention discloses a method for solving mathematical problems through a machine. The method comprises the steps that sentences about noun objects in the mathematical problems are converted into direct corresponding formulas, contained formulas and / or formulas inferred from a knowledge graph; forming a formula association diagram according to the common variables in the plurality of formulas; and the value of each variable is calculated according to the formula association diagram, and self debugging can be carried out. And then interrogative sentences and corresponding answers are generated by utilizing the formulas and the variable values of the formulas to carry out interactive heuristic teaching with students.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application belongs to the field of artificial intelligence and relates to artificial intelligence that uses natural language processing to solve mathematical problems. Background Technology

[0002] Natural Language Processing (NLP) technology has made significant progress since the advent of large-scale language models. In writing new articles, large-scale language models, with their vast training corpora, can piece together new paragraphs from various related datasets. However, when it comes to answering mathematical problems with fixed answers, large-scale language models cannot correctly understand the input mathematical problem using their large training corpora, let alone perform logical reasoning and calculations.

[0003] Therefore, there is an urgent need for an automatic problem-solving and explanation system for mathematical word problems. The aim is to design an interpretable and reliable method. The key is how to translate word problems into mathematical formulas through a series of analyses, reasoning, and the incorporation of common sense, and then calculate the final answer. Afterward, an explanation should be provided in a "goal-oriented" manner, resulting in an interactive and personalized testing system. Summary of the Invention

[0004] This application proposes a method, server, and system for solving mathematical problems by machine to address the shortcomings of existing technologies, with the aim of automatically solving and interpreting mathematical textual problems.

[0005] To achieve the above objectives, this application adopts the following technical solution:

[0006] According to one embodiment of this application, a method for machine-solving mathematical problems is provided, applicable to a server, comprising: receiving a mathematical problem, wherein the mathematical problem includes a mathematical question described in natural language; decomposing the mathematical problem into multiple sentences, wherein one of the multiple sentences contains a question; determining whether each of the multiple sentences is a formula sentence based on whether it contains noun objects; converting each formula sentence into a corresponding formula, wherein each of the formulas contains one or more variables and a corresponding relationship between those variables; forming a formula association graph based on the relationships between the variables contained in each of the formulas; and calculating the values ​​of the variables contained in the formula association graph one by one, until the value of the variable contained in the formula corresponding to the question sentence is calculated as the answer.

[0007] Preferably, for self-error detection, the method for solving mathematical problems by machine further includes: determining whether each of the above formulas is satisfied based on the values ​​of the variables contained in the above formula association diagram; and determining that the answer is wrong when at least one of the above formulas is not satisfied.

[0008] Preferably, for heuristic teaching purposes, the machine-based method for solving mathematical problems further includes: generating corresponding questions and answers based on the variables and values ​​contained in each of the above formulas; and conducting interactive teaching with a student through the server's input / output devices based on the questions and answers.

[0009] Preferably, in order to solve mathematical problems involving graphics, the machine-based method for solving mathematical problems further includes: after receiving the mathematical problem, performing image recognition and text recognition on the graphics in the mathematical problem to generate one or more sentences describing the graphics using natural language.

[0010] Preferably, to avoid errors in problem-solving and reduce the consideration of formulas, the step of converting each formula sentence in the multiple sentences into the corresponding formula further includes: first expanding the simplified formula sentence into multiple formula sentences.

[0011] Preferably, in order to avoid errors when converting formula sentences into formulas, and to ensure that the standard structure corresponds to the formula model, before the step of converting each formula sentence in the plurality of sentences into the corresponding formula, the method further includes: standardizing the descriptive order of the formula sentences to form a standard structure, which includes a subject, a verb, and an object.

[0012] Preferably, to avoid errors when converting formula sentences into formulas, the step of converting each of the multiple sentences into the corresponding formula further includes: inferring the noun referred to by the demonstrative pronoun in the formula sentence.

[0013] Preferably, in order to utilize the known correspondence between formula sentences and formulas, the step of converting each formula sentence in the plurality of sentences into a corresponding formula further includes: querying a database to which the formula sentence belongs, wherein the database contains relevant information on various of the above-mentioned sentence types; and forming the above-mentioned corresponding formula based on a formula model corresponding to the sentence type to which the formula sentence belongs, using the quantity and variables in the formula sentence.

[0014] Preferably, in order to utilize the known correspondence between formula sentences and one or more implied formulas, the step of converting each formula sentence in the plurality of sentences into a corresponding formula further includes: forming the aforementioned corresponding formula by combining the quantity and variables in the formula sentence according to an implied formula model corresponding to the sentence type to which the formula sentence belongs.

[0015] Preferably, in order to cope with the ever-changing different sentence representations, the method for solving mathematical problems by machine further includes: using a trained neural network model to classify the formula sentence in order to find out the sentence type to which the formula sentence belongs.

[0016] Preferably, in order to find hidden knowledge and avoid missing formulas, the step of converting each formula sentence in the multiple sentences into a corresponding formula further includes: performing semantic inference on the formula sentence based on a knowledge graph, and combining the quantity in the formula sentence with the hidden variables inferred from the semantic inference to form the corresponding formula mentioned above.

[0017] Preferably, in order to cope with the ever-changing different sentence representations, the method for solving mathematical problems by machine further includes: using a trained neural network model to classify the formula sentence in order to find the problem type to which the formula sentence belongs, so as to know the formula and its hidden variables implied by the problem type.

[0018] Preferably, in order to establish relationships between formulas, the method for solving mathematical problems by machine further includes the step of forming a formula association graph of each of the above formulas, which further includes variable reduction by unifying variables with the same meaning; and treating multiple formulas with the same variables as nodes connected to each other, with the connecting edges referring to the aforementioned same variables.

[0019] Preferably, in order to solve chain problems, the step of calculating the values ​​of the variables contained in the above formula association diagram one by one until the value of the variable contained in the formula corresponding to the question is calculated further includes: finding one or more edge formulas in the above formula association diagram, the values ​​of the variables to which the edge formulas belong are known; and recursively finding the values ​​of the variables of the adjacent formulas based on the values ​​of the known variables.

[0020] Preferably, in order to solve simultaneous equation problems, the step of calculating the values ​​of the variables contained in the above formula association diagram one by one until the value of the variable contained in the formula corresponding to the question is calculated further includes: when the values ​​of the variables in the adjacent formulas are found recursively, but the values ​​of all the variables contained in the above formula association diagram are still not calculated, the step of solving simultaneous equations is used so as to calculate the values ​​of the variables contained in the above formula association diagram one by one.

[0021] According to one embodiment of this application, a server for solving mathematical problems by machine is provided, comprising a processor for executing a plurality of instructions stored in non-volatile memory to implement the method for solving mathematical problems by machine as described above.

[0022] Preferably, in order to perform machine math problem solving on a single calculator, the machine math problem solving server further includes: an input device for inputting the math problem; and an output device for outputting the answer.

[0023] To enable machine-based math problem solving on multiple networked calculators, according to one embodiment of this application, a system for machine-based math problem solving is provided, comprising: a machine-based math problem solving server as described above; and a user calculator, wherein the user calculator transmits the math problem to the server via a network and receives the answer from the server via the network.

[0024] Due to the adoption of the above scheme, the beneficial effects of this application are as follows: In summary, this application provides a method for automatically solving and explaining mathematical problems by machine. Unlike traditional large-scale natural language models that blindly guess solutions based on learned materials, this application provides an interpretable and reliable method. The key is to interpret mathematical problems into formulas through a series of analyses, reasoning, and the infusion of common sense, and then calculate the final answer. Afterwards, an explanation is provided in a "goal-oriented" manner, generating an interactive and personalized testing system. As the types of questions and sentences in the knowledge graph expand, the automatic problem-solving and explanation method provided by this application can expand the range of problems it can solve. While expanding the range of problems, it can still pose a series of heuristic questions and corresponding answers to the problem-solving process, enabling students to understand the problem-solving process through step-by-step question-and-answer sessions. Attached Figure Description

[0025] Figure 1 This is a block diagram of a natural language understanding and problem-solving system 100 according to an embodiment of this application.

[0026] Figure 2 This is a block diagram of a server 110 according to an embodiment of this application.

[0027] Figure 3 This is a block diagram of a user calculator 130 according to an embodiment of this application.

[0028] Figure 4 This is a flowchart illustrating a method 400 for solving mathematical problems by machine according to an embodiment of the present invention.

[0029] Figure 5 This is a flowchart illustrating a method 500 for converting a sentence into a formula according to an embodiment of this application.

[0030] Figure 6 This is a block diagram illustrating a problem-solving method 600 for a formula association diagram according to an embodiment of this application. Detailed Implementation

[0031] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other implementation methods obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0032] The terms “first,” “second,” “third,” etc. (if present) in the specification, claims, and drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that the described objects can be used interchangeably where appropriate. In the description of this application, “plural” means two or more, unless otherwise expressly and specifically defined. Furthermore, the terms “comprising” and “having,” and any variations thereof, are intended to cover non-exclusive inclusion. Some block diagrams shown in the drawings are functional entities and do not necessarily correspond to physically or logically independent entities. Such functional entities may be implemented in software, in one or more hardware circuits or integrated circuits, or in different network and / or processor devices and / or microcontroller devices.

[0033] In the description of this application, it should be understood that the terms "center", "upper", "lower", "front", "rear", "left", "right", "vertical", "horizontal", "top", "bottom", "inner", and "outer" indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings. They are used only for the convenience of describing this application and simplifying the description, and do not indicate or imply that the device or component referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, they should not be construed as limitations on this application.

[0034] In the description of this application, it should be noted that, unless otherwise expressly specified and limited, the terms "installation," "connection," and "linking" should be interpreted broadly. For example, they can refer to fixed connections, detachable connections, or integral connections; they can refer to mechanical connections, electrical connections, or connections that allow for communication; they can refer to direct connections or indirect connections via an intermediate medium; they can refer to the internal communication of two components or the interaction between two components. Those skilled in the art can understand the specific meaning of the aforementioned terms in this application according to the specific circumstances.

[0035] To make the objectives, features and advantages of this application more apparent and understandable, the application will be further described in detail below with reference to the drawings and specific embodiments.

[0036] Please refer to Figure 1The diagram shown is a block illustration of a natural language understanding and problem-solving system 100 according to an embodiment of this application. The natural language understanding and problem-solving system 100 includes a server 110, a network 120, and multiple user calculators 130. The network 120 may be a combination of one or more physical networks, including one or more interconnected wide area networks (WANs) or telecommunications networks, and one or more access networks or local area networks (LANs) connected to the aforementioned WANs or telecommunications networks. The WAN or telecommunications network may be a wired or wireless network provided by a telecommunications provider. For example, it may be the Internet, 3G / 4G / 5G / 6G wireless mobile networks, or satellite communication networks such as Starlink or Iridium. The access network or LAN may be a wired or wireless LAN, such as a wired network conforming to the IEEE 802.3 series of protocols, or a wireless network conforming to the IEEE 802.11 series of protocols. The network 120 can transmit information between the server 110 and the user calculators 130.

[0037] Please refer to Figure 2 The diagram shown is a block illustration of a server 110 according to an embodiment of this application. The server 110 may comprise a combination of one or more physical or logical computers, such as a server composed of virtual machines within one or more physical computers. In terms of software functionality, the server 110 may include a database management system (DBMS) 210, an application / logic serving system 220, an interface system 230, and a web interface system 240.

[0038] The aforementioned database management system 210 can include relational database management systems, such as the common MySQL, Oracle, and DB2, or non-relational database management systems, or even simple spreadsheet systems. It is used to store various types of data related to the natural language understanding and problem-solving system 100, such as questions, problem history, user data, and problem-solving progress.

[0039] The aforementioned application logic server system 220 may include common application servers and / or business logic systems, such as Oracle's J2EE server and Microsoft's ASP.NET server. The aforementioned application logic server system 220 may include artificial intelligence models and their inference modules, such as various trained neural network models. The aforementioned application logic server system 220 can implement different applications or business logic, utilizing data stored in the database management system 210, and communicating with the user calculator 130 through the interface system 230 and / or the web interface system. For example, Enterprise JavaBeans and ASP programs can be used to implement the methods and steps provided in this application to perform various operations on the data in the database management system 210.

[0040] The aforementioned interface system 230 may include a proprietary and / or industry-standard transmission protocol-compliant interface system for communicating with the application installed on the user calculator 130. The aforementioned web interface system 240 may communicate with the web browser installed on the user calculator 130 using HTTP, HTTPS, HTML, or similar protocols, such as the common Apache Web Server.

[0041] This application does not limit the software implemented on server 110 to necessarily being a three-tier architecture as described above; it can also be a single, customized software suite. However, those skilled in the art of computers will understand that server 110 of this application includes the ability to connect to network 120, the ability to implement the methods and steps provided in this application, and the ability to store relevant data.

[0042] In one embodiment, the natural language understanding and problem-solving system 100 may further include an artificial intelligence server 140 for providing natural language processing capabilities to handle the computational generation of teaching instruction content. The artificial intelligence server 140 may be used to implement a natural language processing model, such as a large language model (LLM), like OpenAI's ChatGPT, Google's Gemini, or Meta's LLaMA. Those skilled in the art will understand that the artificial intelligence inferences mentioned herein can be processed using the computing resources within server 110 or the computing resources of the artificial intelligence server 140.

[0043] Please refer to Figure 3The diagram shown is a block illustration of a user calculator 130 according to an embodiment of this application. The user calculator 130 can be a wearable mobile device, a smartphone, a personal digital assistant, a tablet computer, a laptop computer, a desktop computer, and / or any form of calculator. For example, the user calculator 130 can be a calculator based on the von Neumann architecture or a variation thereof.

[0044] The user calculator 130 may include a central processing unit 310, a memory module 320, an input / output interface module 330, an output device 340, an input device 350, a storage device 360, and / or a network device 370. The central processing unit 310 includes at least one microprocessor, such as a microprocessor suitable for one of the RISC-V, x86, x64, ARM, or Alpha instruction sets, for executing instructions stored in the memory module 320 to control the user calculator 130 through software such as an operating system and / or applications, and to implement the methods and steps provided in this application using the operating system and / or application program control hardware.

[0045] The input / output interface module 330 can be a proprietary or industry-standard interface, such as USB, SATA, SCSI, PCI, or PCI-Express interfaces, used to connect the aforementioned output device 340, input device 350, storage device 360, and / or network device 370. The output device 340 is used to output data to sources other than the user calculator 130, such as outputting sound, video, or data signals. Common output devices 340 include displays, speakers, and printers. The input device 350 is used to input data into the user calculator 130. Common input devices 350 include touchpads, touchscreens, keyboards, mice, microphones, cameras, satellite positioning devices, and 2D or 3D scanners. The storage device 360 ​​includes non-volatile memory, such as hard drives, flash memory, optical discs, and disks. The network device 370 is used to connect to the aforementioned network 120, for example, to an access network included in network 120.

[0046] In one embodiment, network device 370 can determine the location of user calculator 130 by using the location of the connected router and wireless base station. Alternatively, wireless or satellite communication network operators can use multiple base stations or satellites to triangulate the communication waves emitted by network device 370. The location of user calculator 130 is then transmitted to user calculator 130 via location-based service (LBS).

[0047] The storage device 360 ​​is used to store the aforementioned operating system and application programs to assist in implementing the methods and steps provided in this application. In one embodiment, the user can connect to the Web interface system 240 of the aforementioned server 110 through a general or dedicated web browser installed on the user calculator 130 to communicate with the server 110. In another embodiment, the user can connect to the interface system 230 through a dedicated application installed on the user calculator 130 via a dedicated communication protocol to communicate with the server 110. Those skilled in the art of calculators will understand that when the methods and steps provided in this application need to be executed on the user calculator 130, the browser can execute part or all of the methods and steps through the web application (such as HTML5, Java Bytecode, ASP, javascript, etc.) provided by the server 110. Alternatively, the application already installed on the user calculator 130 can execute part or all of the methods and steps according to the instructions and / or data provided by the server 110.

[0048] Those skilled in the art will understand that, although Figure 3 The block diagram shown is one embodiment of the user calculator 130, but it can also be applied to other systems. Figure 1 The server 110 shown may include a central processing unit, network device, memory module, and other related devices for implementing the methods and steps provided in this application. The storage device within the server may store data used in this application, such as deep neural network models, knowledge graphs, and databases, which will be mentioned below.

[0049] The aforementioned natural language understanding and problem-solving system 100 can be used to implement the natural language understanding and problem-solving method provided in this application. The natural language understanding and problem-solving method provided in this application includes a dialog window displayed on the user calculator 130. This dialog window can be part of a dedicated application or part of a browser display. In some embodiments, the dialog window can be a dialog window of real-time communication software. This application does not limit the implementation of the dialog window.

[0050] The user inputs a text-based mathematical problem, along with optional graphics, via user calculator 130, which is then transmitted to server 110 via network 120. Server 110 executes software to implement the natural language understanding and problem-solving method provided in this application. The aforementioned text-based problem contains a question and is described in natural language. In one embodiment, mathematical formulas may also be used for illustrative purposes. This application uses elementary school level math problems as examples because such problems have a fixed set of standard answers. However, those skilled in the art will understand that this application is not limited to elementary school level math problems.

[0051] The analysis of text-based problems inevitably involves "natural language understanding." While the natural language used in elementary school mathematics is not as complex as general natural language, it still presents typical difficulties in comprehension, such as omissions, demonstrative pronouns, handling common sense (things not explicitly written but widely known), and the application of arithmetic knowledge (when to use addition, subtraction, multiplication, and division). Many of the natural language understanding methods described in this application can be applied to general natural language understanding. Human knowledge representation employs an ontology framework. For each main concept, its category, property, and event are recorded, and this is expanded to include related events of common sense.

[0052] First, through sentence parsing, proper nouns (names of people, organizations, places, etc.), subjects, verbs, and objects are extracted from the sentence. Due to potential omissions or inversions, the natural language understanding and problem-solving method provided in this application often needs to handle incomplete or irregular sentences. Therefore, it is necessary to first normalize the sentences and remove noise. Then, the sentences are categorized to simplify the processing.

[0053] Natural language understanding and problem-solving can be divided into six main components: 1. Sentence standardization; 2. Formula sentence processing; 3. Answer calculation; 4. Explanation generation; 5. Automatic error detection; 6. Knowledge graph.

[0054] I. Sentence Standardization

[0055] Since many sentences omit previously mentioned concepts, the natural language understanding and problem-solving method provided in this application will first fill in the omitted concepts for easier sentence classification. Additionally, if a sentence mentions more than two numerically related objects, we will try to simplify these descriptions.

[0056] In one embodiment, if the input sentence is regular and standard, no sentence standardization step is required. In another embodiment, if the input sentence is not regular and standard, various optional sentence standardization steps can be performed based on the input sentence.

[0057] Standardization of sentence description order

[0058] Standardize the descriptions of the subject, verb, and object (SVO) in the sentence, for example:

[0059] The teacher drank two glasses of juice --> The teacher drank two glasses of juice

[0060] The teacher bought two apples --> The teacher bought two apples

[0061] These two apples you bought are very sweet.

[0062] ˙Omitted backfill

[0063] Sentences often omit concepts that were just mentioned. Look back to determine the omitted object name based on the quantifier of the object, and the omitted noun based on the subject or place noun corresponding to the verb.

[0064] For example:

[0065] Dad had two apples, and ate three.

[0066] Sometimes verbs may be omitted. For example, in the following two sentences:

[0067] The teacher drank two glasses of juice, and the students drank three glasses.

[0068] Simplified sentences

[0069] Xiaoming bought two apples and three pineapples. (This is repeated twice in the original text.)

[0070] However, in some sentences that cover the relevance of more than two objects, such as comparative sentences, the natural language understanding and problem-solving method provided in this application will retain the original description, for example: Xiaoming has 3 more apples than Xiaohua has pineapples.

[0071] Generally, if a noun in a question has a quantity modifier, such as: three boys, the relevant quantity of this noun may appear in the calculation formula of the natural language understanding and problem-solving method provided in this application. This application refers to this noun "boys" as the "noun object" (abbreviated as "object") of this question. Additionally, some nouns are implicit, such as: time, age. We say what time it is now, or someone's age, which means these nouns have already appeared and do not need to be elaborated. A sentence with such noun objects and relevant quantities is called a "formula sentence", that is, the description of the sentence should be convertible into a calculation formula.

[0072] If a sentence completely does not contain the quantity of any noun object, it may be just a description of the problem scenario, which this application calls a "scenario sentence", and most of them will not generate a formula, such as: There has been a drought recently, the reservoir water level has dropped, or Xiaoming's apples are very sweet, etc.

[0073] II. Processing of formula sentences

[0074] The goal of this step is to convert each formula sentence into the corresponding formula. During the conversion process, first classify the formula sentences to facilitate dealing with them one by one. According to the situation of object transfer, this step also divides verbs into several categories. The processing of verbs will be slightly different when converting different types of formula sentences.

[0075] ˙ Types of formula sentences

[0076] If a math problem contains a mathematical formula, it is already a formula itself and does not need to be converted.

[0077] According to whether the quantity of objects in a formula sentence is transferred, the relationship between objects and attributes, or different combined units of objects, the formula sentences can be divided into many types. In an example of this application, the sentence patterns in primary school mathematics can be divided into more than thirty categories. The following are five examples:

[0078] 1. "Have": Describe that someone "has", or a certain quantity of objects "are stored" somewhere, for example: Xiaoming has three apples, and there are 4 little birds in the tree.

[0079] 2. "Quantity change": The quantity of a certain object changes (increases or decreases, related to its verb). Dad bought 8 apples. Xiaoming ate two apples.

[0080] 3. "Unit quantity": Describe the relationship between an object and its attribute value, for example: Five bags of rice weigh ten kilograms; Ten comic books cost 100 yuan. The former is the weight value of one bag of rice, and the latter is the price of a comic book.

[0081] 4. "Unit conversion": Describe different combined units of the same object, for example: One bar of chocolate has three pieces; 1 US dollar is exchanged for 32 New Taiwan dollars; One yard has three feet.

[0082] 5. "Remainder": Describes the reduction of someone's objects. For example: Xiaoming ate an apple. How many apples does he have left? Usually, the reduction of objects is determined by a certain verb in the front.

[0083] The definition of formula sentence types can be trained through deep learning and supplemented by a parser to correct. This application does not limit the types and quantities of formula sentences. As long as it is about the quantity, attributes, correspondence relationship with / or other noun objects of noun objects and their changes, and can be described in a sentence, formulas can be used to describe formula sentences.

[0084] ˙ The formula corresponding to the formula sentence

[0085] For each formula sentence, its corresponding formula is designed. Through the parser and deep learning, the natural language understanding and problem-solving method provided by this application can summarize the formula models patterns generated by each type of formula sentence. Through these patterns, the corresponding quantities can be extracted and put into the pre-written formulas.

[0086] ˙ Basic operation framework (formation of calculation formula)

[0087] Each addition, subtraction, multiplication, and division operation has its corresponding operation framework for quantities, and these operation frameworks are also composed of "inferences" of domain knowledge.

[0088] 1. Sentence formula of "have":

[0089] S has X apples, and the formula is

[0090] The number of apples of S = X

[0091] 2. Sentence formula of "quantity change":

[0092] For the same object, if the quantity changes in the sentence, we call this changed (possibly increased or decreased) quantity the "variable quantity", the original quantity is simply called the "original" (X1), the variable quantity is X2, and the changed quantity is called the "current" (X3). Assuming the quantity change is an increase, the formula is

[0093] Original + Variable quantity = Current or X1 + X2 = X3

[0094] Assume that all three values X1, X2, and X3 are greater than 0.

[0095] When asking about the current quantity, use addition: X3 = X1 + X2

[0096] When asking about the original quantity, use subtraction: X1 = X3 ─ X2

[0097] When asking about the variable quantity value, use subtraction: X2 = X3 ─ X1

[0098] In some cases, the meaning of a sentence implies that the variable has a negative value. For example: "There is 4 yuan left." This means that there was originally more (X1), but after a certain action V, some (X2) was used up. In this case, the quantity has decreased, so the formula is X1 – X2 = 4.

[0099] 3. Formula for sentences using "unit quantity"

[0100] X1 comic book X2 yuan, the formula is:

[0101] Comic book unit price x 3 yuan / book = x2 yuan / x1 book

[0102] X2 yuan = X3 yuan / book x X1 book

[0103] X1 book = X2 yuan / (X3 yuan / book)

[0104] Common sense about "entailment"

[0105] Some sentences contain multiple meanings. Here are a few examples:

[0106] A. Dad bought 5 apples

[0107] Besides the sentence itself, it also implies the following two sentences:

[0108] A. Dad had 5 more apples.

[0109] B. Dad paid for the 5 apples.

[0110] Generally speaking, the above sentences can be written as the following formula.

[0111] Subject S bought X objects O

[0112] Formula: Subject S buys object O = X

[0113] Common sense contained in the sentence

[0114] A. The subject S has X more objects O.

[0115] Formula: Subject S, existing object O = S, original object O + X

[0116] B. Subject S paid X O's money.

[0117] Formula: The amount paid by subject S = X x the unit price of object O

[0118] Formula: Subject S's current money = Subject S's original money - Money paid by Subject S

[0119] Such entailments or entailments can be written in the related event within the ontology of the event <S, buy, O>.

[0120] Different formulas can be used to answer different questions:

[0121] How many O did CS buy?

[0122] How many O's in DS?

[0123] How much did ES pay?

[0124] How much money does FS have left?

[0125] B. Xiaoming gave Xiaohua 3 apples.

[0126] A. Xiaoming is missing 3 apples.

[0127] B. Xiaohua had 3 more apples.

[0128] These sentences contain strong implications related to verbs, and the natural language understanding and problem-solving methods provided in this application need to clarify the relationship between these verbs and objects.

[0129] Beyond the identification of various entities (or labels) and semantic implications, semantic inference is extremely important in mathematics. Through these inferences, the natural language understanding and problem-solving methods provided in this application can deduce important variable relationships not mentioned in a sentence, and the formulas arising from these relationships. These inferences can also be considered part of common sense (which is usually not written in the text). The lack of these "inferences" would make many problems difficult to solve.

[0130] C. Xiaoming doesn't have 200 yuan.

[0131] "Not enough" must be relative to a certain "enough" number X1. Let's assume Xiaoming has X2 yuan.

[0132] Formula: X1–200=X2

[0133] Ding, One Person X Cup

[0134] It should be X cups (units) per person.

[0135] Assume there are X1 cups to distribute, and X2 people are participating in the distribution.

[0136] Formula: X1 cups / X2 pieces = X cups / piece

[0137] E. Buy X1 (O) and get X2 (O) free.

[0138] Assume the original price of one 0 is X3 yuan.

[0139] Formula: Actual purchase price per unit = X1 units x X3 yuan / (X1 + X2) units

[0140] ˙Demonstrative pronoun

[0141] In math problems, demonstrative pronouns are mostly people, and the people involved often have changing ownership of objects. The natural language understanding and problem-solving method provided in this application can be traced back to determine the person corresponding to the pronoun based on the increase or decrease of the corresponding objects. For example:

[0142] If Dad gives Xiaoming 100 yuan, Xiaoming will have enough money to buy a bicycle.

[0143] "There was enough" means that it wasn't enough before, but later the money increased and it became enough. Since the previous sentence involved two people whose money changed, we can infer that "he" here should refer to the person whose "money increased" mentioned earlier. Therefore, we know from the previous sentence that "he" is Xiaoming. Thus, the identification of a demonstrative pronoun requires considering the implied meanings in the preceding and following sentences before it can be determined.

[0144] Question processing

[0145] Understanding the question has a decisive impact on problem-solving. First, the question determines whether the final operation in a problem is one of five: addition, subtraction, multiplication, division, or equality. Once this operation is determined, the question simplifies to a second-order question asking for the value of each operand. Similarly, for each second-order question, its final operation can be further determined as addition, subtraction, multiplication, division, or equality. Then, the analysis continues recursively.

[0146] If a question involves the values ​​of multiple variables, the natural language understanding and problem-solving method provided in this application can first simplify the complex question: each complex question (Question, Q) is broken down into multiple questions with a single variable (SubQuestion, SQ). For example, the question "How many apples do A and B have in total?" can be divided into question (1) "How many apples does A have (X1)?" and question (2) "How many apples does B have (X2)?". The answer is X3 = X1 + X2. Each subsequent step calculates the answer to an SQ. For each SQ, relevant sentences (with the same subject, verb, object (SVO)) are selected from the preceding sentences to form a mathematical problem with fewer redundant sentences. This step is especially important in "competency questions".

[0147] Selection of relevant sentences

[0148] For a single-variable question, the natural language understanding and problem-solving method provided in this application can, based on its SVO (Single Variable Object), search upstream for conditional sentences with the same SVO and related events within its ontology, such as implication sentences or inference sentences. This is somewhat similar to handling reading comprehension tests. Sometimes, what is found may be the implication sentence of a conditional sentence (rather than the original sentence). These conditional sentences and the question together constitute a relatively simple mathematical problem (compared to having no irrelevant conditional sentences).

[0149] Formulas for word problems

[0150] Word problems in elementary school math have fairly clear names, such as water flow problems, speed problems, clock problems, street light problems, etc. These problems all have their own established formulas; for example, water flow problems have...

[0151] Downstream speed = boat speed + water speed; Upstream speed = boat speed - water speed.

[0152] More importantly, the boat speed, water speed, or distance traveled are determined from the problem statement. Therefore, the natural language understanding and problem-solving method provided in this application can be used to solve application problems using the general "conditional clause correspondence formula" approach.

[0153] III. Answer Calculation

[0154] Formula Relationship Diagram

[0155] A variable in one sentence may have the same meaning as a variable in another sentence. Therefore, the natural language understanding and problem-solving method provided in this application can replace the variable with the smaller number with the larger number; this process is called "variable reduction." The natural language understanding and problem-solving method provided in this application can build a "formula association graph" from the reduced variable formulas. The nodes in this graph are individual formulas. If two formulas have a common variable, this application states that the two formulas are related, and connects the two nodes with an edge, labeling this variable on the edge. As the problem states, each formula contains one or more variables. A single-variable formula represents the value of that variable, for example: X1 = 2. At the same time, there may be more than one edge connecting two formula nodes; for example, there are two edges between X1 + X2 = 3 and X1 – X2 + X3 = 5, one labeled X1 and the other labeled X2.

[0156] The natural language understanding and problem-solving method provided in this application can start with a single-variable formula and substitute it into all formulas containing that variable. If a new formula is generated (because one variable has been eliminated), a new single-variable formula may also be generated. Then, the single-variable formula is recursively substituted into the relevant multi-variable formulas, and finally the value of the variable in the problem sentence is solved.

[0157] Based on the above approach, this application can classify general topics into three types:

[0158] 1. Chain problems: You can substitute the constant term in the single-variable formula into other formulas one by one, and then substitute the newly solved unknowns into the other formulas. Finally, calculate the unknowns of the problem.

[0159] 2. Simultaneous Equation Problems: All single-variable formulas have been substituted, but some formulas remain. These need to be solved using the Euclidean algorithm. Those skilled in the art will understand that the method used in this application to solve simultaneous equations or the aforementioned Euclidean algorithm is known, used to recursively eliminate variables in formulas containing unknown variables until only one variable remains. Then, the value of that variable can be solved. Thus, the values ​​of the remaining unknown variables can be solved using the aforementioned chain problem approach.

[0160] 3. Unsolvable problems: The conditions are contradictory, or the unknowns in the problem cannot be calculated. Any problem that cannot be categorized as a "chain problem" or "simultaneous problem" falls into this category.

[0161] Example of answer calculation

[0162] Example: There are 22 cups of milk. If each person drinks two cups, there are 6 cups left over. How many people should receive the milk?

[0163] Analysis of each sentence:

[0164] (1) 22 cups of milk

[0165] Milk quantity X1 = 22 Formula (1)

[0166] (2) Two cups per person

[0167] The phrase "one person, two cups" implies two meanings, which we refer to as entailment.

[0168] Entailment 1: Some milk was distributed among some people.

[0169] X2 is the amount of milk used for distribution (the actual amount of milk distributed).

[0170] The number of people to be allocated (x3) (the number of people participating in the allocation)

[0171] Entailment 2: The amount of milk (in units) allocated to each person = 2

[0172] X2 / X3 = 2 Formula (2)

[0173] (3) There are 6 cups left.

[0174] X4 Original Milk Quantity

[0175] X5 The amount of milk used (= the amount of milk allocated)

[0176] X4 – X5 = 6 Formula (3)

[0177] (4) How many people were given the prize?

[0178] The number of people to be distributed X6

[0179] X6 = ? (Find X6)

[0180] Next step: Variable reduction: merge variables with different names but the same substance.

[0181] X6 = X3 (Therefore, the problem is to find X3)

[0182] X4 = X1

[0183] X5 = X2

[0184] Therefore, the revised formula is obtained:

[0185] X1 = 22 Formula (1)

[0186] X2 / X3 = 2 Formula (2)

[0187] X1–X2=6 Formula (3')

[0188] From formula (1), X1 = 22

[0189] Substituting into formula (3), we get X2 = X1 – 6 = 16

[0190] Substituting into formula (2), we get X3 = X2 / 2 = 16 / 2 = 8

[0191] IV. Explanation and Generation

[0192] To train students' logical thinking skills: When faced with questions from students, instead of directly providing answers or explanations (to avoid plagiarism), I find "similar examples" from a pre-prepared question bank (which may contain tens of thousands) and explain them. After understanding, students then try to answer the questions in their own words.

[0193] The previously mentioned answer calculation method primarily relies on variable substitution and reduction using formula relationship diagrams. However, this strategy is purely based on internal computer calculations. Once these answers are calculated, they need to be explained to students in a way that easily stimulates their thinking. Reference books often present explanations in a straightforward manner. But once the book is closed, students find it difficult to remember the solutions from the book.

[0194] The principle of this application is "goal-oriented," starting from the formula of the question and gradually calculating the unknowns asked in the problem. As mentioned earlier, the question determines whether the final operation of a problem is addition, subtraction, multiplication, division, or "equals." When the formula of the question is "equals," the goal is to find the value of a certain variable. Otherwise, the formula of the question should be a linear equation with multiple variables. The natural language understanding and problem-solving method provided in this application sets the goal as finding the value of each variable in this formula. Then, it recursively explains how to use conditional clauses to find the values ​​of individual variables.

[0195] In the process of converting formulaic sentences into formulas, a standardized explanation can be given for each type of sentence (in other words, more than one explanation can be given), and such explanations are applicable to almost all types of sentences. Next, for chain problems or simultaneous problems, each step mostly involves substituting the values ​​of known variables into the formulas for unknown variables to find their values. The explanations are also relatively easy.

[0196] The following example, using the milk question as an example, illustrates how to generate an explanation:

[0197] Question 1: (1) There are 22 cups of milk, (2) each person gets two cups, (3) there are 6 cups left, (4) how many people will receive the milk?

[0198] First, list the variables and related formulas:

[0199] X1 is the number of milk items that can be allocated.

[0200] X2 The actual amount of milk allocated

[0201] X3 Number of people participating in the allocation

[0202] X1 = 22 Formula (1)

[0203] X2 / X3 = 2 Formula (2)

[0204] X1–X2=6 Formula (3')

[0205] X3=? Formula (4)

[0206] From question (4), we know that we need to find the number of people participating in the allocation, X3.

[0207] From formula (2), we know that we need to first calculate the actual amount of milk allocated, X2.

[0208] From sentence (1), we know that there are 22 cups of milk that can be distributed. Sentence (3) tells us that there are 6 cups left after distribution.

[0209] Therefore, according to formula (3), the actual amount of milk allocated is X2 = X1 – 6 = 22 – 6 = 16 cups.

[0210] From sentence (2), we can see that each person received 2 cups.

[0211] Therefore, according to formula (2), the number of people participating in the allocation is X3 = X2 / 2 = 16 / 2 = 8 people.

[0212] Question 2: (1) There are 10 chickens and rabbits in a cage. (2) There are 30 legs in total. (3) How many chickens are there? (4) How many rabbits are there?

[0213] X1 Number of chickens

[0214] X2 Number of rabbits

[0215] Analysis of each sentence:

[0216] (1) There are 10 chickens and rabbits in a cage. Therefore,

[0217] X1 + X2 = 10 Formula (11)

[0218] (2) It is known that there are 30 feet in total.

[0219] A chicken has two legs, and a rabbit has four legs. Therefore, we get...

[0220] 2 X1 + 4 X2 = 30 Formula (12)

[0221] There are no single-variable formulas here; each formula has two or more variables, so it's a problem involving simultaneous equations. The answer can be calculated using the Euclidean algorithm.

[0222] Multiplying both sides of formula (11) by 2, we get 2X1 + 2X2 = 20

[0223] Next, subtract the two sides of the above formula from the left and right sides of formula (12) respectively, and we get 2X2=10, so X2=5

[0224] Substituting into formula (11), we get X1 = 5

[0225] Interactive, personalized testing system

[0226] A thorough understanding of mathematics requires continuous problem-solving. Timely assistance is most effective when students encounter difficulties while doing their homework. These difficulties include: 1. Difficulty understanding the meaning of words; 2. Unclear connection (logic) between sentences, making it impossible to write out formulas; 3. Calculation errors.

[0227] The natural language understanding and problem-solving method provided in this application employs an "educational assessment" approach, using interactive dialogue to explore problems in depth. Students are not passively browsing explanations but actively thinking about and responding to questions. Two examples are provided below, in which the system asks questions to the student, and the answers are only displayed after the student responds:

[0228] Question 1: (1) There are 22 cups of milk, (2) each person gets two cups, (3) there are 6 cups left, (4) how many people will receive the milk?

[0229] System: What does "one person, two cups" mean?

[0230] Students: Each student received two cups of milk.

[0231] System: Are you going to distribute all the milk?

[0232] Student: No

[0233] The system states: "6 cups left" means that 6 cups of milk have not been allocated. How many cups of milk have been allocated?

[0234] Students: 22-6 = 16 cups

[0235] System: Given sentence ((2) one person gets two cups, how many people are served?

[0236] Students: 16 / 2 = 8 people

[0237] Question 3: (1) Dad gives Xiaoming 100 yuan, (2) so he has enough money to buy a bicycle. (3) If the price of the bicycle is 3000 yuan, (4) how much money did Xiaoming originally have?

[0238] System: Who is "he" in sentence (2)?

[0239] Student: Xiaoming

[0240] System: Why not "Dad"?

[0241] Student: In sentence (2), "he" originally didn't have enough money, but because his money increased later, he had the required 3000 yuan. From sentence (1), we know that Xiaoming's money increased. Therefore, "he" is Xiaoming.

[0242] System: So, what formula does sentence (2) represent?

[0243] Student: Original money + additional money = required money (from sentence (3) = 3000)

[0244] System: So, how much money did Xiaoming originally have?

[0245] Student: 3000 - 100 = 2900 yuan

[0246] V. Automatic Error Detection

[0247] After the answer is calculated, the natural language understanding and problem-solving method provided in this application also includes an automatic error detection process: using the formula association diagram mentioned earlier, all calculable unknowns in the problem can be calculated. Then, the natural language understanding and problem-solving method provided in this application can substitute these values ​​into each conditional clause for verification. This should determine whether the calculation of the problem causes a contradiction. If there is no contradiction, the probability that the answer to the problem is correct is very high.

[0248] If a contradiction arises, the next step is to try to identify the problematic formula sentence. Assuming only one formula sentence is incorrect, it should be detectable. Once the incorrect formula sentence is found, it can be determined whether the problem stems from the sentence type or an error in numerical substitution within the formula.

[0249] VI. Knowledge Graph

[0250] This application expands the traditional knowledge ontology into a generalized ontology: each major concept's ontology includes related events related to common sense. The various types of common sense mentioned earlier, along with the natural language understanding and problem-solving methods provided in this application, are stored within the ontologies of each major concept. For example, sentence implication and inference are placed within the "related events" section of the related verb ontology. Various labeled training corpora are stored in an "annotation database," including types of formula sentences, the transformed formulas, sentences used to explain examples (aiding natural language generation), and in other words, the logic for generating interactive dialogues (automatically generating test questions and answers), etc. The natural language understanding and problem-solving methods provided in this application are closely integrated with knowledge graphs and training corpora to achieve interpretability and reliability as much as possible.

[0251] The following is a flowchart of a mathematical problem-solving system according to an embodiment of this application.

[0252] 1. Fill in the missing parts of each sentence in a question.

[0253] 2. Find the correct person or thing to correspond to the demonstrative pronoun.

[0254] Third, make necessary semantic inferences and list the relevant variables.

[0255] IV. Convert each formula sentence into a formula according to its type and corresponding pattern.

[0256] 5. Standardize variable names with the same meaning (variable reduction).

[0257] 6. Establish a "formula association diagram", recursively substitute the formula of the single variable into the formula of the related multivariable, and finally solve for the value of the variable in the problem sentence.

[0258] 7. Starting from the formula in the question, recursively explain how to find the value of each unknown.

[0259] 8. Test students' understanding of the questions through interactive dialogue.

[0260] 9. Implement an automatic error detection process to avoid unnecessary mistakes.

[0261] 10. All common knowledge is stored in the "knowledge graph", and the training corpus is placed in the labeled database.

[0262] Furthermore, for problems involving graphics, image processing is required first to identify the shapes and relevant side lengths within the graphics before combining this information with the textual description to solve the problem. The subsequent process is the same as described above.

[0263] Please refer to Figure 4 The diagram shown is a flowchart of a machine problem-solving method 400 according to one embodiment of the present invention. This machine problem-solving method 400 can be applied to... Figure 1 and Figure 2 The server 110 is shown. The machine-based method 400 for solving mathematical problems can be implemented as multiple instructions and related data stored in non-volatile memory. After the server 110 executes these multiple instructions, the machine-based method 400 for solving mathematical problems can be implemented. This application does not restrict the order in which any two steps are executed if there is no direct or indirect causal relationship between them. The machine-based method 400 for solving mathematical problems begins with step 410.

[0264] Step 410: Receive a math problem from a user's calculator via a network. The math problem contains multiple sentences expressed in natural language, including at least one question.

[0265] Optional step 415: Perform image recognition and text recognition on the graphics in the above mathematical problems to obtain one or more sentences describing the graphics.

[0266] Step 420: Break down the math problem into multiple sentences.

[0267] Step 430: Determine whether each of the multiple sentences is a formulaic sentence or a non-formulaic sentence (such as the scenario sentence mentioned above) based on whether it contains a noun object. The noun object in the sentence is modified by a number of modifiers.

[0268] Step 440: Convert each formula sentence in the multiple sentences into a corresponding formula, where each formula contains one or more variables and their corresponding relationships.

[0269] Step 450: Based on the relationship between the variables of each formula sentence above, combine them into a formula relationship graph, which may contain one or more tree structures, and the above multiple tree structures may be called forest structures.

[0270] Step 460: Based on the above formula association diagram, calculate the value of each variable included in the above formula association diagram one by one until the value of the variable corresponding to the question is calculated.

[0271] Optional step 470: Perform automatic error detection based on the calculated value of the variable corresponding to the question. According to the formula association diagram above, recursively check whether the formulas of adjacent nodes are satisfied by comparing the value of the variable corresponding to the question with the values ​​of each variable. If the formula of every node is satisfied, the answer can be considered correct. However, if the formula of any node is not satisfied, the answer can be judged to be incorrect.

[0272] Optional step 480: Based on the calculation order of step 460, generate a question for each variable corresponding to the formula and an answer to the question, wherein the answer to the question corresponds to the value of the variable.

[0273] Optional step 490: Based on the questions and answers generated in step 480, conduct teaching interactions with the user of the user calculator through the network.

[0274] Please refer to Figure 5 The diagram shown is a flowchart illustrating a method 500 for converting a sentence into a formula according to an embodiment of this application. The method 500 for converting a sentence into a formula may be... Figure 4 This is an embodiment of step 440 of the machine problem-solving method 400. The implementation of the sentence-to-formula method 500 can be the same as the machine problem-solving method 400. This application does not restrict the order in which any two steps are performed unless there is a direct or indirect causal relationship between them. The sentence-to-formula method 500 can begin with step 510.

[0275] Step 510: Determine whether the sentence among the multiple sentences that has not been converted is a formula sentence. If the sentence is not a formula sentence, proceed to step 520. If the sentence is a formula sentence, proceed to step 530.

[0276] Step 515: Ignore this sentence and return to step 510.

[0277] Step 520: Expand more than two relationships involved in a sentence into more than two sentences. For example, Xiaoming bought two apples, three pineapples and a bunch of lychees. It can be expanded into Xiaoming bought two apples, Xiaoming bought three pineapples, and Xiaoming bought a bunch of lychees. In one embodiment, a compound question can be disassembled into multiple single-variable questions (Sub-question, SQ). For example, how many apples do A and B have in total can be disassembled into how many apples does A have and how many apples does B have.

[0278] Optional step 522: Standardize the description order of this sentence. For example, form this sentence into a standard structure including a subject, a verb and an object.

[0279] Optional step 524: Fill in the omitted parts in this sentence. As mentioned above, the subject may be omitted in this sentence. The omitted subject or noun can be determined according to the verb or local noun in the standard structure. Or according to the quantifier, such as "piece", "person", "cup", etc., to determine the omitted noun to be filled in.

[0280] Optional step 526: Infer the demonstrative pronouns in this sentence. In one embodiment, those of ordinary skill in the art can understand that this step can use a trained neural network model to infer the demonstrative pronouns in this sentence, so as to find out which sentence's noun in the math problem the demonstrative pronoun refers to. For example, existing large language models (LLMs) can provide the nouns referred to by demonstrative pronouns among tens of thousands of tokens in the context.

[0281] Step 530: Query the sentence type to which this sentence belongs in a database, where the database contains multiple sentence types. In one embodiment, those of ordinary skill in the art can understand that this step can use a trained neural network model to classify the sentence. The neural network has a classifier for classifying the sentence type to which this sentence belongs. In another embodiment, an interpreter can be used to interpret and correct the sentence first, and then the interpreted and corrected sentence is input into the neural network model for classification.

[0282] In one embodiment, this step 530 also includes determining whether this sentence is a question. Understanding questions has a decisive impact on problem-solving and self-detection of errors.

[0283] Step 540: According to a formula model corresponding to the sentence type to which this sentence belongs, form a formula with the quantities and variables in this sentence.

[0284] Optional step 550: Based on the implication formula model corresponding to the sentence type to which this sentence belongs, form an implication formula from the quantities and variables in this sentence.

[0285] Optional step 560: Perform semantic inference on the sentence based on a knowledge graph, and combine the quantities in the sentence with the hidden variables inferred from the semantic inference to form an inference formula. For example, there are some known problems in the knowledge graph, such as water flow problems, speed problems, clock problems, and street light problems. These known problems already have established formulas. Therefore, a trained neural network model can be used to classify the sentence. This neural network has a classifier that classifies the question type in the knowledge graph to which the sentence belongs, in order to identify the question type to which the sentence belongs, and further understand the implicit formula and hidden variables of that question type. In another embodiment, an interpreter can first interpret and correct the sentence, and then input the interpreted and corrected sentence into the neural network model for classification.

[0286] The neural networks used in steps 530 and 560 can be different. The neural network in step 530 can classify the sentence according to its sentence type to find the formula corresponding to that type. The neural network in step 560 can classify the question type of the sentence to find the formula corresponding to that question type.

[0287] Step 570: Determine if all the formula sentences in the math problem have been converted into formulas. If the result is negative, the process returns to step 510; otherwise, the process ends. The output of method 500, which converts the sentences into formulas, is multiple formulas.

[0288] Returning to the previous point Figure 4Step 450: When there are multiple formulas, a formula relationship graph (i.e., a graph as defined in mathematics) can be formed based on the relationships between the variables of each formula. This formula relationship graph can contain one or more tree structures, which may also be called forest structures. Therefore, this can be called the variable reduction step. Each node in the tree or forest structure refers to one of the aforementioned formulas. Each formula can have a single variable or multiple variables, respectively called a univariate formula or a multivariate formula. Its corresponding node is called a univariate node or a multivariate node. When two nodes have common or shared variables, they can be connected by an edge, and the aforementioned variables can be added to this edge. When two formula nodes have more than one common variable, they can have two or more connected edges.

[0289] In the foregoing Figure 4 In step 460, solving the above formula correlation diagram can be performed in several steps. Please refer to... Figure 6 The diagram shown is a block illustration of a method 600 for solving formula association diagrams according to an embodiment of this application. This method 600 for solving formula association diagrams can be... Figure 4 One embodiment of step 460. The implementation method 600 for solving the formula association diagram can be the same as the machine problem-solving method 400. If there is no direct or indirect causal relationship between any two steps, this application does not restrict the order in which these two steps are executed. The method 600 for solving the formula association diagram can begin with step 610.

[0290] Step 610: Find one or more edge nodes in the formulaic graph (e.g., forest structure) where the values ​​of the variables of the edge nodes are known.

[0291] Step 620: Based on the edge nodes with known variable values, recursively find the variable values ​​of their neighboring nodes.

[0292] Step 630: Determine whether the values ​​of all variables for all nodes in the formula's association graph have been calculated. If yes, proceed to step 640. Otherwise, proceed to step 650.

[0293] Step 640: Find the value of the variable in the formula corresponding to the aforementioned question. This is the answer to the math problem. The process ends here.

[0294] Step 650: Determine how many node variable values ​​have not yet been calculated, and how many variables have not yet been calculated. These nodes should be multivariate nodes. If there are only N multivariate nodes remaining, and M variables remain unsolved, then if M > N, proceed to step 660. If M <= N, proceed to step 670.

[0295] Step 660: Since the number of variables M is greater than the number of nodes in the formula N, it is clear that it is impossible to solve for the value of each variable. Therefore, this mathematical problem has no solution or has infinitely many solutions.

[0296] Step 670: By performing calculations on the remaining multiple formula nodes, each variable is recursively eliminated to obtain its value. This is the Euclidean algorithm. Next, the process proceeds to step 640.

[0297] In summary, this application provides a method for automated machine problem-solving and explanation of mathematical problems. Unlike traditional large-scale natural language models that blindly guess solutions based on learned materials, this application offers an interpretable and reliable method. The key is to interpret mathematical problems into equations through a series of analyses, reasoning, and the incorporation of common sense, ultimately calculating the final answer. Then, an explanation is provided in a "goal-oriented" manner, generating an interactive and personalized testing system. As the types of questions and sentences in the knowledge graph expand, the automated machine problem-solving and explanation method provided in this application can broaden its problem-solving scope. While expanding the problem scope, it can still pose a series of heuristic questions and corresponding answers to the problem-solving process, allowing students to understand the solution process through step-by-step question-and-answer interaction.

[0298] According to one embodiment of this application, a method for machine-solving mathematical problems is provided, applicable to a server, comprising: receiving a mathematical problem, wherein the mathematical problem includes a mathematical question described in natural language; decomposing the mathematical problem into multiple sentences, wherein one of the multiple sentences contains a question; determining whether each of the multiple sentences is a formula sentence based on whether it contains noun objects; converting each formula sentence into a corresponding formula, wherein each of the formulas contains one or more variables and a corresponding relationship between those variables; forming a formula association graph based on the relationships between the variables contained in each of the formulas; and calculating the values ​​of the variables contained in the formula association graph one by one, until the value of the variable contained in the formula corresponding to the question sentence is calculated as the answer.

[0299] Preferably, for self-error detection, the method for solving mathematical problems by machine further includes: determining whether each of the above formulas is satisfied based on the values ​​of the variables contained in the above formula association diagram; and determining that the answer is wrong when at least one of the above formulas is not satisfied.

[0300] Preferably, for heuristic teaching purposes, the machine-based method for solving mathematical problems further includes: generating corresponding questions and answers based on the variables and values ​​contained in each of the above formulas; and conducting interactive teaching with a student through the server's input / output devices based on the questions and answers.

[0301] Preferably, in order to solve mathematical problems involving graphics, the machine-based method for solving mathematical problems further includes: after receiving the mathematical problem, performing image recognition and text recognition on the graphics in the mathematical problem to generate one or more sentences describing the graphics using natural language.

[0302] Preferably, to avoid errors in problem-solving and reduce the consideration of formulas, the step of converting each formula sentence in the multiple sentences into the corresponding formula further includes: first expanding the simplified formula sentence into multiple formula sentences.

[0303] Preferably, in order to avoid errors when converting formula sentences into formulas, and to ensure that the standard structure corresponds to the formula model, before the step of converting each formula sentence in the plurality of sentences into the corresponding formula, the method further includes: standardizing the descriptive order of the formula sentences to form a standard structure, which includes a subject, a verb, and an object.

[0304] Preferably, to avoid errors when converting formula sentences into formulas, the step of converting each of the multiple sentences into the corresponding formula further includes: inferring the noun referred to by the demonstrative pronoun in the formula sentence.

[0305] Preferably, in order to utilize the known correspondence between formula sentences and formulas, the step of converting each formula sentence in the plurality of sentences into a corresponding formula further includes: querying a database to which the formula sentence belongs, wherein the database contains relevant information on various of the above-mentioned sentence types; and forming the above-mentioned corresponding formula based on a formula model corresponding to the sentence type to which the formula sentence belongs, using the quantity and variables in the formula sentence.

[0306] Preferably, in order to utilize the known correspondence between formula sentences and one or more implied formulas, the step of converting each formula sentence in the plurality of sentences into a corresponding formula further includes: forming the aforementioned corresponding formula by combining the quantity and variables in the formula sentence according to an implied formula model corresponding to the sentence type to which the formula sentence belongs.

[0307] Preferably, in order to cope with the ever-changing different sentence representations, the method for solving mathematical problems by machine further includes: using a trained neural network model to classify the formula sentence in order to find out the sentence type to which the formula sentence belongs.

[0308] Preferably, in order to find hidden knowledge and avoid missing formulas, the step of converting each formula sentence in the multiple sentences into a corresponding formula further includes: performing semantic inference on the formula sentence based on a knowledge graph, and combining the quantity in the formula sentence with the hidden variables inferred from the semantic inference to form the corresponding formula mentioned above.

[0309] Preferably, in order to cope with the ever-changing different sentence representations, the method for solving mathematical problems by machine further includes: using a trained neural network model to classify the formula sentence in order to find the problem type to which the formula sentence belongs, so as to know the formula and its hidden variables implied by the problem type.

[0310] Preferably, in order to establish relationships between the formulas, the method for solving mathematical problems by machine further includes the step of forming a formula association graph of each of the above formulas, which further includes: unifying variables with the same meaning to reduce variables; and treating multiple formulas with the same variables as nodes connected to each other, with the connecting edges referring to the same variables mentioned above.

[0311] Preferably, in order to solve chain problems, the step of calculating the values ​​of the variables contained in the above formula association diagram one by one until the value of the variable contained in the formula corresponding to the question is calculated further includes: finding one or more edge formulas in the above formula association diagram, the values ​​of the variables to which the edge formulas belong are known; and recursively finding the values ​​of the variables of the adjacent formulas based on the values ​​of the known variables.

[0312] Preferably, in order to solve simultaneous equation problems, the step of calculating the values ​​of the variables contained in the above formula association diagram one by one until the value of the variable contained in the formula corresponding to the question is calculated further includes: when the values ​​of the variables in the adjacent formulas are found recursively, but the values ​​of all the variables contained in the above formula association diagram are still not calculated, the step of solving simultaneous equations is used so as to calculate the values ​​of the variables contained in the above formula association diagram one by one.

[0313] According to one embodiment of this application, a server for solving mathematical problems by machine is provided, comprising a processor for executing a plurality of instructions stored in non-volatile memory to implement the method for solving mathematical problems by machine as described above.

[0314] Preferably, in order to perform machine math problem solving on a single calculator, the machine math problem solving server further includes: an input device for inputting the math problem; and an output device for outputting the answer.

[0315] To perform machine-based math problem solving on multiple networked calculators, according to one embodiment of this application, a system for machine-based math problem solving is provided, comprising: a machine-based math problem solving server as described above; and a user calculator, wherein the user calculator transmits the math problem to the server via a network and receives the answer from the server via the network.

[0316] The above description is merely a preferred embodiment of this application, but the scope of protection of this application is not limited thereto. Any equivalent substitutions or modifications made by those skilled in the art within the scope of the technology disclosed in this application, based on the technical solution and application concept of this application, should be included within the scope of protection of this application.

Claims

1. A method for solving mathematical problems by machine, applicable to a server, comprising: Receive a math problem, which contains a mathematical problem described in natural language; Break down the math problem into multiple sentences, one of which contains a question. Based on whether it contains noun objects, determine whether each sentence in the multiple sentences is a formula sentence; convert each formula sentence in the multiple sentences into a corresponding formula, wherein each of the above formulas contains one or more variables and their corresponding relationships; Based on the relationships between the variables contained in each of the above formulas, each of the above formulas is combined into a formula relationship diagram; and Based on the above formula relationship diagram, calculate the values ​​of the variables contained in the above formula relationship diagram one by one until the value of the variable contained in the formula corresponding to the question is calculated, which is the answer.

2. The method for solving mathematical problems by machine as described in claim 1, characterized in that, It further includes: determining whether each of the above formulas is satisfied based on the values ​​of the variables contained in the above formula association diagram; and The answer is considered incorrect if at least one of the above formulas is not satisfied.

3. The method for solving mathematical problems by machine as described in claim 1, characterized in that, It further includes: generating corresponding interrogative sentences and corresponding answers based on the variables and values ​​contained in each of the above formulas; and Based on the above questions and their corresponding answers, a student is engaged in interactive teaching through the server's input / output devices.

4. The method for solving mathematical problems by machine as described in claim 1, characterized in that, It further includes: after receiving the math problem, performing image recognition and text recognition on the graphics in the math problem to generate one or more sentences describing the graphics using natural language.

5. The method for solving mathematical problems by machine as described in claim 1, characterized in that, Before converting each formula sentence in the multiple sentences into the corresponding formula, the process further includes: first expanding the simplified formula sentence into multiple formula sentences.

6. The method for solving mathematical problems by machine as described in claim 1, characterized in that, Before the step of converting each formula sentence in the multiple sentences into the corresponding formula, it further includes: standardizing the descriptive order of the formula sentences to form a standard structure, which includes a subject, a verb, and an object.

7. The method for solving mathematical problems by machine as described in claim 1, characterized in that, Before converting each formula sentence in the multiple sentences into the corresponding formula, the process further includes filling in the omitted parts of the formula sentence.

8. The method for solving mathematical problems by machine as described in claim 1, characterized in that, Before the step of converting each formula sentence in the multiple sentences into the corresponding formula, it further includes: inferring the noun referred to by the demonstrative pronoun in the formula sentence.

9. The method for solving mathematical problems by machine as described in claim 1, characterized in that, The process of converting each formula sentence in these multiple sentences into a corresponding formula further includes: The formula sentence is queried in a database to determine its sentence type, and the database contains relevant information for various sentence types mentioned above. as well as Based on the formula model corresponding to the sentence type to which the formula sentence belongs, the quantities and variables in the formula sentence are combined to form the corresponding formula mentioned above.

10. The method for solving mathematical problems by machine as described in claim 9, characterized in that, The step of converting each formula sentence in the multiple sentences into a corresponding formula further includes: according to the implied formula model corresponding to the sentence type to which the formula sentence belongs, the quantity and variables in the formula sentence are combined into the corresponding formula mentioned above.

11. The method for solving mathematical problems by machine as described in claim 9, characterized in that, It also includes: using a trained neural network model to classify the formula sentence in order to determine the sentence type to which the formula sentence belongs.

12. The method for solving mathematical problems by machine as described in claim 1, characterized in that, The step of converting each formula sentence in the multiple sentences into a corresponding formula further includes: performing semantic inference on the formula sentence based on a knowledge graph, and combining the quantity in the formula sentence with the hidden variables inferred from the semantic inference to form the corresponding formula mentioned above.

13. The method for solving mathematical problems by machine as described in claim 12, characterized in that, It also includes: using a trained neural network model to classify the formula statement in order to find the problem type to which the formula statement belongs, so as to know the formula and its hidden variables implied by the problem type.

14. The method for solving mathematical problems by machine as described in claim 1, characterized in that, The step of assembling each of the above formulas into a formula relationship diagram further includes: Variable reduction involves unifying variables with the same meaning; and Multiple formulas with the same variable are treated as nodes connected to each other, and the edges connecting them refer to the same variable mentioned above.

15. The method for solving mathematical problems by machine as described in claim 1, characterized in that, The step of calculating the values ​​of the variables included in the above formula association diagram one by one until the value of the variable included in the formula corresponding to the question is calculated further includes: Find one or more marginal formulas in the above formula correlation graph, where the values ​​of the variables to which the marginal formulas belong are known; and Based on the known values ​​of the variables above, recursively find the values ​​of the variables in the adjacent formulas.

16. The method for solving mathematical problems by machine as described in claim 15, characterized in that, The step of calculating the values ​​of the variables included in the above formula association diagram one by one until the value of the variable included in the formula corresponding to the question is calculated further includes: If, after recursively finding the values ​​of the variables in the adjacent formulas, it is still impossible to calculate the values ​​of all the variables contained in the above formula relationship diagram, the step of solving simultaneous equations is used to calculate the values ​​of the variables contained in the above formula relationship diagram one by one.

17. A server for solving mathematical problems by machine, characterized in that, It includes a processor for executing a plurality of instructions stored in non-volatile memory to implement the machine method for solving mathematical problems as described in any one of claims 1 to 16.

18. The server for solving mathematical problems by machine as described in claim 15, characterized in that, It also includes: an input device for inputting the mathematical problem; and An output device is provided to output the answer.

19. A system for solving mathematical problems by machine, characterized in that, Include: The server for solving mathematical problems by machine as described in claim 17; and A user calculator that transmits a math problem to a server via a network and receives the answer from the server via the same network.