Mathematical problem processing method, electronic device and storage medium
By verifying and outputting the solution steps in natural and formal languages through electronic devices or servers, the problem of insufficient correctness and completeness of solution steps in existing technologies is solved, thereby improving the accuracy of automatic solutions to mathematical problems and the interpretability of the solution process.
Patent Information
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- HUAWEI TECH CO LTD
- Filing Date
- 2025-12-26
- Publication Date
- 2026-07-02
AI Technical Summary
Existing technologies are insufficient for effectively automating math problems, especially in verifying the correctness and completeness of solution steps, resulting in insufficient accuracy and authority in the solutions.
Based on user-inputted natural language math problems, the system verifies and outputs solution steps in both natural and formal languages using electronic devices or servers. This ensures the logical rigor and accuracy of the solution steps, including displaying the solution process and verification results in a dialog window.
It improves the accuracy of automatic solutions to math problems and the interpretability of the solution process, ensuring the correctness and completeness of the solution steps and making it convenient for users to verify the accuracy of the solution steps.
Smart Images

Figure CN2025145981_02072026_PF_FP_ABST
Abstract
Description
A mathematical problem-solving method, electronic device, and storage medium
[0001] This application claims priority to Chinese Patent Application No. 202411987944.2, filed on December 27, 2024, entitled "A Method for Processing Mathematical Problems, Electronic Device and Storage Medium", the entire contents of which are incorporated herein by reference. Technical Field
[0002] This application relates to the field of terminal technology, and in particular to a mathematical problem processing method, electronic device and storage medium. Background Technology
[0003] Mathematical proofs are an important part of mathematics, and mathematical proofs are a core element of mathematical learning and research, requiring extremely high rigor and logical consistency. Currently, artificial intelligence is increasingly being applied in education, and how to automate the solution of mathematical problems requires further research. Summary of the Invention
[0004] This application provides a mathematical problem processing method, an electronic device, and a storage medium. The electronic device or server can verify the correctness and completeness of the solution steps corresponding to the first mathematical problem input by the user in natural language, thereby improving the accuracy of the solution. Furthermore, the electronic device can output solution steps in both natural language and formal language, or verification results in both natural language and formal language, based on the first mathematical problem input by the user in natural language, thus improving the authority and interpretability of the mathematical solution.
[0005] In a first aspect, this application provides a method for processing mathematical problems. The method includes: an electronic device displaying a first dialog window; the electronic device receiving a first operation of inputting a first mathematical problem into the first dialog window, the first mathematical problem including a mathematical problem in natural language; the electronic device displaying a first solution step and a second solution step within the first dialog window, the first solution step including solution steps in natural language for the first mathematical problem, the second solution step including solution steps in formal language for the first mathematical problem, or the second solution step including a verification result in natural language and a verification result in formal language for the first solution step.
[0006] In some embodiments, the first mathematical problem may also be referred to as the first mathematical problem in natural language.
[0007] In some embodiments, the first problem-solving step may also be referred to as the first problem-solving step in natural language.
[0008] In some embodiments, the second problem-solving step may also be referred to as the first problem-solving step of the formal language.
[0009] In some embodiments, if it is a problem-solving scenario, the first problem-solving step may be obtained by an electronic device or server based on the first problem-solving step. If it is a problem-verification scenario, the first problem-solving step may be entered by the user in the first dialog window.
[0010] In this way, for problem-solving scenarios, electronic devices can display both natural language and formal language solution steps in a first dialog window based on the user's input of the first mathematical problem. This demonstrates the solution process to the user, allowing them to easily verify the second solution step based on the formal language solution. For solution step scenarios, the electronic device can also display both natural language and formal language verification results in a first dialog window based on the user's input of the first mathematical problem and the first solution step. This demonstrates the verification process to the user, allowing them to easily understand whether their initial solution steps are correct. This improves the authority and interpretability of mathematical problem solutions.
[0011] In conjunction with the first aspect, in one possible implementation, if the second problem-solving step includes the problem-solving steps of the formal language of the first mathematical problem, the first problem-solving step is obtained based on the second problem-solving step.
[0012] In this way, for problem-solving scenarios, we can obtain the problem-solving steps in natural language and formal language, and show the problem-solving process to the user.
[0013] In conjunction with the first aspect, in one possible implementation, before the electronic device displays the second solution steps in the first dialog window, the method further includes: the electronic device sending a first mathematical problem to a server, the first mathematical problem being used by the server to determine the first solution steps and the second solution steps; the electronic device displaying the second solution steps in the first dialog window specifically includes: the electronic device receiving the first solution steps and the second solution steps sent by the server, and displaying the first solution steps and the second solution steps in the first dialog window.
[0014] Optionally, the electronic device may determine the first and second solution steps based on the first mathematical problem.
[0015] In conjunction with the first aspect, in one possible implementation, the first mathematical problem is also used by the server to confirm that the second solution step satisfies the second condition.
[0016] This method allows for the verification of the correctness and completeness of the obtained second solution step in a problem-solving scenario. This makes the logic between the second and first solution steps more rigorous, thereby improving the accuracy of automatic solutions to mathematical problems.
[0017] For example, the description of the solution scenario can be found in the embodiments shown in Figures 5A-5F and Figure 6.
[0018] In conjunction with the first aspect, in one possible implementation, if the second problem-solving step includes the verification result of the natural language of the first problem-solving step and the verification result of the formal language of the first problem-solving step, when the second problem-solving step is used to indicate that the first problem-solving step is the answer to the first mathematical problem, the verification result of the formal language of the first problem-solving step includes the problem-solving step of the formal language of the first mathematical problem.
[0019] In some embodiments, the natural language verification result of the first problem-solving step can also be referred to as the first verification result of the natural language.
[0020] In some embodiments, the verification result of the formal language in the first problem-solving step can also be referred to as the fourth verification result of the formal language.
[0021] In this way, when the solution steps are verified and the verification passes, both the formal language verification result and the natural language verification result can be output simultaneously. This allows users to easily view and reconfirm the accuracy of the verification process.
[0022] For example, reference can be made to the description in the embodiments of Figures 7A-7C and Figure 8.
[0023] In conjunction with the first aspect, in one possible implementation, if the second problem-solving step includes the verification result of the natural language of the first problem-solving step and the verification result of the formal language of the first problem-solving step, when the second problem-solving step is used to indicate that the first problem-solving step is not the answer to the first mathematical problem, the verification result of the natural language of the first problem-solving step includes the first step in the first problem-solving step where an error occurred, and the reason for the error in the first step; the verification result of the formal language of the first problem-solving step includes the second step in the second problem-solving step where an error occurred, and the reason for the error in the second step.
[0024] In some embodiments, the natural language verification result of the first problem-solving step can also be referred to as the second natural language verification result.
[0025] In some embodiments, the verification result of the formal language in the first problem-solving step can also be referred to as the third verification result of the formal language.
[0026] In this way, in scenarios where the verification of the solution steps fails, both the formal language verification result and the natural language verification result can be output simultaneously. This allows users to confirm that the steps in their solution are incorrect, and also to know the location and cause of the error in the second solution step.
[0027] For example, reference can be made to the description in the embodiments of Figures 7D-7F and 8.
[0028] In conjunction with the first aspect, in one possible implementation, before the electronic device displays the first solution step in the first dialog window, the method further includes: the electronic device receiving a second operation of inputting the first solution step in the first dialog window.
[0029] In conjunction with the first aspect, in one possible implementation, the electronic device displays the second solution steps within the first dialog window, specifically including: the electronic device sending a first mathematical problem and a first solution step to the server, the first mathematical problem being used by the server to determine whether the first solution step is the answer to the first mathematical problem; the electronic device receiving the second solution step sent by the server; and the electronic device displaying the second solution step within the first dialog window.
[0030] Optionally, the answer to the first problem can also be determined by whether the first step of the electronic device is the answer to the first mathematical problem.
[0031] In conjunction with the first aspect, in one possible implementation, the solution steps of the formal language for the first mathematical problem satisfy the second condition, which includes any one or more of the following: correctness and completeness.
[0032] In this way, in the scenario of verifying solution steps, the first solution steps in natural language provided by the user can be verified based on the first mathematical problem and the first solution steps in natural language input by the user, and the correctness and / or completeness of the solution steps in the formal language corresponding to the first solution steps can also be verified, thereby improving the accuracy of verifying solution steps.
[0033] In conjunction with the first aspect, in one possible implementation, correctness includes any one or more of the following: the first solution step satisfies the constraint of the first condition, or the mathematical theorem or mathematical formula used in the first solution step is correct;
[0034] Completeness includes any one or more of the following: the first solution step does not omit the limitation of the first condition, and the logical relationship of the first solution step is complete.
[0035] In conjunction with the first aspect, in one possible implementation, the first dialogue window includes the dialogue window of the voice assistant.
[0036] For example, the first dialog window could be window 5001.
[0037] Secondly, this application provides a mathematical problem processing method, the method comprising: obtaining a first mathematical problem and a first solution step, wherein the first mathematical problem includes a mathematical problem in formal language, the first solution step includes solution steps in formal language, the first mathematical problem includes a first condition and a first unsolved problem, the first condition is used to obtain the solution steps of the first mathematical problem; if it is determined based on the first mathematical problem and the first solution step that the first solution step satisfies a second condition, outputting a second solution step or a first verification result, wherein the second solution step includes solution steps in natural language, the second solution step is obtained based on the first solution step, and the first verification result is used to indicate that the first solution step is the correct answer to the first mathematical problem, the first verification result includes a verification result in natural language; wherein the second condition includes any one or more of the following: correctness, completeness.
[0038] This method can be executed by an electronic device or by a server.
[0039] In some embodiments, the first mathematical problem may also be referred to as the first mathematical problem of the formal language.
[0040] In some embodiments, the first problem-solving step may also be referred to as the first problem-solving step of the formal language.
[0041] In some embodiments, the second problem-solving step may also be referred to as the first problem-solving step in natural language processing.
[0042] In some embodiments, the first verification result may also be referred to as the first verification result in natural language.
[0043] This method can be applied to both problem-solving scenarios and to verifying problem-solving steps. By using this method, the correctness and completeness of the obtained first problem-solving steps can be verified, making the logic of the first problem-solving steps more rigorous and improving the accuracy of automatic solutions to mathematical problems.
[0044] In conjunction with the second aspect, in one possible implementation, the method further includes: if it is determined based on the first mathematical problem and the first solution step that the first solution step satisfies the second condition, then output the first solution step.
[0045] Optionally, the verification process can be re-verified based on the first solution step output. This allows users to verify the accuracy of the second solution step again based on the first solution step.
[0046] This allows for the simultaneous display of solution steps for both formal and natural languages, making it convenient for users to view and verify the solution steps.
[0047] In conjunction with the second aspect, in one possible implementation, correctness includes any one or more of the following: the first solution step satisfies the constraint of the first condition, and the mathematical theorem or mathematical formula used in the first solution step is correct; completeness includes any one or more of the following: the first solution step does not omit the constraint of the first condition, and the logical relationship of the first solution step is complete.
[0048] In conjunction with the second aspect, in one possible implementation, obtaining the first mathematical problem and the first solution step specifically includes: obtaining the second mathematical problem, which includes mathematical problems in natural language; determining the first mathematical problem based on the second mathematical problem; and determining the first solution step based on the first mathematical problem.
[0049] In some embodiments, the second mathematical problem may also be referred to as the first mathematical problem in natural language.
[0050] In this way, in problem-solving scenarios, based on the input of a second math problem, a second set of solution steps can be automatically provided, offering users a professional solution. Furthermore, the correctness and / or completeness of the first solution step can be automatically verified, improving the accuracy of the generated solution steps.
[0051] Optionally, in a problem-solving scenario, both the first and second solution steps can be output simultaneously. This allows users to verify the accuracy of the second solution step based on the first.
[0052] For example, reference can be made to the description in the embodiments of Figures 5A-5F and 6.
[0053] In conjunction with the second aspect, in one possible implementation, obtaining the first mathematical problem and the first solution step specifically includes: obtaining the second mathematical problem and the second solution step, wherein the second mathematical problem includes a mathematical problem in natural language; determining the first mathematical problem based on the second mathematical problem; and determining the first solution step based on the second solution step.
[0054] In some embodiments, the second problem-solving step may also be referred to as the first problem-solving step in natural language processing.
[0055] In this way, in the scenario of verifying solution steps, the second solution step provided by the user can be verified based on the second math problem and the second solution step, and the correctness and / or completeness of the second solution step can be verified. After confirming that the first solution step is the answer to the first math problem, the first verification result in natural language can be returned, allowing the user to confirm that the steps in the user's solution are correct.
[0056] Optionally, in the scenario of verifying the solution steps, the first solution step and the first verification result can be output simultaneously. This allows users to verify the second solution step based on the first solution step to ensure its accuracy.
[0057] For example, reference can be made to the description in the embodiments of Figures 7A-7C and Figure 8.
[0058] In conjunction with the second aspect, in one possible implementation, the method further includes: if it is determined based on the first mathematical problem and the first solution step that the first solution step does not satisfy the second condition, outputting a second verification result, the second verification result being used to indicate that the second solution step is not the correct answer to the second mathematical problem, the second verification result including verification results in natural language.
[0059] In some embodiments, the second verification result may also be referred to as the second verification result in natural language.
[0060] In one possible implementation, the second verification result includes the first step in the second problem-solving process where an error occurred, and the reason why the first step was wrong.
[0061] In this way, in the scenario of verifying the solution steps, the second solution steps of the user's solution can be verified based on the second math problem and the second solution steps. If the verification of the second solution steps does not meet the requirements of correctness and / or completeness, it means that the second solution steps are not the correct answer to the second math problem. The second verification result can be output so that the user can confirm that the steps of the user's solution are wrong, and the user can know the location of the error in the second solution steps and the reason for the error.
[0062] In conjunction with the second aspect, in one possible implementation, the method further includes: if it is determined based on the first mathematical problem and the first solution step that the first solution step does not satisfy the second condition, output a third verification result. The third verification result is also used to indicate that the first solution step is not the correct answer to the first mathematical problem. The third verification result includes the verification result of the formal language.
[0063] In some embodiments, the third verification result may also be referred to as the third verification result in natural language.
[0064] In this way, in the scenario of verifying the solution steps, if the verification of the second solution step does not meet the requirements of correctness and / or completeness, the verification results in both natural language and formal language can be output simultaneously, so that users can confirm that the steps in the user's solution are incorrect.
[0065] For example, reference can be made to the description in the embodiments of Figures 7D-7F and 8.
[0066] Thirdly, this application provides an electronic device, which includes a memory and a processor; wherein the memory and the processor are coupled, the memory is used to store a computer program, and when the processor executes and calls the computer program, the electronic device performs a mathematical problem processing method provided in any possible implementation of any of the above aspects.
[0067] Fourthly, this application provides a server, which includes a memory and a processor; wherein the memory and the processor are coupled, the memory is used to store a computer program, and when the processor executes the call to the computer program, the server executes a mathematical problem processing method provided in any possible implementation of the second aspect.
[0068] Fifthly, this application provides a computer-readable storage medium including instructions that, when executed on an electronic device, cause the electronic device to perform a mathematical problem-solving method provided in any possible implementation of any of the above aspects.
[0069] In a sixth aspect, this application provides a computer-readable storage medium including instructions that, when executed on a server, cause the server to perform a mathematical problem-solving method provided in any possible implementation of the second aspect.
[0070] In a seventh aspect, this application provides a chip system including one or more processors, which are used to invoke computer instructions to cause an electronic device to execute a mathematical problem processing method provided in any possible implementation of any of the above aspects.
[0071] Eighthly, this application provides a chip system including one or more processors, the processors being used to invoke computer instructions to cause a server to execute a mathematical problem processing method provided in any possible implementation of the second aspect.
[0072] Ninthly, this application provides a computer program product containing instructions that, when the computer program product is run on an electronic device, causes the electronic device to execute a mathematical problem-solving method provided in any possible implementation of any of the above aspects.
[0073] In a tenth aspect, this application provides a computer program product containing instructions that, when the computer program product is run on a server, cause the server to execute a mathematical problem-solving method provided in any possible implementation of the second aspect.
[0074] For a description of the beneficial effects in aspects three through ten, please refer to the description of the beneficial effects in aspect one; this application will not repeat them here. Attached Figure Description
[0075] Figure 1 shows a schematic diagram of an interactive system provided in this application;
[0076] Figure 2 shows a schematic diagram of the hardware structure of an electronic device 100;
[0077] Figure 3 is a hardware structure diagram of the server 200 provided in an embodiment of this application;
[0078] Figure 4 shows a schematic diagram of the interaction of functional modules in server 200;
[0079] Figures 5A-5F illustrate a mathematical problem-solving scenario;
[0080] Figure 6 shows a flowchart of a mathematical problem-solving scenario;
[0081] Figures 7A-7F illustrate a scenario for verifying problem-solving steps;
[0082] Figure 8 shows a flowchart of a method for verifying problem-solving steps;
[0083] Figure 9 shows a flowchart of a mathematical problem-solving method;
[0084] Figure 10 shows a flowchart of another mathematical problem-solving method. Detailed Implementation
[0085] The technical solutions in the embodiments of this application will be clearly and thoroughly described below with reference to the accompanying drawings. In the description of the embodiments of this application, unless otherwise stated, " / " means "or," for example, A / B can mean A or B; the word "and / or" in the text is limited to describing the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, and B existing alone. Furthermore, in the description of the embodiments of this application, "multiple" refers to two or more than two.
[0086] Hereinafter, the terms "first" and "second" are used for descriptive purposes only and should not be construed as implying or suggesting relative importance or implicitly indicating the number of indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of the embodiments of this application, unless otherwise stated, "multiple" means two or more.
[0087] The term "user interface (UI)" used in the following embodiments of this application refers to the medium interface through which an application or operating system interacts and exchanges information with a user. It realizes the conversion between the internal form of information and the form that the user can accept. The most common form of user interface is the graphical user interface (GUI), which refers to a user interface related to computer operation displayed in a graphical manner. It can be visual interface elements such as text, icons, buttons, menus, tabs, text boxes, dialog boxes, status bars, navigation bars, and widgets displayed on the screen of a wearable device.
[0088] First, the technical terms used in this application will be explained.
[0089] 1. Natural language.
[0090] Natural language is the language that is conventionally used in social practice to express everyday thinking. Natural language can also be described as the language and script people use in daily life. For example, natural languages can include, but are not limited to, English, Russian, French, German, Italian, and Spanish scripts, all of which are phonetic languages. The script of any natural language can be composed of phonetics, vocabulary, and grammar.
[0091] For example, natural language could be a user inputting the text "If it rains today, then I will bring an umbrella," where the predetermined semantics could be the condition "It rains today" and the conclusion "I will bring an umbrella." Natural language can be a language that humans can understand.
[0092] 2. Formal languages.
[0093] Formal languages are languages defined using precise mathematics and processable formulas. A formal language can be a collection of letters, numbers, symbols, etc., with certain logical relationships. Formal languages can be languages that machines can understand.
[0094] Natural language and formal language can be converted into each other.
[0095] For example, natural language could be "If it rains today, then I will bring an umbrella." The corresponding formal language could be "(p->q)". Here, "p" represents "if it rains today", "->" represents a causal relationship, and "q" represents "I will bring an umbrella".
[0096] 3. The correctness and completeness of the problem-solving steps.
[0097] The problem-solving steps can include proof steps and solution steps.
[0098] The proof step can refer to the first mathematical problem that provides the first condition and the first question to be solved. The first condition provides certain rules or standards, and the first question to be solved provides the result. The proof step is to derive the result corresponding to the first question to be solved based on the first condition within a specific axiomatic system.
[0099] For example, the first math problem could be: "Given that quadrilaterals ABCD and A1B1C1D1 are both squares, and A2, B2, C2, and D2 are the midpoints of AA1, BB1, CCC1, and DD1 respectively. Prove that quadrilateral A2B2C2D2 is a square." The first condition could be: "Given that quadrilaterals ABCD and A1B1C1D1 are both squares, and A2, B2, C2, and D2 are the midpoints of AA1, BB1, CCC1, and DD1 respectively." The first unsolved problem could be: "Prove that quadrilateral A2B2C2D2 is a square."
[0100] The solution steps can refer to the first mathematical problem that provides the first condition and the first question to be solved. The first condition provides certain rules or standards, and the first question to be solved does not provide a result but only a question. Based on the first condition, the correct result of the question corresponding to the first question to be solved needs to be derived.
[0101] For example, the first math problem could be "Xiaogang has 70 coins in his piggy bank, including 2-cent and 5-cent coins. Xiaogang counted them and found there were 194 coins in total. How many of each type of coin are there?" The first condition could be "Xiaogang has 70 coins in his piggy bank, including 2-cent and 5-cent coins. Xiaogang counted them and found there were 194 coins in total." The first question to be answered could be "How many of each type of coin are there?"
[0102] The correctness of a problem-solving step can include the correctness of the proof step or the correctness of the solution step. The correctness of a problem-solving step can refer to whether the solution steps are correct. For example, whether the solution steps satisfy the constraints of the first condition (the rules or standards in the first condition), or whether the mathematical theorems or formulas used in the solution steps are correct.
[0103] The completeness of a problem-solving process can include the completeness of the proof steps or the completeness of the solution steps. The completeness of a problem-solving process can refer to whether the steps are comprehensive. For example, whether the solution steps omit any constraints of the first condition (e.g., whether all rules or standards in the first condition are used), and whether the logical relationships within the solution steps are complete.
[0104] Figure 1 shows a schematic diagram of an interactive system provided in this application.
[0105] The following is an architecture diagram of a communication system 10 provided in an embodiment of this application.
[0106] As shown in Figure 1, the communication system 10 may include an electronic device 100 and a server 200. The electronic device 100 shown in Figure 1 is a mobile phone.
[0107] The electronic device 100 and the server 200 establish a communication connection, which can be, for example, a 2G / 3G / 4G / 5G communication connection, a wireless fidelity (Wi-Fi) network communication connection, etc. This application embodiment does not limit the method of the above-mentioned communication connection.
[0108] In some embodiments, electronic device 100 can acquire a first mathematical problem in natural language and then send it to server 200. Server 200 can obtain a first solution step in formal language based on the first mathematical problem in natural language using a first model. After acquiring the first solution step in formal language, server 200 can verify whether the first solution step in formal language satisfies a second condition based on the first mathematical problem in natural language and the first solution step in formal language. The second condition includes, but is not limited to, correctness and / or completeness. After confirming that the first solution step in formal language satisfies the second condition, server 200 can confirm that the first solution step in formal language is the correct answer to the first mathematical problem in formal language, and then obtain a first solution step in natural language based on the first solution step in formal language. Server 200 then sends the first solution step in natural language to electronic device 100, and electronic device 100 displays the first solution step in natural language. Through this method, server 200 can verify the accuracy of the solution steps obtained by server 200, thereby improving the accuracy of mathematical problem solving.
[0109] In some embodiments, the first problem-solving step of the formal language is the correct answer to the first mathematical problem of the formal language, or it can be referred to as the first problem-solving step of the formal language being the answer to the first mathematical problem of the formal language.
[0110] In some embodiments, the electronic device 100 can acquire a first mathematical problem and a first solution step in natural language, and then send the first mathematical problem and the first solution step in natural language to the server 200. After acquiring the first mathematical problem and the first solution step in natural language, the server 200 can obtain a first mathematical problem and a first solution step in formal language based on the first mathematical problem and the first solution step in natural language, and based on the first mathematical problem and the first solution step in formal language, confirm whether the first solution step in formal language satisfies a second condition, the second condition including but not limited to: correctness and / or completeness. If it is confirmed that the first solution step in formal language satisfies the second condition, the server 200 can confirm that the first solution step in formal language is the correct answer to the first mathematical problem in formal language, and the server 200 then returns a first verification result, which is used to indicate that the first solution step in natural language is the correct answer to the first mathematical problem in natural language. If it is confirmed that the first solution step in formal language does not satisfy the second condition, the server 200 then returns a second verification result, which is used to indicate that the first solution step in natural language is not the correct answer to the first mathematical problem in natural language. Using this method, the electronic device 100 can verify the accuracy of the first problem-solving step sent by the electronic device 100 through the server 200, thereby improving the accuracy of the problem-solving step verification.
[0111] Optionally, the first problem-solving step of natural language processing includes multiple steps, including the first step. The second verification result may include the first step in the first problem-solving step of natural language processing that does not meet the second condition, and the reason why the first step does not meet the second condition.
[0112] In some embodiments, the above steps may also be performed by electronic device 100 without the need for server 200.
[0113] Figure 2 shows a schematic diagram of the hardware structure of an electronic device 100.
[0114] Electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, antenna 1, antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, a sensor module 180, a display screen 194, a subscriber identification module (SIM) card interface 195, etc. The sensor module 180 may include one or more sensors, such as a gyroscope sensor 180B, a magnetic sensor 180D, an accelerometer sensor 180E, a proximity sensor 180F, a touch sensor 180K, etc. In some embodiments, the sensor module 180 may also include one or more of the following sensors: a pressure sensor, a barometric pressure sensor, a proximity sensor, a fingerprint sensor, a temperature sensor, an ambient light sensor, a bone conduction sensor, etc.
[0115] It is understood that the structures illustrated in the embodiments of this application do not constitute a specific limitation on the electronic device 100. In other embodiments of this application, the electronic device 100 may include more or fewer components than illustrated, or combine some components, or split some components, or have different component arrangements. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
[0116] Processor 110 may include one or more processing units, such as application processor (AP), modem processor, graphics processing unit (GPU), image signal processor (ISP), controller, video codec, digital signal processor (DSP), baseband processor, and / or neural network processing unit (NPU). These different processing units may be independent devices or integrated into one or more processors.
[0117] The controller can generate operation control signals based on the instruction opcode and timing signals to complete the control of instruction fetching and execution.
[0118] The processor 110 may also include a memory for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. This memory can store instructions or data that the processor 110 has just used or that are used repeatedly. If the processor 110 needs to use the instruction or data again, it can directly retrieve it from the memory. This avoids repeated accesses, reduces the waiting time of the processor 110, and thus improves the efficiency of the system. In some embodiments, the processor 110 may include one or more interfaces, such as a universal serial bus (USB) interface.
[0119] USB port 130 is a USB standard compliant interface, specifically a Mini USB port, Micro USB port, or USB Type-C port. USB port 130 can be used to connect a charger to charge electronic device 100, and can also be used for data transfer between electronic device 100 and peripheral devices. It can also be used to connect headphones for audio playback. This interface can also be used to connect other electronic devices, such as AR devices.
[0120] The charging management module 140 receives charging input from a charger. The charger can be a wireless charger or a wired charger. In some wired charging embodiments, the charging management module 140 receives charging input from the wired charger via the USB interface 130. In some wireless charging embodiments, the charging management module 140 receives wireless charging input via the wireless charging coil of the electronic device 100. While charging the battery 142, the charging management module 140 can also supply power to the electronic device via the power management module 141.
[0121] The power management module 141 connects the battery 142, the charging management module 140, and the processor 110. The power management module 141 receives input from the battery 142 and / or the charging management module 140, providing power to the processor 110, internal memory 121, display screen 194, and wireless communication module 160, etc. The power management module 141 can also monitor parameters such as battery capacity, battery cycle count, and battery health status (leakage current, impedance). In some other embodiments, the power management module 141 may also be located within the processor 110. In other embodiments, the power management module 141 and the charging management module 140 may be located in the same device.
[0122] The wireless communication function of electronic device 100 can be realized through antenna 1, antenna 2, mobile communication module 150, wireless communication module 160, modem processor and baseband processor, etc.
[0123] Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in electronic device 100 can be used to cover one or more communication frequency bands. Different antennas can also be multiplexed to improve antenna utilization. For example, antenna 1 can be multiplexed as a diversity antenna for a wireless local area network. In some other embodiments, the antennas can be used in conjunction with tuning switches.
[0124] The mobile communication module 150 can provide solutions for wireless communication, including 2G / 3G / 4G / 5G, applied to the electronic device 100. The mobile communication module 150 may include at least one filter, switch, power amplifier, low noise amplifier (LNA), etc. The mobile communication module 150 can receive electromagnetic waves via antenna 1, and perform filtering, amplification, and other processing on the received electromagnetic waves before transmitting them to a modem processor for demodulation. The mobile communication module 150 can also amplify the signal modulated by the modem processor and convert it into electromagnetic waves for radiation via antenna 1. In some embodiments, at least some functional modules of the mobile communication module 150 may be housed in the processor 110. In some embodiments, at least some functional modules of the mobile communication module 150 and at least some modules of the processor 110 may be housed in the same device.
[0125] The wireless communication module 160 can provide solutions for wireless communication applications on the electronic device 100, including wireless local area networks (WLANs) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), and infrared (IR) technologies. The wireless communication module 160 can be one or more devices integrating at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via antenna 2, demodulates and filters the electromagnetic wave signals, and sends the processed signal to processor 110. The wireless communication module 160 can also receive signals to be transmitted from processor 110, frequency modulate and amplify them, and then convert them into electromagnetic waves for radiation via antenna 2.
[0126] In some embodiments, antenna 1 of electronic device 100 is coupled to mobile communication module 150, and antenna 2 is coupled to wireless communication module 160, enabling electronic device 100 to communicate with networks and other devices via wireless communication technology. The wireless communication technology may include Global System for Mobile Communications (GSM), General Packet Radio Service (GPRS), Code Division Multiple Access (CDMA), Wideband Code Division Multiple Access (WCDMA), Time-Division Code Division Multiple Access (TD-SCDMA), Long Term Evolution (LTE), BT, GNSS, WLAN, NFC, FM, and / or IR technologies, etc. The GNSS may include the Global Positioning System (GPS), the Global Navigation Satellite System (GLONASS), the BeiDou Navigation Satellite System (BDS), the Quasi-Zenith Satellite System (QZSS), and / or satellite-based augmentation systems (SBAS).
[0127] Electronic device 100 implements display functions through a GPU, a display screen 194, and an application processor. The GPU is a microprocessor for image processing, connected to the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations and for graphics rendering. Processor 110 may include one or more GPUs, which execute program instructions to generate or modify display information.
[0128] Display screen 194 is used to display images, videos, etc. Display screen 194 includes a display panel. The display panel may be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), a miniature LED, a microLED, a quantum dot light-emitting diode (QLED), etc. In some embodiments, electronic device 100 may include one or N displays 194, where N is a positive integer greater than 1.
[0129] Internal memory 121 may include one or more random access memory (RAM) and one or more non-volatile memory (NVM).
[0130] The random access memory can be directly read and written by the processor 110. It can be used to store executable programs (such as machine instructions) of the operating system or other running programs, as well as user and application data.
[0131] Non-volatile memory can also store executable programs and user and application data, and can be pre-loaded into random access memory for direct reading and writing by the processor 110.
[0132] The external memory interface 120 can be used to connect to external non-volatile memory, thereby expanding the storage capacity of the electronic device 100. The external non-volatile memory communicates with the processor 110 through the external memory interface 120 to perform data storage functions. For example, music, video, and other files can be stored in the external non-volatile memory.
[0133] Electronic device 100 can implement audio functions, such as making calls and recording, through audio module 170, speaker 170A, receiver 170B, microphone 170C, and application processor.
[0134] The audio module 170 is used to convert digital audio information into analog audio signals for output, and also to convert analog audio input into digital audio signals. The audio module 170 can also be used for encoding and decoding audio signals. In some embodiments, the audio module 170 may be located in the processor 110, or some functional modules of the audio module 170 may be located in the processor 110.
[0135] The speaker 170A, also known as a "loudspeaker," is used to convert audio electrical signals into sound signals. The electronic device 100 can listen to music or make hands-free calls through the speaker 170A.
[0136] The receiver 170B, also known as the "earpiece," is used to convert audio electrical signals into sound signals. When the electronic device 100 answers a telephone call or voice message, the receiver 170B can be brought close to the ear to listen to the voice.
[0137] Microphone 170C, also known as a "microphone" or "voice transducer," is used to convert sound signals into electrical signals. When making a phone call or sending a voice message, the user can speak by bringing their mouth close to microphone 170C, inputting the sound signal into microphone 170C. Electronic device 100 may have at least one microphone 170C. In some embodiments, electronic device 100 may have two microphones 170C, which, in addition to collecting sound signals, can also perform noise reduction. In other embodiments, electronic device 100 may also have three, four, or more microphones 170C, which can collect sound signals, reduce noise, identify the sound source, and perform directional recording, etc.
[0138] The gyroscope sensor 180B can be used to determine the motion attitude of the electronic device 100. In some embodiments, the gyroscope sensor 180B can determine the angular velocity of the electronic device 100 about three axes (i.e., the x, y, and z axes). The gyroscope sensor 180B can be used for image stabilization. For example, when the shutter is pressed, the gyroscope sensor 180B detects the angle of the shake of the electronic device 100, calculates the distance that the lens module needs to compensate based on the angle, and allows the lens to counteract the shake of the electronic device 100 by moving in the opposite direction, thus achieving image stabilization. The gyroscope sensor 180B can also be used in navigation and motion-sensing game scenarios.
[0139] The magnetic sensor 180D includes a Hall sensor. The electronic device 100 can use the magnetic sensor 180D to detect the opening and closing of the flip cover.
[0140] The 180E accelerometer can detect the magnitude of acceleration of electronic device 100 in various directions (typically three axes). When electronic device 100 is stationary, it can detect the magnitude and direction of gravity. It can also be used to identify the posture of electronic devices and applied to applications such as screen orientation switching and pedometers.
[0141] A distance sensor 180F is used to measure distance. Electronic device 100 can measure distance via infrared or laser. In some embodiments, during a shooting scene, electronic device 100 can utilize the distance sensor 180F to measure distance for rapid focusing.
[0142] Touch sensor 180K, also known as a "touch device," can be located on display screen 194. The touch sensor 180K and display screen 194 together form a touchscreen, also known as a "touchscreen." Touch sensor 180K detects touch operations applied to or near it. The touch sensor can transmit the detected touch operation to the application processor to determine the type of touch event. Visual output related to the touch operation can be provided through display screen 194. In other embodiments, touch sensor 180K may also be located on the surface of electronic device 100, in a different position than display screen 194.
[0143] In some embodiments, the electronic device 100 may further include one or more of buttons, a motor, and an indicator. Buttons may include a power button, volume buttons, etc. Buttons may be mechanical buttons or touch buttons. The electronic device 100 can receive button input and generate key signal inputs related to user settings and function control of the electronic device 100. The motor may generate vibration cues. The indicator may be an indicator light, which can be used to indicate charging status, battery level changes, and can also be used to indicate messages, missed calls, notifications, etc.
[0144] The SIM card interface 195 is used to connect the SIM card.
[0145] Figure 3 is a hardware structure diagram of the server 200 provided in an embodiment of this application.
[0146] As shown in Figure 3, server 200 may include: one or more processors 301, memory 302, communication interface 303, transmitter 305, receiver 306, coupler 307, and antenna 308. These components can be connected via bus 204 or other means; Figure 3 illustrates a connection via bus.
[0147] The communication interface 303 can be used by the server 200 to communicate with other communication devices, such as electronic devices 100. Specifically, the communication interface 303 can be a 3G communication interface, a Long Term Evolution (LTE) (4G) communication interface, a 5G communication interface, a WLAN communication interface, a WAN communication interface, etc. Not limited to wireless communication interfaces, the server 200 can also be configured with a wired communication interface 303 to support wired communication; for example, the backhaul link between the server 200 and other servers can be a wired communication connection.
[0148] In some embodiments, the server 200 may receive a first mathematical problem in natural language, or a first mathematical problem in natural language and a first solution step in natural language, sent by the electronic device 100 via the communication interface 303.
[0149] In some embodiments, the server 200 may also send the first solution steps of the formal language, or the verification results of the natural language and the formal language to the electronic device 100 through the communication interface 303.
[0150] In some embodiments of this application, transmitter 305 and receiver 306 can be considered as a wireless modem. Transmitter 305 can be used to transmit signals output by processor 301. Receiver 306 can be used to receive signals. In server 200, the number of transmitters 305 and receivers 306 can be one or more. Antenna 308 can be used to convert electromagnetic energy in a transmission line into electromagnetic waves in free space, or to convert electromagnetic waves in free space into electromagnetic energy in a transmission line. Coupler 307 can be used to split mobile communication signals into multiple paths and distribute them to multiple receivers 306. Understandably, antenna 308 of server 200 can be implemented as a large-scale antenna array.
[0151] The memory 302 is coupled to the processor 301 and is used to store various software programs and / or multiple sets of instructions. Specifically, the memory 302 may include high-speed random access memory and may also include non-volatile memory, such as one or more disk storage devices, flash memory devices, or other non-volatile solid-state storage devices.
[0152] The memory 302 can store an operating system (hereinafter referred to as the system), such as uCOS, VxWorks, RTLinux and other embedded operating systems.
[0153] In this embodiment of the application, the processor 301 can be used to read and execute computer-readable instructions.
[0154] In some embodiments, server 200 can obtain a first mathematical problem in formal language based on a first mathematical problem in natural language by processor 301.
[0155] In some embodiments, server 200 can obtain a first solution step of the formal language based on a first mathematical problem of the formal language by processor 301.
[0156] In some embodiments, server 200 may verify, via processor 301, whether the first problem-solving step of the formal language satisfies the second condition.
[0157] In some embodiments, server 200 can obtain first solution steps for natural language based on first solution steps of formal language by processor 30.
[0158] In some embodiments, server 200 can obtain natural language verification results based on formal language verification results from processor 30.
[0159] Figure 4 shows a schematic diagram of the interaction between functional modules in a server 200.
[0160] As shown in Figure 4, the server 200 includes a communication module, a language conversion module, a solution module, and a verification module.
[0161] The communication module is used for communication between the server 200 and the electronic device 100.
[0162] The language conversion module is used by the server 200 to convert the first mathematical problem in natural language sent by the electronic device 100 into the first mathematical problem in formal language that the server 200 can understand, or to convert the mathematical problem in natural language and the first solution steps in natural language sent by the electronic device 100 into the first mathematical problem in formal language and the first solution steps in formal language that the server 200 can understand.
[0163] The solution module is used by server 200 to obtain the first solution steps in the formal language based on the first mathematical problem of the first model.
[0164] The verification module is used by server 200 to verify whether the first solution step of the formal language satisfies a second condition, which includes, but is not limited to, correctness and / or completeness. The first solution step of the formal language can be sent from electronic device 100 to server 200, or it can be obtained by server 200 based on a first mathematical problem of the formal language using a first model.
[0165] The communication module is also used to, after confirming that the first solution step of the formal language satisfies the second condition, obtain the first solution step of the natural language based on the first solution step of the formal language, and then send the first solution step of the natural language to the electronic device 100, or send the first verification result to the electronic device 100. The first verification result is used to indicate that the first solution step of the natural language is the correct answer to the first mathematical problem in the natural language.
[0166] The communication module is also used to send a second verification result to the electronic device 100 after confirming that the first solution step of the formal language does not meet the second condition. The second verification result is used to indicate that the first solution step of the natural language is not the correct answer to the first mathematical problem.
[0167] Optionally, the first problem-solving step of natural language processing includes multiple steps, including the first step. The second verification result may include the first step in the first problem-solving step of natural language processing that does not meet the second condition, and the reason why the first step does not meet the second condition.
[0168] This application can be applied to two scenarios: problem-solving and verifying problem-solving steps. The following section will introduce the mathematical problem-solving methods provided in this application, using these two scenarios as examples.
[0169] I. Mathematical problem-solving scenarios.
[0170] Mathematical problem-solving scenarios can include solution-finding scenarios and proof-finding scenarios. Proof-finding scenarios are similar to solution-finding scenarios; this application's embodiments use proof-finding scenarios as an example for illustration.
[0171] Figures 5A-5F illustrate a mathematical problem-solving scenario.
[0172] For example, an electronic device 100 has a voice assistant application installed. The voice assistant application can output the first solution steps for the first math problem based on the first math problem input by the user.
[0173] For example, as shown in Figure 5A, a user can wake up the voice assistant application in the electronic device 100 using voice. For instance, a user can output the voice "Xiaoyi, Xiaoyi," and in response, the electronic device 100 can recognize the voice and wake up the voice assistant application. Then, the electronic device 100 can display window 5001 as shown in Figure 5B. Window 5001 can be the window displayed by the voice assistant application. Window 5001 includes a hidden control 5002. The electronic device 100 can receive and respond to user input on the hidden control 5002 and stop displaying window 5001. Window 5001 also includes multiple controls, such as controls 5007, 5008, and 5009. The electronic device 100 can receive and respond to user input on control 5007, displaying keyboard options, allowing the user to input text, symbols, etc., within window 5001. The electronic device 100 can also receive and respond to user input on control 5008, allowing the user to input an image within window 5001. Electronic device 100 can receive and respond to user input operations on control 5009, and call the camera of electronic device 100 to scan images and obtain image information, which may include text and other information.
[0174] For example, as shown in Figure 5C, the electronic device 100 can receive a mathematical problem 5003 and text 5004 input by the user in window 5001. The mathematical problem 5003 may include "Given the function f(x+3)=3x2+7x+4, and f(x)=ax2+bx+c. Prove that a+b+c=2". The text 5004 may include "Give the proof steps". The text 5004 is used to instruct the voice assistant application to give the proof steps for the mathematical problem 5003.
[0175] Optionally, the user may not need to input the text 5004, and the electronic device 100 can automatically provide the proof steps of the mathematical problem 5003 based on the mathematical problem 5003.
[0176] As shown in Figure 5D, in response to the user's input of a mathematical problem 5003, the voice assistant application can obtain the proof steps 5005 of the mathematical problem 5003 based on the mathematical problem 5003, and display the proof steps 5005 in the window 5001.
[0177] Optionally, proof step 5005 can be a proof step that satisfies the second condition.
[0178] For example, as shown in FIG5D, the electronic device 100 can receive user operations on window 5001 to expand the size of window 5001 so that the electronic device 100 can display the entire content of proof step 5005 within window 5001.
[0179] As shown in Figure 5E, the electronic device 100 can display window 5001 in full screen, and window 5001 displays all the content of proof step 5005.
[0180] Optionally, proof step 5005 can be a proof step in natural language, that is, a proof step that users can understand.
[0181] In some embodiments, as shown in FIG5E, the electronic device 100 can obtain proof step 5005, obtain proof step of formal language, i.e. proof step 5006, and display proof step 5006 in window 5001.
[0182] Optionally, proof step 5006 can be obtained by server 200 based on proof step 5005.
[0183] As shown in Figures 5E and 5F, the electronic device 100 can receive user actions within window 5001, such as an upward swipe operation. In response to this user operation, the electronic device 100 can display the user interface shown in Figure 5F. As shown in Figure 5F, the electronic device 100 displays a portion of proof step 5005 and a partial portion of proof step 5006 within window 5001. Thus, the electronic device 100 can simultaneously display proof steps in both natural language and formal language.
[0184] Optionally, the electronic device 100 may also limit the display of proof step 5005 to window 5001, without displaying proof step 5006.
[0185] Figure 6 shows a schematic diagram of a mathematical problem-solving scenario.
[0186] As shown in Figure 6, this method is applied to a system including an electronic device 100 and a server 200, which have established a communication connection.
[0187] The method shown in Figure 6 includes, but is not limited to, the following steps:
[0188] S601, electronic device 100 and server 200 establish a communication connection.
[0189] The communication connection can be, for example, a 2G / 3G / 4G / 5G communication connection, a wireless fidelity (Wi-Fi) network communication connection, etc. This application does not limit the type of communication connection described above.
[0190] S602, Electronic device 100 receives the first mathematical problem in natural language input by the user.
[0191] For example, the first mathematical problem in natural language can be mathematical problem 5003 as shown in Figure 5C.
[0192] Optionally, the electronic device 100 can also receive user-input images, identify mathematical problems in natural language within the images, and obtain the first mathematical problem in natural language, eliminating the need for the user to manually input the first mathematical problem in natural language and saving user time.
[0193] Optionally, the electronic device 100 can also receive a user's copy operation and temporarily store the first mathematical problem in natural language in the clipboard. Then, the electronic device 100 receives a user's paste operation and displays the first mathematical problem in natural language temporarily stored in the clipboard in window 5001. In this way, the user does not need to manually enter the first mathematical problem in natural language, saving user operations.
[0194] S603, Electronic device 100 sends the first mathematical problem in natural language to server 200.
[0195] After obtaining the first mathematical problem in natural language, the electronic device 100 can send the first mathematical problem in natural language to the server 200.
[0196] Optionally, server 200 can be a server for a voice assistant application. Electronic device 100 can send a first mathematical problem in natural language to server 200 via the voice assistant application.
[0197] S604, Server 200, based on the first mathematical problem of natural language, obtains the first mathematical problem of formal language.
[0198] After obtaining the first mathematical problem in natural language, server 200 can convert the first mathematical problem in natural language into a first mathematical problem in formal language that server 200 can understand, so that server 200 can obtain the first solution steps in formal language based on the first mathematical problem in formal language.
[0199] S605, Server 200, based on the first mathematical problem of formal language, obtains the first solution steps of formal language.
[0200] Optionally, server 200 can obtain the first solution steps of the formal language based on the first mathematical problem in the formal language using the first model.
[0201] Optionally, if server 200 can obtain the first solution steps in formal language based on the first mathematical problem in natural language through the first model, server 200 may choose not to execute S604.
[0202] Optionally, server 200 can also obtain the first problem-solving steps in natural language based on the first mathematical problem in natural language through the first model.
[0203] The first step in solving a problem using a formal language can include either the first proof step or the first solution step.
[0204] The first math problem consists of a first condition and a first unsolved problem. The first condition is used to obtain the first solution steps for the first unsolved problem.
[0205] In some embodiments, the first condition provides certain rules or standards, the first problem to be solved provides a result, and the first solution step can be a first proof step in a specific axiomatic system, which derives the result corresponding to the first problem to be solved based on the first condition.
[0206] In some embodiments, the first condition provides certain rules or standards, the first question to be answered does not provide a result but only a question, and the first solution step can be the first solution step that derives the result of the question corresponding to the first question to be answered based on the first condition.
[0207] Optionally, server 200 has a pre-built first model. Server 200 can use the first model to derive the first solution steps in the formal language based on the first mathematical problem. For example, server 200 can input the first condition and the first problem to be solved into the first model, and the first model can output the first solution steps in the formal language. In some embodiments, the first model can also directly output the first solution steps in natural language.
[0208] S606, Server 200 confirms whether the first step of solving the problem in the formal language satisfies the second condition.
[0209] The optional second condition may include, but is not limited to: correctness and / or completeness.
[0210] The correctness of the first solution step can include the correctness of the first proof step or the correctness of the first solution step. The correctness of the first solution step can refer to whether the first solution step is correct. For example, the first solution step satisfies the constraints of the first condition, or the mathematical theorem or formula used in the first solution step is correct.
[0211] The first solution step satisfies the first condition, which can mean that the first solution step does not use any rules or standards not specified in the first condition.
[0212] For example, if the first condition in the first math problem specifies that the real number a is greater than or equal to 0 and less than or equal to 1, and the first solution step uses the case where a is less than 0, then the first solution step uses a rule or standard not specified in the first condition, and the first solution step does not satisfy the limitation of the first condition.
[0213] The first step in solving the problem uses the correct mathematical theorem or formula, which can mean that the first step in solving the problem does not use the wrong mathematical theorem or formula.
[0214] For example, the Pythagorean theorem was used in the first solution step, but the expression for the Pythagorean theorem used in the first solution step is "a 2 +b 2 =c", the correct expression for the Pythagorean theorem is "a". 2 +b 2 =c 2 If the first step in solving the problem is incorrect, then the mathematical theorem or formula used is wrong.
[0215] The completeness of the first solution step can include the completeness of the first proof step or the completeness of the first solution step. The completeness of the first solution step can refer to whether it is comprehensive. For example, whether the first solution step omits the first condition, or whether the logical relationships within the first solution step are complete.
[0216] The first step in solving the problem does not omit the limitation of the first condition, which can refer to whether all the rules or standards in the first condition are used.
[0217] For example, if the first condition in the first math problem specifies that the real number a is greater than or equal to 0 and less than or equal to 1, the second step of the first solution only discusses the case where a is greater than 0 and less than 1, omitting the cases where a equals 0 and a is equal to 1. The first step is the step in the first solution that does not satisfy the second condition, and the error is due to "omitting the cases where a equals 0 and a is equal to 1".
[0218] The completeness of the logical relationship in the first problem-solving step can refer to whether there is a logical relationship between two adjacent steps in the first problem-solving step. Alternatively, it can refer to whether there is a logical relationship between the first m steps and the last n steps in the first problem-solving step, where m and n are both positive integers greater than or equal to 1. Logical relationships can include, but are not limited to: causal relationships, parallel relationships, general-to-specific relationships, and progressive relationships. The completeness of the logical relationship in the first problem-solving step can also refer to the absence of any missing steps in the first problem-solving step.
[0219] For example, if the second step in the first problem-solving process proves that 'a' equals 3, and the next step adjacent to the second step, for instance, references 'a' in the first step but the value of 'a' is 2, then the logical relationship between the second and first steps is invalid. The first step is the step in the first problem-solving process that does not satisfy the second condition, and the error reason is "the value of 'a' is incorrect".
[0220] Server 200 can determine whether the first solution step of the formal language satisfies the second condition based on the first mathematical problem in the formal language.
[0221] Optionally, after obtaining the first solution step of the formal language, the server 200 can sequentially traverse all steps in the first solution step of the formal language, starting from the first step, to confirm whether each step in the first solution step of the formal language satisfies the second condition. If a step does not satisfy the second condition, the server 200 can output the steps in the first solution step of the formal language that do not satisfy the second condition and the reason for not satisfying the second condition.
[0222] Optionally, the first problem-solving step of the formal language satisfies the second condition, which can mean that all steps in the first problem-solving step of the formal language satisfy the second condition.
[0223] If the first step of solving the problem in the formal language satisfies the second condition, server 200 can execute S607-S609.
[0224] If the first solution step of the formal language does not meet the second condition, the server 200 can execute S604 again to obtain the first solution step of the formal language based on the first solution step of the natural language, and then confirm whether the newly obtained first solution step of the formal language meets the second condition.
[0225] Optionally, the electronic device 100 may also confirm whether the first solution step of the natural language satisfies the second condition based on the first mathematical problem in the natural language.
[0226] S607 and Server 200, based on the first problem-solving steps of formal language, obtain the first problem-solving steps of natural language.
[0227] Optionally, if server 200 can obtain the first solution steps of natural language based on the first mathematical problem through the first model, server 200 may not execute S607.
[0228] S608, server 200 sends the first solution steps of natural language and the first solution steps of formal language to electronic device 100.
[0229] S609, Electronic device 100 displays the first problem-solving steps of natural language and the first problem-solving steps of formal language.
[0230] After confirming that the first solution step of the formal language satisfies the second condition, the server 200 can obtain the first solution step of the natural language based on the first solution step of the formal language.
[0231] Server 200 can send the first solution steps for the natural language and the first solution steps for the formal language to electronic device 100. Electronic device 100 displays the first solution steps for the natural language and the first solution steps for the formal language.
[0232] For example, the first problem-solving step in natural language can be proof step 5005 as shown in Figure 5E, and the first problem-solving step in formal language can be proof step 5006 as shown in Figure 5E. The electronic device 100 can display window 5001 as shown in Figure 5E, which displays proof step 5005 and proof step 5006.
[0233] In some embodiments, server 200 may also be limited to sending the first solution steps in natural language to electronic device 100, without sending the first solution steps in formal language. Electronic device 100 may also only display the first solution steps in natural language.
[0234] Optionally, and not limited to, converting the first mathematical problem in natural language into the first mathematical problem in formal language, the server 200 can also directly obtain the first solution steps in natural language based on the first mathematical problem in natural language through the first model.
[0235] Using the method shown in the embodiment of Figure 6, the electronic device 100 can automatically provide the first solution steps in natural language based on the first mathematical problem input by the user via the server 200, providing a professional solution for the user. Furthermore, the server 200 can automatically verify the correctness and / or completeness of the first solution steps in formal language, improving the accuracy of the solution steps generated by the server 200.
[0236] It should be noted that the method steps shown in the embodiment of Figure 6 are limited to explaining this application, and the execution order of each step in the embodiment of Figure 6 does not constitute a limitation.
[0237] It should be noted that in the embodiment of Figure 6, the electronic device 100 can perform all the steps in the embodiment of Figure 6 without the participation of the server 200.
[0238] II. Verification of problem-solving steps in specific scenarios.
[0239] Verifying the solution steps can include scenarios for verifying the solution steps and scenarios for verifying the proof steps. Since scenarios for verifying the solution steps and scenarios for verifying the proof steps are similar, this embodiment of the application will use the scenario for verifying the proof steps as an example for illustration.
[0240] Figures 7A-7F illustrate a scenario for verifying problem-solving steps.
[0241] For example, an electronic device 100 has a voice assistant application installed. The voice assistant application can verify whether the first solution step is the correct answer to the first math problem based on the first math problem input by the user and the first solution step.
[0242] Referring to the description in the embodiment of FIG5A, the electronic device 100 can wake up the voice assistant application in the electronic device 100 by voice and display the window 5001 shown in FIG7A.
[0243] As shown in Figure 7A, the electronic device 100 can receive text 6001, which includes a mathematical problem and proof steps, and text 6002, which are input by the user in window 5001. The text 6002 includes "Please verify whether the proof process is correct". The text 6002 is used to instruct the voice assistant application to verify whether the proof steps in the text 6001 are the correct answer to the mathematical problem in the text 6001.
[0244] In response to a user's input of a math problem and proof steps, the voice assistant application can verify whether the proof steps are the correct answer to the math problem.
[0245] If the proof step is verified to satisfy the second condition, that is, to confirm that the proof step is the correct answer to the mathematical problem, the server 200 can return a first verification result to the electronic device 100. The first verification result is used to indicate that the proof step is the correct answer to the mathematical problem.
[0246] As shown in Figure 7B, in response to the first verification result sent by the server 200, the electronic device 100 can display the text 6003 shown in Figure 7B. The text 6003 is used to indicate that the proof steps in the text 6001 are the correct answer to the mathematical problem in the text 6001.
[0247] The first verification result can be a natural language verification result.
[0248] Optionally, server 200 may also return a fourth verification result to electronic device 100, which may be a verification result of a formal language. The fourth verification result is also used to indicate that the proof steps in text 6001 are the correct answer to the mathematical problem in text 6001.
[0249] Optionally, the fourth verification result can also be the proof step in the formal language corresponding to the proof step in the natural language in text 6001.
[0250] As shown in Figure 7B, the electronic device 100 can receive user input operations on window 5001, such as an upward swipe operation. In response to this input operation, the electronic device 100 can display window 5001 as shown in Figure 7C. As shown in Figure 7C, window 5001 also shows proof step 5006, which is used to indicate the fourth verification result. Proof step 5006 is also used to indicate that the proof step in text 6001 is the correct answer to the mathematical problem in text 6001. Proof step 5006 shown in Figure 7C is the formal language proof step corresponding to the natural language proof step in text 6001.
[0251] In other embodiments, window 5001 may not display proof step 5006, but instead display the formal language corresponding to the natural language text 6003.
[0252] In some embodiments, if the proof step is verified to not meet the second condition, i.e., it is confirmed that the proof step is not the correct answer to the mathematical problem, the server 200 may return a second verification result to the electronic device 100. The second verification result is used to indicate that the proof step in the text 6001 is not the correct answer to the mathematical problem in the text 6001.
[0253] As shown in Figure 7D, the electronic device 100 can receive text 6004, which includes a mathematical problem and proof steps, and text 6005, which are input by the user in window 5001. Text 6005 includes "Please verify whether the proof process is correct". Text 6005 is used to instruct the voice assistant application to verify whether the proof steps in text 6004 are the correct answer to the mathematical problem in text 6004.
[0254] In response to a user's input of a math problem and proof steps, the voice assistant application can verify whether the proof steps are the correct answer to the math problem.
[0255] If the proof step does not meet the second condition, i.e., it is confirmed that the proof step is not the correct answer to the mathematical problem, the server 200 can return a third verification result to the electronic device 100. The third verification result is used to indicate that the proof step is not the correct answer to the mathematical problem.
[0256] As shown in Figure 7E, in response to the third verification result sent by the server 200, the electronic device 100 can display the text 6006 shown in Figure 7E. The text 6006 is used to indicate that the proof steps in the text 6004 are not the correct answer to the mathematical problem in the text 6004.
[0257] The third verification result can be a natural language verification result.
[0258] Optionally, text 6006 also provides the location and cause of errors in the proof steps of text 6001.
[0259] Optionally, server 200 may also return a fourth verification result to electronic device 100. The fourth verification result may be a verification result in a formal language. The fourth verification result is also used to indicate that the proof steps in text 6004 are not the correct answer to the mathematical problem in text 6004.
[0260] As shown in Figures 7D and 7E, the electronic device 100 can receive user actions within window 5001, such as an upward swipe operation. In response to this user operation, the electronic device 100 can display the user interface shown in Figure 7F. As shown in Figure 7F, the electronic device 100 also displays information 6007 within window 5001. Information 6007 is used to indicate the fourth verification result, and also to indicate that the proof steps in text 6004 are not the correct answer to the mathematical problem in text 6004.
[0261] Optionally, information 6007 also provides the location and cause of errors in the proof steps of text 6001.
[0262] Figure 8 shows a flowchart of a method for verifying problem-solving steps.
[0263] As shown in Figure 8, this method is applied to a system including an electronic device 100 and a server 200, which have established a communication connection.
[0264] The method shown in Figure 8 includes, but is not limited to, the following steps:
[0265] S801, electronic device 100 and server 200 establish a communication connection.
[0266] For an introduction to S801, please refer to the description in S601; this application will not repeat it here.
[0267] S802, Electronic device 100 receives the first mathematical problem and the first solution steps in natural language input by the user.
[0268] For example, the first mathematical problem and the first solution steps in natural language can be the mathematical problem and solution steps in text 6001 shown in Figure 7A.
[0269] For example, the first mathematical problem and the first solution steps in natural language can be the mathematical problem and solution steps in text 6004 shown in Figure 7D.
[0270] The first problem-solving step can include either a first proof step or a first solution step. The first problem-solving step in natural language processing can include either a first proof step or a first solution step.
[0271] S803, electronic device 100 sends the first mathematical problem in natural language and the first solution steps in natural language to server 200.
[0272] S804 and Server 200, based on the first mathematical problem and the first solution steps of natural language, obtain the first mathematical problem and the first solution steps of formal language.
[0273] The first step in solving a problem using a formal language can include either the first proof step or the first solution step.
[0274] After obtaining the first mathematical problem and the first solution steps in natural language, the electronic device 100 sends the first mathematical problem and the first solution steps in natural language to the server 200.
[0275] After obtaining the first mathematical problem and the first solution steps in natural language, server 200 can convert the first mathematical problem in natural language into a first mathematical problem in formal language that server 200 can understand, and convert the first solution steps in natural language into the first solution steps in formal language.
[0276] S805, Server 200 confirms whether the first step of solving the problem in the formal language satisfies the second condition.
[0277] The optional second condition may include, but is not limited to: correctness and / or completeness.
[0278] For how electronic device 100 can determine whether the first solution step of the formal language satisfies the second condition, please refer to the description in S606, which will not be repeated here.
[0279] If the first step of solving the problem in the formal language satisfies the second condition, execute S806-S808.
[0280] If the first step of the problem-solving process in the confirmed formal language does not satisfy the second condition, execute S809-S811.
[0281] S806, Server 200 outputs the first verification result in natural language.
[0282] S807, Server 200 sends the first verification result of the natural language to Electronic Device 100.
[0283] S808, Electronic device 100 displays the first verification result of natural language, which is used to indicate that the first problem-solving step of natural language is the correct answer to the first mathematical problem of natural language.
[0284] If the first step of solving the problem in the formal language satisfies the second condition, the server 200 can output the first verification result in the natural language and send it to the electronic device 100. The electronic device 100 displays the first verification result in the natural language, which indicates that the first step of solving the problem in the natural language is the correct answer to the first mathematical problem in the natural language.
[0285] Optionally, server 200 may also output a fourth verification result of the formal language and send the fourth verification result of the formal language to electronic device 100. Electronic device 100 displays the fourth verification result of the formal language, which indicates that the first solution step of the formal language is the correct answer to the first mathematical problem in the formal language.
[0286] For example, the first verification result for natural language can be the text 6003 shown in Figure 7B or Figure 7C. The fourth verification result for formal language can be the proof step 5006 shown in Figure 7C.
[0287] S809, Server 200 confirms the first step in the first problem-solving step of the formal language that does not satisfy the second condition and the reason why the second condition is not satisfied.
[0288] S810 and server 200 send the second verification result of natural language to electronic device 100.
[0289] S811, Electronic device 100 displays a second verification result of natural language, which is used to indicate the first step in the first problem-solving steps of natural language that does not meet the second condition and the reason for not meeting the second condition.
[0290] If the first solution step of the formal language is confirmed to not meet the second condition, the server 200 can confirm the first step in the first solution step of the formal language that does not meet the second condition and the reason for not meeting the second condition, and obtain the second verification result of the natural language. The second verification result of the natural language is used to indicate the first step in the first solution step of the natural language that does not meet the second condition and the reason for not meeting the second condition.
[0291] Server 200 then sends the second verification result in natural language to electronic device 100. Electronic device 100 displays the second verification result in natural language.
[0292] Optionally, server 200 may also output a third verification result of the formal language and send the third verification result of the formal language to electronic device 100. Electronic device 100 displays the third verification result of the formal language, which is used to indicate the first step in the first problem-solving step of the formal language that does not satisfy the second condition and the reason for not satisfying the second condition.
[0293] For example, the second verification result for natural language can be the text 6006 shown in Figure 7D or Figure 7E. The third verification result for formal language can be the information 6007 shown in Figure 7F.
[0294] Using the method shown in the embodiment of Figure 8, the electronic device 100 can, through the server 200, verify the user's first solution steps in natural language based on the user's input of a first mathematical problem and first solution steps in natural language. It can also verify the correctness and / or completeness of the first solution steps in formal language, and provide error location and modification suggestions, thus helping the user to perform error analysis more accurately. This improves the accuracy of the server 200 in verifying solution steps.
[0295] Figure 9 shows a flowchart of a mathematical problem-solving method.
[0296] S901, The electronic device displays the first dialog window.
[0297] S902, the electronic device receives a first operation in which a first mathematical problem is entered in a first dialog window, the first mathematical problem including a mathematical problem in natural language.
[0298] S903. The electronic device displays a first solution step and a second solution step in a first dialog window. The first solution step includes the solution steps in natural language for the first mathematical problem, and the second solution step includes the solution steps in formal language for the first mathematical problem. Alternatively, the second solution step includes the verification results of the natural language of the first solution step and the verification results of the formal language of the first solution step.
[0299] In some embodiments, the first mathematical problem may also be referred to as the first mathematical problem in natural language.
[0300] In some embodiments, the first problem-solving step may also be referred to as the first problem-solving step in natural language.
[0301] In some embodiments, the second problem-solving step may also be referred to as the first problem-solving step of the formal language.
[0302] In some embodiments, if it is a problem-solving scenario, the first problem-solving step may be obtained by an electronic device or server based on the first problem-solving step. If it is a problem-verification scenario, the first problem-solving step may be entered by the user in the first dialog window.
[0303] In this way, for problem-solving scenarios, electronic devices can display both natural language and formal language solution steps in a first dialog window based on the user's input of the first mathematical problem. This demonstrates the solution process to the user, allowing them to easily verify the second solution step based on the formal language solution. For solution step scenarios, the electronic device can also display both natural language and formal language verification results in a first dialog window based on the user's input of the first mathematical problem and the first solution step. This demonstrates the verification process to the user, allowing them to easily understand whether their initial solution steps are correct. This improves the authority and interpretability of mathematical problem solutions.
[0304] In one possible implementation, if the second solution step includes the solution steps of the formal language of the first mathematical problem, the first solution step is obtained based on the second solution step.
[0305] In this way, for problem-solving scenarios, we can obtain the problem-solving steps in natural language and formal language, and show the problem-solving process to the user.
[0306] In one possible implementation, before the electronic device displays the second solution steps in the first dialog window, the method further includes: the electronic device sending a first mathematical problem to a server, the first mathematical problem being used by the server to determine the first solution steps and the second solution steps; the electronic device displaying the second solution steps in the first dialog window specifically includes: the electronic device receiving the first solution steps and the second solution steps sent by the server, and displaying the first solution steps and the second solution steps in the first dialog window.
[0307] Optionally, the electronic device may determine the first and second solution steps based on the first mathematical problem.
[0308] In one possible implementation, the first math problem is also used by the server to confirm that the second solution step satisfies the second condition.
[0309] This method allows for the verification of the correctness and completeness of the obtained second solution step in a problem-solving scenario. This makes the logic between the second and first solution steps more rigorous, thereby improving the accuracy of automatic solutions to mathematical problems.
[0310] For example, the description of the solution scenario can be found in the embodiments shown in Figures 5A-5F and Figure 6.
[0311] In one possible implementation, if the second solution step includes the verification result of the natural language of the first solution step and the verification result of the formal language of the first solution step, when the second solution step is used to indicate that the first solution step is the answer to the first mathematical problem, the verification result of the formal language of the first solution step includes the solution step of the formal language of the first mathematical problem.
[0312] In some embodiments, the natural language verification result of the first problem-solving step can also be referred to as the first verification result of the natural language.
[0313] In some embodiments, the verification result of the formal language in the first problem-solving step can also be referred to as the fourth verification result of the formal language.
[0314] In this way, when the solution steps are verified and the verification passes, both the formal language verification result and the natural language verification result can be output simultaneously. This allows users to easily view and reconfirm the accuracy of the verification process.
[0315] For example, reference can be made to the description in the embodiments of Figures 7A-7C and Figure 8.
[0316] In one possible implementation, if the second problem-solving step includes the verification result of the natural language of the first problem-solving step and the verification result of the formal language of the first problem-solving step, when the second problem-solving step is used to indicate that the first problem-solving step is not the answer to the first mathematical problem, the verification result of the natural language of the first problem-solving step includes the first step in the first problem-solving step where an error occurred, and the reason for the error in the first step; the verification result of the formal language of the first problem-solving step includes the second step in the second problem-solving step where an error occurred, and the reason for the error in the second step.
[0317] In some embodiments, the natural language verification result of the first problem-solving step can also be referred to as the second natural language verification result.
[0318] In some embodiments, the verification result of the formal language in the first problem-solving step can also be referred to as the third verification result of the formal language.
[0319] In this way, in scenarios where the verification of the solution steps fails, both the formal language verification result and the natural language verification result can be output simultaneously. This allows users to confirm that the steps in their solution are incorrect, and also to know the location and cause of the error in the second solution step.
[0320] For example, reference can be made to the description in the embodiments of Figures 7D-7F and 8.
[0321] In one possible implementation, before the electronic device displays the first solution step in the first dialog window, the method further includes: the electronic device receiving a second operation of inputting the first solution step in the first dialog window.
[0322] In one possible implementation, the electronic device displays a second solution step within a first dialog window, specifically including: the electronic device sending a first mathematical problem and a first solution step to a server, the first mathematical problem being used by the server to determine whether the first solution step is the answer to the first mathematical problem; the electronic device receiving the second solution step sent by the server; and the electronic device displaying the second solution step within the first dialog window.
[0323] Optionally, the answer to the first problem can also be determined by whether the first step of the electronic device is the answer to the first mathematical problem.
[0324] In one possible implementation, the solution steps of the formal language for the first mathematical problem satisfy the second condition, which includes any one or more of the following: correctness and completeness.
[0325] In this way, in the scenario of verifying solution steps, the first solution steps in natural language provided by the user can be verified based on the first mathematical problem and the first solution steps in natural language input by the user, and the correctness and / or completeness of the solution steps in the formal language corresponding to the first solution steps can also be verified, thereby improving the accuracy of verifying solution steps.
[0326] In one possible implementation, correctness includes any one or more of the following: the first solution step satisfies the constraint of the first condition, or the mathematical theorem or mathematical formula used in the first solution step is correct;
[0327] Completeness includes any one or more of the following: the first solution step does not omit the limitation of the first condition, and the logical relationship of the first solution step is complete.
[0328] In one possible implementation, the first dialogue window includes the dialogue window of the voice assistant.
[0329] For example, the first dialog window could be window 5001.
[0330] Figure 10 shows a flowchart of another mathematical problem-solving method.
[0331] S1001. Obtain the first mathematical problem and the first solution steps. The first mathematical problem includes a mathematical problem in a formal language. The first solution steps include solution steps in a formal language. The first mathematical problem includes a first condition and a first question to be solved. The first condition is used to obtain the solution steps of the first mathematical problem.
[0332] S1002. If, based on the first mathematical problem and the first solution step, it is determined that the first solution step satisfies the second condition, output the second solution step or the first verification result. The second solution step includes the solution step in natural language. The second solution step is obtained based on the first solution step. The first verification result is used to indicate that the first solution step is the correct answer to the first mathematical problem. The first verification result includes the verification result in natural language. The second condition includes any one or more of the following: correctness and completeness.
[0333] This method can be executed by an electronic device or by a server.
[0334] In some embodiments, the first mathematical problem may also be referred to as the first mathematical problem of the formal language.
[0335] In some embodiments, the first problem-solving step may also be referred to as the first problem-solving step of the formal language.
[0336] In some embodiments, the second problem-solving step may also be referred to as the first problem-solving step in natural language processing.
[0337] In some embodiments, the first verification result may also be referred to as the first verification result in natural language.
[0338] This method can be applied to both problem-solving scenarios and to verifying problem-solving steps. By using this method, the correctness and completeness of the obtained first problem-solving steps can be verified, making the logic of the first problem-solving steps more rigorous and improving the accuracy of automatic solutions to mathematical problems.
[0339] In one possible implementation, the method further includes: if it is determined based on the first mathematical problem and the first solution step that the first solution step satisfies the second condition, then output the first solution step.
[0340] Optionally, the verification process can be re-verified based on the first solution step output. This allows users to verify the accuracy of the second solution step again based on the first solution step.
[0341] This allows for the simultaneous display of solution steps for both formal and natural languages, making it convenient for users to view and verify the solution steps.
[0342] In one possible implementation, correctness includes any one or more of the following: the first solution step satisfies the constraint of the first condition, and the mathematical theorem or mathematical formula used in the first solution step is correct; completeness includes any one or more of the following: the first solution step does not omit the constraint of the first condition, and the logical relationship of the first solution step is complete.
[0343] In one possible implementation, obtaining the first mathematical problem and the first solution step specifically includes: obtaining the second mathematical problem, which includes mathematical problems in natural language; determining the first mathematical problem based on the second mathematical problem; and determining the first solution step based on the first mathematical problem.
[0344] In some embodiments, the second mathematical problem may also be referred to as the first mathematical problem in natural language.
[0345] In this way, in problem-solving scenarios, based on the input of a second math problem, a second set of solution steps can be automatically provided, offering users a professional solution. Furthermore, the correctness and / or completeness of the first solution step can be automatically verified, improving the accuracy of the generated solution steps.
[0346] Optionally, in a problem-solving scenario, both the first and second solution steps can be output simultaneously. This allows users to verify the accuracy of the second solution step based on the first.
[0347] For example, the descriptions in the embodiments of Figures 5A-5F and 6 can be referred to, and will not be repeated here.
[0348] In one possible implementation, obtaining the first mathematical problem and the first solution step specifically includes: obtaining the second mathematical problem and the second solution step, wherein the second mathematical problem includes a mathematical problem in natural language; determining the first mathematical problem based on the second mathematical problem; and determining the first solution step based on the second solution step.
[0349] In some embodiments, the second problem-solving step may also be referred to as the first problem-solving step in natural language processing.
[0350] In this way, in the scenario of verifying solution steps, the second solution step provided by the user can be verified based on the second math problem and the second solution step, and the correctness and / or completeness of the second solution step can be verified. After confirming that the first solution step is the answer to the first math problem, the first verification result in natural language can be returned, allowing the user to confirm that the steps in the user's solution are correct.
[0351] Optionally, in the scenario of verifying the solution steps, the first solution step and the first verification result can be output simultaneously. This allows users to verify the second solution step based on the first solution step to ensure its accuracy.
[0352] For example, the descriptions in the embodiments of Figures 7A-7C and 8 can be referred to, and will not be repeated here.
[0353] In one possible implementation, the method further includes: if it is determined based on the first mathematical problem and the first solution step that the first solution step does not satisfy the second condition, outputting a second verification result, the second verification result being used to indicate that the second solution step is not the correct answer to the second mathematical problem, the second verification result including verification results in natural language.
[0354] In some embodiments, the second verification result may also be referred to as the second verification result in natural language.
[0355] In one possible implementation, the second verification result includes the first step in the second problem-solving process where an error occurred, and the reason why the first step was wrong.
[0356] In this way, in the scenario of verifying the solution steps, the second solution steps of the user's solution can be verified based on the second math problem and the second solution steps. If the verification of the second solution steps does not meet the requirements of correctness and / or completeness, it means that the second solution steps are not the correct answer to the second math problem. The second verification result can be output so that the user can confirm that the steps of the user's solution are wrong, and the user can know the location of the error in the second solution steps and the reason for the error.
[0357] In one possible implementation, the method further includes: if it is determined based on the first mathematical problem and the first solution step that the first solution step does not satisfy the second condition, output a third verification result. The third verification result is also used to indicate that the first solution step is not the correct answer to the first mathematical problem. The third verification result includes the verification result of the formal language.
[0358] In some embodiments, the third verification result may also be referred to as the third verification result in natural language.
[0359] In this way, in the scenario of verifying the solution steps, if the verification of the second solution step does not meet the requirements of correctness and / or completeness, the verification results in both natural language and formal language can be output simultaneously, so that users can confirm that the steps in the user's solution are incorrect.
[0360] For example, the descriptions in the embodiments of Figures 7D-7F and 8 can be referred to, and will not be repeated here.
[0361] The above are merely some embodiments and implementation methods of this application. The scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
[0362] It is understood that the various user interfaces described in the embodiments of this application are merely illustrative and do not constitute a limitation on the solution of this application. In other embodiments, the user interface may adopt different interface layouts, may include more or fewer controls, and may add or remove other functional options, as long as they are based on the same inventive concept provided in this application, they are all within the protection scope of this application.
[0363] It should be noted that, without causing contradictions or conflicts, any feature in any embodiment of this application, or any part of any feature, can be combined, and the combined technical solution is also within the scope of the embodiments of this application.
[0364] The above-described embodiments are only used to illustrate the technical solutions of this application and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of this application.
Claims
1. A method for solving mathematical problems, characterized in that, The method includes: The electronic device displays the first dialog window; The electronic device receives a first operation of inputting a first mathematical problem in the first dialog window, wherein the first mathematical problem includes a mathematical problem in natural language. The electronic device displays a first solution step and a second solution step within the first dialog window. The first solution step includes a solution step in natural language for the first mathematical problem, and the second solution step includes a solution step in formal language for the first mathematical problem. Alternatively, the second solution step includes the verification result of the first solution step in natural language and the verification result of the first solution step in formal language.
2. The method according to claim 1, characterized in that, If the second solution step includes the solution steps of the formal language of the first mathematical problem, the first solution step is obtained based on the second solution step.
3. The method according to claim 2, characterized in that, Before the electronic device displays the second problem-solving step within the first dialog window, the method further includes: The electronic device sends the first math problem to the server, and the first math problem is used by the server to determine the first solution step and the second solution step; The electronic device displays the second problem-solving steps within the first dialog window, specifically including: The electronic device receives the first solution step and the second solution step sent by the server, and displays the first solution step and the second solution step in the first dialog window.
4. The method according to claim 3, characterized in that, The first mathematical problem is also used by the server to confirm that the second solution step satisfies the second condition.
5. The method according to claim 1, characterized in that, If the second problem-solving step includes the verification result of the natural language of the first problem-solving step and the verification result of the formal language of the first problem-solving step, when the second problem-solving step is used to indicate that the first problem-solving step is the answer to the first mathematical problem, the verification result of the formal language of the first problem-solving step includes the problem-solving step of the formal language of the first mathematical problem.
6. The method according to claim 1, characterized in that, If the second problem-solving step includes the verification result of the natural language of the first problem-solving step and the verification result of the formal language of the first problem-solving step, when the second problem-solving step is used to indicate that the first problem-solving step is not the answer to the first mathematical problem, the verification result of the natural language of the first problem-solving step includes the first step in the first problem-solving step where an error occurred, and the reason for the error in the first step; the verification result of the formal language of the first problem-solving step includes the second step in the second problem-solving step where an error occurred, and the reason for the error in the second step.
7. The method according to claim 5 or 6, characterized in that, Before the electronic device displays the first problem-solving step within the first dialog window, the method further includes: The electronic device receives a second operation in which the first problem-solving steps are entered in the first dialog window.
8. The method according to any one of claims 5-7, characterized in that, The electronic device displays the second problem-solving steps within the first dialog window, specifically including: The electronic device sends the first math problem and the first solution steps to the server, whereby the server determines whether the first solution steps are the answer to the first math problem. The electronic device receives the second problem-solving steps sent by the server; The electronic device displays the second problem-solving steps within the first dialog window.
9. The method according to claim 5, characterized in that, The solution steps of the formal language for the first mathematical problem satisfy the second condition, which includes any one or more of the following: correctness and completeness.
10. The method according to claim 4 or 9, characterized in that, The correctness includes any one or more of the following: the first problem-solving step satisfies the limitation of the first condition, or the mathematical theorem or mathematical formula used in the first problem-solving step is correct; The completeness includes any one or more of the following: the first problem-solving step does not omit any limitation of the first condition, and the logical relationship of the first problem-solving step is complete.
11. The method according to any one of claims 1-10, characterized in that, Its features are, The first dialogue window includes the dialogue window of the voice assistant.
12. A method for solving mathematical problems, characterized in that, The method includes: Obtain a first mathematical problem and a first solution step. The first mathematical problem includes a mathematical problem in a formal language. The first solution step includes a solution step in a formal language. The first mathematical problem includes a first condition and a first question to be solved. The first condition is used to obtain the solution step of the first mathematical problem. If, based on the first mathematical problem and the first solution step, it is determined that the first solution step satisfies the second condition, the second solution step or the first verification result is output. The second solution step includes a solution step in natural language. The second solution step is obtained based on the first solution step. The first verification result is used to indicate that the first solution step is the answer to the first mathematical problem. The first verification result includes a verification result in natural language. The second condition includes any one or more of the following: correctness and completeness.
13. The method according to claim 12, characterized in that, The method further includes: If, based on the first mathematical problem and the first solution steps, it is determined that the first solution steps satisfy the second condition, then the first solution steps are output.
14. The method according to claim 12 or 13, characterized in that, The correctness includes any one or more of the following: the first problem-solving step satisfies the limitation of the first condition, or the mathematical theorem or mathematical formula used in the first problem-solving step is correct; The completeness includes any one or more of the following: the first problem-solving step does not omit any limitation of the first condition, and the logical relationship of the first problem-solving step is complete.
15. The method according to any one of claims 12-14, characterized in that, The process of obtaining the first mathematical problem and the first solution steps specifically includes: Obtain a second math problem, which includes math problems in natural language; The first mathematical problem is determined based on the second mathematical problem; The first solution steps are determined based on the first mathematical problem.
16. The method according to any one of claims 12-14, characterized in that, The process of obtaining the first mathematical problem and the first solution steps specifically includes: Obtain a second math problem and a second solution step, wherein the second math problem includes a math problem in natural language; The first mathematical problem is determined based on the second mathematical problem; The first problem-solving step is determined based on the second problem-solving step.
17. The method according to any one of claims 12-16, characterized in that, The method further includes: If, based on the first mathematical problem and the first solution step, it is determined that the first solution step does not satisfy the second condition, a second verification result is output. The second verification result is used to indicate that the second solution step is not the correct answer to the second mathematical problem. The second verification result includes verification results in natural language.
18. The method according to claim 17, characterized in that, The second verification result includes the first step in the second problem-solving process where an error occurred, and the reason why the first step was wrong.
19. The method according to claim 17 or 18, characterized in that, The method further includes: If, based on the first mathematical problem and the first solution step, it is determined that the first solution step does not satisfy the second condition, a third verification result is output. The third verification result is also used to indicate that the first solution step is not the correct answer to the first mathematical problem. The third verification result includes the verification result of the formal language.
20. An electronic device, characterized in that, The electronic device includes a memory and a processor; wherein the memory and the processor are coupled, the memory is used to store a computer program, and when the processor executes the computer program, the electronic device performs the method of any one of claims 1-19.
21. A server, characterized in that, The server includes a memory and a processor; wherein the memory and the processor are coupled, the memory is used to store a computer program, and when the processor executes the computer program, it causes the server to perform the method of any one of claims 12-19.
22. A computer-readable storage medium, characterized in that, Includes instructions that, when executed on an electronic device, cause the electronic device to perform the method of any one of claims 1-19.
23. A computer-readable storage medium, characterized in that, Includes instructions that, when executed on a server, cause the server to perform the method of any one of claims 12-19.
24. A computer program product, characterized in that, Includes a computer program that, when run on an electronic device, causes the electronic device to perform the method of any one of claims 1-19.
25. A computer program product, characterized in that, Includes a computer program that, when run on a server, causes the server to perform the method of any one of claims 12-19.