B spline curve approximate fitting method, device and equipment and readable storage medium

By constructing a power-based polynomial based on expansion points and derivatives in the B-spline curve for approximate fitting, the problem of high computational complexity in converting the B-spline curve into a Bezier curve is solved, and efficient curve approximate fitting is achieved.

CN118587390AInactive Publication Date: 2024-09-03ZKHM CNC SOFTWARE (SHENZHEN) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411075428.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-07
Publication Date
2024-09-03
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

Converting existing B-spline curves to Bezier curves requires a large amount of calculations and high computational complexity, making it difficult to achieve real-time curve fitting and error control.

Method used

By obtaining the parameters of the B-spline curve, determining the expansion point based on adjacent nodes, calculating the k-order derivative of the parameter curve, and constructing a power-based polynomial for approximate fitting, the computational complexity is reduced.

Benefits of technology

It significantly reduces the amount of calculation, improves calculation efficiency, reduces storage resource consumption, and achieves fast approximate fitting of B-spline curves.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118587390A
    Figure CN118587390A
Patent Text Reader

Abstract

The invention discloses a B-spline curve approximate fitting method, device and equipment and a readable storage medium, and relates to the technical field of curve fitting, and the method comprises the steps that B-spline curve parameters are acquired, and the B-spline curve parameters comprise a plurality of nodes and parameter curves; an expansion point is determined based on the two adjacent nodes, and the expansion point is a midpoint corresponding to the two adjacent nodes; for each expansion point, a k-order guide vector of the parameter curve at the expansion point is calculated, a power-based polynomial is constructed based on the expansion point and each k-order guide vector, the power-based polynomial is determined to be approximate fitting of the parameter curve, the value range of k is zero to p, and p is the number of times of the highest order term in the parameter curve. According to the invention, the calculation amount and calculation complexity of approximate fitting of the B-spline curve are reduced, and then the approximate fitting time delay of the B-spline curve is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of curve fitting, and in particular to a B-spline curve approximate fitting method, device, equipment and readable storage medium. Background Art

[0002] B-spline curve is a curve representation method widely used in computer graphics, engineering design, CAD (Computer-Aided Design), CAM (Computer-Aided Manufacturing) and other fields. For example, in CNC systems, the machining trajectory of the workpiece is generally fitted with a B-spline curve, and then interpolation is performed based on the fitted B-spline curve, which can improve the machining accuracy.

[0003] However, the B-spline curve fitting algorithm is too complex and takes a long time to calculate. It is difficult to fit the curve in real time and it is difficult to control the error. Therefore, the B-spline curve is usually converted to other curves. Currently, the B-spline curve is usually converted to a Bezier curve. However, to convert the B-spline curve to the Bezier curve, an n-order conversion matrix (n is the number of control points) needs to be calculated. The B-spline curve is converted to the Bezier curve based on the n-order conversion matrix. The conversion process is based on matrix operations, which has a large amount of calculation and high computational complexity. Summary of the invention

[0004] The main purpose of the present application is to provide a B-spline curve approximate fitting method, device, equipment and readable storage medium, aiming to solve the existing technical problems of large amount of calculation and high computational complexity in converting B-spline curves into Bezier curves.

[0005] To achieve the above object, the present application provides a B-spline curve approximate fitting method, the B-spline curve approximate fitting method comprising the following steps: Acquire B-spline curve parameters, wherein the B-spline curve parameters include a plurality of nodes and a parameter curve; Determine an expansion point based on two adjacent nodes, wherein the expansion point is a midpoint corresponding to the two adjacent nodes; For each of the expansion points, the k-order derivatives of the parameter curve at the expansion point are calculated respectively, a power-base polynomial is constructed based on the expansion point and each of the k-order derivatives, and the power-base polynomial is determined to be an approximate fit to the parameter curve, wherein the value range of k is zero to p, and p is the degree of the highest-order term in the parameter curve.

[0006] In one embodiment, after the step of constructing a power basis polynomial based on the expansion points and each of the k-order derivatives, the method further includes: determining a fit error of the power basis polynomial; If the fitting error is greater than a preset error threshold, determining an adjacent expansion point adjacent to the expansion point; The midpoint between the expansion point and the adjacent expansion point is taken as a new expansion point, and based on the new expansion point, the step of respectively calculating the k-order derivatives of the parameter curve at the expansion point is returned to be performed.

[0007] In one embodiment, the step of determining the power-base polynomial as an approximate fit to the parametric curve comprises: Determine a left expansion point adjacent to the expansion point on the left and a right expansion point adjacent to the expansion point on the right; Determine the midpoint between the expansion point and the left expansion point as the left midpoint, and determine the midpoint between the expansion point and the right expansion point as the right midpoint; The area between the left midpoint and the right midpoint is determined as the scope of action of the power-based polynomial, and the power-based polynomial is determined to be an approximate fit of the parameter curve within the scope of action, so as to obtain a complete approximate fit of the parameter curve after combining the power-based polynomials corresponding to all the expansion points.

[0008] In one embodiment, after the step of determining the power-base polynomial as an approximate fit of the parameter curve within the scope of action, the method further comprises: If a new parameter value is input, determining a target action range within which the new parameter value falls in the action range corresponding to each of the expansion points; The power-base polynomial corresponding to the target action range is determined as the target power-base polynomial, and the new parameter value is input into the target power-base polynomial to obtain the curve coordinates.

[0009] In one embodiment, the power base polynomial is: f(u)=f (0) (EP i )+f (1) (EP i )(u-EP i )+(1 / 2!)f (2) (EP i )(u-EP i )+...+(1 / p!)f (p) (EP i )(u-EP i ),in, represents the expansion point, represents the k-th order derivative of the parameter curve at the expansion point, the value range of k is from zero to p, p represents the degree of the basis function in the parameter curve, and u represents the parameter value.

[0010] In one embodiment, the B-spline curve parameters further include a plurality of control points, and the parameter curve is: ,in, represents the control point with index i, n represents the total number of control points minus one, and u represents the parameter value.

[0011] In one embodiment, the k-order derivative of the parameter curve at the expansion point is: ,in, represents the k-th derivative of the basis function in the parametric curve at the expansion point, represents the expansion point.

[0012] In addition, to achieve the above-mentioned purpose, the present application also provides a B-spline curve approximate fitting device, and the B-spline curve approximate fitting device also includes: An acquisition module, used for acquiring B-spline curve parameters, wherein the B-spline curve parameters include a plurality of nodes and a parameter curve; An expansion module, used to determine an expansion point based on two adjacent nodes, wherein the expansion point is a midpoint corresponding to the two adjacent nodes; A fitting module is used to calculate, for each of the expansion points, the k-order derivatives of the parameter curve at the expansion point, construct a power-base polynomial based on the expansion point and each of the k-order derivatives, and determine that the power-base polynomial is an approximate fit to the parameter curve, wherein the value range of k is zero to p, and p is the degree of the highest-order term in the parameter curve.

[0013] In addition, to achieve the above-mentioned purpose, the present application also provides a B-spline curve approximate fitting device, which includes a microphone array and a processor, and the microphone array is electrically connected to the processor; the processor is used to execute the steps of the B-spline curve approximate fitting method as described above.

[0014] In addition, to achieve the above-mentioned purpose, the present application also provides a readable storage medium, which is a computer-readable storage medium, and a program for implementing the B-spline curve approximate fitting method is stored on the computer-readable storage medium. The program for implementing the B-spline curve approximate fitting method is executed by a processor to implement the steps of the B-spline curve approximate fitting method as described above.

[0015] The present application also provides a computer program product, including a computer program, which implements the steps of the above-mentioned B-spline curve approximate fitting method when executed by a processor.

[0016] The present application obtains B-spline curve parameters, wherein the B-spline curve parameters include multiple nodes and a parameter curve; an expansion point is determined based on two adjacent nodes, wherein the expansion point is a midpoint corresponding to the two adjacent nodes; for each expansion point, a k-order derivative of the parameter curve at the expansion point is calculated respectively, a power-base polynomial is constructed based on the expansion point and each k-order derivative, and the power-base polynomial is determined to be an approximate fit to the parameter curve, wherein the value range of k is from zero to p, and p is the degree of the highest-order term in the parameter curve. In this way, compared with the approximate fitting method of using Bezier curves to approximate fitting of B-spline curves, after the embodiments of the present application obtain the B-spline curve parameters such as nodes and parameter curves, the expansion point is determined based on two adjacent nodes to approximate fitting of the B-spline curve at the expansion point, and the k-th derivative of the parameter curve at the expansion point is calculated. A power basis polynomial is constructed based on the k-th derivative and the expansion point to complete the approximate fitting of the B-spline curve. Therefore, the approximate fitting method mainly performs p-time derivative calculations, and compared with matrix operations, the amount of calculation is small and the calculation complexity is low. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.

[0018] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0019] Figure 1 This is a flow chart of the first embodiment of the B-spline curve approximate fitting method of the present application; Figure 2 This is a schematic diagram of the working range involved in an embodiment of the B-spline curve approximate fitting method of the present application; Figure 3 A brief flowchart of the B-spline curve approximate fitting method of this application; Figure 4 This is a schematic diagram of the device structure of the B-spline curve approximate fitting device of the present application; Figure 5 Schematic diagram of the device structure of the hardware operating environment involved in the B-spline curve approximate fitting device in the embodiment of the present application.

[0020] The purpose, features and advantages of this application will be further described in conjunction with the embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION

[0021] In order to make the above-mentioned purposes, features and advantages of the present invention more obvious and easy to understand, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work belong to the scope of protection of the present invention.

[0022] B-spline curves are widely used in engineering to describe geometric shapes and trajectories. However, the real-time calculation of B-spline curves is large and the calculation efficiency is low. Converting to power-based polynomials to approximate B-spline curves can significantly improve the calculation speed.

[0023] The common method of converting B-spline curve to power basis polynomial is: 1. Calculate a transformation matrix and convert the B-spline curve into a piecewise Bezier curve based on the transformation matrix; 2. Convert each Bezier curve into a power-based polynomial; 3. Reparameterization of power basis polynomial.

[0024] However, the overall algorithm of this approximate fitting method has a large amount of calculation and high computational complexity. In addition, since each segment of the Bezier curve is uniquely determined by adjacent control points, and the B-spline curve allows control points to affect multiple segments of the curve, if a segment of the B-spline curve is converted to a Bezier curve, it may be necessary to increase the control points exponentially to ensure that the Bezier curve maintains the same tangent and curvature as the original B-spline curve at the endpoint, thereby doubling the number of segments of the power basis polynomial and taking up more storage space.

[0025] For example, for n control points and a B-spline curve with a maximum degree of p, the time complexity of converting the power basis polynomial by the above approximate fitting method is at least O(n 2 ), the space complexity is usually O(pn).

[0026] Based on this, the main solution of the present application is: the present application obtains B-spline curve parameters, wherein the B-spline curve parameters include multiple nodes and a parameter curve; an expansion point is determined based on two adjacent nodes, wherein the expansion point is the midpoint corresponding to the two adjacent nodes; for each of the expansion points, the k-th order derivative of the parameter curve at the expansion point is calculated respectively, a power basis polynomial is constructed based on the expansion point and each of the k-th order derivatives, and the power basis polynomial is determined to be an approximate fit to the parameter curve, wherein the value range of k is from zero to p, and p is the degree of the highest order term in the parameter curve.

[0027] After obtaining the B-spline curve parameters such as nodes and parameter curves, the application determines the expansion point based on two adjacent nodes to approximately fit the B-spline curve at the expansion point, calculates the k-th order derivative of the parameter curve at the expansion point, and constructs a power basis polynomial based on the k-th order derivative and the expansion point to complete the approximate fitting of the B-spline curve. Therefore, the approximate fitting method mainly performs p-time derivative calculations, which has a small amount of calculation and low computational complexity compared to matrix operations.

[0028] It should be noted that the executor of each embodiment of the B-spline curve approximate fitting method of the present application can be a computing service device with data processing, network communication and program running functions, such as a tablet computer, a personal computer, a mobile phone, etc., or a B-spline curve approximate fitting device that can realize the above functions. The embodiments of the B-spline curve approximate fitting method of the present application do not impose specific restrictions on this.

[0029] This application proposes a B-spline curve approximate fitting method of the first embodiment, please refer to Figure 1 The B-spline curve approximate fitting method includes steps S10 to S30: Step S10, obtaining B-spline curve parameters, wherein the B-spline curve parameters include a plurality of nodes and a parameter curve; The B-spline curve parameters represent the parameters required to define the B-spline curve, including but not limited to nodes and parameter curves, and may also include control points, which is not specifically limited in this embodiment.

[0030] Step S20, determining an expansion point based on two adjacent nodes, wherein the expansion point is a midpoint corresponding to the two adjacent nodes; It is known to those skilled in the art that a node defining a B-shaped curve is actually a specific value, and thus two adjacent nodes can be specifically two adjacent nodes after the nodes are arranged in numerical order. Then the expansion point between two adjacent nodes is actually also a specific value.

[0031] It should be noted that, in this embodiment, one expansion point is determined based on every two adjacent nodes. If there are m nodes, m-1 expansion points are correspondingly determined.

[0032] For example, suppose that after arranging all nodes in non-decreasing order, the node vector is (u0, u1, ..., u m ), then the two adjacent nodes can be represented as u i with u i+1 , where i ranges from 0 to m-1, and the expansion point is u i with u i+1 The midpoint of .

[0033] Step S30, for each of the expansion points, respectively calculate the k-th order derivative of the parameter curve at the expansion point, construct a power basis polynomial based on the expansion point and each of the k-th order derivatives, and determine that the power basis polynomial is an approximate fit to the parameter curve, wherein the value range of k is from zero to p, and p is the degree of the highest order term in the parameter curve.

[0034] For each expansion point, the k-order derivative of the parameter curve at the expansion point is calculated, and a power-base polynomial is constructed based on the expansion point and each k-order derivative. That is, a power-base polynomial is constructed at each expansion point.

[0035] In a possible implementation manner, the B-spline curve parameters further include a plurality of control points, and the parameter curve is: ,in, represents the control point with index i, n represents the total number of control points minus one, and u represents the parameter value.

[0036] It can be understood that, usually, a B-spline curve is defined by a parameter curve C(u), and the parameter curve C(u) can usually be defined by a set of control points P0, P1,...,P i ,...,P n and a set of B-spline basis functions N i,p (u) defined, where P i represents the control point with index i, n represents the maximum index of the control point, specifically the total number of control points minus one, p represents the degree of the basis function, and u is the parameter value, specifically, .

[0037] Among them, the basis function N in the parametric curve i,p (u) is defined by nodes, and all nodes are sorted in non-decreasing order to form a node vector U (u0,u1,...,u m ) defines the parameter space of the B-spline curve, u i represents the node with index i, m represents the maximum index of the node, which is the total number of nodes minus one. Each node interval corresponds to a sub-B-spline curve segment on the curve, that is, the node divides the entire parameter domain into multiple intervals, and each interval [u i ,u i+1 ] defines a B-spline curve segment. Specifically, the basis function is defined as follows:

[0038]

[0039] In this way, the control points, nodes and degrees of basis functions that define the B-spline curve input can be obtained, and the parameter curve is determined based on the degrees of the input control points, nodes and basis functions. After the parameter curve is obtained, the parameter curve is approximately fitted by the method of the embodiment of the present application, thereby achieving approximate fitting of the B-spline curve.

[0040] In a possible implementation manner, the k-order derivative of the parameter curve at the expansion point is: ,in, represents the k-th derivative of the basis function in the parametric curve at the expansion point, represents the expansion point.

[0041] It should be noted that the control points defining the B-spline curve are points in two-dimensional or three-dimensional space or any dimensional space, which can usually be represented by a coordinate. For example, in three-dimensional space, the control point P i Can be represented as a three-dimensional vector P i =(x i ,y i ,z i ), where (x i ,y i ,z i ) are the coordinates of the control points. Therefore, the derivatives of each order of the parametric curve at the expansion point are actually vectors.

[0042] In a possible implementation manner, the power base polynomial is: f(u)=f (0) (EP i )+f (1) (EP i )(u-EP i )+(1 / 2!)f (2) (EP i )(u-EP i )+...+(1 / p!)f (p) (EP i )(u-EP i ),in, represents the expansion point, represents the k-th order derivative of the parameter curve at the expansion point, the value range of k is from zero to p, p represents the degree of the basis function in the parameter curve, and u represents the parameter value.

[0043] It is easy to understand that the power basis polynomial is a p-order Taylor expansion, and the p-order Taylor expansion only needs to obtain the derivatives of each order of the basis functions corresponding to n+1 control points. Therefore, the time complexity of the B-spline curve approximate fitting method provided in this embodiment is approximately O(n), and the space complexity is about O(2n). For commonly used quintic B-spline curves or B-spline curves with higher orders, there is less storage space requirement. Therefore, the B-spline curve approximate fitting method provided in this embodiment reduces both computing resource consumption and storage resource consumption.

[0044] Furthermore, after the B-spline curve is approximated by this power-based polynomial, when the parameter value is subsequently input to calculate the curve coordinates corresponding to the parameter value, the Qin Jiushao algorithm can be used to optimize the calculation and reduce the number of multiplication calculations. Only p multiplications and p additions are required, and there is no need to calculate the curve coordinates corresponding to the parameter value based on multiple control points (understandably, there are usually more control points, so the amount of calculation is larger), thereby improving the calculation speed of the curve coordinates from the parameter value. Among them, the Qin Jiushao algorithm calculates the value of the polynomial by iteratively term by term, thereby reducing the number of multiplications. Specifically, for the polynomial P(x)=a0+a1x+a2x 2 +...+anx n The calculation process of Qin Jiushao's algorithm is as follows: initialize the result result = an, for i = n-1 to 0, multiply result by x and add ai, that is, result = result × x + ai, and the final result is the value of the polynomial P (x) at. In this process, only n multiplications and n additions are required, instead of n (n + 1) / 2 multiplications and n additions in the conventional method.

[0045] This embodiment obtains B-spline curve parameters, wherein the B-spline curve parameters include multiple nodes and a parameter curve; an expansion point is determined based on two adjacent nodes, wherein the expansion point is a midpoint corresponding to the two adjacent nodes; for each of the expansion points, a k-order derivative of the parameter curve at the expansion point is calculated respectively, a power-base polynomial is constructed based on the expansion point and each of the k-order derivatives, and the power-base polynomial is determined to be an approximate fit to the parameter curve, wherein the value range of k is from zero to p, and p is the degree of the highest-order term in the parameter curve. Thus, compared with the approximate fitting method of using Bezier curves to approximately fit B-spline curves, after obtaining the B-spline curve parameters such as nodes and parameter curves, this embodiment determines expansion points based on two adjacent nodes to approximately fit the B-spline curve at the expansion points, calculates the k-th order derivative of the parameter curve at the expansion points, and constructs a power basis polynomial based on the k-th order derivative and the expansion points to complete the approximate fitting of the B-spline curve. Thus, the approximate fitting method mainly performs p-time derivative calculations, which has a small amount of calculation and low computational complexity compared with matrix operations.

[0046] Based on the first embodiment of the present application, in the second embodiment of the present application, the same or similar contents as those in the first embodiment can be referred to the above introduction, and will not be described in detail later. On this basis, the step of determining that the power basis polynomial is an approximate fit to the parameter curve includes: Step A10, determining a left expansion point adjacent to the expansion point on the left and a right expansion point adjacent to the expansion point on the right; It should be noted that the expansion point vector obtained by arranging all expansion points in non-decreasing order of numerical values ​​can be used to determine the left expansion point adjacent to a certain expansion point on the left and the right expansion point adjacent to the expansion point on the right in the expansion point vector. For example, assuming that the expansion point vector obtained by arranging all expansion points in non-decreasing order of numerical values ​​is (EP0, EP1, ..., EP s ), the expansion point with index i is denoted as EP i , i ranges from 0 to s, the index is numbered sequentially starting from zero, s is the total number of expansion points minus one, EP i The left expansion point is EP i-1 , the right expansion point is EP i+1 , the value range of i with left expansion point and right expansion point is from 1 to s-1.

[0047] Furthermore, for the two expansion points at the endpoints, that is, the maximum expansion point and the minimum expansion point, for the minimum expansion point, the midpoint between the minimum expansion point and the right expansion point adjacent to the minimum expansion point on the right can be determined, and the interval range between the minimum node and the midpoint is used as the scope of the power basis polynomial at the minimum expansion point; for the maximum expansion point, the midpoint between the maximum expansion point and the left expansion point adjacent to the maximum expansion point on the left can be determined, and the interval range between the midpoint and the maximum node is used as the scope of the power basis polynomial at the maximum expansion point. Among them, the minimum node and the maximum node respectively represent the left endpoint node and the right endpoint node when all nodes are arranged in non-decreasing order of numerical values. For example, assuming that all nodes are arranged in non-decreasing order of numerical values, the node vector obtained is (u0, u1, ..., u m ), then the minimum node is u0 and the maximum node is u m .

[0048] Step A20, determining the midpoint between the expansion point and the left expansion point as the left midpoint, and determining the midpoint between the expansion point and the right expansion point as the right midpoint; Step A30, determining the area between the left midpoint and the right midpoint as the scope of action of the power-based polynomial, determining the power-based polynomial as an approximate fit of the parameter curve within the scope of action, so as to obtain a complete approximate fit of the parameter curve after combining the power-based polynomials corresponding to all the expansion points.

[0049] It should be noted that the interval range can be a closed interval including the left midpoint and the right midpoint, or a left-closed and right-open interval including the left midpoint but not including the right midpoint (in this case, all interval ranges are left-closed and right-open), or a left-open and right-closed interval excluding the left midpoint but including the right midpoint (in this case, all interval ranges are left-open and right-closed). This embodiment does not impose specific restrictions on this. The scope of action of all power-based polynomials can completely cover the value range of the parameter value, and the value range of the parameter value in the B-spline curve is greater than or equal to the minimum node and less than or equal to the maximum node, that is, the scope of action of all power-based polynomials can completely cover the interval greater than or equal to the minimum node and less than or equal to the maximum node. The scope of action of a power-based polynomial can be understood as the domain of the power-based polynomial.

[0050] For example, refer to Figure 2 As shown, the expansion point is marked as 101, and the midpoint of the adjacent expansion point is marked as 102. Then, the effective range of the power basis polynomial at the expansion point 101 is the area between the midpoints 102 of the adjacent expansion points.

[0051] Then it can be understood that m+1 nodes correspond to m expansion points, and each expansion point corresponds to constructing a power basis polynomial, that is, the B-spline curve is piecewise approximated with the expansion point as the center. It can be understood that in fact, the midpoint between adjacent expansion points is a node, that is, when defining a B-spline curve with m+1 nodes, m segments of power basis polynomials are used to approximate the B-spline curve, and the range of each segment of the power basis polynomial is u i to u i+1 , which improves the accuracy of approximate fitting.

[0052] In a possible implementation manner, after the step of determining the power-based polynomial as an approximate fit of the parameter curve within the scope of action, the method further includes: Step B10, if a new parameter value is received as input, determining a target action range in which the new parameter value falls in the action range corresponding to each of the expansion points; The new parameter value is used to indicate the parameter value of the corresponding curve coordinate to be determined.

[0053] Step B20, determining the power-base polynomial corresponding to the target action range as the target power-base polynomial, and inputting the new parameter value into the target power-base polynomial to obtain the curve coordinates.

[0054] In actual application scenarios, when the B-spline curve has been determined, new parameter values ​​may be entered to calculate the corresponding points on the curve (that is, the curve coordinates) to query specific positions, curve drawing, animation and simulation, interpolation and approximation, geometric calculations, interactive design, etc.

[0055] Query specific position: By entering specific parameter values, you can find the corresponding point on the curve. This is very important in design, analysis and application. For example, in computer-aided design (CAD), designers may need to know the exact coordinates of a specific position on the curve.

[0056] Curve drawing: In computer graphics, to draw a B-spline curve, it is necessary to discretize the parameter interval and calculate the curve points corresponding to each parameter value. These points can then be connected to form a visual representation of the curve.

[0057] Animation and simulation: In animation and physical simulation, B-spline curves are often used to describe the motion trajectory of an object. By continuously inputting different parameter values, the position of the object at different time points can be calculated to achieve a smooth motion effect.

[0058] Interpolation and approximation: Although B-spline curves are primarily used to approximate shapes formed by control points, in some cases they can also be used to interpolate data points. By properly choosing parameter values, you can ensure that the curve passes through all data points.

[0059] Geometric calculation: In geometric calculation, you may need to calculate the length, curvature, tangent, normal and other geometric properties of the curve. These calculations usually need to be performed at different points along the curve, so different parameter values ​​need to be entered to obtain the corresponding points.

[0060] Interactive design: In interactive design, users may want to observe the changes in the curve by adjusting parameter values ​​in order to adjust and optimize the shape.

[0061] Therefore, this embodiment can obtain the curve coordinates corresponding to the parameter value by approximate fitting of the B-spline curve, and then obtain the power-based polynomial through approximate fitting, so as to perform subsequent processing.

[0062] In addition, if there are multiple target power base polynomials, if the scopes of the expansion points overlap, there may be new parameter values ​​that fall into the scopes corresponding to the multiple power base polynomials, that is, there will be multiple target power base polynomials. As one implementation method, the target scope corresponding to each target power base polynomial can be determined, the span corresponding to each target scope can be determined, and the new parameter value can be selected to be input into the target power base polynomial corresponding to the minimum span to obtain the curve coordinates. Among them, the span of the scope refers to the absolute difference between the maximum value and the minimum value of the scope. If a scope is A~B, the span of the scope is |BA|.

[0063] As another implementation, the target fitting error corresponding to each target power basis polynomial can be obtained, the minimum target fitting error among the target fitting errors can be determined, and the new parameter value can be input into the target power basis polynomial corresponding to the minimum target fitting error to obtain the curve coordinates. The new parameter value is input into the target power basis polynomial corresponding to the minimum target fitting error to obtain the curve coordinates, thereby reducing the error between the obtained curve coordinates and the curve coordinates actually corresponding to the new parameter, and improving the accuracy of the obtained curve coordinates.

[0064] In addition, in another feasible implementation manner, the new parameter value may be input into any target power-base polynomial to obtain the curve coordinates, thereby improving the efficiency of obtaining the curve coordinates.

[0065] Based on the first embodiment and / or the second embodiment of the present application, in the third embodiment of the present application, the same or similar contents as those in the first and second embodiments can be referred to the above description, and will not be described in detail later. On this basis, after the step of constructing a power basis polynomial based on the expansion points and each of the k-order derivatives, the method further includes: Step D10, determining the fitting error of the power basis polynomial; It can be understood that the power basis polynomial is a Taylor expansion, and thus its error is the Taylor expansion remainder, specifically the Lagrange remainder, which can be expressed by the formula: ,in, represents the fitting error, ξ is the value between u and EP i A value between It is the p+1th order derivative of the parameter curve at ξ, which can be obtained by differential calculation of the p-order derivatives of adjacent expansion points, such as forward difference method, backward difference method or central difference method, Richardson extrapolation method, etc. This embodiment does not make any specific limitation to this.

[0066] It is easy to understand that for the B-spline curve, the value range of u is the range of action of the expansion point, from which it can be determined that u has the maximum value, and then is the one with the maximum value, and It also has the best value, preferably The maximum positive value of The maximum value of The maximum value is obtained to determine the maximum fitting error of the power basis polynomial, ensuring that the maximum fitting error also meets the actual error requirements.

[0067] Furthermore, it should be noted that In fact, a derivative, the fitting error calculated from this It is actually a vector, which means that the fitting error of each axis corresponding to the power basis polynomial can be calculated. For example, assuming that in three-dimensional space, the control point has three-dimensional coordinates, namely the x-axis, y-axis and z-axis coordinates, and the calculation is It is actually a three-dimensional vector and can be expressed as ( , , ),but represents the fitting error of the power basis polynomial on the x-axis, represents the fitting error of the power basis polynomial on the y-axis, Represents the fitting error of the power basis polynomial on the z-axis.

[0068] If the actual error requirement only requires evaluating whether the total fitting error of the power basis polynomial meets the requirement, the modulus length of the fitting error of each axis corresponding to the power basis polynomial can be calculated as the final fitting error. for( , , ), then we can determine ( , , ) has a modulus length of the fitting error of the power basis polynomial.

[0069] Step D20, if the fitting error is greater than a preset error threshold, determining an adjacent expansion point adjacent to the expansion point; It should be noted that the adjacent expansion points include a left expansion point and a right expansion point. Similar to the above embodiment, if the expansion point is the minimum expansion point, the minimum node and the right expansion point adjacent to it on the right will be used as the adjacent expansion points of the minimum expansion point. If the expansion point is the maximum expansion point, the left expansion point adjacent to it on the left and the maximum node will be used as the adjacent expansion points of the maximum expansion point.

[0070] It should be noted that if the actual requirement is to ensure that the fitting error of each axis is less than a certain error threshold, the preset error threshold corresponding to each axis can be set respectively, and the preset error threshold corresponding to each axis can be used to determine whether the fitting error of the axis meets the requirement. If the fitting error of any axis is greater than the preset error threshold of the axis, the adjacent expansion point adjacent to the expansion point is determined, and the subsequent segmentation and re-fitting process is performed. If the fitting errors of all axes are less than or equal to the preset error threshold, it is determined that the approximate fitting at the expansion point is completed. In this way, it can be ensured that the power basis polynomial obtained by approximate fitting meets the error requirements on each axis.

[0071] Step D30, taking the midpoint between the expansion point and the adjacent expansion point as a new expansion point, and returning to execute the step of respectively calculating the k-order derivatives of the parameter curve at the expansion point based on the new expansion point.

[0072] It can be understood that each expansion point corresponds to two adjacent expansion points, and then two new expansion points are determined accordingly. For the two new expansion points, the steps of respectively calculating the k-order derivatives of the parameter curve at the expansion point of the signal are returned to re-approximately fit the power basis polynomial at the new expansion point. Further, after the re-segmentation, the expansion points adjacent to the expansion point will also change accordingly, so that the scope of action of the power basis polynomial at the expansion point will also be updated accordingly. Specifically, the scope of action of the power basis polynomial at each expansion point can be determined in the manner of the above embodiment, and the specific process of determining the scope of action is not repeated in this embodiment.

[0073] In this embodiment, for a given preset error threshold, the polynomial curve segments that exceed the preset error threshold will be split during the approximate fitting process until the error of the power basis polynomial constructed after the split meets the error requirement. The computational complexity of splitting at the midpoints of adjacent expansion points is logarithmic complexity, and the splitting efficiency is high.

[0074] For example, in order to help understand the technical concept or technical principle of the B-spline curve approximate fitting after the present embodiment is combined with the above-mentioned embodiment 1 and embodiment 2, a specific embodiment is listed. In this specific embodiment, refer to Figure 3 As shown in the figure, the B-spline curve approximate fitting process is: 1. Input B-spline curve parameters: The parameters are the control points, nodes and the highest degree p of the curve required to define the B-spline curve. The parametric curve C(u) is defined based on the control points and p. .

[0075] 2. Calculate the expansion points of the segmented curve: Take all the nodes of the B-spline, and then find the midpoints of the adjacent nodes, and use them as the expansion points of the segmented curve corresponding to these two adjacent nodes.

[0076] 3. Calculate the expansion coordinates and derivatives of each order (that is, the vector composed of the derivatives of each axis) of the piecewise curve: For all expansion points, calculate the zero to p order derivatives of the parametric curve at the expansion point. The zero order derivative is also the expansion coordinate corresponding to the expansion point.

[0077] 4. Construct a power-based polynomial: Use the derivatives of each order to construct the corresponding power-based polynomial as an approximate fit of the B-spline curve. Specifically, let the expansion point be EP, and take the expansion point EP with index i i , the coordinates of the point have been calculated in the third step (also known as the zero-order derivative), the first-order derivative , ..., p-order derivative Used to calculate polynomial coefficients, the specific power basis polynomial is: f(u)=f (0) (EP i )+f (1) (EP i )(u-EP i )+(1 / 2!)f (2) (EP i )(u-EP i )+...+(1 / p!)f (p) (EP i )(u-EP i ), the area from this expansion point to the two midpoints of the two adjacent expansion points is the scope of action of this power basis polynomial.

[0078] 5. Calculate the error: Calculate the error of each axis based on the remainder of Taylor expansion. The p+1 order derivative in the remainder can be obtained by the difference of the corresponding parameters of two adjacent p order derivatives.

[0079] 6. Determine whether the fitting error meets the given error: Compare the fitting error of each axis with the given preset error threshold. If the fitting error is less than or equal to the preset error threshold, output the current power base polynomial; if the fitting error is greater than the preset error threshold, split the current curve segment, and use the two midpoints from this point to the adjacent two expansion points as new expansion points. For these three expansion points, repeat steps 3 to 5 until the error requirements are met.

[0080] After the above steps, a set of power basis polynomials obtained is the piecewise approximate fitting curve of the B-spline curve, and satisfies the given error.

[0081] The time complexity of this approximate fitting method is approximately O(n); while the time complexity of the Bezier curve conversion method is at least O(n 2 ); The computational efficiency is significantly improved.

[0082] This approximate fitting method requires less storage space for commonly used 5th-order and higher-order B-spline curves.

[0083] In practical applications, the given error can be processed adaptively, and the obtained power-basis polynomial curve meets the error requirements.

[0084] It should be noted that the above specific embodiments are only used to understand the present application and do not constitute a limitation on the B-spline curve approximate fitting process of the present application. More forms of simple transformations based on this technical concept are all within the protection scope of the present application.

[0085] In addition, the present application also provides a B-spline curve approximate fitting device, referring to Figure 4 As shown, the B-spline curve approximate fitting device includes: An acquisition module 10 is used to acquire B-spline curve parameters, wherein the B-spline curve parameters include a plurality of nodes and a parameter curve; An expansion module 20, configured to determine an expansion point based on two adjacent nodes, wherein the expansion point is a midpoint corresponding to the two adjacent nodes; The fitting module 30 is used to calculate, for each of the expansion points, the k-order derivatives of the parameter curve at the expansion point, construct a power-base polynomial based on the expansion point and each of the k-order derivatives, and determine that the power-base polynomial is an approximate fit to the parameter curve, wherein the value range of k is zero to p, and p is the degree of the highest-order term in the parameter curve.

[0086] In one embodiment, the B-spline curve approximate fitting device further includes a correction module, wherein the correction module is used to: After the step of constructing a power basis polynomial based on the expansion points and each of the k-order derivatives, the method further includes: determining a fit error of the power basis polynomial; If the fitting error is greater than a preset error threshold, determining an adjacent expansion point adjacent to the expansion point; The midpoint between the expansion point and the adjacent expansion point is taken as a new expansion point, and based on the new expansion point, the fitting module respectively calculates the k-order derivative of the parameter curve at the expansion point.

[0087] In one embodiment, the fitting module 30 is further configured to: Determine a left expansion point adjacent to the expansion point on the left and a right expansion point adjacent to the expansion point on the right; Determine the midpoint between the expansion point and the left expansion point as the left midpoint, and determine the midpoint between the expansion point and the right expansion point as the right midpoint; The area between the left midpoint and the right midpoint is determined as the scope of action of the power-based polynomial, and the power-based polynomial is determined to be an approximate fit of the parameter curve within the scope of action, so as to obtain a complete approximate fit of the parameter curve after combining the power-based polynomials corresponding to all the expansion points.

[0088] In one embodiment, the B-spline curve approximate fitting device further includes a conversion module, wherein the conversion module is used to: If a new parameter value is input, determining a target action range within which the new parameter value falls in the action range corresponding to each of the expansion points; The power-base polynomial corresponding to the target action range is determined as the target power-base polynomial, and the new parameter value is input into the target power-base polynomial to obtain the curve coordinates.

[0089] In one embodiment, the power base polynomial is: , in, represents the expansion point, represents the k-th order derivative of the parameter curve at the expansion point, the value range of k is from zero to p, p represents the degree of the basis function in the parameter curve, and u represents the parameter value.

[0090] In one embodiment, the B-spline curve parameters further include a plurality of control points, and the parameter curve is: ,in, represents the control point with index i, n represents the total number of control points minus one, and u represents the parameter value.

[0091] In one embodiment, the k-order derivative of the parameter curve at the expansion point is: ,in, represents the k-th derivative of the basis function in the parametric curve at the expansion point, represents the expansion point.

[0092] In addition, an embodiment of the present application also proposes a B-spline curve approximate fitting device, which includes a memory, a processor, and a B-spline curve approximate fitting program stored in the memory and executable on the processor. When the B-spline curve approximate fitting program is executed by the processor, the steps of the cognitive impairment auxiliary detection method as described above are implemented.

[0093] Reference below Figure 5, which shows a schematic diagram of the structure of a B-spline curve approximate fitting device suitable for implementing the embodiment of the present application. The B-spline curve approximate fitting device in the embodiment of the present application may include but is not limited to mobile terminals such as mobile phones, laptops, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Descriptions), PMPs (Portable Media Players), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 5 The B-spline curve approximation fitting device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.

[0094] like Figure 5 As shown, the B-spline curve approximate fitting device may include a processing device 1001 (such as a central processing unit, a graphics processor, etc.), which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM: Read Only Memory) 1002 or a program loaded from a storage device 1003 to a random access memory (RAM: Random Access Memory) 1004. In RAM1004, various programs and data required for the operation of the signal noise reduction device are also stored. The processing device 1001, ROM1002 and RAM1004 are connected to each other through a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Generally, the following systems can be connected to the I / O interface 1006: an input device 1007 including, for example, a touch screen, a touch pad, a keyboard, a mouse, an image sensor, a microphone, an accelerometer, a gyroscope, etc.; an output device 1008 including, for example, a liquid crystal display (LCD: Liquid Crystal Display), a speaker, a vibrator, etc.; a storage device 1003 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 1009. The communication device 1009 can allow the signal noise reduction device to communicate with other devices wirelessly or by wire to exchange data. Although the figure shows a signal noise reduction device with various systems, it should be understood that it is not required to implement or have all the systems shown. More or fewer systems can be implemented or have alternatively.

[0095] In particular, according to the embodiments disclosed in the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present application include a computer program sensor, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device, or installed from a storage device 1003, or installed from a ROM 1002. When the computer program is executed by the processing device 1001, the above-mentioned functions defined in the method of the embodiment disclosed in the present application are executed.

[0096] The B-spline curve approximate fitting device provided in the embodiment of the present application adopts the B-spline curve approximate fitting method in the above embodiment, which can solve the technical problem of B-spline curve approximate fitting. Compared with the prior art, the beneficial effects of the B-spline curve approximate fitting device provided in the present application are the same as the beneficial effects of the B-spline curve approximate fitting method provided in the above embodiment, and other technical features in the B-spline curve approximate fitting device are the same as the features disclosed in the method of the previous embodiment, which will not be repeated here.

[0097] It should be understood that the various parts disclosed in this application can be implemented by hardware, software, firmware or a combination thereof. In the description of the above embodiments, specific features, structures, materials or characteristics can be combined in any one or more embodiments or examples in a suitable manner.

[0098] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

[0099] In addition, to achieve the above-mentioned purpose, an embodiment of the present application also provides a readable storage medium having computer-readable program instructions (ie, computer program) stored thereon, and the computer-readable program instructions are used to execute the B-spline curve approximate fitting method in the above-mentioned embodiment.

[0100] The computer-readable storage medium provided in the embodiment of the present application may be, for example, a USB flash drive, but is not limited to electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, systems or devices, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM: Random Access Memory), a read-only memory (ROM: Read Only Memory), an erasable programmable read-only memory (EPROM: Erasable Programmable Read Only Memory or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM: CD-Read Only Memory), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program, which may be used by or in combination with an instruction execution system, system or device. The program code contained on the computer-readable storage medium may be transmitted using any appropriate medium, including but not limited to: wires, optical cables, RF (Radio Frequency: Radio Frequency), etc., or any suitable combination of the above.

[0101] The computer-readable storage medium may be included in the B-spline curve approximate fitting device; or may exist independently without being assembled into the B-spline curve approximate fitting device.

[0102] The computer-readable storage medium carries one or more programs. When the one or more programs are executed by the B-spline curve approximate fitting device, the B-spline curve approximate fitting device: obtains B-spline curve parameters, wherein the B-spline curve parameters include multiple nodes and parameter curves; An expansion point is determined based on two adjacent nodes, wherein the expansion point is a midpoint corresponding to the two adjacent nodes; for each expansion point, a k-order derivative of the parameter curve at the expansion point is calculated respectively, a power-base polynomial is constructed based on the expansion point and each k-order derivative, and the power-base polynomial is determined to be an approximate fit to the parameter curve, wherein the value range of k is from zero to p, and p is the degree of the highest-order term in the parameter curve.

[0103] Computer program code for performing the operations of the present application may be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, C++, and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0104] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present application. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0105] The modules involved in the embodiments described in this application may be implemented by software or hardware, wherein the name of the module does not constitute a limitation on the unit itself in some cases.

[0106] The readable storage medium provided in the present application is a computer-readable storage medium, which stores computer-readable program instructions (i.e., computer programs) for executing the above-mentioned B-spline curve approximate fitting method, and can solve the technical problems of B-spline curve approximate fitting. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided in the present application are the same as the beneficial effects of the B-spline curve approximate fitting method provided in the above-mentioned embodiment, and will not be described in detail here.

[0107] In addition, an embodiment of the present application further provides a computer program product, including a B-spline curve approximate fitting program, wherein the B-spline curve approximate fitting program implements the steps of the B-spline curve approximate fitting method described above when executed by a processor.

[0108] The specific implementation of the computer program product of the present application is basically the same as the embodiments of the above-mentioned B-spline curve approximate fitting method, and will not be repeated here.

[0109] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or system including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or system. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or system including the element.

[0110] The serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.

[0111] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art can be embodied in the form of a software sensor, which is stored in a storage medium (such as ROM / RAM, disk, CD) as described above, including a number of instructions for a terminal device (which can be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in each embodiment of the present application.

[0112] The above are only preferred embodiments of the present application, and are not intended to limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the present application specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present application.

Claims

1. A B-spline curve approximate fitting method, characterized in that: The B-spline curve approximate fitting method comprises the following steps: Acquire B-spline curve parameters, wherein the B-spline curve parameters include a plurality of nodes and a parameter curve; Determine an expansion point based on two adjacent nodes, wherein the expansion point is a midpoint corresponding to the two adjacent nodes; For each of the expansion points, the k-order derivatives of the parameter curve at the expansion point are calculated respectively, a power-base polynomial is constructed based on the expansion point and each of the k-order derivatives, and the power-base polynomial is determined to be an approximate fit to the parameter curve, wherein the value range of k is zero to p, and p is the degree of the highest-order term in the parameter curve.

2. The method according to claim 1, characterized in that After the step of constructing a power basis polynomial based on the expansion points and each of the k-order derivatives, the method further includes: determining a fit error of the power basis polynomial; If the fitting error is greater than a preset error threshold, determining an adjacent expansion point adjacent to the expansion point; The midpoint between the expansion point and the adjacent expansion point is taken as a new expansion point, and based on the new expansion point, the step of respectively calculating the k-order derivatives of the parameter curve at the expansion point is returned to be performed.

3. The method according to claim 1, characterized in that The step of determining the power-base polynomial as an approximate fit to the parametric curve comprises: Determine a left expansion point adjacent to the expansion point on the left and a right expansion point adjacent to the expansion point on the right; Determine the midpoint between the expansion point and the left expansion point as the left midpoint, and determine the midpoint between the expansion point and the right expansion point as the right midpoint; The area between the left midpoint and the right midpoint is determined as the scope of action of the power-based polynomial, and the power-based polynomial is determined to be an approximate fit of the parameter curve within the scope of action, so as to obtain a complete approximate fit of the parameter curve after combining the power-based polynomials corresponding to all the expansion points.

4. The method according to claim 3, characterized in that After the step of determining the power-base polynomial as an approximate fit of the parameter curve within the scope of action, the method further comprises: If a new parameter value is input, determining a target action range within which the new parameter value falls in the action range corresponding to each of the expansion points; The power-base polynomial corresponding to the target action range is determined as the target power-base polynomial, and the new parameter value is input into the target power-base polynomial to obtain the curve coordinates.

5. The method according to any one of claims 1 to 4, characterized in that: The power base polynomial is: f(u)=f (0) (EP i )+f (1) (EP i )(u-EP i )+(1 / 2!)f (2) (EP i )(u-EP i )+...+(1 / p!)f (p) (EP i )(u-EP i ),in, represents the expansion point, represents the k-th order derivative of the parameter curve at the expansion point, the value range of k is from zero to p, p represents the degree of the basis function in the parameter curve, and u represents the parameter value.

6. The method according to any one of claims 1 to 4, characterized in that: The B-spline curve parameters also include a plurality of control points, and the parameter curve is: ,in, represents the control point with index i, n represents the total number of control points minus one, and u represents the parameter value.

7. The method according to claim 6, characterized in that The k-order derivative of the parameter curve at the expansion point is: ,in, represents the k-th derivative of the basis function in the parametric curve at the expansion point, represents the expansion point.

8. A B-spline curve approximate fitting device, characterized in that: The B-spline curve approximate fitting device also includes: An acquisition module, used for acquiring B-spline curve parameters, wherein the B-spline curve parameters include a plurality of nodes and a parameter curve; An expansion module, used to determine an expansion point based on two adjacent nodes, wherein the expansion point is a midpoint corresponding to the two adjacent nodes; A fitting module is used to calculate, for each of the expansion points, the k-order derivatives of the parameter curve at the expansion point, construct a power-base polynomial based on the expansion point and each of the k-order derivatives, and determine that the power-base polynomial is an approximate fit to the parameter curve, wherein the value range of k is zero to p, and p is the degree of the highest-order term in the parameter curve.

9. A B-spline curve approximate fitting device, characterized in that: The B-spline curve approximate fitting device comprises: a memory, a processor, and a B-spline curve approximate fitting program stored in the memory and executable on the processor. When the B-spline curve approximate fitting program is executed by the processor, the steps of the B-spline curve approximate fitting method according to any one of claims 1 to 7 are implemented.

10. A readable storage medium, characterized in that: The readable storage medium is a computer-readable storage medium, on which is stored a program for implementing the B-spline curve approximate fitting method. The program for implementing the B-spline curve approximate fitting method is executed by a processor to implement the steps of the B-spline curve approximate fitting method as described in any one of claims 1 to 7.