CN110069743B - Multi-mode calculus calculation method, device, equipment and storage medium - Google Patents

Multi-mode calculus calculation method, device, equipment and storage medium Download PDF

Info

Publication number
CN110069743B
CN110069743B CN201910359817.0A CN201910359817A CN110069743B CN 110069743 B CN110069743 B CN 110069743B CN 201910359817 A CN201910359817 A CN 201910359817A CN 110069743 B CN110069743 B CN 110069743B
Authority
CN
China
Prior art keywords
calculus
target
information
integral
character string
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201910359817.0A
Other languages
Chinese (zh)
Other versions
CN110069743A (en
Inventor
王防修
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Wuhan Polytechnic University
Original Assignee
Wuhan Polytechnic University
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Wuhan Polytechnic University filed Critical Wuhan Polytechnic University
Priority to CN201910359817.0A priority Critical patent/CN110069743B/en
Publication of CN110069743A publication Critical patent/CN110069743A/en
Application granted granted Critical
Publication of CN110069743B publication Critical patent/CN110069743B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F17/00Digital computing or data processing equipment or methods, specially adapted for specific functions
    • G06F17/10Complex mathematical operations
    • G06F17/11Complex mathematical operations for solving equations, e.g. nonlinear equations, general mathematical optimization problems
    • G06F17/13Differential equations

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Mathematical Physics (AREA)
  • Computational Mathematics (AREA)
  • Mathematical Analysis (AREA)
  • Mathematical Optimization (AREA)
  • Pure & Applied Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Theoretical Computer Science (AREA)
  • Operations Research (AREA)
  • Databases & Information Systems (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Algebra (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The invention discloses a multimode calculus calculation method, a device, equipment and a storage medium, wherein when current character string information input by a user is received, whether the format of the current character string information meets the preset calculus format condition or not is judged by calling a preset interface function; when the format of the current character string information meets a preset integral format condition, judging that the current character string information is calculus information; identifying a target identifier from the current character string information, and segmenting the current character string information according to the target identifier; and finally, selecting a corresponding integral calculation mode from preset interface functions according to the segmentation result, and performing calculus calculation on the current character string information through the integral calculation mode, so that calculus calculation in different modes can be distinguished and identified, and corresponding calculus calculation is performed after identification is successful.

Description

Multi-mode calculus calculation method, device, equipment and storage medium
Technical Field
The invention relates to the technical field of computers, in particular to a multi-mode calculus calculation method, a multi-mode calculus calculation device, multi-mode calculus calculation equipment and a storage medium.
Background
At present, most of computing devices for calculating the calculus have single functions, for example, up to now, an independent calculator for calculating the double integral and an independent calculator for calculating the triple integral exist, but none of the computing devices can calculate the double integral and the triple integral, so that when a user needs to calculate the calculus, the efficiency is low, meanwhile, calculators in different calculus modes must be purchased, and the cost of the user is increased.
Disclosure of Invention
The invention mainly aims to provide a multimode calculus calculation method, a device, equipment and a storage medium, aiming at solving the problems that the existing independent calculation device for calculus calculation has single function and is not flexible enough to use.
In order to achieve the above object, the present invention provides a multi-mode calculus calculation method, which comprises the following steps:
when current character string information input by a user is received, judging whether the format of the current character string information meets a preset integral format condition or not by calling a preset interface function;
when the format of the current character string information meets a preset integral format condition, judging that the current character string information is calculus information;
identifying a target identifier from the current character string information, and segmenting the current character string information according to the target identifier;
and selecting a corresponding integral calculation mode from the preset interface function according to the segmentation result, and performing calculus calculation on the current character string information through the integral calculation mode.
Preferably, after the step of determining that the current character string information is calculus information when the format of the current character string information satisfies a preset calculus format condition, the method further includes:
acquiring textbox controls triggered by the current character string information and unit calculus information corresponding to each textbox control, and acquiring preset priorities among the textbox controls;
setting an initial target variable;
and assigning unit calculus information corresponding to each textbox control to the initial target variable according to the sequence of the preset priority, and taking an assignment result as target calculus information.
Preferably, the step of identifying a target identifier from the current character string information and segmenting the current character string information according to the target identifier specifically includes:
identifying preset separators from the target calculus information, acquiring the number of the identified preset separators, and segmenting the target calculus information according to the preset separators;
determining the integral type of the target calculus information according to the number of the preset separators;
correspondingly, the selecting a corresponding integral calculation mode from the preset interface function according to the segmentation result, and performing calculus calculation on the current character string information through the integral calculation mode specifically includes:
determining a target integral calculation mode corresponding to the integral type of the target calculus information from the preset interface function according to the segmentation result;
and carrying out calculus calculation on the target calculus information through the target integral calculation mode.
Preferably, the integration types include fixed integration, double integration, and triple integration;
correspondingly, the determining the integral type of the target calculus information at any time according to the number of the preset separators specifically comprises:
if the number of the preset separators is 1, determining that the integral type of the target calculus information is a fixed integral; if the number of the preset separators is 2, determining that the integral type of the target calculus information is double integral; and if the number of the preset separators is 3, determining that the integral type of the target calculus information is triple integral.
Preferably, the step of identifying a target identifier from the current character string information and segmenting the current character string information according to the target identifier specifically includes:
identifying preset separators and target operators from the target calculus information, acquiring the number of the identified target operators, and segmenting the target calculus information according to the preset separators;
determining the integral type of the target calculus information according to the number of the target operators;
correspondingly, the step of selecting a corresponding integral calculation mode from the preset interface function according to the segmentation result and performing calculus calculation on the current character string information through the integral calculation mode specifically includes:
and determining a target integral calculation mode corresponding to the integral type of the target calculus information from the preset interface function according to the segmentation result, and performing calculus calculation on the target calculus information through the target integral calculation mode.
Preferably, the integration types include fixed integration, double integration, and triple integration;
correspondingly, the step of determining the integral type of the target calculus information according to the number of the target operators specifically includes:
if the number of the target operators is 2, determining the integral type of the target calculus information as a fixed integral; if the number of the target operators is 4, determining the integral type of the target calculus information as double integral; and if the number of the target operators is 6, determining that the integral type of the target calculus information is triple integral.
Preferably, the step of determining that the current character string information is calculus information when the format of the current character string information satisfies a preset calculus format condition specifically includes:
and traversing the current character string information, and judging that the current character string information is calculus information when a character string matched with the integrand format and the parameter format exists in the traversal result.
In addition, to achieve the above object, the present invention further provides an apparatus for multi-mode calculus calculation, the apparatus comprising:
the receiving module is used for judging whether the format of the current character string information meets a preset integral format condition or not by calling a preset interface function when the current character string information input by a user is received;
the judging module is used for judging the current character string information as calculus information when the format of the current character string information meets a preset calculus format condition;
the segmentation module is used for identifying a target identifier from the current character string information and segmenting the current character string information according to the target identifier;
and the calculation module is used for selecting a corresponding integral calculation mode from the preset interface function according to the segmentation result and carrying out calculus calculation on the current character string information through the integral calculation mode.
In addition, to achieve the above object, the present invention further provides a multi-mode calculus calculating apparatus, including: a memory, a processor and a multimodal calculus calculation program stored on the memory and executable on the processor, the multimodal calculus calculation program being configured to implement the steps of the method of multimodal calculus calculation as described above.
Furthermore, to achieve the above object, the present invention further proposes a storage medium having stored thereon a multimode calculus calculation program configured to implement the steps of the multimode calculus calculation method as described above.
When current character string information input by a user is received, whether the format of the current character string information meets a preset integral format condition or not is judged by calling a preset interface function; when the format of the current character string information meets a preset integral format condition, judging that the current character string information is calculus information; identifying a target identifier from the current character string information, and segmenting the current character string information according to the target identifier; and finally, selecting a corresponding integral calculation mode from the preset interface function according to the segmentation result, and performing calculus calculation on the current character string information through the integral calculation mode, so that calculus calculation in different modes can be distinguished and identified, and corresponding calculus calculation is performed after identification is successful.
Drawings
FIG. 1 is a schematic structural diagram of a multi-mode calculus computing device in a hardware operating environment according to an embodiment of the present invention;
FIG. 2 is a schematic flow chart illustrating a method for multi-mode calculus calculation according to a first embodiment of the present invention;
FIG. 3 is a flowchart illustrating a method for multi-mode calculus calculation according to a second embodiment of the present invention;
FIG. 4 is a schematic flow chart illustrating a method for multi-mode calculus calculation according to a third embodiment of the present invention;
FIG. 5 is a block diagram of an apparatus for a method of multi-mode calculus calculation in accordance with the present invention;
FIG. 6 is a schematic diagram of an input interface corresponding to the multi-mode calculus calculation device of the present invention.
The implementation, functional features and advantages of the objects of the present invention will be further explained with reference to the accompanying drawings.
Detailed Description
Referring to fig. 1, fig. 1 is a schematic structural diagram of a multi-mode calculus calculation device in a hardware operating environment according to an embodiment of the present invention.
As shown in fig. 1, the multi-modal calculus calculation device may include: a processor 1001, such as a controller or microprocessor, a communication bus 1002, a user interface 1003, and a memory 1004. Wherein a communication bus 1002 is used to enable connective communication between these components. The user interface 1003 may include a Display screen (Display), an input unit such as an interface button. The memory 1004 may be a high-speed RAM memory or a non-volatile memory (non-volatile memory).
Those skilled in the art will appreciate that the configuration shown in fig. 1 does not constitute a limitation of the apparatus for acquiring cluster information of signal impulse responses and may include more or less components than those shown, or some components in combination, or a different arrangement of components. The processor 1001 of this embodiment may also be combined with a rom to perform complex operations, and have more ram units to store input programs and data
As shown in fig. 1, the memory 1004, which is a storage medium, may include therein an operating system, a user receiving module, and a multi-mode calculus calculation program.
It is to be understood that the multimode calculus calculation device of the present embodiment may be a calculator for performing calculus calculation; the apparatus of the present invention performs calculus calculations in different modes by the processor 1001 calling a multi-mode calculus calculation program stored in the memory 1005.
Referring to fig. 2 and fig. 2, a flow chart of an embodiment of a multi-mode calculus calculation method according to the present invention is shown.
In this embodiment, the multi-mode calculus calculation method includes the following steps:
step S10: and responding to current character string information input by a user, and calling a preset interface function to judge whether the format of the current character string information meets a preset integral format condition.
It should be noted that the main execution subject of the present embodiment is the processor of the above-described multi-mode calculus calculation device.
In this embodiment, an object-oriented programming design is taken as an example, and in the object-oriented programming design, a standard input interface needs to be designed, where the input interface has a function of analyzing character information input by a user.
Accordingly, the input interface can be understood as a subroutine program loaded in the above multi-mode calculus calculation program, and the corresponding input interface of the subroutine program is shown in fig. 6; there is no requirement for the input box in fig. 6 to enable free input by the user. The input interface of fig. 6 may have several input boxes or only input boxes. That is, the entire integration information may be input in one block or may be input in several blocks. To achieve this free input function, the key is the data collection of the input interface.
In specific implementation, a preset interface function is called to traverse the current character string information in response to the current character string information input by a user, and whether the format of the current character string information meets a preset integral format condition or not is judged according to a traversal result.
Step S20: and when the format of the current character string information meets a preset integral format condition, judging that the current character string information is calculus information.
Specifically, when a character string matched with the integrand format and the parameter format exists in the traversal result, the current character string information is judged to be calculus information.
Further, in this embodiment, when the format of the current character string information satisfies the preset integral format condition, after the step of determining that the current character string information is calculus information, the method further includes:
acquiring textbox controls triggered by the current character string information and unit calculus information corresponding to each textbox control, and acquiring preset priorities among the textbox controls;
setting an initial target variable S;
and assigning unit calculus information corresponding to each textbox control to the initial target variable according to the sequence of the preset priority, and taking an assignment result as target calculus information.
It can be understood that, the priority of each input box is set in advance in the embodiment, and the implementation may use the sequence of the input boxes counted from top to bottom in fig. 6 as the preset priority among the textbox controls.
The information of the first input box is received by the variable stage1, the information of the second input box is received by the variable stage2, the information of the third input box is received by the variable stage3, and the information of the fourth input box is received by the variable stage4.
stage1, stage2, stage3 and stage4 have preset binding relations with the text box controls; stage1, stage2, stage3 and stage4 are all used for receiving unit calculus information. Once the user clicks the "calculate points" button, the collection of user input points information for the system is as follows:
initializing variables
Figure BDA0002045276210000061
If it is not
Figure BDA0002045276210000062
Then S = stage1 is executed;
if it is not
Figure BDA0002045276210000063
The collection process is as follows: if it is
Figure BDA0002045276210000064
Then S = S + ',' + stage2; if it is
Figure BDA0002045276210000071
Let S = stage2;
if it is not
Figure BDA0002045276210000072
The collection procedure is as follows: if it is
Figure BDA0002045276210000073
Then S = S + ',' + stage3; if it is
Figure BDA0002045276210000074
Let S = stage3;
if it is used
Figure BDA0002045276210000075
The collection procedure is as follows: if it is
Figure BDA0002045276210000076
Then S = S + ',' + stage4; if it is
Figure BDA0002045276210000077
Then S = stage4.
From the above process, it can be seen that the multi-mode calculus calculation program can collect all the calculus information inputted by the user and ensure that the input of the user is free.
Step S30: and identifying a target identifier from the current character string information, and segmenting the current character string information according to the target identifier.
In a specific implementation, the target identifiers may be operation symbols or punctuation symbols (for example, comma "," or an operator "< =" or less than or equal to) common to product classifications of constant integral, double integral, and triple integral, and the current string information may be segmented by the target identifiers.
Step S40: and selecting a corresponding integral calculation mode from the preset interface function according to the segmentation result, and carrying out calculus calculation on the current character string information through the integral calculation mode.
It should be noted that, in this embodiment, the default settings are performed on the fixed point, the double point, and the triple point, and are encapsulated in the preset interface function, where the default settings include:
firstly, the selection of the fixed point calculation method needs to make the following appointment settings in order to identify the fixed point information input by the user:
(1)S=s 1 s 2 …s n s is current character string information, and data on the right of the equal sign represents an integral calculation mode of a user;
(2) f1 represents a position in S where '< = x < =' is present;
(3) f2 represents the position in S where '< = y < =' is present;
(4) f3 represents the position in S where '< = x < =' is present;
(5) ft1 represents the position of the 1 st ',' in S;
let S = S 1 s 2 …s n If it is the integration information input by the user, the segmentation process for the character string S is as follows:
step one, if f1 > 0, f2=0 and f3=0, it means to integrate the variable x:
(1) If the user enters "f (x), a < = x < = b", the calculation is done directly;
(2) If the user inputs a < = x < = b, f (x), it becomes "f (x), a < = x < = b", and then the integral is determined;
step two, if f1=0, f2 > and f3=0, it means that the variable y is integrated:
(1) If the user enters "f (y), c < = y < = d", the calculation is done directly;
(2) If the user enters c < = y < = b, f (y), then it becomes "f (y), c < = y < = d", and then the integral is determined;
step three, if f1=0, f2= and f3 > 0, it means that the variable z is integrated:
(1) If the user enters "f (z), p < = y < = q", the calculation is done directly;
(2) If the user inputs p < = z < = q, f (z), it becomes "f (z), p < = z < = q", and then the integral is determined.
Secondly, selecting a double integral calculation method, and in order to identify double integral information input by a user, making the following appointment settings:
(1)f 1 a position indicating that a substring '< = x < =' exists in the information input by the user;
(2)f 2 a position indicating that a substring '< = y < =' exists in the information input by the user;
(3)f 3 a position indicating that a substring '< = t < =' exists in the information input by the user;
(4)f 4 a position indicating that a substring '< = yx < =' exists in the information input by the user;
(5)f 5 a position indicating that a substring '< = xy < =' exists in the information input by the user;
(6)f 6 a position indicating that a substring '< = rt < =' exists in the information input by the user;
(7) fs1 represents the position of the first comma in the information input by the user;
(8) fs2 represents the position of the second comma in the information input by the user;
(9) stage1 represents variables used to store y1 (x) < = yx < = y2 (x) or x1 (y) < = xy < = x2 (y) or r1 (t) < = rt < = r2 (t);
(10) stage2 represents the variables used to store a < = x < = b or c < = y < = d or α < = t < = β;
(11) func represents a variable used to store the binary function f (x, y);
for example, S = S 1 s 2 …s n If it is the point information input by the user, the segmentation process for the character string S is as follows:
step one, if f 1 > 0 and f 4 > 0, the integrand and integration interval are divided as follows:
(1) If f is 1 Fs1 and fs1 < f 4 < fs2, then stage1= s fs1+1 s fs1+2 …s fs2-1 ,stage2=s 1 s 2 …s fs1-1 ,func=s fs2+1 s fs2+2 …s n (ii) a Namely, the point information input by the user is:
a<=x<=b,y1(x)<=yx<=y2(x),f(x,y)
(2) If f is 4 Fs1 and fs1 < f 1 < fs2, then stage2= s fs1+1 s fs1+2 …s fs2-1 ,stage1=s 1 s 2 …s fs1-1 ,func=s fs2+1 s fs2+2 …s n (ii) a Namely, the point information input by the user is:
y1(x)<=yx<=y2(x),a<=x<=b,f(x,y)
(3) If f is 1 < fs1 and f 4 > fs2, func = s fs1+1 s fs1+2 …s fs2-1 ,stage2=s 1 s 2 …s fs1-1 ,stage1=s fs2+1 s fs2+2 …s n (ii) a Namely, the point information input by the user is:
a<=x<=b,f(x,y),y1(x)<=yx<=y2(x)
(4) If fs1 < f 1 < fs2 and f 4 > fs2, stage2= s fs1+1 s fs1+2 …s fs2-1 ,func=s 1 s 2 …s fs1-1 ,stage1=s fs2+1 s fs2+2 …s n (ii) a Namely, the point information input by the user is:
f(x,y),a<=x<=b,y1(x)<=yx<=y2(x)
(5) If f is 4 < fs1 and f 1 > fs2, func = s fs1+1 s fs1+2 …s fs2-1 ,stage1=s 1 s 2 …s fs1-1 ,stage2=s fs2+1 s fs2+2 …s n (ii) a Namely, the point information input by the user is:
y1(x)<=yx<=y2(x),f(x,y),a<=x<=b
(6) If fs1 < f 4 < fs2 and f 1 > fs2, stage1= s fs1+1 s fs1+2 …s fs2-1 ,func=s 1 s 2 …s fs1-1 ,stage2=s fs2+1 s fs2+2 …s n . Namely, the point information input by the user is:
f(x,y),y1(x)<=yx<=y2(x),a<=x<=b
step two, if f 2 > 0 and f 5 > 0, the integrand and integration interval are divided as follows:
(1) If f is 2 Fs1 and fs1 < f 5 < fs2, then stage1= s fs1+1 s fs1+2 …s fs2-1 ,stage2=s 1 s 2 …s fs1-1 ,func=s fs2+1 s fs2+2 …s n (ii) a Namely, the point information input by the user is:
c<=y<=d,x1(y)<=xy<=x2(y),f(x,y)
(2) If f is 5 Fs1 and fs1 < f 2 < fs2, then stage2= s fs1+1 s fs1+2 …s fs2-1 ,stage1=s 1 s 2 …s fs1-1 ,func=s fs2+1 s fs2+2 …s n (ii) a Namely, the point information input by the user is:
x1(y)<=xy<=x2(y),c<=y<=d,f(x,y)
(3) If f is 2 < fs1 and f 5 > fs2, func = s fs1+1 s fs1+2 …s fs2-1 ,stage2=s 1 s 2 …s fs1-1 ,stage1=s fs2+1 s fs2+2 …s n (ii) a Namely, the point information input by the user is:
c<=y<=d,f(x,y),x1(y)<=xy<=x2(y)
(4) If fs1 < f 2 < fs2 and f 5 > fs2, stage2= s fs1+1 s fs1+2 …s fs2-1 ,func=s 1 s 2 …s fs1-1 ,stage1=s fs2+1 s fs2+2 …s n (ii) a Namely, the point information input by the user is:
f(x,y),c<=y<=d,x1(y)<=xy<=x2(y)
(5) If f is 5 < fs1 and T 2 > fs2, func = s fs1+1 s fs1+2 …s fs2-1 ,stage1=s 1 s 2 …s fs1-1 ,stage2=s fs2+1 s fs2+2 …s n (ii) a Namely, the point information input by the user is:
x1(y)<=xy<=x2(y),f(x,y),c<=y<=d
(6) If fs1 < f 5 < fs2 and f 2 > fs2, stage1= s fs1+1 s fs1+2 …s fs2-1 ,func=s 1 s 2 …s fs1-1 ,stage2=s fs2+1 s fs2+2 …s n . Namely, the point information input by the user is:
f(x,y),x1(y)<=xy<=x2(y),c<=y<=d
step three, if f 3 > 0 and f 6 > 0, the integrand and integration interval are divided as follows:
(1) If f is 3 Fs1 and fs1 < f 6 < fs2, then stage1= s fs1+1 s fs1+2 …s fs2-1 ,stage2=s 1 s 2 …s fs1-1 ,func=s fs2+1 s fs2+2 …s n (ii) a Namely, the point information input by the user is:
α<=t<=β,r1(t)<=rt<=r2(t),f(x,y)
(2) If f is 6 Fs1 and fs1 < f 3 Less than fs2, then stage2= s fs1+1 s fs1+2 …s fs2-1 ,stage1=s 1 s 2 …s fs1-1 ,func=s fs2+1 s fs2+2 …s n (ii) a Namely, the point information input by the user is:
r1(t)<=rt<=r2(t),α<=t<=β,f(x,y)
(3) If f is 3 < fs1 and f 6 > fs2, func = s fs1+1 s fs1+2 …s fs2-1 ,stage2=s 1 s 2 …s fs1-1 ,stage1=s fs2+1 s fs2+2 …s n (ii) a Namely, the point information input by the user is:
α<=t<=β,f(x,y),r1(t)<=rt<=r2(t)
(4) If fs1 < f 3 < fs2 and f 6 > fs2, stage2= s fs1+1 s fs1+2 …s fs2-1 ,func=s 1 s 2 …s fs1-1 ,stage1=s fs2+1 s fs2+2 …s n (ii) a Namely, the point information input by the user is:
f(x,y),α<=t<=β,r1(t)<=rt<=r2(t)
(5) If f is 6 < fs1 and f 3 > fs2, func = s fs1+1 s fs1+2 …s fs2-1 ,stage1=s 1 s 2 …s fs1-1 ,stage2=s fs2+1 s fs2+2 …s n (ii) a Namely, the point information input by the user is:
r1(t)<=rt<=r2(t),f(x,y),α<=t<=β
(6) If fs1 < f 6 < fs2 and f 3 > fs2, stage1= s fs1+1 s fs1+2 …s fs2-1 ,func=s 1 s 2 …s fs1-1 ,stage2=s fs2+1 s fs2+2 …s n . Namely, the point information input by the user is:
f(x,y),r1(t)<=rt<=r2(t),α<=t<=β
finally, the selection of the triple integral calculation method needs to make the following convention:
(1)S=s 1 s 2 …s n is the user's input mode;
(2) f1 represents a position in S where '< = xyz < =' is present;
(3) f2 represents the position in S where '< = yxz < =' is present;
(4) f3 represents the position in S where '< = xzy < =' is present;
(5) f4 represents the position in S where '< = zxy < =' is present;
(6) f5 denotes the position in S where '< = yzx < =' is present;
(7) f6 represents the position in S where '< = zyx < =' is present;
(8) f7 represents the position in S where '< = xy < =' is present;
(9) f8 represents the position in S where '< = yx < =' is present;
(10) f9 represents a position in S where '< = xz < =' is present;
(11) f10 represents the presence of '< = zx < =' positions in S;
(12) f11 represents a position in S where '< = yz < =' is present;
(13) f12 represents the presence of '< = zy < =' positions in S;
(14) f13 represents the position in S where '< = x < =' is present;
(15) f14 represents the position in S where '< = y < =' is present;
(16) f15 represents a position in S where '< = z < =';
(17) f16 represents the position in S where '< = t < =' is present;
(18) f17 represents a position in S where '< = r < =' is present;
(19) f18 represents a position in S where '< = a < =' is present;
(20) f19 represents the position in S where '< = rx < =' is present;
(21) f20 denotes the position in S where '< = ry < =' is present;
(22) f21 represents the position in S where '< = rz < =' is present;
(23) ft1 represents the position of the 1 st ',' in S;
(24) ft2 represents the position of the 2 nd ',' in S;
(25) ft3 represents the position of the 3 rd ',' in S;
once it is confirmed that the user requires triple integration through the input mode of the user, the equivalent mode must be converted into a standard mode, that is, the input information of the user must be rearranged and combined so as to be converted into a standard mode that can be used by the system for calculation. Therefore, the information reorganization process input by the user is as follows:
step one, if f1 > 0, f11 > 0 and f15 > 0, it means that the user inputs
f(x,y,z),x 1 (y,z)≤x≤x 2 (y,z),y 1 (z)≤y≤y 2 (z),p≤z≤q
So the process of separating the integrand and the upper and lower limits of each variable integration from S is as follows:
(1) Let p = q = f1;
(2) Repeating p = p-1 until s p = ',' or p = 1;
(3) Repeatedly performing q = q +1 until s q Or p = n;
(4) If s is p = ',', then p = p +1 is performed;
(5) If s is q = ',', then perform q = q-1;
(6)stage1=s p s p+1 …s q
(7) Let p = q = f11;
(8) Repeating p = p-1 until s p = ',' or p = 1;
(9) Repeatedly performing q = q +1 until s q Or p = n;
(10) If s is p = ',', then p = p +1 is performed;
(11) If s is q = ',', then perform q = q-1;
(12)stage2=s p s p+1 …s q
(13) Let p = q = f15;
(14) Repeating p = p-1 until s p = ',' or p = 1;
(15) Repeatedly performing q = q +1 until s q Or p = n;
(16) If s is p = ',', then p = p +1 is performed;
(17) If s is q = ',', then perform q = q-1;
(18)stage3=s p s p+1 …s q
(19) Deleting stage1, stage2 and stage3 from S, namely S = S-stage1-stage2-stage3; (20) f = S.
(21) Replacing "< = xyz < =" with "< = x < =" in stage1;
(22) Replacing "< = yz < =" with "< = y < =" in stage2;
(23) Re-splicing S = f + ',' + stage1+ ',' + stage2+ ',' + stage3;
step two, if f2 > 0, f9 > 0 and f15 > 0, it means that the user inputs
f(x,y,z),y 1 (x,z)≤y≤y 2 (x,z),x 1 (z)≤x≤x 2 (z),p≤z≤q
The process of separating the integrand and the upper and lower limits of each variable integration from S is as follows:
(1) Let p = q = f2;
(2) Repeating p = p-1 until s p = ',' or p = 1;
(3) Repeatedly performing q = q +1 until s q Or p = n;
(4) If s is p = ',', then p = p +1 is performed;
(5) If s is q = ',', then perform q = q-1;
(6)stage1=s p s p+1 …s q
(7) Let p = q = f9;
(8) Repeating p = p-1 until s p = ',' or p = 1;
(9) Repeatedly performing q = q +1 until s q Or p = n;
(10) If s is p = ',', then p = p +1 is performed;
(11) If s is q = ',', then perform q = q-1;
(12)stage2=s p s p+1 …s q
(13) Let p = q = f15;
(14) Repeating p = p-1 until s p = ',' or p = 1;
(15) Repeatedly executing q = q +1 until s q = ',' or p = n;
(16) If s is p = ',', then p = p +1 is performed;
(17) If s is q = ',', then perform q = q-1;
(18)stage3=s p s p+1 …s q
(19) Deleting stage1, stage2 and stage3 from S, i.e. S = S-stage1-stage2-stage3; (20) f = S.
(21) Replacing "< = yxz < =" with "< = y < =" in stage1;
(22) Replacing "< = xz < =" with "< = x < =" in stage2;
(23) Re-splicing S = f + ',' + stage1+ ',' + stage2+ ',' + stage3;
step three, if f3 > 0, f12 > 0 and f14 > 0, then f (x, y, z), x is the user input 1 (y,z)≤x≤x 2 (y,z),z 1 (y)≤z≤z 2 (y), c is less than or equal to y and less than or equal to d, so that the process of separating the integrand and the upper and lower integration limits of each variable from S is as follows:
(1) Let p = q = f3;
(2) Repeating p = p-1 until s p = ',' or p = 1;
(3) Repeatedly performing q = q +1 until s q Or p = n;
(4) If s is p = ',', then p = p +1 is performed;
(5) If s is q = ',', then perform q = q-1;
(6)stage1=s p s p+1 …s q
(7) Let p = q = f12;
(8) Repeating p = p-1 until s p = ',' or p = 1;
(9) Repeatedly performing q = q +1 until s q Or p = n;
(10) If s is p = ',', then p = p +1 is performed;
(11) If s is q =′,', then q = q-1 is performed;
(12)stage2=s p s p+1 …s q
(13) Let p = q = f14;
(14) Repeating p = p-1 until s p = ',' or p = 1;
(15) Repeatedly performing q = q +1 until s q Or p = n;
(16) If s is p = ',', then p = p +1 is performed;
(17) If s is q = ',', then perform q = q-1;
(18)stage3=s p s p+1 …s q
(19) Deleting stage1, stage2 and stage3 from S, i.e. S = S-stage1-stage2-stage3;
(20)f=S。
(21) Replacing "< = xzy < =" with "< = x < =" in stage1;
(22) Replacing "< = zy < =" with "< = z < =" in stage2;
(23) Re-splicing S = f + ',' + stage1+ ',' + stage2+ ',' + stage3;
step four, if f4 > 0, f7 > 0 and f14 > 0, it indicates that the user inputs f (x, y, z), z 1 (x,y)≤z≤z 2 (x,y),x 1 (y)≤x≤x 2 (y),c≤y≤d
Therefore, the process of separating the integrand and the upper and lower integration limits of each variable from S is as follows:
(1) Let p = q = f4;
(2) Repeating p = p-1 until s p = ',' or p = 1;
(3) Repeatedly performing q = q +1 until s q Or p = n;
(4) If s is p = ',', then perform p = p +1;
(5) If s is q = ',', then perform q = q-1;
(6)stage1=s p s p+1 …s q
(7) Let p = q = f7;
(8) Repeating p = p-1 until s p = ',' or p = 1;
(9) Repeatedly performing q = q +1 until s q Or p = n;
(10) If s is p = ',', then p = p +1 is performed;
(11) If s is q = ',', then perform q = q-1;
(12)stage2=s p s p+1 …s q
(13) Let p = q = f14;
(14) Repeating p = p-1 until s p = ',' or p = 1;
(15) Repeatedly performing q = q +1 until s q Or p = n;
(16) If s is p = ',', then p = p +1 is performed;
(17) If s is q = ',', then perform q = q-1;
(18)stage3=s p s p+1 …s q
(19) Deleting stage1, stage2 and stage3 from S, i.e. S = S-stage1-stage2-stage3;
(20)f=S。
(21) Replacing "< = zxy < =" with "< = z < =" in stage1;
(22) Replacing "< = xy < =" with "< = x < =" in stage2;
(23) Re-splicing S = f + ',' + stage1+ ',' + stage2+ ',' + stage3;
step five, if f5 is greater than 0, f10 is greater than 0 and f13 is greater than 0, then f (x, y, z), y and y are input by the user 1 (x,z)≤y≤y 2 (x,z),z 1 (x)≤z≤z 2 (x) And a is more than or equal to x is less than or equal to b, so that the process of separating the integrand and the upper and lower integration limits of each variable from S is as follows:
(1) Let p = q = f5;
(2) Repeating p = p-1 until s p = ',' or p = 1;
(3) Repeatedly performing q = q +1 until s q Or p = n;
(4) If s is p = ',', then p = p +1 is performed;
(5) If s is q = ',', then perform q = q-1;
(6)stage1=s p s p+1 …s q
(7) Let p = q = f10;
(8) Repeating p = p-1 until s p = ',' or p = 1;
(9) Repeatedly performing q = q +1 until s q Or p = n;
(10) If s is p = ',', then p = p +1 is performed;
(11) If s is q = ',', then perform q = q-1;
(12)stage2=s p s p+1 …s q
(13) Let p = q = f13;
(14) Repeating p = p-1 until s p = ',' or p = 1;
(15) Repeatedly performing q = q +1 until s q Or p = n;
(16) If s is p = ',', then p = p +1 is performed;
(17) If s is q = ',', then perform q = q-1;
(18)stage3=s p s p+1 …s q
(19) Deleting stage1, stage2 and stage3 from S, i.e. S = S-stage1-stage2-stage3; (20) f = S.
(21) Replacing "< = yzx < =" with "< = y < =" in stage1;
(22) Replacing "< = zx < =" with "< = z < =" in stage2;
(23) Re-splicing S = f + ',' + stage1+ ',' + stage2+ ', and' + stage3;
step six, if f6 is more than 0,f8 > 0 and f13 > 0, then f (x, y, z), z, indicates that the user input is f (x, y, z), z 1 (x,y)≤z≤z 2 (x,y),y 1 (x)≤y≤y 2 (x) And a is more than or equal to x is less than or equal to b, so that the process of separating the integrand and the upper and lower integration limits of each variable from S is as follows:
(1) Let p = q = f6;
(2) Repeating p = p-1 until s p = ',' or p = 1;
(3) Repeatedly performing q = q +1 until s q Or p = n;
(4) If s is p = ',', then perform p = p +1;
(5) If s is q = ',', then perform q = q-1;
(6)stage1=s p s p+1 …s q
(7) Let p = q = f8;
(8) Repeating p = p-1 until s p = ',' or p = 1;
(9) Repeatedly performing q = q +1 until s q Or p = n;
(10) If s is p = ',', then p = p +1 is performed;
(11) If s is q = ',', then perform q = q-1;
(12)stage2=s p s p +1…s q
(13) Let p = q = f13;
(14) Repeating p = p-1 until s p = ',' or p = 1;
(15) Repeatedly performing q = q +1 until s q Or p = n;
(16) If s is p = ',', then p = p +1 is performed;
(17) If s is q = ',', then perform q = q-1;
(18)stage3=s p s p+1 …s q
(19) Deleting stage1, stage2 and stage3 from S, i.e. S = S-stage1-stage2-stage3;
(20)f=S。
(21) Replacing "< = zyx < =" with "< = z < =" in stage1;
(22) Replacing "< = yx < =" with "< = y < =" in stage2;
(23) Re-splicing S = f + ',' + stage1+ ',' + stage2+ ',' + stage3;
step seven, if f13 > 0, f17 > 0 and f16 > 0, then f (x, rcost, rsint), x is the input of user 1 (r,t)≤x≤x 2 (r,t),r 1 (t)≤r≤r 2 (t), alpha is less than or equal to t is less than or equal to beta, so the process of separating the integrand and the upper and lower integration limits of each variable from S is as follows:
(1) Let p = q = f13;
(2) Repeating p = p-1 until s p = ',' or p = 1;
(3) Repeatedly performing q = q +1 until s q Or p = n;
(4) If s is p = ',', then p = p +1 is performed;
(5) If s is q = ',', then perform q = q-1;
(6)stage1=s p s p+1 …s q
(7) Let p = q = f17;
(8) Repeating p = p-1 until s p = ',' or p = 1;
(9) Repeatedly performing q = q +1 until s q Or p = n;
(10) If s is p = ',', then p = p +1 is performed;
(11) If s is q = ',', then perform q = q-1;
(12)stage2=s p s p+1 …s q
(13) Let p = q = f16;
(14) Repeating p = p-1 until s p = ',' or p = 1;
(15) Repeatedly performing q = q +1 until s q Or p = n;
(16) If s is p = ',', then p = p +1 is performed;
(17) If s is q = ',', then perform q = q-1;
(18)stage3=s p s p+1 …s q
(19) Deleting stage1, stage2 and stage3 from S, i.e. S = S-stage1-stage2-stage3; (20) f = S.
(21) Re-splicing S = f + ',' + stage1+ ',' + stage2+ ',' + stage3;
step eight, if f14 > 0, f17 > 0 and f16 > 0, then f (rcost, y, rsint), y represents the user input 1 (r,t)≤y≤y 2 (r,t),r 1 (t)≤r≤r 2 (t), alpha is less than or equal to t is less than or equal to beta, so the process of separating the integrand and the upper and lower integration limits of each variable from S is as follows:
(1) Let p = q = f14;
(2) Repeating p = p-1 until s p = ',' or p = 1;
(3) Repeatedly performing q = q +1 until s q = ',' or p = n;
(4) If s is p = ',', then p = p +1 is performed;
(5) If s is q = ',', then perform q = q-1;
(6)stage1=s p s p+1 …s q
(7) Let p = q = f17;
(8) Repeating p = p-1 until s p = ',' or p = 1;
(9) Repeatedly performing q = q +1 until s q Or p = n;
(10) If s is p = ',', then p = p +1 is performed;
(11) If s is q = ',', then perform q = q-1;
(12)stage2=s p s p+1 …s q
(13) Let p = q = f16;
(14) Repeatedly execute p= p-1, up to s p = ',' or p = 1;
(15) Repeatedly performing q = q +1 until s q Or p = n;
(16) If s is p = ',', then p = p +1 is performed;
(17) If s is q = ',', then perform q = q-1;
(18)stage3=s p s p+1 …s q
(19) Deleting stage1, stage2 and stage3 from S, i.e. S = S-stage1-stage2-stage3;
(20)f=S。
(21) Re-splicing S = f + ',' + stage1+ ',' + stage2+ ', and' + stage3;
step nine, if f15 > 0, f17 > 0 and f16 > 0, then f (rcost, rsint, z), z is the input of the user 1 (r,t)≤z≤z 2 (r,t),r 1 (t)≤r≤r 2 (t), alpha is less than or equal to t is less than or equal to beta, so the process of separating the integrand and the upper and lower integration limits of each variable from S is as follows:
(1) Let p = q = f15;
(2) Repeating p = p-1 until s p = ',' or p = 1;
(3) Repeatedly performing q = q +1 until s q Or p = n;
(4) If s is p = ',', then p = p +1 is performed;
(5) If s is q = ',', then perform q = q-1;
(6)stage1=s p s p+1 …s q
(7) Let p = q = f17;
(8) Repeating p = p-1 until s p = ',' or p = 1;
(9) Repeatedly performing q = q +1 until s q Or p = n;
(10) If s is p = ',', then p = p +1 is performed;
(11) If s is q = ',', then perform q = q-1;
(12)stage2=s p s p+1 …s q
(13) Let p = q = f16;
(14) Repeating p = p-1 until s p = ',' or p = 1;
(15) Repeatedly performing q = q +1 until s q Or p = n;
(16) If s is p = ',', then p = p +1 is performed;
(17) If s is q = ',', then perform q = q-1;
(18)stage3=s p s p+1 …s q
(19) Deleting stage1, stage2 and stage3 from S, i.e. S = S-stage1-stage2-stage3;
(20)f=S。
(21) Re-splicing S = f + ',' + stage1+ ',' + stage2+ ',' + stage3;
step ten, if f19 > 0, f18 > 0 and f16 > 0, then f (rcosa, rsinacost, rsinasint) r represents the user input 2 sina,r 1 (a,t)≤r≤r 2 (a,t),a 1 (t)≤a≤a 2 (t), alpha is less than or equal to t is less than or equal to beta, so the process of separating the integrand and the upper and lower integration limits of each variable from S is as follows:
(1) Let p = q = f19;
(2) Repeating p = p-1 until s p = ',' or p = 1;
(3) Repeatedly performing q = q +1 until s q = ',' or p = n;
(4) If s is p = ',', then p = p +1 is performed;
(5) If s is q = ',', then perform q = q-1;
(6)stage1=s p s p+1 …s q
(7) Let p = q = f18;
(8) Repeating p = p-1 until s p = ',' or p = 1;
(9) Q = q +1 is repeatedly performed,up to s q Or p = n;
(10) If s is p = ',', then p = p +1 is performed;
(11) If s is q = ',', then perform q = q-1;
(12)stage2=s p s p+1 …s q
(13) Let p = q = f16;
(14) Repeating p = p-1 until s p = ',' or p = 1;
(15) Repeatedly performing q = q +1 until s q Or p = n;
(16) If s is p = ',', then p = p +1 is performed;
(17) If s is q = ',', then perform q = q-1;
(18)stage3=s p s p+1 …s q
(19) Deleting stage1, stage2 and stage3 from S, i.e. S = S-stage1-stage2-stage3;
(20)f=S。
(21) Re-splicing S = f + ',' + stage1+ ',' + stage2+ ',' + stage3;
step eleven, if f20 > 0, f18 > 0 and f16 > 0, then f (rsinacost, rcosa, rsinasint) r represents the user input 2 sina,r 1 (a,t)≤r≤r 2 (a,t),a 1 (t)≤a≤a 2 (t), alpha is more than or equal to t and less than or equal to beta, and the process of separating the integrand and the upper and lower integration limits of each variable from S is as follows:
(1) Let p = q = f20;
(2) Repeating p = p-1 until s p = ',' or p = 1;
(3) Repeatedly executing q = q +1 until s q Or p = n;
(4) If s is p = ',', then p = p +1 is performed;
(5) If s is q = ',', then perform q = q-1;
(6)stage1=s p s p +1…s q
(7) Let p = q = f18;
(8) Repeating p = p-1 until s p = ',' or p = 1;
(9) Repeatedly performing q = q +1 until s q Or p = n;
(10) If s is p = ',', then p = p +1 is performed;
(11) If s is q = ',', then perform q = q-1;
(12)stage2=s p s p+1 …s q
(13) Let p = q = f16;
(14) Repeating p = p-1 until s p = ',' or p = 1;
(15) Repeatedly performing q = q +1 until s q Or p = n;
(16) If s is p = ',', then p = p +1 is performed;
(17) If s is q = ',', then perform q = q-1;
(18)stage3=s p s p +1…s q
(19) Deleting stage1, stage2 and stage3 from S, i.e. S = S-stage1-stage2-stage3;
(20)f=S。
(21) Re-splicing S = f + ',' + stage1+ ',' + stage2+ ',' + stage3;
step twelve, if f21 > 0, f18 > 0 and f16 > 0, then f (rsinacost, rsinasint, rcosa) r is the input of user 2 sina,r 1 (a,t)≤r≤r 2 (a,t),a 1 (t)≤a≤a 2 (t), alpha is less than or equal to t is less than or equal to beta, so the process of separating the integrand and the upper and lower integration limits of each variable from S is as follows:
(1) Let p = q = f21;
(2) Repeating p = p-1 until s p = ',' or p = 1;
(3) Repeatedly performing q = q +1 until s q Or p = n;
(4) If s is p = ',', then p = p +1 is performed;
(5) If s is q = ',', then perform q = q-1;
(6)stage1=s p s p+1 …s q
(7) Let p = q = f18;
(8) Repeating p = p-1 until s p = ',' or p = 1;
(9) Repeatedly performing q = q +1 until s q Or p = n;
(10) If s is p = ',', then p = p +1 is performed;
(11) If s is q = ',', then perform q = q-1;
(12)stage2=s p s p+1 …s q
(13) Let p = q = f16;
(14) Repeating p = p-1 until s p = ',' or p = 1;
(15) Repeatedly executing q = q +1 until s q Or p = n;
(16) If s is p = ',', then p = p +1 is performed;
(17) If s is q = ',', then perform q = q-1;
(18)stage3=s p s p+1 …s q
(19) Deleting stage1, stage2 and stage3 from S, i.e. S = S-stage1-stage2-stage3;
(20)f=S。
(21) Re-splicing S = f + ',' + stage1+ ',' + stage2+ ',' + stage3;
when receiving current character string information input by a user, the embodiment judges whether the format of the current character string information meets a preset integral format condition by calling a preset interface function; when the format of the current character string information meets a preset integral format condition, judging that the current character string information is calculus information; identifying a target identifier from the current character string information, and segmenting the current character string information according to the target identifier; and finally, selecting a corresponding integral calculation mode from the preset interface function according to the segmentation result, and performing calculus calculation on the current character string information through the integral calculation mode, so that calculus calculation in different modes can be distinguished and identified, and corresponding calculus calculation is performed after identification is successful.
Referring to fig. 3, a second embodiment of the multimode calculus calculation method is provided based on the first embodiment of the multimode calculus calculation method, and fig. 3 is a schematic flow chart of the second embodiment of the multimode calculus calculation method according to the present invention.
In this embodiment, the step S30 specifically includes:
step S301: identifying preset separators from the target calculus information, acquiring the number of the identified preset separators, and segmenting the target calculus information according to the preset separators;
step S302: determining the integral type of the target calculus information according to the number of the preset separators;
it should be noted that the integration types of the present embodiment include three integration types, namely constant integration, double integration, and triple integration.
The preset separator is preferably commas ",", and it can be found from the user input pattern that there is only one comma in any one input pattern for fixed integration, two commas in any one input pattern for double integration, and three commas in all input patterns for triple integration. Therefore, if the number of the preset separators is 1, determining that the integral type of the target calculus information is a fixed integral; if the number of the preset separators is 2, determining that the integral type of the target calculus information is double integral; and if the number of the preset separators is 3, determining that the integral type of the target calculus information is triple integral.
Correspondingly, the step S40 specifically includes:
step S401: determining a target integral calculation mode corresponding to the integral type of the target calculus information from the preset interface function according to the segmentation result;
step S402: and carrying out calculus calculation on the target calculus information through the target integral calculation mode.
And if the integral information input by the user is detected to have only one comma, calling a fixed integral calculation module to perform fixed integral calculation. And if the system detects that two commas exist in the integral information input by the user, calling a double integral calculation module to perform double integral calculation. And if the system detects that three commas exist in the integral information input by the user, calling a triple integral calculation module to perform triple integral calculation.
According to the method and the device, the integral type input by the user can be quickly judged according to the number of the preset separators in the target calculus information, and the calculus mode input by the user can be effectively distinguished.
Referring to fig. 4, a third embodiment of the multimode calculus calculation method is provided based on the first embodiment of the multimode calculus calculation method, and fig. 4 is a schematic flow chart of the third embodiment of the multimode calculus calculation method according to the present invention.
In this embodiment, the step S30 specifically includes:
step S310: identifying preset separators and target operators from the target calculus information, acquiring the number of the identified target operators, and segmenting the target calculus information according to the preset separators;
step S320: determining the integral type of the target calculus information according to the number of the target operators;
it should be noted that the integral types of the present embodiment include three integral types, namely constant integral, double integral, and triple integral, the preset separator of the present embodiment is preferably "comma", and the target operator is preferably "< =" which is smaller than or equal to a sign.
In a specific implementation, if the number of the preset separators is 1, determining that the integral type of the target calculus information is a fixed integral; if the number of the preset separators is 2, determining that the integral type of the target calculus information is double integral; and if the number of the preset separators is 3, determining that the integral type of the target calculus information is triple integral.
Correspondingly, the step S40 specifically includes:
step S410: and determining a target integral calculation mode corresponding to the integral type of the target calculus information from the preset interface function according to the segmentation result, and performing calculus calculation on the target calculus information through the target integral calculation mode.
Specifically, if the integral information input by the user includes two "< =" substrings, the system calls the fixed integral calculation module to perform fixed integral calculation. And if the integral information input by the user comprises four "< =" substrings, the system calls a double integral calculation module to perform double integral calculation. And if the integral information input by the user comprises six substrings which are < =, calling a triple integral calculation module to calculate the triple integral.
According to the embodiment, the integral type input by the user can be quickly judged according to the number of the target operator in the target calculus information, and the calculus modes input by the user can be effectively distinguished.
In addition, the invention also provides a device for calculating the multi-mode calculus, which comprises:
the receiving module 10 is configured to, when receiving current character string information input by a user, call a preset interface function to determine whether a format of the current character string information meets a preset integral format condition;
a determining module 20, configured to determine that the current character string information is calculus information when a format of the current character string information satisfies a preset calculus format condition;
a segmentation module 30, configured to identify a target identifier from the current character string information, and segment the current character string information according to the target identifier;
and the calculation module 40 is configured to select a corresponding integral calculation mode from the preset interface function according to the segmentation result, and perform calculus calculation on the current character string information through the integral calculation mode.
It can be understood that the multi-mode calculus calculating device of the present invention may be an application program, and the application program is loaded in the device of the above embodiment, and the specific implementation manner of the multi-mode calculus calculating device of the present invention may refer to the above embodiment of the multi-mode calculus calculating method, and will not be described herein again.
Furthermore, the present invention also provides a storage medium, which is a computer-readable storage medium, on which a multi-mode calculus calculation program is stored, and the multi-mode calculus calculation program, when executed by a processor, implements the steps of the multi-mode calculus calculation method as described above.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or system that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or system. The term "comprising", without further limitation, means that the element so defined is not excluded from the group of processes, methods, articles, or systems that include the element.
The above-mentioned serial numbers of the embodiments of the present invention are only for description, and do not represent the advantages and disadvantages of the embodiments.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium (e.g., ROM/RAM, magnetic disk, optical disk) as described above and includes instructions for enabling a terminal device (e.g., a mobile phone, a computer, a server, an air conditioner, or a network device) to execute the method according to the embodiments of the present invention.
The above description is only a preferred embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes, which are made by using the contents of the present specification and the accompanying drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.

Claims (8)

1. A method of multi-modal calculus computation, the method comprising:
when current character string information input by a user is received, judging whether the format of the current character string information meets a preset integral format condition or not by calling a preset interface function;
when the format of the current character string information meets a preset integral format condition, judging that the current character string information is calculus information;
identifying a target identifier from the current character string information, and segmenting the current character string information according to the target identifier;
selecting a corresponding integral calculation mode from the preset interface function according to a segmentation result, and performing calculus calculation on the current character string information through the integral calculation mode;
after the step of determining that the current character string information is calculus information when the format of the current character string information meets the preset calculus format condition, the method further comprises the following steps:
acquiring textbox controls triggered by the current character string information and unit calculus information corresponding to each textbox control, and acquiring preset priorities among the textbox controls;
setting an initial target variable;
assigning unit calculus information corresponding to each textbox control to the initial target variable according to the sequence of the preset priority, and taking an assignment result as target calculus information;
the step of identifying a target identifier from the current character string information and segmenting the current character string information according to the target identifier specifically includes:
identifying preset separators from the target calculus information, acquiring the number of the identified preset separators, and segmenting the target calculus information according to the preset separators;
determining the integral type of the target calculus information according to the number of the preset separators;
correspondingly, the selecting a corresponding integral calculation mode from the preset interface function according to the segmentation result, and performing calculus calculation on the current character string information through the integral calculation mode specifically includes:
determining a target integral calculation mode corresponding to the integral type of the target calculus information from the preset interface function according to the segmentation result;
and carrying out calculus calculation on the target calculus information through the target integral calculation mode.
2. The method of claim 1, wherein the integration types include fixed integration, double integration, and triple integration;
correspondingly, determining the integral type of the target calculus information at any time according to the number of the preset separators specifically comprises:
if the number of the preset separators is 1, determining that the integral type of the target calculus information is a fixed integral; if the number of the preset separators is 2, determining that the integral type of the target calculus information is double integral; and if the number of the preset separators is 3, determining that the integral type of the target calculus information is triple integral.
3. The method of claim 1, wherein the step of identifying a target identifier from the current string information and segmenting the current string information according to the target identifier comprises:
identifying preset separators and target operators from the target calculus information, acquiring the number of the identified target operators, and segmenting the target calculus information according to the preset separators;
determining the integral type of the target calculus information according to the number of the target operators;
correspondingly, the step of selecting a corresponding integral calculation mode from the preset interface function according to the segmentation result and performing calculus calculation on the current character string information through the integral calculation mode specifically includes:
and determining a target integral calculation mode corresponding to the integral type of the target calculus information from the preset interface function according to the segmentation result, and performing calculus calculation on the target calculus information through the target integral calculation mode.
4. The method of claim 3, wherein the integration types include fixed integral, double integral, and triple integral;
correspondingly, the step of determining the integral type of the target calculus information according to the number of the target operators specifically includes:
if the number of the target operators is 2, determining the integral type of the target calculus information as a fixed integral; if the number of the target operators is 4, determining the integral type of the target calculus information as double integral; and if the number of the target operators is 6, determining that the integral type of the target calculus information is triple integral.
5. The method according to any one of claims 1 to 4, wherein the step of determining that the current character string information is calculus information when the format of the current character string information satisfies a preset calculus format condition specifically includes:
traversing the current character string information, and judging that the current character string information is calculus information when character strings matched with the integrand format and the parameter format exist in the traversing result.
6. An apparatus for multi-modal calculus calculation, the apparatus comprising:
the receiving module is used for judging whether the format of the current character string information meets a preset integral format condition or not by calling a preset interface function when the current character string information input by a user is received;
the judging module is used for judging the current character string information as calculus information when the format of the current character string information meets a preset calculus format condition;
the segmentation module is used for identifying a target identifier from the current character string information and segmenting the current character string information according to the target identifier;
the calculation module is used for selecting a corresponding integral calculation mode from the preset interface function according to the segmentation result and carrying out calculus calculation on the current character string information through the integral calculation mode;
the judging module is also used for acquiring textbox controls triggered by the current character string information and unit calculus information corresponding to each textbox control, and acquiring preset priorities among the textbox controls; setting an initial target variable; assigning unit calculus information corresponding to each textbox control to the initial target variable according to the sequence of the preset priority, and taking an assignment result as target calculus information;
the segmentation module is further configured to identify preset separators from the target calculus information, acquire the number of the identified preset separators, and segment the target calculus information according to the preset separators; determining the integral type of the target calculus information according to the number of the preset separators;
the calculation module is further configured to determine, according to the segmentation result, a target integral calculation mode corresponding to the integral type of the target calculus information from the preset interface function; and carrying out calculus calculation on the target calculus information through the target integral calculation mode.
7. A multi-modal calculus calculation device, the device comprising: a memory, a processor and a multimodal calculus calculation program stored on the memory and executable on the processor, the multimodal calculus calculation program being configured to implement the steps of the method of multimodal calculus calculation as claimed in any of claims 1 to 5.
8. A storage medium having stored thereon a multi-modal calculus calculation program configured to implement the steps of the multi-modal calculus calculation method of any of claims 1 to 5.
CN201910359817.0A 2019-04-29 2019-04-29 Multi-mode calculus calculation method, device, equipment and storage medium Active CN110069743B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910359817.0A CN110069743B (en) 2019-04-29 2019-04-29 Multi-mode calculus calculation method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910359817.0A CN110069743B (en) 2019-04-29 2019-04-29 Multi-mode calculus calculation method, device, equipment and storage medium

Publications (2)

Publication Number Publication Date
CN110069743A CN110069743A (en) 2019-07-30
CN110069743B true CN110069743B (en) 2023-02-24

Family

ID=67369590

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910359817.0A Active CN110069743B (en) 2019-04-29 2019-04-29 Multi-mode calculus calculation method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN110069743B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH10171786A (en) * 1996-12-09 1998-06-26 Tokai Univ System for editing mathematical expression
CN101261554A (en) * 2008-04-21 2008-09-10 东莞市步步高教育电子产品有限公司 Formula, expression hand-written inputting and computing system and method
CN101281514A (en) * 2008-04-03 2008-10-08 博采林电子科技(深圳)有限公司 Portable function arithmetic operation device and method for processing and computing function
CN102521411A (en) * 2011-12-28 2012-06-27 畅捷通信息技术股份有限公司 Formula and formula data processing device and formula and formula data processing method
WO2013024810A1 (en) * 2011-08-12 2013-02-21 株式会社モーションラボ High-speed computation device, high-speed computation program and recording medium upon which high-speed computation program is recorded, apparatus control system, as well as simulation system

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8943113B2 (en) * 2011-07-21 2015-01-27 Xiaohua Yi Methods and systems for parsing and interpretation of mathematical statements
US10346681B2 (en) * 2015-09-26 2019-07-09 Wolfram Research, Inc. Method and computing device for optically recognizing mathematical expressions

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH10171786A (en) * 1996-12-09 1998-06-26 Tokai Univ System for editing mathematical expression
CN101281514A (en) * 2008-04-03 2008-10-08 博采林电子科技(深圳)有限公司 Portable function arithmetic operation device and method for processing and computing function
CN101261554A (en) * 2008-04-21 2008-09-10 东莞市步步高教育电子产品有限公司 Formula, expression hand-written inputting and computing system and method
WO2013024810A1 (en) * 2011-08-12 2013-02-21 株式会社モーションラボ High-speed computation device, high-speed computation program and recording medium upon which high-speed computation program is recorded, apparatus control system, as well as simulation system
CN102521411A (en) * 2011-12-28 2012-06-27 畅捷通信息技术股份有限公司 Formula and formula data processing device and formula and formula data processing method

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
中文电子文档中数学公式的语义识别方法研究;王高,等;《小型微型计算机系统》;20171031;第38卷(第10期);第2379-2384页 *

Also Published As

Publication number Publication date
CN110069743A (en) 2019-07-30

Similar Documents

Publication Publication Date Title
US9990209B2 (en) Digital assistance device for facilitating multi-stage setup
EP2557490A1 (en) Icon adding method and device in interface of android system and mobile terminal
US8335997B2 (en) Electronic device and method for sorting menu options of a program menu in the electronic device
CN111831176A (en) Application program management method and device
CN109144650B (en) Display object management method and device, electronic equipment and computer storage medium
CN111831182A (en) Application icon control method and device and electronic equipment
CN110851987B (en) Method, apparatus and storage medium for predicting calculated duration based on acceleration ratio
CN109522086B (en) Operation method and device for window, computer device and readable storage medium
CN109484925B (en) Floor information display method and device, computer equipment and storage medium
CN110020333A (en) Data analysing method and device, electronic equipment, storage medium
EP3273337A1 (en) Method and system applied to touchscreen for newly creating and dismissing folder
CN110069743B (en) Multi-mode calculus calculation method, device, equipment and storage medium
CN105224680A (en) A kind of method of search for application and terminal
CN112486492A (en) Page generation method and device, storage medium and electronic equipment
CN112199404A (en) Report creating method and device, electronic equipment and computer readable storage medium
CN106951241B (en) Method and device for setting display of application program
CN110796200B (en) Data classification method, terminal, device and storage medium
CN108762736B (en) Project branch management method, device and equipment and computer readable storage medium
CN110838001A (en) Sample analysis method and sample analysis system for nuclear power plant
US20140043286A1 (en) Method for identifying touch pen in electronic device, and electronic device
CN111049981A (en) Message identification method, device, user equipment and computer readable storage medium
CN111176830A (en) Information flow distribution method and device and server system
CN110020765B (en) Service flow switching method and device
CN108921374B (en) Policy distribution method, device and apparatus and computer readable storage medium
KR102386822B1 (en) Method and Apparatus for Task Assignment and Content Authoring for Multiple Users in the Industrial eXtended Reality Content Platform

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant