CN117828234A - Data processing method, device, processor, computing equipment and storage medium - Google Patents

Data processing method, device, processor, computing equipment and storage medium Download PDF

Info

Publication number
CN117828234A
CN117828234A CN202410015333.5A CN202410015333A CN117828234A CN 117828234 A CN117828234 A CN 117828234A CN 202410015333 A CN202410015333 A CN 202410015333A CN 117828234 A CN117828234 A CN 117828234A
Authority
CN
China
Prior art keywords
operator
polynomial
interpolation
observation point
lagrangian
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.)
Pending
Application number
CN202410015333.5A
Other languages
Chinese (zh)
Inventor
杨强
阳柳
方姣丽
邬轩
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Phytium Technology Co Ltd
Original Assignee
Phytium Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Phytium Technology Co Ltd filed Critical Phytium Technology Co Ltd
Priority to CN202410015333.5A priority Critical patent/CN117828234A/en
Publication of CN117828234A publication Critical patent/CN117828234A/en
Pending legal-status Critical Current

Links

Landscapes

  • Complex Calculations (AREA)

Abstract

The embodiment of the specification provides a data processing method, which is characterized in that a pending Lagrange polynomial corresponding to an interpolation observation point is expressed as a ratio of a sum of a plurality of second operators to a first operator, wherein the first operator and the second operator can each comprise a product of a plurality of minimum operators corresponding to the pending Lagrange polynomial; in this way, in the Lagrange interpolation fitting process, the calculation result of the minimum operator included in the undetermined Lagrange polynomial can be obtained first, then the target Lagrange polynomial is determined according to the undetermined Lagrange polynomial and the calculation result of the minimum operator, finally the target Lagrange polynomial is utilized to solve the observation point to be solved, in the process, the calculation result of the minimum operator is solved, and the target Lagrange polynomial is determined based on the calculation result, so that repeated calculation in the process of determining the target Lagrange polynomial is reduced, and the solving speed is improved.

Description

Data processing method, device, processor, computing equipment and storage medium
Technical Field
The present disclosure relates to the field of computer application technologies, and in particular, to a data processing technology in the field of computer application technologies, and more particularly, to a data processing method, apparatus, processor, computing device, and storage medium.
Background
In the scenes such as image processing, a numerical analysis method may be used to obtain the data value of the missing data point or the data point to be corrected, so as to predict the unknown data point. For example, in an image processing scene, due to factors such as limitation of shooting environment or data loss during data processing, blurring or missing of some pixels in images may occur, resulting in partial information loss of the images. To predict or correct these missing or blurred pixels, lagrangian interpolation may be used to fit the pixels to complement the image to be complete or to correct the image to be sharp.
However, in the current data processing process such as image processing, the calculation speed of the data point fitting process is slow, so that the whole fitting process takes longer time.
Disclosure of Invention
The embodiment of the specification provides a data processing method, a device, a processor, computing equipment and a storage medium, so as to achieve the purpose of reducing the time length required in the fitting process of observation points to be solved.
In order to achieve the technical purpose, the embodiment of the specification provides the following technical scheme:
in a first aspect, an embodiment of the present specification provides a data processing method, including:
responding to a data processing instruction carrying an observation point to be solved and an interpolation observation point, and executing a Lagrange interpolation fitting process; the interpolation observation point comprises a key value pair of a pixel point position and a pixel point parameter;
the Lagrange interpolation fitting process comprises the following steps:
obtaining a calculation result of a minimum operator included in the undetermined Lagrangian polynomial according to the undetermined observation point, the interpolation observation point and the undetermined Lagrangian polynomial corresponding to the interpolation observation point;
and determining a target Lagrange polynomial according to the calculation results of the undetermined Lagrange polynomial and the minimum operator, and solving the observation point to be solved by using the target Lagrange polynomial to obtain the pixel point position and the pixel point parameter of the observation point to be solved.
In a second aspect, an embodiment of the present specification provides a data processing apparatus, including:
the instruction response module is used for responding to a data processing instruction carrying an observation point to be solved and an interpolation observation point and executing a Lagrange interpolation fitting process; the interpolation observation point comprises a key value pair of a pixel point position and a pixel point parameter;
the Lagrange interpolation fitting process comprises the following steps:
obtaining a calculation result of a minimum operator included in the undetermined Lagrangian polynomial according to the undetermined observation point, the interpolation observation point and the undetermined Lagrangian polynomial corresponding to the interpolation observation point;
and determining a target Lagrange polynomial according to the calculation results of the undetermined Lagrange polynomial and the minimum operator, and solving the observation point to be solved by using the target Lagrange polynomial to obtain the pixel point position and the pixel point parameter of the observation point to be solved.
In a third aspect, one embodiment of the present specification provides a processor comprising:
a decoder for decoding the data processing instructions into decoded instructions;
an execution unit to execute the decoded instructions to implement the data processing method of any of the above.
In a fourth aspect, one embodiment of the present specification also provides a computing device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing a data processing method as described above when executing the computer program.
In a fifth aspect, an embodiment of the present specification further provides a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements a data processing method as described above.
In a sixth aspect, the present description provides a computer program product or a computer program, the computer program product comprising a computer program stored in a computer readable storage medium; the processor of the computer device reads the computer program from the computer readable storage medium, and the processor implements the steps of the data processing method described above when executing the computer program.
As can be seen from the above technical solutions, in the data processing method provided in the embodiments of the present disclosure, a predetermined lagrangian polynomial corresponding to an interpolation observation point is represented to include a ratio of a sum of the plurality of second operators to the first operator, where the first operator and the second operator may each include a product of a plurality of minimum operators corresponding to the predetermined lagrangian polynomial; in this way, in the lagrangian interpolation fitting process, the calculation result of the minimum operator included in the lagrangian polynomial to be determined can be obtained first, then the target lagrangian polynomial is determined according to the calculation results of the lagrangian polynomial to be determined and the minimum operator, finally the target lagrangian polynomial is utilized to solve the observation point to be solved, in the process, the calculation result of the minimum operator is solved, and the target lagrangian polynomial is determined based on the calculation result, so that repeated calculation in the process of determining the target lagrangian polynomial is reduced, the number of instructions required in the process of determining the target lagrangian polynomial is reduced, and on the basis of improving the calculation speed of the lagrangian difference fitting process and reducing the required time, the requirement of the process on calculation resources is reduced.
Drawings
In order to more clearly illustrate the embodiments of the present description or the technical solutions in the prior art, the drawings that are required to be used in the embodiments or the description of the prior art will be briefly described below, and it is obvious that the drawings in the following description are only embodiments of the present description, and that other drawings may be obtained according to the drawings provided without inventive effort to a person skilled in the art.
FIG. 1 is a schematic flow chart of a data processing method according to an embodiment of the present disclosure;
FIG. 2 is a flow chart of another data processing method according to an embodiment of the present disclosure;
FIG. 3 is a schematic flow chart of a data processing apparatus according to an embodiment of the present disclosure;
FIG. 4 is a schematic diagram of a processor according to an embodiment of the present disclosure;
fig. 5 is a schematic structural diagram of a computing device according to an embodiment of the present disclosure.
Detailed Description
Unless defined otherwise, technical or scientific terms used in the embodiments of the present specification should be given the ordinary meaning as understood by one of ordinary skill in the art to which the present specification belongs. The terms "first," "second," and the like, as used in the embodiments of the present disclosure, do not denote any order, quantity, or importance, but rather are used to avoid intermixing of the components.
Throughout the specification, unless the context requires otherwise, the word "plurality" means "at least two", and the word "comprising" is to be construed as open, inclusive meaning, i.e. as "comprising, but not limited to. In the description of the present specification, the terms "one embodiment," "some embodiments," "example embodiments," "examples," "particular examples," or "some examples," etc., are intended to indicate that a particular feature, structure, material, or characteristic associated with the embodiment or example is included in at least one embodiment or example of the present specification. The schematic representations of the above terms do not necessarily refer to the same embodiment or example.
The technical solutions of the embodiments of the present specification will be clearly and completely described below with reference to the drawings in the embodiments of the present specification, and it is apparent that the described embodiments are only some embodiments of the present specification, not all embodiments. All other embodiments, which can be made by one of ordinary skill in the art without undue burden from the present disclosure, are intended to be within the scope of the present disclosure.
SUMMARY
In the related art, in a scene such as image processing or physical quantity observation, a method of numerical analysis may be required to obtain a data value of a missing data point or a data point to be corrected, so as to implement prediction of an unknown data point. Many practical problems use functions to represent some internal relation or law, but many functions can only be known through experiments and observations, and the functions are often complex nonlinear functions and are difficult to represent by simple analytical formulas, and the lagrangian interpolation method can well solve the problem. Lagrangian interpolation is a polynomial function-based interpolation method for fitting a set of discrete data points. The method is characterized in that a polynomial function is constructed through given data points, the values of the polynomial function at the points are equal to the given values, and then the data points to be solved are solved through the constructed polynomial function, so that the prediction of the data points to be solved is realized. The lagrangian interpolation method is simple and easy to use, but when the number of data points is large, the calculation amount is very large, so that the calculation time is long, and the performance is also reduced.
To solve this problem, the inventors found through studies that a pending lagrangian polynomial corresponding to an interpolation observation point may be expressed as a ratio including a sum of the plurality of second operators to the first operator, wherein the first operator and the second operator may each include a product of a plurality of the minimum operators corresponding to the pending lagrangian polynomial; in this way, in the lagrangian interpolation fitting process, the calculation result of the minimum operator included in the lagrangian polynomial to be determined can be obtained first, then the target lagrangian polynomial is determined according to the calculation results of the lagrangian polynomial to be determined and the minimum operator, finally the target lagrangian polynomial is utilized to solve the observation point to be solved, in the process, the calculation result of the minimum operator is solved, and the target lagrangian polynomial is determined based on the calculation result, so that repeated calculation in the process of determining the target lagrangian polynomial is reduced, the number of instructions required in the process of determining the target lagrangian polynomial is reduced, and on the basis of improving the calculation speed of the lagrangian difference fitting process and reducing the required time, the requirement of the process on calculation resources is reduced.
Based on the above-described concept, the present embodiment provides a data processing method, and the data processing method provided by the present embodiment will be exemplarily described below with reference to the accompanying drawings.
Exemplary method
Taking the processor 11 applied to the computing device 10 in fig. 1 as an example, some embodiments of the present specification exemplify the data processing method including:
s101: responding to a data processing instruction carrying an observation point to be solved and an interpolation observation point, and executing a Lagrange interpolation fitting process; the interpolation observation point comprises a key value pair of the position of the observation point and the value of the observation point;
the Lagrange interpolation fitting process comprises the following steps:
obtaining a calculation result of a minimum operator included in the undetermined Lagrangian polynomial according to the undetermined observation point, the interpolation observation point and the undetermined Lagrangian polynomial corresponding to the interpolation observation point;
and determining a target Lagrange polynomial according to the calculation results of the undetermined Lagrange polynomial and the minimum operator, and solving the observation point to be solved by using the target Lagrange polynomial to obtain the pixel point position and the pixel point parameter of the observation point to be solved.
The observation point to be found may refer to a data point whose value is unknown, the data point may be expressed as (x, y) or (x, f (x)), the data point may be found by solving the data point by a determined target lagrangian polynomial, the prediction of the data point to be found may be achieved, x of the observation point to be found may refer to an observation point position, y or f (x) represents an observation point value corresponding to the observation point position, and in some cases, the observation point value in the observation point to be found may be found by solving the observation point value in the observation point to be found by the determined target lagrangian polynomial.
The interpolated observation point may refer to a data point with a known value, the interpolated data point is typically used to determine the target lagrangian polynomial by lagrangian interpolation, and the interpolated data point may be expressed as (x) i ,y i ) I represents the ith interpolation pixel point, x of the interpolation pixel point i And y i The observation point position and the observation point value are respectively represented, and the two values are known values.
Taking an example of application to an image processing scene, the to-be-obtained observation point may include to-be-obtained pixel points, where the to-be-obtained pixel points may be missing part pixel points or blurred pixel points in an image, the interpolation observation point may include a plurality of interpolation pixel points, the interpolation pixel points may be known pixel points in the image, and pixel point positions and pixel point parameters of the interpolation pixel points are all known values, where the pixel point parameters include, but are not limited to, parameters such as brightness, color gamut, gray scale, and the like, which are not limited in this specification, and are specific to practical situations. By using the data processing method provided by the embodiment of the specification, the prediction of the pixel to be solved can be realized, so that at least one of the functions of image complementation, splicing, scaling, smoothing and the like can be realized.
The predetermined lagrangian polynomial may refer to a general expression of a lagrangian polynomial corresponding to the order, for example, the predetermined lagrangian polynomial may include a first-order lagrangian polynomial, a second-order lagrangian polynomial, a third-order lagrangian polynomial, and the like, which is not limited in this specification. The minimum operator can refer to the same operator in each operator in the Lagrangian polynomials to be determined, and the target Lagrangian polynomials are determined according to the calculation result of the minimum operator by solving the minimum operator, so that repeated calculation of the minimum operator can be reduced, and the execution efficiency of the Lagrangian interpolation fitting process is improved. Specifically, in this embodiment, during the lagrangian interpolation fitting process, the calculation result of the minimum operator included in the lagrangian polynomial is obtained according to the to-be-solved observation point, the interpolation observation point and the to-be-determined lagrangian polynomial corresponding to the interpolation observation point, and then the target lagrangian polynomial is determined according to the calculation result of the to-be-determined lagrangian polynomial and the minimum operator, and in this process, the minimum operator is used as a basic calculation unit, so that repeated calculation in the process of determining the target lagrangian polynomial can be avoided, and the execution efficiency of the lagrangian interpolation fitting process can be improved.
In an alternative embodiment, the undetermined Lagrangian polynomial includes a ratio of a sum of a plurality of second operators to a first operator; the first operator and the second operator each comprise a product of a plurality of the minimum operators corresponding to the pending lagrangian polynomial, the minimum operators comprising a subtraction operation.
In this way, the data processing method represents the undetermined Lagrangian polynomial corresponding to the interpolation observation point as a ratio of the sum of the plurality of second operators to the first operator, wherein the first operator and the second operator can each comprise a product of a plurality of minimum operators corresponding to the undetermined Lagrangian polynomial; in this way, in the lagrangian interpolation fitting process, the calculation result of the minimum operator included in the lagrangian polynomial to be determined can be obtained first, then the target lagrangian polynomial is determined according to the calculation results of the lagrangian polynomial to be determined and the minimum operator, finally the target lagrangian polynomial is utilized to solve the observation point to be solved, in the process, the calculation result of the minimum operator is solved, and the target lagrangian polynomial is determined based on the calculation result, so that repeated calculation in the process of determining the target lagrangian polynomial is reduced, the number of instructions required in the process of determining the target lagrangian polynomial is reduced, and on the basis of improving the calculation speed of the lagrangian difference fitting process and reducing the required time, the requirement of the process on calculation resources is reduced.
Specific formulas and determination methods of the undetermined lagrangian polynomials of each order are described below as examples. In one embodiment, the pending-lagrangian polynomial comprises a first order polynomial, a second order polynomial, and a third order polynomial;
the first order polynomial includes:
wherein L is 1 (x) Representing a first order polynomial, A 10 =y 0 a 1 ;A 11 =―y 1 b 1 ;B 1 =C 1 ;a 1 =x―x 1 ;b 1 =x―x 0 ;C 1 =x 0 ―x 1 ,A 10 And A 11 A second operator representing the first order polynomial, B 1 A first operator, a, representing the first order polynomial 1 、b 1 And C 1 Representing a minimum operator corresponding to the first-order polynomial; (x) 0 ,y 0 ) And (x) 1 ,y 1 ) A key value pair representing the pixel point position and the pixel point parameter of the interpolation observation point;
the second order polynomial includes:
wherein L is 2 (x) Representing a second order polynomial, A 20 =y 0 a 2 b 2 c 2 ,A 21 =―y 1 d 2 b 2 e 2 ,A 22 =y 2 d 2 a 2 f 2 ,B 2 =f 2 e 2 c 2 ;a 2 =x―x 1 ,b 2 =x―x 2 ,c 2 =x 1 ―x 2 ,d 2 =x―x 0 ,e 2 =x 0 ―x 2 ,f 2 =x 0 ―x 1 ,A 20 、A 21 And A 22 A second operator representing the second order polynomial, B 2 A first operator, a, representing the second order polynomial 2 、b 2 、c 2 、d 2 、e 2 And f 2 Representing a minimum operator corresponding to the second order polynomial; (x) 0 ,y 0 )、(x 1 ,y 1 ) And (x) 2 ,y 2 ) A key value pair representing the pixel point position and the pixel point parameter of the interpolation observation point;
the third-order polynomial includes:
wherein L is 3 (x) Representing a third order polynomial, A 30 =y 0 a 3 b 3 c 3 d 3 e 3 f 3 ,A 31 =-y 1 g 3 b 3 C 3 h 3 i 3 f 3 ,A 32 =y 2 g 3 a 3 c 3 j 3 i 3 e 3 ,A 33 =-y 3 g 3 a 3 b 3 j 3 h 3 d 3 ,B 3 =j 3 h 3 i 3 d 3 e 3 f 3 a 3 =x-x 1 ,b 3 =x-x 2 ,c 3 =x-x 3 ,d 3 =x 1 -x 2 ,e 3 =x 1 -x 3 ,f 3 =x 2 -x 3 ,g 3 =x-x 0 ,h 3 =x 0 -x 2 ,i 3 =x 0 -x 3 ,j 3 =x 0 -x 1 ,A 30 、A 31 、A 32 And A 33 A second operator representing the third order polynomial, B 3 A first operator, a, representing the third order polynomial 3 、b 3 、c 3 、d 3 、e 3 、f 3 、g 3 、h 3 、i 3 And j 3 Representing a minimum operator corresponding to the second order polynomial; (x) 0 ,y 0 )、(x 1 ,y 1 )、(x 2 ,y 2 ) And (x) 3 ,y 3 ) And a key value pair of the pixel point position and the pixel point parameter of the interpolation observation point is represented.
In one embodiment, the determining of the pending lagrangian polynomial includes:
representing an original Lagrangian polynomial as a ratio of a sum of a plurality of said second operators to said first operator;
extracting a minimum operator of the first operator and the second operator to represent the first operator and the second operator as a product of a plurality of the minimum operators.
In this way, the expression of the pending Lagrangian polynomial can be simplified, so that the pending Lagrangian polynomial can include the product of a plurality of repeated minimum operators, and thus, when the calculation result of the minimum operators is calculated, repeated calculation can be reduced, and the calculation efficiency is improved.
The determination of the above-described pending lagrangian polynomial is described in detail below:
defined according to lagrangian interpolation: on a plane with (x) 0 ,y 0 ),(x 1 ,y 1 ),....,(x n ,y n ) In total n+1 points, a function f (x) is now applied to pass the image through these n+1 points. Let Dn be the set of corner labels about point (x, y), dn= {0,1,2, … …, n }, as n+1 polynomials p j (x) J ε Dn. For any k.epsilon.Dn, there is p k (x),B k = { i|i+.k, i e Dn } such that:
wherein, pi represents cumulative multiplication, p k (x) Is a polynomial of degree n and satisfies Represents arbitrary, p k (xm) =0 and p k (x k ) =1; finally, a Lagrangian interpolation polynomial construction formula can be obtained:
the first-order Lagrangian interpolation function has two interpolation observation points, corresponding to n=1, and the corresponding polynomial can be obtained as follows:
the second-order Lagrangian interpolation function has three interpolation observation points, corresponding to n=2, and the corresponding polynomial can be obtained as follows:
the three-order Lagrangian interpolation function has four interpolation observation points, corresponding to n=3, and the corresponding polynomial can be obtained as follows:
for processors, the clock cycles required for division instructions are much greater than multiplications, and excessive division instructions can cause performance degradation because division instructions involve multiple steps, including the adjustment of the estimator, partial quotient, and the calculation of the remainder, which are typically dependent, and are more complex for multiplications; meanwhile, in a processor, a special hardware multiplier is generally provided for a multiplication instruction so as to efficiently execute the multiplication operation, and for a division operation, the requirement of hardware resources is high, and a special hardware unit may not be needed, and the operation needs to be completed through a series of instructions and a general arithmetic logic unit, so that the division operation is relatively slow. Therefore, the division operation in the Lagrangian polynomials of each order can be reduced as much as possible by means of polynomial rearrangement.
In this embodiment, the polynomial may be rearranged into the following operation form, so that the number of divisions in each order lagrangian polynomial is reduced to 1:
wherein the method comprises the steps of
The final calculation factor for the first order, second order, third order Lagrangian interpolation polynomial can be obtained from equation 4-1:
wherein A is 10 =y 0 (x-x 1 )
A 11 =-y 1 (x 0 -x)
B 1 =x 0 -x 1
A 20 =y 0 (x-x 1 )(x-x 2 )(x 1 -x 2 )
A 21 =-y 1 (x-x 0 )(x-x 2 )(x 0 -x 2 )
A 22 =y 2 (x-x 0 )(x-x 1 )(x 0 -x 1 )
B 2 =(x 0 -x 1 )(x 0 -x 2 )(x 1 -x 2 )
A 30 =y 0 (x-x 1 )(x-x 2 )(x-x 3 )(x 1 -x 2 )(x 1 -x 3 )(x 2 -x 3 )
A 31 =-y 1 (x-x 0 )(x-x 2 )(x-x 3 )(x 0 -x 2 )(x 0 -x 3 )(x 2 -x 3 )
A 32 =y 2 (x-x 0 )(x-x 1 )(x-x 3 )(x 0 -x 1 )(x 0 -x 3 )(x 1 -x 3 )
A 33 =-y 3 (x-x 0 )(x-x 1 )(x-x 2 )(x 0 -x 1 )(x 0 -x 2 )(x 1 -x 2 )
B 3 =(x 0 -x 1 )(x 0 -x 2 )(x 0 -x 3 )(x 1 -x 2 )(x 1 -x 3 )(x 2 -x 3 )
By the method, a first operator and a second operator in the undetermined Lagrangian polynomials of each order are obtained. The minimum operator in each of the first operator and the second operator can be extracted as: for a first order polynomial, its minimum operator includes: a, a 1 =2x-x 1 ,b 1 =x-x 0 ,C 1 =x 0 -x 1 In the first order polynomial, the calculation factor may include: a is that 10 =y 0 a 1 ,A 11 =-y 1 b 1 ,B 1 =C 1 . With this expression, the number of subtraction instructions required can be reduced by reducing the number of times of subtraction in the first-order polynomial from 4 th order in equation 1-1 to 3 th order.
For a second order polynomial, its minimum operator includes: a, a 2 =x-x 1 ,b 2 =x-x 2 ,c 2 =x 1 -x 2 ,d 2 =x-x 0 ,e 2 =x 0 -x 2 ,f 2 =x 0 -x 1 In the second order polynomial, the calculation factor may include: a is that 20 =y 0 a 2 b 2 c 2 ,A 21 =-y 1 d 2 b 2 e 2 ,A 22 =y 2 d 2 a 2 f 2 ,B 2 =f 2 e 2 c 2 . With this expression, the number of times of subtraction operation in the second order polynomial can be reduced from 12 th order to 6 th order in expression 2-1, thereby reducing the number of times of subtraction operation and the number of required subtraction instruction pieces.
For a third order polynomial, its minimum operator includes: a, a 3 =x-x 1 ,b 3 =x-x 2 ,c 3 =x-x 3 ,d 3 =x 1 -x 2 ,e 3 =x 1 -x 3 ,f 3 =x 2 -x 3 ,g 3 =x-x 0 ,h 3 =x 0 -x 2 ,i 3 =x 0 -x 3 ,j 3 =x 0 -x 1 Then in the third order polynomial, the calculation factor may include: a is that 30 =y 0 a 3 b 3 c 3 d 3 e 3 f 3 ,A 31 =-y 1 g 3 b 3 c 3 h 3 i 3 f 3 ,A 32 =y 2 g 3 a 3 c 3 j 3 i 3 e 3 ,A 33 =-y 3 g 3 a 3 b 3 j 3 h 3 d 3 ,B 3 =j 3 h 3 j 3 d 3 e 3 f 3 . With this expression, the number of subtraction instructions required can be reduced by reducing the number of times of subtraction in the third-order polynomial from 24 th order to 10 th order in expression 3-1.
In one embodiment, the predetermined Lagrangian polynomial corresponds to a plurality of minimum operators, and the plurality of minimum operators corresponding to the predetermined Lagrangian polynomial are different. Therefore, repeated calculation of the minimum operator can be reduced to the maximum extent, and the execution efficiency of the method is improved.
In order to improve the calculation efficiency of the calculation result of the minimum operator, referring to fig. 2, in one embodiment of the present disclosure, the obtaining, according to the to-be-found observation point, the interpolation observation point, and the to-be-determined lagrangian polynomial corresponding to the interpolation observation point, the calculation result of the minimum operator included in the to-be-determined lagrangian polynomial includes:
s300: determining a pending Lagrange polynomial corresponding to the number of the interpolation observation points according to the number of the interpolation observation points, wherein the order of the pending Lagrange polynomial is equal to the number of the interpolation observation points minus one;
s301: loading the observation point to be solved and the interpolation observation point by using single instruction stream multiple data stream SIMD instructions;
s302: and calculating a calculation result of a minimum operator included in the undetermined Lagrangian polynomial according to the to-be-found observation point and the interpolation observation point by utilizing the SIMD instruction.
In step S300, the number of interpolation observation points may be determined according to the start and end indexes of the interpolation observation points, so as to determine the pending lagrangian polynomial corresponding to the number of interpolation observation points. For example, assuming that the input is a batch of data to be processed, a polynomial is generally only required to be constructed for a certain number of continuous points (i.e. interpolation observation points), the data range of the construction polynomial is determined through the interpolation observation point index range (m, n), at this time, the interpolation observation points of the construction polynomial are determined through mn to be (Xm, ym) to (Xn, yn), K interpolation nodes are corresponding to K-1 order polynomials according to the definition of the interpolation polynomial, at this time, the number of the interpolation observation points determined by mn is n-m+1, so that the interpolation polynomial of n-m order is corresponding.
In step S301, the observation point to be found and the interpolation observation point are loaded into vector registers 1 to n from a memory in a vectorization manner.
In step S302, parallel operation of a plurality of data points is performed by means of vector operation, and a minimum operator (represented by an operator in fig. 2) stored in vector registers 1 to n (the vector registers 1 to n may be different from or the same as the vector registers to which the observation point to be obtained and the interpolation observation point are loaded in step S301) is obtained.
In this embodiment, based on the SIMD (Single Instruction Multiple Data, single instruction stream multiple data stream) instruction and the vector register, the to-be-solved observation point and the interpolation observation point are loaded and the minimum operator is calculated, so that parallel calculation of multiple data points by using one instruction can be realized, which is beneficial to improving the calculation efficiency and reducing the required instruction number.
Still referring to fig. 2, in an alternative embodiment, the undetermined lagrangian polynomial comprises a ratio of a sum of the plurality of second operators to the first operator; the first operator and the second operator each comprise a product of a plurality of minimum operators corresponding to the pending lagrangian polynomials, the minimum operators comprising a subtraction operation;
the determining the target Lagrangian polynomial according to the pending Lagrangian polynomial and the calculation result of the minimum operator comprises:
s303: and combining the calculation result of the minimum operator into a first operator and a second operator according to the expressions of the first operator and the second operator included in the to-be-pulled Lagrangian polynomial by using a SIMD instruction so as to obtain the target Lagrangian polynomial.
In the embodiment, the minimum operator is combined into the first operator and the second operator through vectorization calculation of the calculation factors, and parallelization operation of the final target Lagrangian polynomial is obtained, so that the method execution efficiency is improved. In fig. 3, the final output to-be-evaluated value may refer to a calculation result in which the to-be-evaluated observation point is substituted into the target lagrangian polynomial.
In some embodiments, in addition to parallel computing the calculation result of the minimum operator included in the pending lagrangian polynomial through steps S301 to S303 by using the SIMD instruction and the vector register and determining the target lagrangian polynomial according to the pending lagrangian polynomial and the calculation result of the minimum operator, the calculation of the minimum operator and the determination of the target lagrangian polynomial may be sequentially performed by using a plurality of scalar registers to load a single data element (for example, a to-be-found observation point or an interpolation observation point) based on a scalar processor, which is not limited in this description, and the description is specific depending on practical situations.
Exemplary apparatus
In an exemplary embodiment of the present specification, there is also provided a data processing apparatus, characterized by being applied to a computing device, as shown in fig. 3, the data processing apparatus including:
the instruction response module 401 is configured to execute a lagrangian interpolation fitting process in response to a data processing instruction carrying an observation point to be solved and an interpolation observation point; the interpolation observation point comprises a key value pair of a pixel point position and a pixel point parameter;
the Lagrange interpolation fitting process comprises the following steps:
obtaining a calculation result of a minimum operator included in the undetermined Lagrangian polynomial according to the undetermined observation point, the interpolation observation point and the undetermined Lagrangian polynomial corresponding to the interpolation observation point;
and determining a target Lagrange polynomial according to the calculation results of the undetermined Lagrange polynomial and the minimum operator, and solving the observation point to be solved by using the target Lagrange polynomial to obtain the pixel point position and the pixel point parameter of the observation point to be solved.
In one embodiment, the predetermined Lagrangian polynomial includes a ratio of a sum of the plurality of second operators to the first operator; the first operator and the second operator each comprise a product of a plurality of the minimum operators corresponding to the pending lagrangian polynomial, the minimum operators comprising a subtraction operation.
In one embodiment, the number of the interpolation observation points is multiple, and the instruction response module is specifically configured to obtain, according to the to-be-solved observation point, the interpolation observation point, and the to-be-determined lagrangian polynomial corresponding to the interpolation observation point, a calculation result of a minimum operator included in the to-be-determined lagrangian polynomial:
determining a pending Lagrange polynomial corresponding to the number of the interpolation observation points according to the number of the interpolation observation points, wherein the order of the pending Lagrange polynomial is equal to the number of the interpolation observation points minus one;
loading the observation point to be solved and the interpolation observation point by using single instruction stream multiple data stream SIMD instructions;
and calculating a calculation result of a minimum operator included in the undetermined Lagrangian polynomial according to the to-be-found observation point and the interpolation observation point by utilizing the SIMD instruction.
In one embodiment, the predetermined Lagrangian polynomial includes a ratio of a sum of the plurality of second operators to the first operator; the first operator and the second operator each comprise a product of a plurality of minimum operators corresponding to the pending lagrangian polynomials, the minimum operators comprising a subtraction operation;
the instruction response module determines, according to the pending lagrangian polynomial and the calculation result of the minimum operator, that the target lagrangian polynomial is specifically used for:
and combining the calculation result of the minimum operator into a first operator and a second operator according to the expressions of the first operator and the second operator included in the to-be-pulled Lagrangian polynomial by using a SIMD instruction so as to obtain the target Lagrangian polynomial.
In one embodiment, the predetermined Lagrangian polynomial corresponds to a plurality of minimum operators, and the plurality of minimum operators corresponding to the predetermined Lagrangian polynomial are different.
In one embodiment, the determining of the pending lagrangian polynomial includes:
representing an original Lagrangian polynomial as a ratio of a sum of a plurality of said second operators to said first operator;
extracting a minimum operator of the first operator and the second operator to represent the first operator and the second operator as a product of a plurality of the minimum operators.
For specific limitations on the data processing means, reference may be made to the above limitations on the data processing method, which are not repeated here. The various modules in the data processing apparatus described above may be implemented in whole or in part by software, hardware, or a combination thereof. The above modules may be embedded in hardware or may be independent of a processor in the computer device, or may be stored in software in a memory in the computer device, so that the processor may call and execute operations corresponding to the above modules.
Exemplary processor and computing device
One embodiment of the present description provides a processor, as shown in fig. 4, the processor 1001 includes:
a decoder 1002 for decoding the computing instructions into decoded instructions;
an execution unit 1003, configured to execute the decoded instruction to implement the data processing method according to any of the above embodiments or the data processing method according to any of the above embodiments.
In addition to the above-described structure, the processor 1001 may further include a plurality of registers 1004 to perform tasks in cooperation with the execution unit 1003. Both the register 1004 and the decoder 1002 are connected to the execution unit 1003. Another embodiment of the present application further provides a computing device, referring to fig. 5, and an exemplary embodiment of the present specification further provides a computing device, including: a memory storing a computer program, and a processor that when executed performs the steps in the classification method according to various embodiments of the present specification described in the above embodiments of the present specification.
The internal architecture of the computing device may be as shown in fig. 5, including a processor, memory, network interfaces, and input devices connected by a system bus. Wherein the processor of the computing device is configured to provide computing and control capabilities. The memory of the computing device includes a non-volatile storage medium, an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The network interface of the computing device is for communicating with an external terminal through a network connection. The computer program, when executed by a processor, performs the steps in the classification method according to various embodiments of the present specification as described in the above embodiments of the present specification.
The processor may include a host processor, and may also include a baseband chip, modem, and the like.
The memory stores programs for executing the technical scheme of the invention, and can also store an operating system and other key services. In particular, the program may include program code including computer-operating instructions. More specifically, the memory may include read-only memory (ROM), other types of static storage devices that may store static information and instructions, random access memory (random access memory, RAM), other types of dynamic storage devices that may store information and instructions, disk storage, flash, and the like.
The processor may be a general-purpose processor, such as a general-purpose Central Processing Unit (CPU), microprocessor, etc., or may be an application-specific integrated circuit (ASIC), or one or more integrated circuits for controlling the execution of programs in accordance with aspects of the present invention. But may also be a Digital Signal Processor (DSP), application Specific Integrated Circuit (ASIC), an off-the-shelf programmable gate array (FPGA) or other programmable logic device, discrete gate or transistor logic device, discrete hardware components.
The input device may include means for receiving data and information entered by a user, such as a keyboard, mouse, camera, scanner, light pen, voice input device, touch screen, pedometer or gravity sensor, etc.
The output device may include means, such as a display screen, printer, speakers, etc., that allow information to be output to the user.
The communication interface may include means, such as any transceiver, for communicating with other devices or communication networks, such as ethernet, radio Access Network (RAN), wireless Local Area Network (WLAN), etc.
The processor executes the program stored in the memory and invokes other devices, which may be used to implement the steps of any of the classification methods provided in the embodiments of the present application.
The computing device can also comprise a display component and a voice component, wherein the display component can be a liquid crystal display screen or an electronic ink display screen, and an input device of the computing device can be a touch layer covered on the display component, can also be a key, a track ball or a touch pad arranged on a shell of the computing device, and can also be an external keyboard, a touch pad or a mouse and the like.
Those skilled in the art will appreciate that the architecture shown in fig. 5 is merely a block diagram of some of the architecture associated with the present description and is not limiting of the computing devices to which the present description may be applied, and that a particular computing device may include more or fewer components than shown, or may combine some of the components, or have a different arrangement of components.
Exemplary computer program product and storage Medium
In addition to the methods and apparatus described above, the classification methods provided by the embodiments of the present description may also be computer program products comprising computer program instructions which, when executed by a processor, cause the processor to perform the steps in the classification methods according to the various embodiments of the present description described in the "exemplary methods" section of the present description.
The computer program product may write program code for performing the operations of embodiments of the present description in any combination of one or more programming languages, including an object oriented programming language such as Java, C++ or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computing device, partly on the user's device, as a stand-alone software package, partly on the user's computing device, partly on a remote computing device, or entirely on the remote computing device or server.
Furthermore, the embodiments of the present specification also provide a computer-readable storage medium having a computer program stored thereon, the computer program being executed by a processor to perform the steps in the classification method according to the various embodiments of the present specification described in the "exemplary method" section of the present specification.
Those skilled in the art will appreciate that implementing all or part of the above described methods may be accomplished by way of a computer program stored on a non-transitory computer readable storage medium, which when executed, may comprise the steps of the embodiments of the methods described above. Any reference to memory, storage, database, or other medium used in the embodiments provided herein may include non-volatile and/or volatile memory. The nonvolatile memory can include Read Only Memory (ROM), programmable ROM (PROM), electrically Programmable ROM (EPROM), electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double Data Rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous Link DRAM (SLDRAM), memory bus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), among others.
The technical features of the above embodiments may be arbitrarily combined, and all possible combinations of the technical features in the above embodiments are not described for brevity of description, however, as long as there is no contradiction between the combinations of the technical features, they should be considered as the scope of the description.
The above examples merely represent a few implementations of the present description, which are described in more detail and are not to be construed as limiting the scope of the solutions provided by the examples of the present description. It should be noted that it will be apparent to those skilled in the art that several variations and modifications can be made without departing from the spirit of the present description, which is within the scope of the present description. Accordingly, the protection scope of the patent should be determined by the appended claims.

Claims (10)

1. A method of data processing, comprising:
responding to a data processing instruction carrying an observation point to be solved and an interpolation observation point, and executing a Lagrange interpolation fitting process; the interpolation observation point comprises a key value pair of a pixel point position and a pixel point parameter;
the Lagrange interpolation fitting process comprises the following steps:
obtaining a calculation result of a minimum operator included in the undetermined Lagrangian polynomial according to the undetermined observation point, the interpolation observation point and the undetermined Lagrangian polynomial corresponding to the interpolation observation point;
and determining a target Lagrange polynomial according to the calculation results of the undetermined Lagrange polynomial and the minimum operator, and solving the observation point to be solved by using the target Lagrange polynomial to obtain the pixel point position and the pixel point parameter of the observation point to be solved.
2. The method of claim 1, wherein the pending lagrangian polynomial comprises a ratio of a sum of the plurality of second operators to the first operator; the first operator and the second operator each comprise a product of a plurality of the minimum operators corresponding to the pending lagrangian polynomial, the minimum operators comprising a subtraction operation.
3. The method of claim 1, wherein the number of the interpolation observation points is a plurality, and the obtaining the calculation result of the minimum operator included in the pending lagrangian polynomial according to the pending observation point, the interpolation observation point, and the pending lagrangian polynomial corresponding to the interpolation observation point includes:
determining a pending Lagrange polynomial corresponding to the number of the interpolation observation points according to the number of the interpolation observation points, wherein the order of the pending Lagrange polynomial is equal to the number of the interpolation observation points minus one;
loading the observation point to be solved and the interpolation observation point by using single instruction stream multiple data stream SIMD instructions;
and calculating a calculation result of a minimum operator included in the undetermined Lagrangian polynomial according to the to-be-found observation point and the interpolation observation point by utilizing the SIMD instruction.
4. A method according to claim 3, wherein the pending lagrangian polynomial comprises a ratio of a sum of the plurality of second operators to the first operator; the first operator and the second operator each comprise a product of a plurality of minimum operators corresponding to the pending lagrangian polynomials, the minimum operators comprising a subtraction operation;
the determining the target Lagrangian polynomial according to the pending Lagrangian polynomial and the calculation result of the minimum operator comprises:
and combining the calculation result of the minimum operator into a first operator and a second operator according to the expressions of the first operator and the second operator included in the to-be-pulled Lagrangian polynomial by using a SIMD instruction so as to obtain the target Lagrangian polynomial.
5. The method of claim 1, wherein the predetermined lagrangian polynomial corresponds to a plurality of minimum operators, and wherein the plurality of minimum operators to which the predetermined lagrangian polynomial corresponds are different.
6. The method of claim 2, wherein the determining of the pending lagrangian polynomial comprises:
representing an original Lagrangian polynomial as a ratio of a sum of a plurality of said second operators to said first operator;
extracting a minimum operator of the first operator and the second operator to represent the first operator and the second operator as a product of a plurality of the minimum operators.
7. A data processing apparatus, comprising:
the instruction response module is used for responding to a data processing instruction carrying an observation point to be solved and an interpolation observation point and executing a Lagrange interpolation fitting process; the interpolation observation point comprises a key value pair of a pixel point position and a pixel point parameter;
the Lagrange interpolation fitting process comprises the following steps:
obtaining a calculation result of a minimum operator included in the undetermined Lagrangian polynomial according to the undetermined observation point, the interpolation observation point and the undetermined Lagrangian polynomial corresponding to the interpolation observation point;
and determining a target Lagrange polynomial according to the calculation results of the undetermined Lagrange polynomial and the minimum operator, and solving the observation point to be solved by using the target Lagrange polynomial to obtain the pixel point position and the pixel point parameter of the observation point to be solved.
8. A processor, comprising:
a decoder for decoding the data processing instructions into decoded instructions;
execution unit for executing the decoded instructions to implement the data processing method according to any of claims 1 to 6.
9. A computing device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the data processing method of any of claims 1 to 6 when the computer program is executed.
10. A computer-readable storage medium, characterized in that the computer-readable storage medium has stored thereon a computer program which, when executed by a processor, implements the data processing method according to any of claims 1 to 6.
CN202410015333.5A 2024-01-04 2024-01-04 Data processing method, device, processor, computing equipment and storage medium Pending CN117828234A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202410015333.5A CN117828234A (en) 2024-01-04 2024-01-04 Data processing method, device, processor, computing equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202410015333.5A CN117828234A (en) 2024-01-04 2024-01-04 Data processing method, device, processor, computing equipment and storage medium

Publications (1)

Publication Number Publication Date
CN117828234A true CN117828234A (en) 2024-04-05

Family

ID=90515146

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202410015333.5A Pending CN117828234A (en) 2024-01-04 2024-01-04 Data processing method, device, processor, computing equipment and storage medium

Country Status (1)

Country Link
CN (1) CN117828234A (en)

Similar Documents

Publication Publication Date Title
US20230305808A1 (en) Accelerated mathematical engine
EP3798928A1 (en) Deep learning implementations using systolic arrays and fused operations
CN112104830A (en) Video frame insertion method, model training method and corresponding device
US10324689B2 (en) Scalable memory-optimized hardware for matrix-solve
CN110390075B (en) Matrix preprocessing method, device, terminal and readable storage medium
JP7414930B2 (en) Information processing device, information processing method
US20220092399A1 (en) Area-Efficient Convolutional Block
CN110637306A (en) Conditional graph execution based on previous reduced graph execution
Boukhtache et al. FPGA-based architecture for bi-cubic interpolation: the best trade-off between precision and hardware resource consumption
Champagnat et al. Efficient cubic B-spline image interpolation on a GPU
Yamashita et al. A primal–dual interior point method for nonlinear optimization over second-order cones
Antczak Generalized fractional minimax programming with B-(p, r)-invexity
CN113888524A (en) Defect detection model training method, device and equipment and readable storage medium
CN117828234A (en) Data processing method, device, processor, computing equipment and storage medium
WO2021056216A1 (en) Predicted value determination method, encoder, decoder, and computer storage medium
US20230185873A1 (en) Method and apparatus for separable convolution filter operations on matrix multiplication arrays
EP4020171A1 (en) Processors, methods, systems, and instructions to select and store data elements from two source two-dimensional arrays indicated by permute control elements in a result two-dimensional array
CN111260559A (en) Image zooming display method and device and terminal equipment
KR100637055B1 (en) Processor
US8135069B2 (en) Frame rate conversion method using motion interpolation
CN113630601B (en) Affine motion estimation method, affine motion estimation device, affine motion estimation equipment and storage medium
CN115659380B (en) Ciphertext data fitting calculation method and device and electronic equipment
JP7114321B2 (en) Data processing device and method
Lakshminarayanan et al. A generalized reduced linear program for Markov decision processes
Sambamurthy et al. FPGA implementation of high performance image de-noising filter

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