CN110020401B - Method, device and equipment for calculating curve integral of arc length and storage medium - Google Patents
Method, device and equipment for calculating curve integral of arc length and storage medium Download PDFInfo
- Publication number
- CN110020401B CN110020401B CN201910287451.0A CN201910287451A CN110020401B CN 110020401 B CN110020401 B CN 110020401B CN 201910287451 A CN201910287451 A CN 201910287451A CN 110020401 B CN110020401 B CN 110020401B
- Authority
- CN
- China
- Prior art keywords
- integral
- curve
- model
- arc length
- curve integral
- 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
Links
- 238000000034 method Methods 0.000 title claims abstract description 47
- 238000004364 calculation method Methods 0.000 claims abstract description 114
- 230000010354 integration Effects 0.000 claims description 84
- 238000000605 extraction Methods 0.000 claims description 7
- 238000001914 filtration Methods 0.000 claims description 6
- 230000008569 process Effects 0.000 description 8
- 238000004891 communication Methods 0.000 description 5
- 239000003550 marker Substances 0.000 description 5
- 238000010586 diagram Methods 0.000 description 4
- 238000005516 engineering process Methods 0.000 description 2
- 230000006870 function Effects 0.000 description 2
- 238000007405 data analysis Methods 0.000 description 1
- 230000003993 interaction Effects 0.000 description 1
- 238000010801 machine learning Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F17/00—Digital computing or data processing equipment or methods, specially adapted for specific functions
- G06F17/10—Complex mathematical operations
- G06F17/15—Correlation function computation including computation of convolution operations
Landscapes
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Mathematical Physics (AREA)
- Computational Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Mathematical Analysis (AREA)
- Mathematical Optimization (AREA)
- Pure & Applied Mathematics (AREA)
- Data Mining & Analysis (AREA)
- Algebra (AREA)
- Databases & Information Systems (AREA)
- Software Systems (AREA)
- General Engineering & Computer Science (AREA)
- Computing Systems (AREA)
- Image Generation (AREA)
Abstract
The invention belongs to the technical field of mathematical computation and discloses a method, a device, equipment and a storage medium for calculating curve integral of arc length. The method comprises the following steps: acquiring integral data corresponding to curve integrals of arc lengths to be calculated, and extracting at least two first integral elements and value ranges corresponding to the first integral elements from the integral data; determining a curve integral model corresponding to the curve integral of the arc length according to the first integral element; determining an integral calculation formula corresponding to the curve integral of the arc length according to the curve integral model; and calculating an integral result corresponding to the curve integral of the arc length according to the value range corresponding to the first integral element and the integral calculation formula. By means of the method, the technical problem that the actual requirements of users cannot be met due to the fact that the arc length curve integral calculation mode is too single in the prior art is solved.
Description
Technical Field
The invention relates to the technical field of mathematical computation, in particular to a method, a device, equipment and a storage medium for calculating curve integral of arc length.
Background
Curve integration over arc length is a specific curve integration, also commonly referred to as curve integration of the first type.
At present, in order to calculate the curve integral of the arc length, a plurality of calculating devices for integrating the curve of the arc length, such as a double integral counter, are successively introduced.
Nevertheless, the result of integrating the curve integral over the arc length can be calculated quickly and accurately using these calculation means. However, since the current computing device can only identify 14 kinds of original curve integral models corresponding to curve integrals of arc lengths, the user is required to provide computing data according to the 14 kinds of original curve integral models to obtain corresponding integral results.
Obviously, the existing calculation scheme for the curve integral of the arc length is difficult to meet the requirements of users, so a new calculation scheme for the curve integral of the arc length needs to be provided to solve the above technical problems.
The above is only for the purpose of assisting understanding of the technical aspects of the present invention, and does not represent an admission that the above is prior art.
Disclosure of Invention
The invention mainly aims to provide a method, a device, equipment and a storage medium for calculating the curve integral of the arc length, and aims to solve the technical problem that the actual requirements of users cannot be met due to the fact that the curve integral of the arc length is calculated in a single mode in the prior art.
In order to achieve the above object, the present invention provides a method for calculating a curve integral of an arc length, the method comprising the steps of:
acquiring integral data corresponding to curve integrals of arc lengths to be calculated, and extracting at least two first integral elements and value ranges corresponding to the first integral elements from the integral data;
determining a curve integral model corresponding to the curve integral of the arc length according to the first integral element;
determining an integral calculation formula corresponding to the curve integral of the arc length according to the curve integral model;
and calculating an integral result corresponding to the curve integral of the arc length according to the value range corresponding to the first integral element and the integral calculation formula.
Preferably, the step of extracting at least two first integral elements from the integral data and the value ranges corresponding to the first integral elements includes:
converting the integral data into a character string according to a preset corresponding relation table to obtain a character string to be processed;
filtering the illegal characters in the character string to be processed according to a preset illegal character table to obtain a target character string;
and extracting at least two first integral elements from the target character string and the value range corresponding to the first integral elements.
Preferably, the step of determining a curve integral model corresponding to the curve integral over the arc length according to the first integral element includes:
determining the position of each first integral element in the integral data;
and arranging the first integral elements in sequence according to the sequence of the positions of the first integral elements in the integral data, and setting a preset interval coincidence between two adjacent first integral elements to obtain a curve integral model corresponding to the curve integral of the arc length.
Preferably, the first integration element comprises an integration arc segment element and a coordinate element;
the step of calculating the integral result corresponding to the curve integral of the arc length according to the value range corresponding to the first integral element and the integral calculation formula includes:
determining an upper integral limit and a lower integral limit according to the value range corresponding to the integral arc section element;
determining an arc differential according to the value range corresponding to the coordinate element;
substituting the upper and lower integral limits and the arc differential into the integral calculation formula to obtain a target integral calculation formula;
and calculating an integral result corresponding to the curve integral of the arc length according to the target integral calculation formula.
Preferably, before the step of determining an integral calculation formula corresponding to the curve integral of the arc length according to the curve integral model, the method further comprises:
judging whether the curve integral model is available;
if the curve integral model is available, executing the operation of determining an integral calculation formula corresponding to the curve integral of the arc length according to the curve integral model;
if the curve integral model is not available, making an error prompt to the user so that the user can modify the integral data according to the error prompt;
wherein the step of judging whether the curve integral model is available comprises:
comparing the curve integral model with a preset curve integral model in a pre-constructed curve integral model library, and if the preset curve integral model which is the same as the curve integral model exists in the curve integral model library, determining that the curve integral model is available;
otherwise, it is determined that the curve integration model is not available.
Preferably, before the step of comparing the curve integral model with the preset curve integral model in the curve integral model library constructed in advance, the method further comprises:
acquiring a predetermined primary curve integral model, and extracting a second integral element included in the primary curve integral model;
adjusting the position of the second integral element in the primary curve integral model to obtain a secondary curve integral model equivalent to the primary curve integral model, wherein the secondary curve integral model comprises the primary curve integral model;
and taking the secondary curve integral model as the preset curve integral model.
Preferably, before the step of adjusting the position of the second integral element in the primary curve integral model to obtain a secondary curve integral model equivalent to the primary curve integral model, the method further includes:
counting the number N of second integral elements included in the primary curve integral model, wherein N is an integer greater than or equal to 2;
determining the number M of second-stage curve integral models equivalent to the first-stage curve integral model according to the number N, wherein M is an integer greater than or equal to N;
determining an adjustment rule of the primary curve integral model according to the number M and the second integral element;
the step of adjusting the position of the second integral element in the primary curve integral model to obtain a secondary curve integral model equivalent to the primary curve integral model includes:
and adjusting the position of the second integral element in the primary curve integral model according to the adjustment rule to obtain M secondary curve integral models equivalent to the primary curve integral model.
In addition, to achieve the above object, the present invention further provides a device for calculating a curve integral of an arc length, the device comprising:
the device comprises an extraction module, a calculation module and a calculation module, wherein the extraction module is used for acquiring integral data corresponding to curve integral of arc length to be calculated, and extracting at least two first integral elements and value ranges corresponding to the first integral elements from the integral data;
a first determining module, configured to determine, according to the first integral element, a curve integral model corresponding to the curve integral of the arc length;
the second determining module is used for determining an integral calculation formula corresponding to the curve integral of the arc length according to the curve integral model;
and the calculating module is used for calculating an integral result corresponding to the curve integral of the arc length according to the value range corresponding to the first integral element and the integral calculating formula.
Further, to achieve the above object, the present invention also proposes a curve integral calculation device for an arc length, the device comprising: a memory, a processor and a curve integral over arc length calculation program stored on the memory and executable on the processor, the curve integral over arc length calculation program configured to implement the steps of the curve integral over arc length calculation method as described above.
Furthermore, to achieve the above object, the present invention further provides a computer readable storage medium having stored thereon a curve integral calculation program for an arc length, which when executed by a processor implements the steps of the curve integral calculation method for an arc length as described above.
According to the arc length curve integral calculation scheme provided by the invention, when an integral result of the arc length curve integral is calculated, the integral result of the arc length curve integral can be automatically calculated by acquiring integral data corresponding to the arc length curve integral, extracting first integral elements relevant to the arc length curve integral required to be calculated currently and value ranges corresponding to the first integral elements from the integral data, further determining a curve integral model corresponding to the arc length curve integral required to be calculated currently according to the extracted first integral elements, then determining an integral calculation formula corresponding to the arc length curve integral according to the determined curve integral model, and finally according to the value ranges corresponding to the first integral elements and the determined integral calculation formula. The process of determining the curve integral model corresponding to the curve integral of the pair of arc lengths is based on the extracted first integral element, and is not directly based on the integral data provided by the user, so that the format of the integral data provided by the user is not limited to be in accordance with the 14 existing original curve integral models, the user can provide the integral data according to the input habit of the user, the use of the user is greatly facilitated, and the technical problem that the actual requirements of the user cannot be met due to the fact that the curve integral calculation mode for the arc lengths is too single in the prior art is effectively solved.
Drawings
FIG. 1 is a schematic diagram of a device for calculating an arc length curve integral in a hardware operating environment according to an embodiment of the present invention;
FIG. 2 is a schematic flow chart of a first embodiment of a method for calculating the integral of the curve of the arc length according to the present invention;
FIG. 3 is a schematic flow chart of a second embodiment of a method for calculating the integral of the curve of the arc length according to the present invention;
fig. 4 is a block diagram of a first embodiment of the curve integral calculating device for arc length according to 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
It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
Referring to fig. 1, fig. 1 is a schematic structural diagram of a device for calculating an arc length curve integral in a hardware operating environment according to an embodiment of the present invention.
As shown in fig. 1, the curve integral calculation device for the pair of arc lengths may include: a processor 1001, such as a Central Processing Unit (CPU), a communication bus 1002, a user interface 1003, a network interface 1004, and a memory 1005. Wherein a communication bus 1002 is used to enable connective communication between these components. The user interface 1003 may include a Display (Display), an input unit such as a Keyboard (Keyboard), and the optional user interface 1003 may also include a standard wired interface, a wireless interface. The network interface 1004 may optionally include a standard wired interface, a WIreless interface (e.g., a WIreless-FIdelity (WI-FI) interface). The Memory 1005 may be a Random Access Memory (RAM) Memory, or may be a Non-Volatile Memory (NVM), such as a disk Memory. The memory 1005 may alternatively be a storage device separate from the processor 1001.
Those skilled in the art will appreciate that the configuration shown in fig. 1 does not constitute a limitation of the curve integral calculation device for arc length, and may include more or fewer components than shown, or some components in combination, or a different arrangement of components.
As shown in fig. 1, a memory 1005, which is a storage medium, may include therein an operating system, a network communication module, a user interface module, and a curve integral calculation program for an arc length.
In the curve integral calculating device for arc length shown in fig. 1, the network interface 1004 is mainly used for data communication with a network server; the user interface 1003 is mainly used for data interaction with a user; the processor 1001 and the memory 1005 of the arc length curve integration calculation device of the present invention may be disposed in the arc length curve integration calculation device, and the arc length curve integration calculation device calls the arc length curve integration calculation program stored in the memory 1005 through the processor 1001 and executes the arc length curve integration calculation method provided by the embodiment of the present invention.
An embodiment of the present invention provides a method for calculating a curve integral of an arc length, and referring to fig. 2, fig. 2 is a schematic flow chart of a first embodiment of a method for calculating a curve integral of an arc length according to the present invention.
In this embodiment, the method for calculating the curve integral of the arc length includes the following steps:
step S10, acquiring integral data corresponding to curve integral of arc length to be calculated, and extracting at least two first integral elements from the integral data and value ranges corresponding to the first integral elements.
It will be appreciated that the integration data may come from a user manual input or data output internally to the system awaiting further processing. In this embodiment, the integration data is from a user input.
In addition, the integral data mentioned in this embodiment specifically refers to the correlation data corresponding to the curve integral over the arc length, which needs to calculate the integral result, and mainly includes a first integral element for calculating the curve integral over the arc length and a value range corresponding to the first integral element.
In addition, it should be noted that the first integral element in this embodiment does not refer to the arc length element ds in the curve integral of the arc length, but also includes a coordinate element, an integral arc segment element, an integrand element, and the like, which are not listed here, and no limitation is made to this.
In addition, it is worth mentioning that, it can be determined from the existing 14 kinds of original curve integral models (hereinafter, referred to as first-order curve integral models), at least two integral elements are required to form one first-order curve integral model, and the value ranges corresponding to the two integral elements are required to be included.
The curve integration model in this embodiment is substantially equivalent to the first-order curve integration model, i.e., contains the same integration elements, but the positions of the integration elements are different.
Therefore, in order to ensure that the operation of determining the curve integral model in step S20 can be performed smoothly, at least two first integral elements and the value ranges corresponding to the first integral elements need to be extracted when the first integral elements are extracted from the integral data.
For ease of understanding, the following list lists 14 existing first-order curve integration models, respectively:
(1)y=y(x),a≤x≤b;
(2)x=x(y),c≤y≤d;
(3)x=x(t),y=y(t),α≤t≤β;
(4)f=f(x,y),y=y(x),a≤x≤b;
(5)f=f(x,y),x=x(y),c≤y≤d;
(6)f=f(x,y),x=x(t),y=y(t),α≤t≤β;
(7)y=y(x),z=z(x),a≤x≤b;
(8)x=x(y),z=z(y),c≤y≤d;
(9)x=x(z),y=y(z),p≤z≤q;
(10)x=x(t),y=y(t),z=z(t),α≤t≤β;
(11)f=f(x,y,z),y=y(x),z=z(x),a≤x≤b;
(12)f=f(x,y,z),x=x(y),z=z(y),c≤y≤d;
(13)f=f(x,y,z),x=x(z),y=y(z),p≤z≤q;
(14)f=f(x,y,z),x=x(t),y=y(t),z=z(t),α≤t≤β。
accordingly, if the integral data provided by the user is "y = y (x), a ≦ x ≦ b", or "a ≦ x ≦ b, y = y (x)", the first integral element extracted from the integral data, specifically, the coordinate element "x" and the coordinate element "y", a value range corresponding to the coordinate element "x" extracted from the integral data is "a ≦ x ≦ b", and a value range corresponding to the coordinate element "x" is "y = y (x)".
It should be understood that the above is only an example, and the technical solution of the present invention is not limited in any way, and in practical applications, those skilled in the art can make settings according to needs, and the present invention is not limited herein.
In addition, it is worth mentioning that in practical applications, when the computer device processes data input by the user, the computer device usually converts the data input by the user into a character string format, and then performs corresponding processing on the basis of the character string according to the service requirement.
Therefore, before the operation of extracting the first integral element and the value range corresponding to the first integral element is performed, the integral data may be converted into a character string, and then the first integral element and the value range corresponding to the first integral element may be extracted from the character string.
For ease of understanding, the present embodiment presents a specific implementation, generally as follows:
(1) And converting the integral data into a character string according to a preset corresponding relation table to obtain the character string to be processed.
It should be understood that the correspondence table is constructed before performing the operation of calculating the integral of the curve for the arc length as referred to in this example.
In practical application, in order to be able to identify the content in the integral data as accurately as possible, the integral data of curve integrals written by different users for the arc length may be collected from each big data platform in advance, and a corresponding relation table capable of identifying the integral data provided by different users as possible is determined by analyzing and learning a large amount of existing integral data based on a big data analysis technology and a machine learning technology.
For example, it may be set in the correspondence table, and if the current information extracted from the integration data is "x ∈ [ a, b ]", the content may be converted into a character string "a ≦ x ≦ b".
For another example, it may be set in the correspondence table that if any two first integral elements are in accordance with intervals such as a semicolon, a pause mark, a blank space, and the like, the current coincidence is replaced by a comma.
It should be understood that the above is only an example, and the technical solution of the present invention is not limited in any way, and in a specific application, a person skilled in the art may set the technical solution as needed, and the present invention is not limited thereto.
(2) And filtering the illegal characters in the character string to be processed according to a preset illegal character table to obtain a target character string.
It should be understood that, in practical applications, when providing the point data, the user may input the first point elements capable of determining the curve point model corresponding to the curve point of the arc length, and the value range corresponding to each first point element, and may add some illegal characters according to the writing habit of the individual. Therefore, in order to ensure that the computer device can accurately extract the first integral element from the integral data and the value range corresponding to the first integral element, an illegal character table can be preset, and illegal characters can be recorded in the illegal character table. In this way, when the illegal character filtering operation is performed on the character string to be processed, the character string to be processed is directly traversed, the traversed current character is compared with the illegal character in the illegal character table, and if the traversed current character is the same as the illegal character, the traversed current character is deleted from the character string to be processed, so that the target character string is obtained.
(3) And extracting at least two first integral elements from the target character string and the value range corresponding to the first integral elements.
For ease of understanding, the following description is made in conjunction with the examples:
assume that the user inputs point data as: "y = y (x) and x ∈ [ a, b ]. "the illegal characters recorded in the preset illegal character table B are: b = { ". ","! ","? "}.
Then the character string to be processed { S = { y = y (x), a ≦ x ≦ b, corresponding to the above-described integral data, is converted by the character string. }.
And traversing the character string S to be processed and the illegal character table B respectively, comparing the characters traversed from the character string S to be processed with the characters traversed from the illegal character table B, and finally determining the characters in the character string S to be processed. "is an illegal character.
Next, the characters in the character string S to be processed ". Filtering to obtain the target character string S P ={S={y=y(x),a≤x≤b}。
Finally, from the target string S P The first integral elements extracted from the integral data are specifically coordinate elements 'x' and coordinate elements 'y', the value range corresponding to the coordinate elements 'x' extracted from the integral data is that 'a is more than or equal to x is less than or equal to b', and the coordinate elements 'x' are extracted from the integral dataThe element "x" corresponds to a range of values "y = y (x)".
It should be understood that the above description is only a specific implementation manner of extracting the first integral element from the integral data and a value range corresponding to the first integral element, and the technical solution of the present invention is not limited at all, and in a specific application, a person skilled in the art may set the value range according to needs, and the present invention is not limited to this.
The term "first" in the above-mentioned "first integral element" is used only to indicate that the integral element is extracted from the integral data, and does not limit the integral data itself, and the first integral element may be any integral element in the integral data.
Correspondingly, the "first stage" in the "first stage curve integral model" does not cause any limitation to the model corresponding to the curve integral of the arc length, and in practical application, the curve integral model may be any one first stage curve integral model or any two-stage curve integral model equivalent to the first stage curve integral model.
Accordingly, the "second order" in the "second order curve integral model" does not impose any limitation on the model corresponding to the curve integral of the arc length.
And S20, determining a curve integral model corresponding to the curve integral of the arc length according to the first integral element.
The step of determining a curve integral model corresponding to the curve integral over the arc length is roughly as follows:
firstly, determining the position of each first integral element in the integral data;
then, according to the sequence of the positions of the first integral elements in the integral data, arranging the first integral elements in sequence, and setting a preset interval between two adjacent first integral elements to meet the requirement, such as comma, to obtain a curve integral model corresponding to the curve integral of the arc length.
For ease of understanding, the following description is made in conjunction with the examples:
assuming that the integral data provided by the user is "y = y (x), and x is greater than or equal to a and is less than or equal to b", the extracted first integral element is specifically a coordinate element "x" and a coordinate element "y", a value range corresponding to the coordinate element "x" extracted from the integral data is "a is greater than or equal to x and is less than or equal to b", and a value range corresponding to the coordinate element "x" is "y = y (x)".
Meanwhile, the position of the coordinate element "x" obtained is w x The position of the coordinate element "y" is w y 。
By comparison, w is found y Corresponding value is less than w x The corresponding numerical value, i.e. coordinate element "y", should be located before coordinate element "x", and the curve integral model obtained by this arrangement is "y = y (x), a ≦ x ≦ b".
If the integral data provided by the user is "a is not less than x is not less than b, y = y (x)", although the extracted first integral element is still the coordinate element "x" and the coordinate element "y", the value range corresponding to the coordinate element "x" extracted from the integral data is "a is not less than x is not less than b", and the value range corresponding to the coordinate element "x" is "y = y (x)".
However, by comparing w x Corresponding numerical value and w y The corresponding value can be found, w y Corresponding values are greater than w x The corresponding numerical value, i.e., the coordinate element "y" should be located behind the coordinate element "x", and the curve integral model obtained by this arrangement is "a ≦ x ≦ b, y = y (x)".
It should be understood that the above is only an example, and the technical solution of the present invention is not limited in any way, and in a specific application, a person skilled in the art may set the technical solution as needed, and the present invention is not limited thereto.
In addition, it should be noted that the curve integration model in this embodiment specifically includes a first-order curve integration model and an equivalent model equivalent to the first-order curve integration model.
For convenience of explanation, the first-order curve integration model and an equivalent model equivalent to the first-order curve integration model are hereinafter referred to as a second-order curve integration model.
Accordingly, the curve integral model determined above is any one of the two-stage curve integral models.
And S30, determining an integral calculation formula corresponding to the curve integral of the pair of arc lengths according to the curve integral model.
Specifically, because the existing 14 kinds of first-order curve integration models respectively correspond to four different curve integrations for arc lengths, the actual correspondence relationship is as follows:
the first-stage curve integral models (1) to (3) correspond to plane curve arc lengths, the first-stage curve integral models (4) to (6) correspond to plane curves corresponding to arc lengths, the first-stage curve integral models (7) to (10) correspond to space curve arc lengths, and the first-stage curve integral models (11) to (14) correspond to space curves corresponding to arc lengths.
Accordingly, the derived curve integral model also corresponds to four different curve integrals for the arc length.
Thus, the charging calculation formula corresponding to the curve integral for the pair of arc lengths determined by the curve integral model may also be different.
It should be noted that, in practical applications, in order to quickly and accurately determine the integral calculation formula corresponding to the curve integral of the arc length according to the curve integral model, the following convention may be performed in advance:
(1) Representing a position where a ternary function flag "f (xyz) =" exists in the curve integral model by f 1;
(2) Representing by f2 a position where a binary function flag "f (xy) =" exists in the curve integral model;
(3) Representing by f3 the position where the mark "x =" is present in the curve integral model;
(4) Denote by f4 the position where the marker "y =" is present in the curve integral model;
(5) Denote by f5 the position in the curve integral model where the mark "z =" is present;
(6) Denote by f6 the position in the curve integral model where the marker "≦ x ≦" is present;
(7) Denote by f7 the position in the curve integration model where the marker "≦ y ≦";
(8) Denote by f8 the position in the curve integral model where the marker "≦ z ≦" is present;
(9) Denote by f9 the position in the curve integration model where the marker "≦ t ≦" is present;
(10) Denote by ft1 the position where the 1 st "" exists in the curve integral model;
(11) Denote by ft2 the position where the 2 nd "," is present in the curve integral model;
(12) Denote by ft3 the position where the 3 rd "" is present in the curve integral model;
(13) The position where the 4 th "" exists in the curve integral model is denoted by ft 4.
Accordingly, if in the curve integration model, f2>0, f3>0, f7>0, and the rest are all equal to 0, it is determined that the curve integration with respect to the arc length that the user needs to calculate is substantially the integration result of the plane curve integration with respect to the arc length, in which case, the integral calculation formula that needs to be selected is:
it should be understood that in the above integral calculation formula, I represents the planar curve integral over the arc length,representing an integration arc segment, f (x (y), y) representing an integrand, and->The arc differential is shown.
Further, if in the curve integration model, f2>0, f4>0, f6>0, and the rest are all equal to 0, it is determined that the curve integration with respect to the arc length that the user needs to calculate is substantially the integration result of the plane curve integration with respect to the arc length, in this case, the integral calculation formula that needs to be selected is:
it should be understood that in the above integral calculation formula, I represents the planar curve integral over the arc length,represents an integrating arc segment, f (x, y (x)) represents an integrand, and->The arc differential is indicated.
Further, if in the curve integration model, f2>0, f3>0, f4>0, f9>0, and the rest are all equal to 0, it is determined that the curve integration with respect to the arc length that the user needs to calculate is substantially the integration result of the plane curve integration with respect to the arc length, in this case, the integral calculation formula that needs to be selected is:
it should be understood that in the above integral calculation formula, I represents the planar curve integral over the arc length,representing an integration arc segment, f (x (t), y (t)) representing an integrand, and->The arc differential is shown.
Further, if in the curve integration model, f1>0, f3>0, f4>0, f8>0, and the rest are all equal to 0, it is determined that the curve integration with the arc length that the user needs to calculate is substantially the integration result of the space curve integration with the arc length, in this case, the integral calculation formula that needs to be selected is:
it should be understood that, in the above integral calculation formula, S represents the spatial curve integral over the arc length,represents an integrating arc segment, f (x (z), y (z), z) represents an integrand, and->The arc differential is shown.
Further, if in the curve integration model, f1>0, f3>0, f5>0, f7>0, and the rest are all equal to 0, it is determined that the curve integration with respect to the arc length that the user needs to calculate is substantially the integration result of the space curve integration with respect to the arc length, in this case, the integral calculation formula that needs to be selected is:
it should be understood that, in the above integral calculation formula, S represents the spatial curve integral over the arc length,represents an integrating arc segment, f (x (y), y, z (y)) represents an integrand, and->The arc differential is shown.
Further, if in the curve integration model, f1>0, f4>0, f5>0, f6>0, and the rest are all equal to 0, it is determined that the curve integration with the arc length that the user needs to calculate is substantially the integration result of the space curve integration with the arc length, in this case, the integral calculation formula that needs to be selected is:
it should be understood that, in the above integral calculation formula, S represents the spatial curve integral over the arc length,represents an integrating arc segment, f (x, y (x), z (x)) represents an integrand, and->The arc differential is shown.
Further, if in the curve integration model, f1>0, f3>0, f4>0, f5>0, f9>0, and the rest are all equal to 0, it is determined that the curve integration with respect to the arc length that the user needs to calculate is substantially the integration result of the space curve integration with respect to the arc length, in this case, the integral calculation formula that needs to be selected is:
it should be understood that, in the above integral calculation formula, S represents the space curve integral over the arc length,represents an integration arc segment, f (x (t), y (t), z (t)) represents an integrand, and->The arc differential is shown.
Further, if in the curve integration model, f3>0, f7>0, and the rest are all equal to 0, it is determined that the curve integration of the arc length that needs to be calculated by the user is substantially the arc length of the plane curve, in this case, the integral calculation formula that needs to be selected is:
it should be understood that L in the above integral calculation formula I The arc length of the curve representing the plane is,the segment of the integrated arc is represented,the arc differential is shown.
Further, if in the curve integral model, f1=0, f2>0, f3>0, f4=0, f7>0, and the rest are all equal to 0, it is determined that the curve integral to the arc length that needs to be calculated by the user is substantially the arc length of the plane curve, in this case, the integral calculation formula that needs to be selected is as follows:
it should be understood that L in the above integral calculation formula I The arc length of the curve representing the plane is,the segment of the integrated arc is represented,the arc differential is indicated.
Further, if in the curve integration model, f3>0, f4>0, f9>0, and the rest are all equal to 0, it is determined that the curve integration of the arc length that needs to be calculated by the user is substantially the arc length of the plane curve, in this case, the integral calculation formula that needs to be selected is:
it should be understood that L in the above integral calculation formula I The arc length of the curve representing the plane is,represents an integrating arc segment, and>the arc differential is shown.
Further, if in the curve integral model, f3>0, f4>0, f8>0, and the rest are all equal to 0, it is determined that the curve integral to the arc length that needs to be calculated by the user is substantially the arc length of the space curve, in this case, the integral calculation formula that needs to be selected is:
it should be understood that L in the above integral calculation formula s The arc length of the curve in space is shown,the segment of the integrated arc is represented,the arc differential is indicated.
Further, if in the curve integration model, f3>0, f5>0, f7>0, and the rest are all equal to 0, it is determined that the curve integration of the arc length that needs to be calculated by the user is substantially the arc length of the space curve, in this case, the integral calculation formula that needs to be selected is:
it should be understood that L in the above integral calculation formula s The arc length of the curve in space is shown,the segment of the integrated arc is represented,the arc differential is shown.
Further, if in the curve integration model, f1=0, f2>0, f3>0, f4=0, f7>0, and the rest are all equal to 0, it is determined that the curve integration with respect to the arc length that needs to be calculated by the user is substantially the arc length of the space curve, in this case, the integral calculation formula that needs to be selected is:
it should be understood that L in the above integral calculation formula s The arc length of the curve in space is shown,the segment of the integrated arc is represented,the arc differential is shown.
Further, if in the curve integration model, f1=0, f2>0, f3>0, f4=0, f7>0, and the rest are all equal to 0, it is determined that the curve integration with respect to the arc length that needs to be calculated by the user is substantially the arc length of the space curve, in this case, the integral calculation formula that needs to be selected is:
it should be understood that L in the above integral calculation formula s The arc length of the curve in space is shown,represents an integration arc segment, <' > or>The arc differential is shown.
It should be understood that the above is only a specific implementation manner of determining the integral calculation formula corresponding to the curve integral of the arc length according to the curve integral model, and the technical solution of the present invention is not limited at all.
And S40, calculating an integral result corresponding to the curve integral of the arc length according to the value range corresponding to the first integral element and the integral calculation formula.
For convenience of understanding, in step S40, the operation of calculating the integral result corresponding to the curve integral of the arc length according to the value range corresponding to the first integral element and the integral calculation formula is described, in this embodiment, taking the first integral element as an integral arc segment element and a coordinate element respectively as an example, and performing the following description:
firstly, determining an upper integral limit and a lower integral limit according to a value range corresponding to the integral arc section element;
then, determining an arc differential according to the value range corresponding to the coordinate elements;
then, substituting the upper and lower integral limits and the arc differential into the integral calculation formula to obtain a target integral calculation formula;
and finally, calculating an integral result corresponding to the curve integral of the pair of arc lengths according to the target integral calculation formula.
It should be understood that the above is only a specific implementation manner for calculating the integration result corresponding to the curve integral of the arc length, and the technical solution of the present invention is not limited in any way, and in a specific application, a person skilled in the art may set the method according to needs, and the present invention is not limited to this.
It is obvious from the above description that, in the method for calculating the curve integral of the arc length provided in this embodiment, when calculating the integral result of the curve integral of the arc length, by obtaining integral data corresponding to the curve integral of the arc length, extracting, from the integral data, the first integral element related to the curve integral of the arc length that needs to be currently calculated, and the value range corresponding to each first integral element, further determining, according to the extracted first integral element, the curve integral model corresponding to the curve integral of the arc length that needs to be currently calculated, then determining, according to the determined curve integral model, the integral calculation formula corresponding to the curve integral of the arc length, and finally, according to the value range corresponding to each first integral element and the determined integral calculation formula, the integral result of the curve integral of the arc length can be automatically calculated. The process of determining the curve integral model corresponding to the curve integral of the pair of arc lengths is based on the extracted first integral element, and is not directly based on the integral data provided by the user, so that the format of the integral data provided by the user is not limited to be in accordance with the 14 existing original curve integral models, the user can provide the integral data according to the input habit of the user, the use of the user is greatly facilitated, and the technical problem that the actual requirements of the user cannot be met due to the fact that the curve integral calculation mode for the arc lengths is too single in the prior art is effectively solved.
Referring to fig. 3, fig. 3 is a flowchart illustrating a method for calculating an integral of a curve with an arc length according to a second embodiment of the present invention.
Based on the first embodiment, before the step S10, the method for calculating the curve integral of the arc length in this embodiment further includes:
and S00, judging whether the curve integral model is available.
Accordingly, if it is determined by the judgment that the curve integral model is available, the step S30 is performed; if the curve integral model is determined to be unavailable through judgment, step S50 is executed to give an error prompt to the user, so that the user modifies the integral data according to the error prompt.
In order to facilitate understanding of the operation of determining whether the curve integration model is available in step S00, this embodiment provides a specific determination manner, which is roughly as follows:
comparing the curve integral model with a preset curve integral model in a curve integral model library which is constructed in advance, and if the preset curve integral model which is the same as the curve integral model exists in the curve integral model library, determining that the curve integral model is available;
otherwise, it is determined that the curve integration model is not available.
It should be understood that the above is only a specific implementation manner for determining whether the curve integration model is available, and the technical solution of the present invention is not limited in any way, and in a specific application, a person skilled in the art may set the implementation manner as needed, and the present invention is not limited to this.
In addition, it is worth mentioning that, in order to ensure the smooth operation of the above operations, before comparing the curve integral model with the preset curve integral model in the curve integral model library which is constructed in advance, a curve integral model library needs to be constructed first, that is, the preset curve integral model needs to be generated first, and the preset curve integral model is added to the curve integral model library.
For ease of understanding, a specific way of generating the pre-set curve integral model is given below, roughly as follows:
firstly, acquiring a predetermined primary curve integral model, and extracting a second integral element included in the primary curve integral model;
then, adjusting the position of the second integral element in the primary curve integral model to obtain a secondary curve integral model equivalent to the primary curve integral model, wherein the secondary curve integral model comprises the primary curve integral model;
and finally, taking the secondary curve integral model as the preset curve integral model.
The operation of adjusting the position of the second integral element in the primary curve integral model to obtain a secondary curve integral model equivalent to the primary curve integral model may specifically be:
firstly, counting the number N of second integral elements included in the primary curve integral model, wherein N is an integer greater than or equal to 2;
then, determining the number M of second-stage curve integral models equivalent to the first-stage curve integral model according to the number N, wherein M is an integer greater than or equal to N;
then, determining an adjustment rule of the primary curve integral model according to the number M and the second integral element;
and finally, adjusting the position of the second integral element in the primary curve integral model according to the adjustment rule to obtain M secondary curve integral models equivalent to the primary curve integral model.
It should be understood that the above is only a specific implementation manner of generating the preset curve integral model, and the technical solution of the present invention is not limited in any way, and in a specific application, a person skilled in the art may set the implementation manner as needed, and the present invention is not limited to this.
The term "second" in the above-mentioned "second integral element" is used only to indicate that the integral element is extracted from the primary curve integral model, and does not limit the primary curve integral model itself, and the second integral element may be any one of the integral elements in the primary curve integral model.
In addition, it should be noted that, since the 14 first-order curve integration models respectively correspond to four different curve integrations for arc lengths, the generated curve integration model is an equivalent model corresponding to each first-order curve integration model.
Therefore, for the convenience of understanding, the following four angles of finding the arc length of a plane curve, finding the plane curve integral of the arc length, finding the arc length of a space curve and finding the space curve integral of the arc length are sequentially given out curve integral models corresponding to the four curve integrals of the arc length.
Specifically, the number of the first-order curve integral models corresponding to the arc length of the plane curve is 3, and the first-order curve integral models are respectively as follows: (1) y = y (x), a ≦ x ≦ b; (2) x = x (y), c ≦ y ≦ d; (3) x = x (t), y = y (t), α ≦ t ≦ β.
Accordingly, for a primary curve integral model "y = y (x), a ≦ x ≦ b", the number of equivalent secondary curve integral models determined M =2! And (2). After the position of the second integral element is adjusted, the obtained 2 preset curve integral models are respectively as follows:
①y=y(x),a≤x≤b;②a≤x≤b,y=y(x)。
accordingly, for a primary curve integral model "= x (y), c ≦ y ≦ d", the number of equivalent secondary curve integral models determined M =2! And (2). After the position of the second integral element is adjusted, the obtained 2 preset curve integral models are respectively as follows:
①x=x(y),c≤y≤d;②c≤y≤d,x=x(y)。
accordingly, for a primary curve integral model "x = x (t), y = y (t), α ≦ t ≦ β", the number of equivalent secondary curve integral models determined M =3! And (6). After the position of the second integral element is adjusted, the obtained 6 preset curve integral models are respectively as follows:
①x=x(t),y=y(t),α≤t≤β;②y=y(t),x=x(t),α≤t≤β;
③x=x(t),α≤t≤β,y=y(t);④α≤t≤β,x=x(t),y=y(t);
⑤y=y(t),α≤t≤β,x=x(t);⑥α≤t≤β,y=y(t),x=x(t)。
in addition, the number of the first-order curve integral models corresponding to the plane curve integral of the arc length is also 3, which are respectively: (1) f = f (x, y), y = y (x), a ≦ x ≦ b; (2) f = f (x, y), x = x (y), c ≦ y ≦ d; (3) f = f (x, y), x = x (t), y = y (t), α ≦ t ≦ β.
Accordingly, for a primary curve integral model "f = f (x, y), y = y (x), a ≦ x ≦ b", the number of equivalent secondary curve integral models determined M =3! And (6). After the position of the second integral element is adjusted, the obtained 6 preset curve integral models are respectively as follows:
①f=f(x,y),y=y(x),a≤x≤b;②y=y(x),f=f(x,y),a≤x≤b;
③f=f(x,y),a≤x≤b,y=y(x);④a≤x≤b,f=f(x,y),y=y(x);
⑤y=y(x),a≤x≤b,f=f(x,y);⑥a≤x≤b,y=y(x),f=f(x,y)。
accordingly, for a primary curve integral model "f = f (x, y), x = x (y), c ≦ y ≦ d", the number of equivalent secondary curve integral models determined M =3! And (6). After the position of the second integral element is adjusted, the obtained 6 preset curve integral models are respectively as follows:
①f=f(x,y),x=x(y),c≤y≤d;②x=x(y),f=f(x,y),c≤y≤d;
③f=f(x,y),c≤y≤d,x=x(y);④c≤y≤d,f=f(x,y),x=x(y);
⑤x=x(y),c≤y≤d,f=f(x,y);⑥c≤y≤d,x=x(y),f=f(x,y)。
accordingly, for a primary curve integral model "f = f (x, y), x = x (t), y = y (t), α ≦ t ≦ β", the number of equivalent secondary curve integral models determined M =4! =24. After the position of the second integral element is adjusted, 24 preset curve integral models are obtained, which are detailed in table 1.
TABLE 1 Preset Curve integral model corresponding to the first-order Curve integral model "f = f (x, y), x = x (t), y = y (t), α ≦ t ≦ β ″
Numbering | Integral model of preset curve | Numbering | Integral model of preset curve |
1 | f=f(x,y),x=x(t),y=y(t),α≤t≤β | 13 | x=x(t),y=y(t),f=f(x,y),α≤t≤β |
2 | f=f(x,y),y=y(t),x=x(t),α≤t≤β | 14 | y=y(t),x=x(t),f=f(x,y),α≤t≤β |
3 | f=f(x,y),x=x(t),α≤t≤β,y=y(t) | 15 | x=x(t),α≤t≤β,f=f(x,y),y=y(t) |
4 | f=f(x,y),α≤t≤β,x=x(t),y=y(t) | 16 | α≤t≤β,x=x(t),f=f(x,y),y=y(t) |
5 | f=f(x,y),y=y(t),α≤t≤β,x=x(t) | 17 | y=y(t),α≤t≤β,f=f(x,y),x=x(t) |
6 | f=f(x,y),α≤t≤β,y=y(t),x=x(t) | 18 | α≤t≤β,y=y(t),f=f(x,y),x=x(t) |
7 | x=x(t),f=f(x,y),y=y(t),α≤t≤β | 19 | x=x(t),y=y(t),α≤t≤β,f=f(x,y) |
8 | y=y(t),f=f(x,y),x=x(t),α≤t≤β | 20 | y=y(t),x=x(t),α≤t≤β,f=f(x,y) |
9 | x=x(t),f=f(x,y),α≤t≤β,y=y(t) | 21 | x=x(t),α≤t≤β,y=y(t),f=f(x,y) |
10 | α≤t≤β,f=f(x,y),x=x(t),y=y(t) | 22 | α≤t≤β,x=x(t),y=y(t),f=f(x,y) |
11 | y=y(t),f=f(x,y),α≤t≤β,x=x(t) | 23 | y=y(t),α≤t≤β,x=x(t),f=f(x,y) |
12 | α≤t≤β,f=f(x,y),y=y(t),x=x(t) | 24 | α≤t≤β,y=y(t),x=x(t),f=f(x,y) |
In addition, because there are 4 first-order curve integral models corresponding to the arc length of the space curve, which are respectively: (1) y = y (x), z = z (x), a ≦ x ≦ b; (2) x = x (y), z = z (y), c ≦ y ≦ d; (3) x = x (z), y = y (z), p ≦ z ≦ q; (4) x = x (t), y = y (t), z = z (t), α ≦ t ≦ β.
Accordingly, for a primary curvilinear integral model "y = y (x), z = z (x), a ≦ x ≦ b", the number of equivalent secondary curvilinear integral models determined M =3! And (6). After the position of the second integral element is adjusted, the obtained 6 preset curve integral models are respectively as follows:
①z=z(x),y=y(x),a≤x≤b;②y=y(x),z=z(x),a≤x≤b;
③z=z(x),a≤x≤b,y=y(x);④a≤x≤b,z=z(x),y=y(x);
⑤y=y(x),a≤x≤b,z=z(x);⑥a≤x≤b,y=y(x),z=z(x)。
accordingly, for a primary curve integral model "x = x (y), z = z (y), c ≦ y ≦ d", the number of equivalent secondary curve integral models determined M =3! And (6). After the position of the second integral element is adjusted, the obtained 6 preset curve integral models are respectively as follows:
①x=x(y),z=z(y),c≤y≤d;②z=z(y),x=x(y),c≤y≤d;
③x=x(y),c≤y≤d,z=z(y);④c≤y≤d,x=x(y),z=z(y);
⑤z=z(y),c≤y≤d,x=x(y);⑥c≤y≤d,z=z(y),x=x(y)。
accordingly, for a primary curve integral model "x = x (z), y = y (z), p ≦ z ≦ q", the number of equivalent secondary curve integral models determined M =3! And (6). After the position of the second integral element is adjusted, the obtained 6 preset curve integral models are respectively as follows:
①x=x(z),y=y(z),p≤z≤q;②y=y(z),x=x(z),p≤z≤q;
③x=x(z),p≤z≤q,y=y(z);④p≤z≤q,x=x(z),y=y(z);
⑤y=y(z),p≤z≤q,x=x(z);⑥p≤z≤q,y=y(z),x=x(z)。
accordingly, for a primary curve integral model "x = x (t), y = y (t), z = z (t), α ≦ t ≦ β", the number of equivalent secondary curve integral models determined M =4! =24. After the position of the second integral element is adjusted, 24 preset curve integral models are obtained, which are detailed in table 2.
TABLE 2 Preset Curve integral model corresponding to the first-order Curve integral model "x = x (t), y = y (t), z = z (t), α ≦ t ≦ β ″
In addition, because there are 4 first-order curve integral models corresponding to the space curve integral of the arc length, which are respectively: (1) f = f (x, y, z), y = y (x), z = z (x), a ≦ x ≦ b; (2) f = f (x, y, z), x = x (y), z = z (y), c ≦ y ≦ d; (3) f = f (x, y, z), x = x (z), y = y (z), p ≦ z ≦ q; (4) f = f (x, y, z), x = x (t), y = y (t), z = z (t), α ≦ t ≦ β.
Accordingly, for a primary curve integral model "f = f (x, y, z), y = y (x), z = z (x), a ≦ x ≦ b", the number of equivalent secondary curve integral models determined M =4! =24. After the position of the second integral element is adjusted, 24 preset curve integral models are obtained, which are detailed in table 3.
TABLE 3 Preset Curve integral model corresponding to the first-order Curve integral model "f = f (x, y, z), y = y (x), z = z (x), a ≦ x ≦ b ″"
Numbering | Integral model of preset curve | Numbering | Integral model of preset curve |
1 | f=f(x,y,z),y=y(x),z=z(x),a≤x≤b | 13 | f=f(x,y,z),y=y(x),a≤x≤b,z=z(x) |
2 | f=f(x,y,z),z=z(x),y=y(x),a≤x≤b | 14 | f=f(x,y,z),z=z(x),a≤x≤b,y=y(x) |
3 | f=f(x,y,z),a≤x≤b,y=y(x),z=z(x) | 15 | f=f(x,y,z),a≤x≤b,z=z(x),y=y(x) |
4 | y=y(x),f=f(x,y,z),z=z(x),a≤x≤b | 16 | y=y(x),f=f(x,y,z),a≤x≤b,z=z(x) |
5 | y=y(x),z=z(x),f=f(x,y,z),a≤x≤b | 17 | y=y(x),z=z(x),a≤x≤b,f=f(x,y,z) |
6 | y=y(x),a≤x≤b,f=f(x,y,z),z=z(x) | 18 | y=y(x),a≤x≤b,z=z(x),f=f(x,y,z) |
7 | z=z(x),y=y(x),f=f(x,y,z),a≤x≤b | 19 | z=z(x),y=y(x),a≤x≤b,f=f(x,y,z) |
8 | z=z(x),f=f(x,y,z),y=y(x),a≤x≤b | 20 | z=z(x),f=f(x,y,z),a≤x≤b,y=y(x) |
9 | z=z(x),a≤x≤b,y=y(x),f=f(x,y,z) | 21 | z=z(x),a≤x≤b,f=f(x,y,z),y=y(x) |
10 | a≤x≤b,y=y(x),z=z(x),f=f(x,y,z) | 22 | a≤x≤b,y=y(x),f=f(x,y,z),z=z(x) |
11 | a≤x≤b,z=z(x),y=y(x),f=f(x,y,z) | 23 | a≤x≤b,z=z(x),f=f(x,y,z),y=y(x) |
12 | a≤x≤b,f=f(x,y,z),y=y(x),z=z(x) | 24 | a≤x≤b,f=f(x,y,z),z=z(x),y=y(x) |
Accordingly, for a primary curve integral model "f = f (x, y, z), x = x (y), z = z (y), c ≦ y ≦ d", the number of equivalent secondary curve integral models determined M =4! =24. After the position of the second integral element is adjusted, 24 preset curve integral models are obtained, which are detailed in table 4.
TABLE 4 Preset Curve integral model corresponding to the first-order Curve integral model "f = f (x, y, z), x = x (y), z = z (y), c ≦ y ≦ d
Accordingly, for a primary curvilinear integral model "f = f (x, y, z), x = x (z), y = y (z), p ≦ z ≦ q", the number of equivalent secondary curvilinear integral models determined M =4! =24. After the position of the second integral element is adjusted, 24 preset curve integral models are obtained, which are detailed in table 5.
TABLE 5 Preset Curve integral model for the first-order Curve integral model "f = f (x, y, z), x = x (z), y = y (z), p ≦ z ≦ q
Number of | Integral model of preset curve | Numbering | Integral model of preset curve |
1 | f=f(x,y,z),x=x(z),y=y(z),p≤z≤q | 13 | f=f(x,y,z),x=x(z),p≤z≤q,y=y(z) |
2 | f=f(x,y,z),y=y(z),x=x(z),p≤z≤q | 14 | f=f(x,y,z),y=y(z),p≤z≤q,x=x(z) |
3 | f=f(x,y,z),p≤z≤q,x=x(z),y=y(z) | 15 | f=f(x,y,z),p≤z≤q,y=y(z),x=x(z) |
4 | x=x(z),f=f(x,y,z),y=y(z),p≤z≤q | 16 | x=x(z),f=f(x,y,z),p≤z≤q,y=y(z) |
5 | x=x(z),y=y(z),f=f(x,y,z),p≤z≤q | 17 | x=x(z),y=y(z),p≤z≤q,f=f(x,y,z) |
6 | x=x(z),p≤z≤q,f=f(x,y,z),y=y(z) | 18 | x=x(z),p≤z≤q,y=y(z),f=f(x,y,z) |
7 | y=y(z),x=x(z),f=f(x,y,z),p≤z≤q | 19 | y=y(z),x=x(z),p≤z≤q,f=f(x,y,z) |
8 | y=y(z),f=f(x,y,z),x=x(z),p≤z≤q | 20 | y=y(z),f=f(x,y,z),p≤z≤q,x=x(z) |
9 | y=y(z),p≤z≤q,x=x(z),f=f(x,y,z) | 21 | y=y(z),p≤z≤q,f=f(x,y,z),x=x(z) |
10 | p≤z≤q,x=x(z),y=y(z),f=f(x,y,z) | 22 | p≤z≤q,x=x(z),f=f(x,y,z),y=y(z) |
11 | p≤z≤q,y=y(z),x=x(z),f=f(x,y,z) | 23 | p≤z≤q,y=y(z),f=f(x,y,z),x=x(z) |
12 | p≤z≤q,f=f(x,y,z),x=x(z),y=y(z) | 24 | p≤z≤q,f=f(x,y,z),y=y(z),x=x(z) |
Accordingly, for a primary curve integral model "f = f (x, y, z), x = x (t), y = y (t), z = z (t), α ≦ t ≦ β", the number of equivalent secondary curve integral models determined M =5! =120. After the position of the second integral element is adjusted, 120 preset curve integral models are obtained, which are detailed in table 6.
TABLE 6 Preset Curve integral model corresponding to the first-order Curve integral model "f = f (x, y, z), x = x (t), y = y (t), z = z (t), α ≦ t ≦ β ″"
It should be understood that the preset curve integral models in tables 1 to 6 are only 280 specific ones, and the technical solution of the present invention is not limited in any way, and in practical applications, a person skilled in the art may modify the preset curve integral models in tables 1 to 6 according to actual needs, and does not limit the present invention.
As can be easily found from the above description, in the method for calculating the curve integral of the arc length provided in this embodiment, before the step of determining the integral calculation formula corresponding to the curve integral of the arc length according to the curve integral model is executed, the curve integral model determined according to the integral data input by the user is compared with any preset curve integral model in a curve integral model library stored with 280 preset curve integral models, and when it is determined that the preset curve integral model identical to the currently determined curve integral model exists in the curve integral model library, the operation of determining the integral calculation formula corresponding to the curve integral of the arc length according to the curve integral model is executed, otherwise, an error prompt is directly given to the user, so that the user modifies the provided integral data according to the error prompt. By the method, the calculation of the integral result of the curve integral of the arc length is realized, and meanwhile, the calculation scheme of the curve integral of the arc length has completeness and fault tolerance, so that the user experience is greatly improved.
Furthermore, an embodiment of the present invention further provides a computer-readable storage medium, on which a curve integral calculation program for an arc length is stored, and when being executed by a processor, the curve integral calculation program for an arc length implements the steps of the curve integral calculation method for an arc length as described above.
Referring to fig. 4, fig. 4 is a block diagram of a first embodiment of the device for calculating the curve integral of the arc length according to the present invention.
As shown in fig. 4, the apparatus for calculating the integral curve of the arc length according to the embodiment of the present invention includes: an extraction module 4001, a first determination module 4002, a second determination module 4003, and a calculation module 4004.
The extraction module 4001 is configured to obtain integral data corresponding to a curve integral of an arc length to be calculated, and extract at least two first integral elements and a value range corresponding to the first integral elements from the integral data; the first determining module 4002 is configured to determine a curve integral model corresponding to the curve integral of the arc length according to the first integral element; the second determining module 4003 is configured to determine an integral calculation formula corresponding to the curve integral of the arc length according to the curve integral model; the calculating module 4004 is configured to calculate an integral result corresponding to the curve integral over the arc length according to the value range corresponding to the first integral element and the integral calculation formula.
It is obvious from the above description that, in the curve integral calculation device for the arc length provided in this embodiment, when calculating the integral result of the curve integral for the arc length, the integral data corresponding to the curve integral for the arc length is obtained, the first integral element related to the curve integral for the arc length that needs to be calculated at present and the value range corresponding to each first integral element are extracted from the integral data, the curve integral model corresponding to the curve integral for the arc length that needs to be calculated at present is determined according to the extracted first integral elements, the integral calculation formula corresponding to the curve integral for the arc length is determined according to the determined curve integral model, and finally, the integral result of the curve integral for the arc length can be automatically calculated according to the value range corresponding to each first integral element and the determined integral calculation formula. The process of determining the curve integral model corresponding to the curve integral of the pair of arc lengths is based on the extracted first integral element, and is not directly based on the integral data provided by the user, so that the format of the integral data provided by the user is not limited to be in accordance with the 14 existing original curve integral models, the user can provide the integral data according to the input habit of the user, the use of the user is greatly facilitated, and the technical problem that the actual requirements of the user cannot be met due to the fact that the curve integral calculation mode for the arc lengths is too single in the prior art is effectively solved.
It should be noted that the above-described work flows are only exemplary, and do not limit the scope of the present invention, and in practical applications, a person skilled in the art may select some or all of them to achieve the purpose of the solution of the embodiment according to actual needs, and the present invention is not limited herein.
In addition, the technical details that are not described in detail in this embodiment may refer to the method for calculating the curve integral of the arc length provided in any embodiment of the present invention, and are not described herein again.
Further, it is to 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. Without further limitation, an element defined by the phrases "comprising a," "8230," "8230," or "comprising" does not exclude the presence of other like elements in a process, method, article, or system comprising 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 description of the foregoing embodiments, it is clear to those skilled in the art that the method of the foregoing embodiments may be implemented by software plus a necessary general hardware platform, and certainly may also be implemented by hardware, but in many cases, the former is a better implementation. Based on such understanding, the technical solution of the present invention or portions thereof that contribute to the prior art may be embodied in the form of a software product, where the computer software product is stored in a storage medium (e.g. Read Only Memory (ROM)/RAM, magnetic disk, optical disk), and includes several instructions for enabling a terminal device (e.g. a mobile phone, a computer, a server, 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 calculating a curve integral over an arc length, the method comprising:
acquiring integral data corresponding to curve integral of arc length to be calculated, and extracting at least two first integral elements from the integral data and value ranges corresponding to the first integral elements;
determining a curve integral model corresponding to the curve integral of the arc length according to the first integral element;
determining an integral calculation formula corresponding to the curve integral of the arc length according to the curve integral model;
calculating an integral result corresponding to the curve integral of the arc length according to the value range corresponding to the first integral element and the integral calculation formula;
the step of extracting at least two first integral elements from the integral data and the value ranges corresponding to the first integral elements includes:
converting the integral data into a character string according to a preset corresponding relation table to obtain a character string to be processed;
filtering illegal characters in the character string to be processed according to a preset illegal character table to obtain a target character string;
extracting at least two first integral elements from the target character string and value ranges corresponding to the first integral elements;
the first integral element comprises an integral arc segment element and a coordinate element;
the step of calculating the integral result corresponding to the curve integral of the arc length according to the value range corresponding to the first integral element and the integral calculation formula includes:
determining an upper integral limit and a lower integral limit according to the value range corresponding to the integral arc section element;
determining an arc differential according to the value range corresponding to the coordinate element;
substituting the upper and lower integral limits and the arc differential into the integral calculation formula to obtain a target integral calculation formula;
and calculating an integral result corresponding to the curve integral of the arc length according to the target integral calculation formula.
2. The method of claim 1, wherein said step of determining a curve integral model corresponding to said curve integral over arc length based on said first integral element comprises:
determining the position of each first integral element in the integral data;
and arranging the first integral elements in sequence according to the sequence of the positions of the first integral elements in the integral data, and setting a preset interval coincidence between two adjacent first integral elements to obtain a curve integral model corresponding to the curve integral of the arc length.
3. The method of any of claims 1 to 2, wherein prior to the step of determining an integral calculation formula corresponding to the curve integral over arc length according to the curve integral model, the method further comprises:
judging whether the curve integral model is available;
if the curve integral model is available, executing the operation of determining an integral calculation formula corresponding to the curve integral of the arc length according to the curve integral model;
if the curve integral model is not available, making an error prompt to a user so that the user can modify the integral data according to the error prompt;
wherein the step of determining whether the curve integration model is available comprises:
comparing the curve integral model with a preset curve integral model in a pre-constructed curve integral model library, and if the preset curve integral model which is the same as the curve integral model exists in the curve integral model library, determining that the curve integral model is available;
otherwise, it is determined that the curve integration model is not available.
4. The method of claim 3, wherein prior to the step of comparing the curvilinear integral model to pre-set curvilinear integral models in a pre-constructed library of curvilinear integral models, the method further comprises:
acquiring a predetermined primary curve integral model, and extracting a second integral element included in the primary curve integral model;
adjusting the position of the second integral element in the primary curve integral model to obtain a secondary curve integral model equivalent to the primary curve integral model, wherein the secondary curve integral model comprises the primary curve integral model;
and taking the secondary curve integral model as the preset curve integral model.
5. The method of claim 4, wherein prior to the step of adjusting the position of the second integral element in the primary curve integral model to obtain a secondary curve integral model equivalent to the primary curve integral model, the method further comprises:
counting the number N of second integral elements included in the primary curve integral model, wherein N is an integer greater than or equal to 2;
determining the number M of second-stage curve integral models equivalent to the first-stage curve integral model according to the number N, wherein M is an integer greater than or equal to N;
determining an adjustment rule of the primary curve integral model according to the number M and the second integral element;
the step of adjusting the position of the second integral element in the primary curve integral model to obtain a secondary curve integral model equivalent to the primary curve integral model includes:
and adjusting the position of the second integral element in the primary curve integral model according to the adjustment rule to obtain M secondary curve integral models equivalent to the primary curve integral model.
6. An apparatus for calculating a curve integral over an arc length, the apparatus comprising:
the device comprises an extraction module, a calculation module and a control module, wherein the extraction module is used for acquiring integral data corresponding to curve integral of arc length to be calculated, and extracting at least two first integral elements and value ranges corresponding to the first integral elements from the integral data;
a first determining module, configured to determine, according to the first integral element, a curve integral model corresponding to the curve integral of the arc length;
the second determining module is used for determining an integral calculation formula corresponding to the curve integral of the arc length according to the curve integral model;
the calculation module is used for calculating an integral result corresponding to the curve integral of the arc length according to the value range corresponding to the first integral element and the integral calculation formula;
the extraction module is further used for converting the integral data into a character string according to a preset corresponding relation table to obtain a character string to be processed; filtering illegal characters in the character string to be processed according to a preset illegal character table to obtain a target character string; extracting at least two first integral elements from the target character string and value ranges corresponding to the first integral elements;
the first integral element comprises an integral arc segment element and a coordinate element;
the calculation module is further used for determining upper and lower integral limits according to the value range corresponding to the integral arc segment element; determining an arc differential according to the value range corresponding to the coordinate element; substituting the upper and lower integral limits and the arc differential into the integral calculation formula to obtain a target integral calculation formula; and calculating an integral result corresponding to the curve integral of the arc length according to the target integral calculation formula.
7. A curve integration computation device for arc lengths, the device comprising: a memory, a processor and a curve integral over arc length calculation program stored on the memory and executable on the processor, the curve integral over arc length calculation program configured to implement the steps of the method of curve integral over arc length calculation as claimed in any one of claims 1 to 5.
8. A computer-readable storage medium, having stored thereon a curve integration over arc length calculation program, which when executed by a processor, implements the steps of the curve integration over arc length calculation method of any one of claims 1 to 5.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910287451.0A CN110020401B (en) | 2019-04-10 | 2019-04-10 | Method, device and equipment for calculating curve integral of arc length and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910287451.0A CN110020401B (en) | 2019-04-10 | 2019-04-10 | Method, device and equipment for calculating curve integral of arc length and storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN110020401A CN110020401A (en) | 2019-07-16 |
CN110020401B true CN110020401B (en) | 2023-03-24 |
Family
ID=67191105
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910287451.0A Active CN110020401B (en) | 2019-04-10 | 2019-04-10 | Method, device and equipment for calculating curve integral of arc length and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110020401B (en) |
Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CA2083867A1 (en) * | 1991-11-26 | 1993-05-27 | Takefumi Namiki | Integral value calculating device and function gradient calculating device |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US8520003B2 (en) * | 2006-05-22 | 2013-08-27 | Raphael L Levien | Method and apparatus for interactive curve generation |
-
2019
- 2019-04-10 CN CN201910287451.0A patent/CN110020401B/en active Active
Patent Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CA2083867A1 (en) * | 1991-11-26 | 1993-05-27 | Takefumi Namiki | Integral value calculating device and function gradient calculating device |
Non-Patent Citations (2)
Title |
---|
基于曲线积分的任意多边形填充算法;阳波等;《计算机工程与应用》;20021215(第24期);全文 * |
微积分理论重要极限"非汉字符号"sinx/x的再证明;潘晓苏;《南京邮电学院学报》;20041230(第04期);全文 * |
Also Published As
Publication number | Publication date |
---|---|
CN110020401A (en) | 2019-07-16 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
EP3588279B1 (en) | Automated extraction of rules embedded in software application code using machine learning | |
CN110263326B (en) | User behavior prediction method, prediction device, storage medium and terminal equipment | |
CN109300050A (en) | Insurance method for pushing, device and storage medium based on user's portrait | |
CN111028006B (en) | Service delivery auxiliary method, service delivery method and related device | |
CN111144215A (en) | Image processing method, image processing device, electronic equipment and storage medium | |
CN110895533B (en) | Form mapping method and device, computer equipment and storage medium | |
WO2019179030A1 (en) | Product purchasing prediction method, server and storage medium | |
JP2009015603A (en) | Operation item extraction device, operation item extraction method, and operation item extraction program | |
CN110990834B (en) | Static detection method, system and medium for android malicious software | |
CN106528419B (en) | A kind of test method and device of operation system | |
CN110213660B (en) | Program distribution method, system, computer device and storage medium | |
CN114091688B (en) | Computing resource obtaining method and device, electronic equipment and storage medium | |
CN110020401B (en) | Method, device and equipment for calculating curve integral of arc length and storage medium | |
CN112950176A (en) | Method, apparatus and storage medium for automatically determining power design index | |
CN117033309A (en) | Data conversion method and device, electronic equipment and readable storage medium | |
CN111143356A (en) | Report retrieval method and device | |
CN110110280B (en) | Curve integral calculation method, device and equipment for coordinates and storage medium | |
CN110163975B (en) | Method, device and equipment for drawing space straight line and storage medium | |
CN110046321B (en) | Curve integral calculation method, device, equipment and storage medium | |
CN115375965A (en) | Preprocessing method for target scene recognition and target scene recognition method | |
CN109993152B (en) | Mode conversion method, equipment, storage medium and device for coordinate curve integration | |
CN109977343B (en) | Ellipsoid equation drawing method, device, equipment and storage medium | |
CN112950167A (en) | Design service matching method, device, equipment and storage medium | |
CN111881947A (en) | Feature point set pair screening method, target matching method and device and electronic equipment | |
CN110782879A (en) | Sample size-based voiceprint clustering method, device, equipment and storage medium |
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 |