Mathematical inference-oriented visual thinking operation system and mathematical inference method

By designing a visual thinking operating system for mathematical reasoning, using large language models and key step extraction modules to generate the optimal reasoning chain, the problems of complex mathematical reasoning difficulties and lack of verification in the existing technology are solved, and higher inference accuracy and autonomous reasoning ability are achieved.

CN119808967AActive Publication Date: 2025-04-11BEI JING BDA NETWORK &INFORMATION CO LTD
View PDF 10 Cites 0 Cited by

Patent Information

Application Number
CN202510301119.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-14
Publication Date
2025-04-11
Estimated Expiration
2045-03-14

AI Technical Summary

Technical Problem

When implementing automated mathematical reasoning, the existing technology is difficult to solve complex mathematical problems, and lacks intermediate reasoning logic and real-time verification, which makes it difficult for students to understand the reasoning process, enhances tool dependence, and is prone to invalid calculations and logical crashes.

Method used

Design a visual thinking operating system for mathematical reasoning, receive mathematical problems through human-computer interaction interface, extract keywords using text processing modules, retrieve mathematical knowledge bases, and generate multiple reasoning chains in combination with large language models. Through the key step extraction module, overlapping steps and candidate key steps are determined, and the optimal reasoning chain and final answer are generated after verification.

Benefits of technology

It improves the inference accuracy of mathematical problems, especially complex mathematical problems, provides complete inference logic and real-time verification of intermediate steps, reduces students' dependence on tools, and enhances independent reasoning ability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119808967A_ABST
    Figure CN119808967A_ABST
Patent Text Reader

Abstract

The invention provides a mathematical reasoning-oriented visual thinking operation system and a mathematical reasoning method, and the method comprises the steps: inputting a mathematical problem description text and a knowledge text matched with the mathematical problem description text into a large language model, and obtaining a plurality of reasoning chains outputted by the large language model; based on a plurality of reasoning chains, determining overlapping steps consistent with reasoning steps in other reasoning chains in each reasoning chain, determining candidate key steps based on the overlapping steps, verifying the candidate key steps, and determining the candidate key steps passing the verification as key steps; then, a mathematical knowledge base is retrieved on the basis of keywords in the key steps, knowledge texts matched with the key steps are obtained, the mathematical problem description text, the key steps and the matched knowledge texts are input into a large language model, an output optimal reasoning chain is obtained, and finally verification is conducted on the basis of final answers given in the optimal reasoning chain. And the optimal reasoning chain and the final answer are output after the verification is passed, so that the reasoning accuracy of the complex mathematical problem is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of automated reasoning technology, and in particular to a visual thinking operating system and a mathematical reasoning method oriented to mathematical reasoning. Background Art

[0002] As a core means of educational assistance and scientific research analysis, mathematical problem-solving tools have evolved from basic calculators to symbolic computing systems. However, existing technologies (such as calculators, symbolic computing software, and online problem-solving platforms) still have some shortcomings in realizing automated reasoning. For example, mainstream symbolic computing tools and some AI problem-solving models can quickly output answers, but only show the final results or brief steps. Students cannot observe the intermediate reasoning logic (such as discriminant calculations and the basis for theorem selection), resulting in "knowing the truth but not the reason", making it difficult to meet the needs of "step-by-step guidance of thinking" in teaching scenarios. Students rely too much on tools and weaken their autonomous reasoning ability. In addition, existing systems usually only verify the final results, lack real-time monitoring of intermediate steps (such as not checking the risk of "dividing by zero"), and cannot automatically return to the wrong path based on mathematical common sense (such as the sum of the internal angles of a triangle is 180°). The error is passed to subsequent steps, resulting in invalid calculations or even logical collapse. More importantly, for complex mathematical problems, existing problem-solving models (even large language models that are good at reasoning) will get stuck in an intermediate step when performing mathematical reasoning and cannot continue reasoning, making it difficult to find the answer in the end. Summary of the invention

[0003] The present invention provides a visual thinking operating system and a mathematical reasoning method for mathematical reasoning, which are used to solve the defects of the prior art that complex mathematical problems are difficult to solve and lack intermediate reasoning logic and intermediate verification.

[0004] The present invention provides a visual thinking operating system for mathematical reasoning, comprising: A human-computer interaction interface for receiving a mathematical problem description text input by a user; A text processing module is used to extract keywords from the mathematical problem description text to obtain keywords therein, and search a mathematical knowledge base based on the keywords to obtain knowledge text matching the mathematical problem description text; A first mathematical reasoning module is used to input the mathematical problem description text and its matching knowledge text into a large language model to obtain multiple reasoning chains output by the large language model; any reasoning chain includes multiple reasoning steps for the mathematical problem description text; A key step extraction module is used to determine, based on the multiple reasoning chains, overlapping steps in each reasoning chain that are consistent with reasoning steps in other reasoning chains, determine candidate key steps based on the overlapping steps, and verify the candidate key steps to determine the verified candidate key steps as key steps; A second mathematical reasoning module is used to search a mathematical knowledge base based on the keywords in the key steps to obtain the knowledge text matching the key steps, and input the mathematical problem description text, the key steps and the knowledge text matching them into a large language model to obtain an optimal reasoning chain output by the large language model; The reasoning result output module is used to verify the final answer given in the optimal reasoning chain, and output the optimal reasoning chain and the final answer after the verification is passed.

[0005] According to a visual thinking operating system for mathematical reasoning provided by the present invention, the determining of a plurality of overlapping steps based on the plurality of reasoning chains, and the determining of candidate key steps based on the plurality of overlapping steps include: For each word segment in any reasoning step of any reasoning chain, a TF-IDF value is calculated, and a semantic vector of any reasoning step is constructed based on the TF-IDF value of each word segment in any reasoning step; If the similarity between the semantic vectors of multiple reasoning steps from different reasoning chains is greater than a preset threshold, the multiple reasoning steps from different reasoning chains are marked as overlapping steps, and the multiple reasoning steps from different reasoning chains are combined into an overlapping step set; the overlapping step set has one or more; The candidate key steps are screened based on the overlapping step set; there are 0 or 1 candidate key steps in the same overlapping step set.

[0006] According to a visual thinking operating system for mathematical reasoning provided by the present invention, the screening of candidate key steps based on the overlapping step set includes: Obtain the reasoning steps marked as overlapping steps and having the deepest depth in each reasoning chain, construct a set of steps to be processed, and construct an empty set of steps to be deleted; Execute the reasoning step screening method for each reasoning step in the set of steps to be processed to obtain an updated set of steps to be deleted, and determine the candidate key steps based on the difference between the set of steps to be processed and the updated set of steps to be deleted; The method for selecting a reasoning step executed for any reasoning step in the set of steps to be processed includes: Discrimination step: determine whether the current reasoning step is in the set of steps to be deleted; if the current reasoning step is in the set of steps to be deleted, jump to the iteration step; if any of the reasoning steps is in the set of steps to be deleted, end the current reasoning step screening method; if neither the current reasoning step nor any of the reasoning steps is in the set of steps to be deleted, determine the step to be deleted based on the current reasoning step and any of the reasoning steps, and add the step to be deleted to the set of steps to be deleted when the step to be deleted is not empty; initially, the current reasoning step is the next reasoning step of any of the reasoning steps in the set of steps to be processed; Iteration step: determine the next reasoning step of the current reasoning step in the set of steps to be processed as the new current reasoning step, and jump to the determination step.

[0007] According to a visual thinking operating system for mathematical reasoning provided by the present invention, the step of determining the step to be deleted based on the current reasoning step and any one of the reasoning steps includes: If the current reasoning step and any of the reasoning steps are in the same reasoning chain, determining the reasoning step with a shallower depth as the step to be deleted; Otherwise, it is determined that the step to be deleted is empty.

[0008] According to a visual thinking operating system for mathematical reasoning provided by the present invention, the verification of the candidate key steps includes: The candidate key steps are verified based on a large language model.

[0009] The present invention also provides a mathematical reasoning method based on any of the above-mentioned visual thinking operating systems, comprising: Receive the mathematical problem description text input by the user; Perform keyword extraction on the mathematical problem description text to obtain keywords therein, and search a mathematical knowledge base based on the keywords to obtain knowledge text matching the mathematical problem description text; Inputting the mathematical problem description text and the matching knowledge text into a large language model to obtain multiple reasoning chains output by the large language model; any reasoning chain includes multiple reasoning steps for the mathematical problem description text; Based on the multiple reasoning chains, determining overlapping steps in each reasoning chain that are consistent with reasoning steps in other reasoning chains, determining candidate key steps based on the overlapping steps, and verifying the candidate key steps to determine the verified candidate key steps as key steps; Based on the keywords in the key steps, a mathematical knowledge base is searched to obtain knowledge texts matching the key steps, and the mathematical problem description text, the key steps and the knowledge texts matching the key steps are input into a large language model to obtain an optimal reasoning chain output by the large language model; Verification is performed based on the final answer given in the optimal reasoning chain, and the optimal reasoning chain and the final answer are output after the verification passes.

[0010] According to a mathematical reasoning method provided by the present invention, the determining of a plurality of overlapping steps based on the plurality of reasoning chains, and the determining of candidate key steps based on the plurality of overlapping steps include: For each word segment in any reasoning step of any reasoning chain, a TF-IDF value is calculated, and a semantic vector of any reasoning step is constructed based on the TF-IDF value of each word segment in any reasoning step; If the similarity between the semantic vectors of multiple reasoning steps from different reasoning chains is greater than a preset threshold, the multiple reasoning steps from different reasoning chains are marked as overlapping steps, and the multiple reasoning steps from different reasoning chains are combined into an overlapping step set; the overlapping step set has one or more; The candidate key steps are screened based on the overlapping step set; there are 0 or 1 candidate key steps in the same overlapping step set.

[0011] According to a mathematical reasoning method provided by the present invention, the screening of candidate key steps based on the overlapping step set includes: Obtain the reasoning steps marked as overlapping steps and having the deepest depth in each reasoning chain, construct a set of steps to be processed, and construct an empty set of steps to be deleted; Execute the reasoning step screening method for each reasoning step in the set of steps to be processed to obtain an updated set of steps to be deleted, and determine the candidate key steps based on the difference between the set of steps to be processed and the updated set of steps to be deleted; The method for selecting a reasoning step executed for any reasoning step in the set of steps to be processed includes: Discrimination step: determine whether the current reasoning step is in the set of steps to be deleted; if the current reasoning step is in the set of steps to be deleted, jump to the iteration step; if any of the reasoning steps is in the set of steps to be deleted, end the current reasoning step screening method; if neither the current reasoning step nor any of the reasoning steps is in the set of steps to be deleted, determine the step to be deleted based on the current reasoning step and any of the reasoning steps, and add the step to be deleted to the set of steps to be deleted when the step to be deleted is not empty; initially, the current reasoning step is the next reasoning step of any of the reasoning steps in the set of steps to be processed; Iteration step: determining the next reasoning step of the current reasoning step in the set of steps to be processed as the new current reasoning step.

[0012] The present invention also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, any one of the mathematical reasoning methods described above is implemented.

[0013] The present invention also provides a non-transitory computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the mathematical reasoning method described in any one of the above is implemented.

[0014] The present invention also provides a computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the computer program implements any one of the mathematical reasoning methods described above.

[0015] The present invention provides a visualized thinking operating system and a mathematical reasoning method for receiving a mathematical problem description text input by a user through a human-computer interaction interface, extracting keywords from the mathematical problem description text through a text processing module to obtain keywords therein, and searching a mathematical knowledge base based on the keywords to obtain knowledge text matching the mathematical problem description text, and then inputting the mathematical problem description text and the matching knowledge text into a large language model through a first mathematical reasoning module to obtain multiple reasoning chains output by the large language model; and then determining the overlapping steps in each reasoning chain that are consistent with the reasoning steps in other reasoning chains through a key step extraction module based on multiple reasoning chains, and determining candidate key steps based on the overlapping steps. Steps are selected and the candidate key steps are verified to determine that the verified candidate key steps are the key steps. Subsequently, the second mathematical reasoning module is used to search the mathematical knowledge base based on the keywords in the key steps to obtain the knowledge text matching the key steps. The mathematical problem description text, the key steps and their matching knowledge texts are input into the large language model to obtain the optimal reasoning chain output by the large language model. Finally, the reasoning result output module is used to verify the final answer given in the optimal reasoning chain, and the optimal reasoning chain and the final answer are output after the verification is passed, which improves the reasoning accuracy of mathematical problems, especially complex mathematical problems, and provides complete reasoning logic and verification of intermediate reasoning steps and final results. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0017] Figure 1 It is a schematic diagram of the structure of the visualized thinking operating system for mathematical reasoning provided by the present invention; Figure 2 It is a schematic flow chart of the method for determining candidate key steps provided by the present invention; Figure 3 It is a flow chart of the mathematical reasoning method provided by the present invention; Figure 4 It is a structural schematic diagram of the electronic device provided by the present invention. DETAILED DESCRIPTION

[0018] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0019] Figure 1 is a schematic diagram of the structure of the visual thinking operating system for mathematical reasoning provided by the present invention, such as Figure 1 As shown, the system includes: The human-computer interaction interface 110 is used to receive a mathematical problem description text input by a user; The text processing module 120 is used to extract keywords from the mathematical problem description text to obtain keywords therein, and search the mathematical knowledge base based on the keywords to obtain knowledge text matching the mathematical problem description text; A first mathematical reasoning module 130 is used to input the mathematical problem description text and its matching knowledge text into a large language model to obtain multiple reasoning chains output by the large language model; any reasoning chain includes multiple reasoning steps for the mathematical problem description text; A key step extraction module 140 is used to determine, based on the multiple reasoning chains, overlapping steps in each reasoning chain that are consistent with reasoning steps in other reasoning chains, determine candidate key steps based on the overlapping steps, and verify the candidate key steps to determine the verified candidate key steps as key steps; The second mathematical reasoning module 150 is used to search the mathematical knowledge base based on the keywords in the key steps to obtain the knowledge text matching the key steps, and input the mathematical problem description text, the key steps and the knowledge text matching them into the large language model to obtain the optimal reasoning chain output by the large language model; The reasoning result output module 160 is used to perform verification based on the final answer given in the optimal reasoning chain, and output the optimal reasoning chain and the final answer after the verification is passed.

[0020] Here, a mathematical problem description text input by a user from the interface can be received by setting a human-computer interaction interface. Subsequently, the text processing module will perform keyword extraction on the mathematical problem description text input by the user to obtain several keywords in the text, thereby searching the pre-built mathematical knowledge base based on the keywords, and the obtained search results can be used as the knowledge text matched by the mathematical problem description text.

[0021] In some embodiments, the mathematical knowledge base includes two types of nodes: concept nodes and theorem nodes. The concept nodes correspond to basic mathematical concepts, such as basic elements in trigonometry, such as sin 3 x and cos x. Theorem nodes represent mathematical propositions or axioms, such as cosπ / 2 = 0. The edges between nodes represent the directional relationship or dependency relationship between concept nodes or theorem nodes. That is, the mathematical knowledge base can be viewed as a directed graph. There are four types of connecting edges in the mathematical knowledge base: (1) dependency connection, which indicates that one node has a dependency on another node. For example, the connection from the sin x node to tanx = sin x / cos x indicates the latter's dependency on sin x; (2) derivation connection, which indicates the derivation relationship from one node to another, for example, from sin x to sin 3x = 3sin x − 4sin 3 x, indicating that the latter is derived from the former; (3) application relationship connection, used when a node is used to infer a specific instance, for example, the connection from cos x to cos (π / 2 ) = 0 indicates the application of cos x in a specific scenario; (4) identity conversion relationship connection, indicating how a node is converted to another node that is essentially the same, for example, tan x to tan x = sin x / cos x. When searching a mathematical knowledge base based on several keywords, you can first search for concept nodes that match the keyword, and then search for other concept nodes and theorem nodes connected to the above concept nodes based on the connection edges of the above four relationships contained in the mathematical knowledge base, and obtain the node content of other concept nodes and theorem nodes connected to the above concept nodes to construct corresponding search results.

[0022] The first mathematical reasoning module combines the mathematical problem description text and its matching knowledge text into a prompt and inputs it into the large language model, wherein the prompt contains the requirements for the output data of the large language model, such as output stepby step, so as to obtain multiple reasoning chains output by the large language model. Among them, any reasoning chain contains multiple reasoning steps for the mathematical problem description text, and each reasoning chain is relatively independent, that is, each reasoning chain corresponds to an independent problem-solving idea. It can be seen that there is a sequence between multiple reasoning steps in the same reasoning chain, and the sequence number of the reasoning step is subsequently used as the depth of the corresponding reasoning step.

[0023] Subsequently, the key step extraction module determines the overlapping steps in each reasoning chain that are consistent with the reasoning steps in other reasoning chains based on multiple reasoning chains. Here, considering that for the same math problem, no matter what solution ideas are adopted, in order to accurately solve the problem, different solution ideas will focus on certain key intermediate reasoning steps, that is, the key links may be the same. Therefore, using this key intermediate reasoning step can guide the reasoning process of the large language model, so as to obtain the correct solution ideas, and overcome the problem that the reasoning process of the existing large language model or other problem-solving models is easily interrupted or deviated when facing complex math problems. It should be noted that there may be multiple sets of different overlapping step sets in multiple reasoning chains, and each set of overlapping step sets contains multiple reasoning steps with consistent reasoning content from different reasoning chains. In this case, if the reasoning steps from different overlapping step sets are directly input into the large language model as prompts, since there may be a derivation relationship between the reasoning steps from different overlapping step sets, it may cause information redundancy, which will reduce the reasoning efficiency of the large language model. Therefore, the candidate key steps can be determined based on the overlapping steps obtained above, and the candidate key steps can be verified, and then the candidate key steps that pass the verification can be determined as key steps. This method can not only select the intermediate reasoning steps that are more critical to a specific mathematical problem from the above different overlapping step sets, but also insert the verification process in the middle of the entire reasoning chain to ensure the correctness of the key steps, thereby improving the accuracy of the entire reasoning process, which is especially important for complex mathematical problems.

[0024] In some embodiments, when verifying a candidate key step, the candidate key step and the mathematical problem description text may be input into a large language model together, so that the large language model can verify the candidate key step.

[0025] In some embodiments, Figure 2 As shown, based on the multiple reasoning chains, a number of overlapping steps are determined, and based on the number of overlapping steps, candidate key steps are determined, including the following steps: Step 210, for each word segment in any reasoning step of any reasoning chain, and based on the TF-IDF value of each word segment in any reasoning step, construct a semantic vector of any reasoning step; Step 220: if the similarity between the semantic vectors of multiple reasoning steps from different reasoning chains is greater than a preset threshold, the multiple reasoning steps from different reasoning chains are marked as overlapping steps, and the multiple reasoning steps from different reasoning chains are combined into an overlapping step set; the overlapping step set has one or more steps; Step 230 , screening candidate key steps based on the overlapping step set; there are 0 or 1 candidate key steps in the same overlapping step set.

[0026] Here, for any reasoning step in any reasoning chain, the TF-IDF value of each word segment in the reasoning step is obtained, and then the TF-IDF value of each word segment in the reasoning step is concatenated and combined to obtain the semantic vector of the reasoning step. Repeating the above process can obtain the semantic vector of each reasoning step in each reasoning chain. Subsequently, the similarity between the semantic vectors of the reasoning steps from different reasoning chains is calculated. If the similarity between the semantic vectors of multiple reasoning steps from different reasoning chains is greater than a preset threshold, the multiple reasoning steps from different reasoning chains are marked as overlapping steps, and then these multiple reasoning steps from different reasoning chains are combined into an overlapping step set. As shown above, there may be one or more overlapping step sets, and the reasoning content of the reasoning steps in the same overlapping step set is consistent. Next, candidate key steps are screened out based on the above overlapping step set, wherein there may be only one candidate key step or no candidate key step in the same overlapping step set.

[0027] In other embodiments, in order to filter out key steps from the set of overlapping steps, the reasoning steps marked as overlapping steps and with the deepest depth in each reasoning chain can be obtained, a set of steps to be processed is constructed, and an empty set of steps to be deleted is constructed. That is, for any reasoning chain, first obtain all the reasoning steps marked as overlapping steps in the reasoning chain, then select the reasoning step with the deepest depth and place it in the set of steps to be processed, and then repeat the above process for all reasoning chains to obtain the final set of steps to be processed. The reasoning step screening method is executed for each reasoning step in the set of steps to be processed to obtain an updated set of steps to be deleted, and based on the difference between the set of steps to be processed and the updated set of steps to be deleted, the reasoning steps in the difference are determined as candidate key steps.

[0028] The method for selecting the reasoning steps to be performed for any reasoning step i in the set of steps to be processed includes: Discrimination step: determine whether the current reasoning step j is in the set of steps to be deleted; if the current reasoning step j is in the set of steps to be deleted, jump to the iteration step; if the reasoning step i is in the set of steps to be deleted, end the current reasoning step screening method; if the current reasoning step j and the reasoning step i are not in the set of steps to be deleted, determine the step to be deleted based on the current reasoning step j and the reasoning step i, and add the step to be deleted to the set of steps to be deleted when the step to be deleted is not empty; in some embodiments, if the current reasoning step j and the reasoning step i are in the same reasoning chain, determine the reasoning step with a shallower depth between the two as the step to be deleted; otherwise, determine that the step to be deleted is empty; it should be noted that, initially, the current reasoning step j is the next reasoning step after the reasoning step i in the set of steps to be processed; Iteration step: determine the next reasoning step of the current reasoning step j in the set of pending steps as the new current reasoning step j, and jump to the discrimination step.

[0029] After the key step extraction model obtains the key steps, the second mathematical reasoning module searches the mathematical knowledge base based on the keywords in the key steps to obtain the knowledge text matching the key steps, and inputs the mathematical problem description text, the key steps and the knowledge text matching the key steps into the large language model to obtain the optimal reasoning chain output by the large language model. It should be noted that there may be multiple optimal reasoning chains here, and prompt can also be used to control the large language model to output only one optimal reasoning chain, which is not specifically limited in the embodiments of the present invention.

[0030] Subsequently, the reasoning result output module can perform verification based on the final answer given in the optimal reasoning chain, and output the optimal reasoning chain and the above-mentioned final answer after the verification is passed.

[0031] In summary, the system provided by the embodiment of the present invention receives a mathematical problem description text input by a user through a human-computer interaction interface, extracts keywords from the mathematical problem description text through a text processing module to obtain keywords therein, and searches a mathematical knowledge base based on the keywords to obtain knowledge text matching the mathematical problem description text, and then inputs the mathematical problem description text and the matching knowledge text into a large language model through a first mathematical reasoning module to obtain multiple reasoning chains output by the large language model; and then determines the overlapping steps in each reasoning chain that are consistent with the reasoning steps in other reasoning chains based on the multiple reasoning chains through a key step extraction module, determines candidate key steps based on the overlapping steps, and selects the candidate key steps. The key steps are selected for verification, and the candidate key steps that have passed the verification are determined to be the key steps. Subsequently, the second mathematical reasoning module is used to search the mathematical knowledge base based on the keywords in the key steps to obtain the knowledge text matching the key steps, and the mathematical problem description text, the key steps and their matching knowledge texts are input into the large language model to obtain the optimal reasoning chain output by the large language model. Finally, the reasoning result output module is used to verify the final answer given in the optimal reasoning chain, and the optimal reasoning chain and the final answer are output after the verification is passed, which improves the reasoning accuracy of mathematical problems, especially complex mathematical problems, and provides complete reasoning logic and verification of intermediate reasoning steps and final results.

[0032] The mathematical reasoning method provided by the present invention is described below. The mathematical reasoning method described below and the visual thinking operating system for mathematical reasoning described above can be referenced to each other.

[0033] Based on any of the above embodiments, Figure 3 It is a flow chart of the mathematical reasoning method provided by the present invention, such as Figure 3 As shown, the method includes: Step 310, receiving a mathematical problem description text input by a user; Step 320, extracting keywords from the mathematical problem description text to obtain keywords therein, and searching a mathematical knowledge base based on the keywords to obtain knowledge text matching the mathematical problem description text; Step 330, inputting the mathematical problem description text and the matching knowledge text into a large language model to obtain multiple reasoning chains output by the large language model; any reasoning chain includes multiple reasoning steps for the mathematical problem description text; Step 340, based on the multiple reasoning chains, determining the overlapping steps in each reasoning chain that are consistent with the reasoning steps in other reasoning chains, determining candidate key steps based on the overlapping steps, and verifying the candidate key steps to determine the verified candidate key steps as key steps; Step 350, searching a mathematical knowledge base based on the keywords in the key steps to obtain knowledge texts matching the key steps, and inputting the mathematical problem description text, the key steps and the knowledge texts matching them into a large language model to obtain an optimal reasoning chain output by the large language model; Step 360: Verify based on the final answer given in the optimal reasoning chain, and output the optimal reasoning chain and the final answer after the verification passes.

[0034] The method provided by the embodiment of the present invention receives a mathematical problem description text input by a user through a human-computer interaction interface, extracts keywords from the mathematical problem description text through a text processing module to obtain keywords therein, searches a mathematical knowledge base based on the keywords to obtain knowledge text matching the mathematical problem description text, and then inputs the mathematical problem description text and the matching knowledge text into a large language model through a first mathematical reasoning module to obtain multiple reasoning chains output by the large language model; then, based on multiple reasoning chains, determines, through a key step extraction module, overlapping steps in each reasoning chain that are consistent with reasoning steps in other reasoning chains, determines candidate key steps based on the overlapping steps, and selects the candidate key steps. The steps are verified, and the candidate key steps that have passed the verification are determined to be the key steps. Subsequently, the second mathematical reasoning module is used to search the mathematical knowledge base based on the keywords in the key steps to obtain the knowledge text matching the key steps, and the mathematical problem description text, the key steps and their matching knowledge texts are input into the large language model to obtain the optimal reasoning chain output by the large language model. Finally, the reasoning result output module is used to verify the final answer given in the optimal reasoning chain, and the optimal reasoning chain and the final answer are output after the verification is passed, which improves the reasoning accuracy of mathematical problems, especially complex mathematical problems, and provides complete reasoning logic and verification of intermediate reasoning steps and final results.

[0035] Based on any of the above embodiments, determining a plurality of overlapping steps based on the multiple reasoning chains, and determining candidate key steps based on the plurality of overlapping steps includes: For each word segment in any reasoning step of any reasoning chain, a TF-IDF value is calculated, and a semantic vector of any reasoning step is constructed based on the TF-IDF value of each word segment in any reasoning step; If the similarity between the semantic vectors of multiple reasoning steps from different reasoning chains is greater than a preset threshold, the multiple reasoning steps from different reasoning chains are marked as overlapping steps, and the multiple reasoning steps from different reasoning chains are combined into an overlapping step set; the overlapping step set has one or more; The candidate key steps are screened based on the overlapping step set; there are 0 or 1 candidate key steps in the same overlapping step set.

[0036] Based on any of the above embodiments, screening candidate key steps based on the overlapping step set includes: Obtain the reasoning steps marked as overlapping steps and having the deepest depth in each reasoning chain, construct a set of steps to be processed, and construct an empty set of steps to be deleted; Execute the reasoning step screening method for each reasoning step in the set of steps to be processed to obtain an updated set of steps to be deleted, and determine the candidate key steps based on the difference between the set of steps to be processed and the updated set of steps to be deleted; The method for selecting a reasoning step executed for any reasoning step in the set of steps to be processed includes: Discrimination step: determine whether the current reasoning step is in the set of steps to be deleted; if the current reasoning step is in the set of steps to be deleted, jump to the iteration step; if any of the reasoning steps is in the set of steps to be deleted, end the current reasoning step screening method; if neither the current reasoning step nor any of the reasoning steps is in the set of steps to be deleted, determine the step to be deleted based on the current reasoning step and any of the reasoning steps, and add the step to be deleted to the set of steps to be deleted when the step to be deleted is not empty; initially, the current reasoning step is the next reasoning step of any of the reasoning steps in the set of steps to be processed; Iteration step: determine the next reasoning step of the current reasoning step in the set of steps to be processed as the new current reasoning step, and jump to the determination step.

[0037] Based on any of the above embodiments, determining the step to be deleted based on the current reasoning step and any of the reasoning steps includes: If the current reasoning step and any of the reasoning steps are in the same reasoning chain, determining the reasoning step with a shallower depth as the step to be deleted; Otherwise, it is determined that the step to be deleted is empty.

[0038] Based on any of the above embodiments, the verifying the candidate key step includes: The candidate key steps are verified based on a large language model.

[0039] Figure 4 is a schematic diagram of the structure of the electronic device provided by the present invention, such as Figure 4As shown, the electronic device may include: a processor (processor) 410, a memory (memory) 420, a communication interface (Communications Interface) 430 and a communication bus 440, wherein the processor 410, the memory 420, and the communication interface 430 communicate with each other through the communication bus 440. The processor 410 can call the logic instructions in the memory 420 to execute the mathematical reasoning method, which includes: receiving a mathematical problem description text input by a user; performing keyword extraction on the mathematical problem description text to obtain keywords therein, and searching a mathematical knowledge base based on the keywords to obtain knowledge text matching the mathematical problem description text; inputting the mathematical problem description text and its matching knowledge text into a large language model to obtain multiple reasoning chains output by the large language model; any reasoning chain contains multiple reasoning steps for the mathematical problem description text; based on the multiple reasoning chains, determining overlapping steps in each reasoning chain that are consistent with reasoning steps in other reasoning chains, determining candidate key steps based on the overlapping steps, and verifying the candidate key steps to determine that the candidate key steps that pass the verification are key steps; searching a mathematical knowledge base based on keywords in the key steps to obtain knowledge text matching the key steps, and inputting the mathematical problem description text, the key steps and their matching knowledge text into a large language model to obtain an optimal reasoning chain output by the large language model; verifying based on a final answer given in the optimal reasoning chain, and outputting the optimal reasoning chain and the final answer after the verification passes.

[0040] In addition, the logic instructions in the above-mentioned memory 420 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc. Various media that can store program codes.

[0041] On the other hand, the present invention also provides a computer program product, the computer program product includes a computer program stored on a non-transitory computer-readable storage medium, the computer program includes program instructions, when the program instructions are executed by a computer, the computer can execute the mathematical reasoning method provided by the above methods, the method comprising: receiving a mathematical problem description text input by a user; performing keyword extraction on the mathematical problem description text to obtain the keywords therein, and searching a mathematical knowledge base based on the keywords to obtain a knowledge text matching the mathematical problem description text; inputting the mathematical problem description text and the knowledge text matching it into a large language model to obtain multiple reasoning chains output by the large language model; any reasoning chain contains A plurality of reasoning steps are described in the math problem text; based on the plurality of reasoning chains, overlapping steps in each reasoning chain that are consistent with reasoning steps in other reasoning chains are determined, candidate key steps are determined based on the overlapping steps, and the candidate key steps are verified to determine the candidate key steps that pass the verification as key steps; a math knowledge base is searched based on keywords in the key steps to obtain knowledge texts that match the key steps, and the math problem description text, the key steps and their matching knowledge texts are input into a large language model to obtain an optimal reasoning chain output by the large language model; verification is performed based on a final answer given in the optimal reasoning chain, and the optimal reasoning chain and the final answer are output after the verification is passed.

[0042] On the other hand, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which is implemented when the processor executes the above-mentioned mathematical reasoning method, the method comprising: receiving a mathematical problem description text input by a user; performing keyword extraction on the mathematical problem description text to obtain keywords therein, and searching a mathematical knowledge base based on the keywords to obtain knowledge text matching the mathematical problem description text; inputting the mathematical problem description text and the knowledge text matching it into a large language model to obtain multiple reasoning chains output by the large language model; any reasoning chain contains multiple reasoning steps for the mathematical problem description text ; Based on the multiple reasoning chains, determine the overlapping steps in each reasoning chain that are consistent with the reasoning steps in other reasoning chains, determine candidate key steps based on the overlapping steps, and verify the candidate key steps to determine the candidate key steps that pass the verification as key steps; search the mathematical knowledge base based on the keywords in the key steps to obtain the knowledge text matching the key steps, and input the mathematical problem description text, the key steps and their matching knowledge texts into the large language model to obtain the optimal reasoning chain output by the large language model; verify based on the final answer given in the optimal reasoning chain, and output the optimal reasoning chain and the final answer after the verification is passed.

[0043] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.

[0044] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.

[0045] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A visual thinking operating system for mathematical reasoning, characterized in that: include: A human-computer interaction interface for receiving a mathematical problem description text input by a user; A text processing module is used to extract keywords from the mathematical problem description text to obtain keywords therein, and search a mathematical knowledge base based on the keywords to obtain knowledge text matching the mathematical problem description text; A first mathematical reasoning module is used to input the mathematical problem description text and its matching knowledge text into a large language model to obtain multiple reasoning chains output by the large language model; any reasoning chain includes multiple reasoning steps for the mathematical problem description text; A key step extraction module is used to determine, based on the multiple reasoning chains, overlapping steps in each reasoning chain that are consistent with reasoning steps in other reasoning chains, determine candidate key steps based on the overlapping steps, and verify the candidate key steps to determine the verified candidate key steps as key steps; A second mathematical reasoning module is used to search the mathematical knowledge base based on the keywords in the key steps to obtain the knowledge text matching the key steps, and input the mathematical problem description text, the key steps and the knowledge text matching them into the large language model to obtain the optimal reasoning chain output by the large language model; The reasoning result output module is used to verify the final answer given in the optimal reasoning chain, and output the optimal reasoning chain and the final answer after the verification is passed.

2. The visual thinking operating system for mathematical reasoning according to claim 1 is characterized in that: The determining of a plurality of overlapping steps based on the plurality of reasoning chains, and determining candidate key steps based on the plurality of overlapping steps, comprises: For each word segment in any reasoning step of any reasoning chain, a TF-IDF value is calculated, and a semantic vector of any reasoning step is constructed based on the TF-IDF value of each word segment in any reasoning step; If the similarity between the semantic vectors of multiple reasoning steps from different reasoning chains is greater than a preset threshold, the multiple reasoning steps from different reasoning chains are marked as overlapping steps, and the multiple reasoning steps from different reasoning chains are combined into an overlapping step set; the overlapping step set has one or more; The candidate key steps are screened based on the overlapping step set; there are 0 or 1 candidate key steps in the same overlapping step set.

3. The visual thinking operating system for mathematical reasoning according to claim 2 is characterized in that: The screening of candidate key steps based on the overlapping step set comprises: Obtain the reasoning steps marked as overlapping steps and having the deepest depth in each reasoning chain, construct a set of steps to be processed, and construct an empty set of steps to be deleted; Execute the reasoning step screening method for each reasoning step in the set of steps to be processed to obtain an updated set of steps to be deleted, and determine the candidate key steps based on the difference between the set of steps to be processed and the updated set of steps to be deleted; The method for selecting a reasoning step executed for any reasoning step in the set of steps to be processed includes: Discrimination step: determine whether the current reasoning step is in the set of steps to be deleted; if the current reasoning step is in the set of steps to be deleted, jump to the iteration step; if any of the reasoning steps is in the set of steps to be deleted, end the current reasoning step screening method; if neither the current reasoning step nor any of the reasoning steps is in the set of steps to be deleted, determine the step to be deleted based on the current reasoning step and any of the reasoning steps, and add the step to be deleted to the set of steps to be deleted when the step to be deleted is not empty; initially, the current reasoning step is the next reasoning step of any of the reasoning steps in the set of steps to be processed; Iteration step: determine the next reasoning step of the current reasoning step in the set of steps to be processed as the new current reasoning step, and jump to the determination step.

4. The visual thinking operating system for mathematical reasoning according to claim 3 is characterized in that: The step of determining the step to be deleted based on the current reasoning step and any of the reasoning steps comprises: If the current reasoning step and any of the reasoning steps are in the same reasoning chain, determining the reasoning step with a shallower depth as the step to be deleted; Otherwise, it is determined that the step to be deleted is empty.

5. The visual thinking operating system for mathematical reasoning according to claim 1 is characterized in that: The verifying of the candidate key steps includes: The candidate key steps are verified based on a large language model.

6. A mathematical reasoning method based on the visual thinking operating system according to any one of claims 1 to 5, characterized in that: include: Receive the mathematical problem description text input by the user; Perform keyword extraction on the mathematical problem description text to obtain keywords therein, and search a mathematical knowledge base based on the keywords to obtain knowledge text matching the mathematical problem description text; Inputting the mathematical problem description text and the matching knowledge text into a large language model to obtain multiple reasoning chains output by the large language model; any reasoning chain includes multiple reasoning steps for the mathematical problem description text; Based on the multiple reasoning chains, determining overlapping steps in each reasoning chain that are consistent with reasoning steps in other reasoning chains, determining candidate key steps based on the overlapping steps, and verifying the candidate key steps to determine the verified candidate key steps as key steps; Based on the keywords in the key steps, a mathematical knowledge base is searched to obtain knowledge texts matching the key steps, and the mathematical problem description text, the key steps and the knowledge texts matching the key steps are input into a large language model to obtain an optimal reasoning chain output by the large language model; Verification is performed based on the final answer given in the optimal reasoning chain, and the optimal reasoning chain and the final answer are output after the verification passes.

7. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the mathematical reasoning method as claimed in claim 6 is implemented.

8. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the mathematical reasoning method according to claim 6 is implemented.

Citation Information

Patent Citations

  • Generation method and device of thinking chain expansion data based on large language model

    CN117217202A

  • Document question and answer method based on multi-granularity mixed retrieval and verification editing reasoning framework

    CN117435713A

  • Large language model rational content generation method based on implicit thinking chain

    CN117892818A

  • Flexible thinking chain learning method and device based on large language model and medium

    CN118333153A

  • Mathematical reasoning method and device, storage medium and computer program product

    CN119005332A