Data processing method, chip, electronic equipment and storage medium

By performing parallel processing of transformed data in the second processing unit of the chip, the countdown calculation is achieved using preset parameters and iterative operations, the calculation efficiency in battery reaction energy calculation is improved, and the serial calculation efficiency of Newton's iterative method is solved. question.

CN119065636APending Publication Date: 2024-12-03SHANGHAI SMARTLOGIC TECHNOLOGY LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411127562.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-16
Publication Date
2024-12-03

AI Technical Summary

Technical Problem

The serial computing efficiency of the Newton iteration method is low when calculating the countdown, especially when there are many parameters, the chip's calculation efficiency is not high. For example, in the calculation of battery reaction energy, many parameters lead to low computing efficiency.

Method used

The to-process data is obtained through the external interface of the chip, and the data that meets the countdown processing conditions are input and processed in parallel in the second processing unit of the chip. The absolute value, symbol bits and iterative initial value are determined using preset parameters, and iterative operation is performed. To get the reciprocal, the sign bits are assigned by fixed-point addition to improve the calculation efficiency.

Benefits of technology

The parallel operation of countdown is realized, the chip's data processing efficiency is improved, and the problem of low serial computing efficiency is solved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119065636A_ABST
    Figure CN119065636A_ABST
Patent Text Reader

Abstract

The invention discloses a data processing method, a chip, electronic equipment and a storage medium. The method comprises the following steps: acquiring to-be-processed data through an external interface of a chip, and transmitting the to-be-processed data to a first processing unit of the chip for processing; when at least one piece of to-be-transformed data meeting the reciprocal processing condition exists, inputting the to-be-transformed data into a second processing unit of the chip in parallel for reciprocal transformation to obtain reciprocals of the to-be-transformed data; wherein reciprocal transformation is carried out on the to-be-transformed data through a second processing unit of the chip, and the reciprocal transformation comprises the following steps: acquiring a preset parameter, and determining an absolute value, a sign bit and an iterative initial value of the to-be-transformed data based on the preset parameter; performing iterative operation on the absolute value and the initial value to obtain a target parameter meeting the precision requirement; the sign bits are assigned to the target parameters through fixed-point addition, the reciprocal of the to-be-transformed data is obtained, the problem that serial calculation is low in efficiency is solved, parallel calculation of the reciprocal is achieved, and the data processing efficiency of a chip is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular to a data processing method, a chip, an electronic device and a storage medium. Background Art

[0002] Newton's iteration method is a commonly used method for solving approximate roots of equations, which can be used to calculate the reciprocal of a number. The specific steps are as follows: 1. Define the objective function: Convert the problem of finding the reciprocal into the form of solving an equation; let the number to be calculated be a, then its reciprocal is 1 / a. This relationship can be expressed by defining the function f(x) = 1 / xa. 2. Select the initial value: Select a suitable initial value x0 as the starting point of the iteration. Usually a value close to 1 / a is selected. 3. Iteration formula: According to the principle of Newton's iteration method, the value of xx is updated each iteration; after each iteration, check whether the difference between the current value and the previous value is less than a preset threshold. If the condition is met, it is considered to have converged and the iteration can be ended. However, when the Newton iteration method is used to perform the reciprocal calculation, the chip needs to calculate one by one. When there are many parameters, for example, the parameters involved in the battery reaction energy calculation process are as high as dozens or even hundreds, and the chip is less efficient in serial calculation. Summary of the invention

[0003] The present invention provides a data processing method, a chip, an electronic device and a storage medium to solve the problem of low serial computing efficiency.

[0004] According to one aspect of the present invention, there is provided a data processing method, comprising:

[0005] Acquire data to be processed through an external interface of the chip, and transmit the data to be processed to a first processing unit of the chip for processing;

[0006] When there is at least one data to be transformed that meets the inverse processing condition, each of the data to be transformed is input in parallel to the second processing unit of the chip for inverse transformation to obtain the inverse of each of the data to be transformed;

[0007] The step of performing an inverse transformation on the data to be transformed by the second processing unit of the chip includes:

[0008] Acquire preset parameters, and determine the absolute value, sign bit and initial value of iteration of the data to be transformed based on the preset parameters;

[0009] Iteratively calculating the absolute value and the initial value to obtain a target parameter that meets the accuracy requirement;

[0010] The sign bit is assigned to the target parameter by fixed-point addition to obtain the reciprocal of the data to be transformed.

[0011] According to another aspect of the present invention, there is provided a chip, comprising:

[0012] An external interface, used to obtain data to be processed and transmit the data to be processed to the first processing unit;

[0013] A first processing unit is used to process the data to be processed, and when there is at least one data to be transformed that meets the inverse processing condition, each of the data to be transformed is input in parallel to the second processing unit;

[0014] A second processing unit is used to perform inverse transformation on each to-be-transformed data in parallel to obtain the inverse of each to-be-transformed data;

[0015] Wherein, the second processing unit is specifically used for:

[0016] Acquire preset parameters, and determine the absolute value, sign bit and initial value of iteration of the data to be transformed based on the preset parameters;

[0017] Iteratively calculating the absolute value and the initial value to obtain a target parameter that meets the accuracy requirement;

[0018] The sign bit is assigned to the target parameter by fixed-point addition to obtain the reciprocal of the data to be transformed.

[0019] According to another aspect of the present invention, an electronic device is provided, the electronic device comprising:

[0020] at least one chip, and a memory communicatively connected to the at least one chip;

[0021] The memory stores a computer program that can be executed by the at least one chip, and the computer program is executed by the at least one chip so that the at least one chip can execute the data processing method described in any embodiment of the present invention.

[0022] According to another aspect of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the data processing method described in any embodiment of the present invention when executed.

[0023] The technical solution of the embodiment of the present invention is to obtain data to be processed through an external interface of a chip, and transmit the data to be processed to a first processing unit of the chip for processing; when there is at least one data to be transformed that meets the inverse processing condition, each of the data to be transformed is input in parallel to the second processing unit of the chip for inverse transformation to obtain the inverse of each of the data to be transformed; wherein, the inverse transformation of the data to be transformed by the second processing unit of the chip includes: obtaining preset parameters, determining the absolute value, sign bit and initial value of iteration of the data to be transformed based on the preset parameters; iteratively calculating the absolute value and the initial value to obtain a target parameter that meets the accuracy requirement; assigning the sign bit to the target parameter by fixed-point addition to obtain the inverse of the data to be transformed, which solves the problem of low serial calculation efficiency. After the data to be processed is obtained through the external interface of the chip, the data to be processed is processed by the first processing unit of the chip. When there is at least one data to be transformed that meets the inverse processing condition, the data to be transformed is processed in parallel by the second processing unit of the chip to determine the inverse of each data to be transformed, so as to achieve parallel calculation of the inverse, thereby improving the data processing efficiency of the chip.

[0024] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0025] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0026] Figure 1 is a flow chart of a data processing method provided according to an embodiment of the present invention;

[0027] Figure 2 is an example diagram of an implementation of determining the inverse of data to be transformed according to an embodiment of the present invention;

[0028] Figure 3 is a schematic structural diagram of a chip provided according to an embodiment of the present invention;

[0029] Figure 4 It is a schematic diagram of the structure of an electronic device provided according to an embodiment of the present invention. DETAILED DESCRIPTION

[0030] In order to enable those skilled in the art to better understand the scheme of the present invention, 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 should fall within the scope of protection of the present invention.

[0031] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0032] Figure 1 This is a flow chart of a data processing method provided by an embodiment of the present invention. This embodiment is applicable to the case where the inverse is calculated in parallel during the data processing process. The method can be executed by a chip, and the chip device can be configured in an electronic device. Figure 1 As shown, the method includes:

[0033] S110 , acquiring data to be processed through an external interface of the chip, and transmitting the data to be processed to a first processing unit of the chip for processing.

[0034] In this embodiment, the external interface can be understood as an interface for the chip to communicate with the outside, such as a USB interface, a Type C interface, an SC interface, etc. The data to be processed can be data that needs to be processed, such as battery data, material data, etc. The first processing unit can be understood as a unit in the chip that has data processing capabilities.

[0035] When processing data, the data to be processed can be input by the user or obtained by reading files. For example, the user inputs the data to be processed through a computer, a single-chip microcomputer or other device, the device is connected to the external interface of the chip through communication, and the chip obtains the data to be processed input by the user through the external interface; or, the data to be processed is stored in the document of the device, and the chip reads the document in the device through the external interface to obtain the data to be processed. After the chip obtains the data to be processed through the external interface, it transmits the data to be processed to the first processing unit. After receiving the data to be processed, the first processing unit processes the data to be processed; when processing the data to be processed, the first processing unit can process it according to a pre-set algorithm, or determine the corresponding processing algorithm according to the data type of the data to be processed, and then process the data to be processed according to the corresponding processing algorithm. The data type can be battery parameters, material parameters, etc. In the process of processing the data to be processed, the first processing unit may generate a lot of data, and may need to perform different types of operations on the data, such as multiplication, reciprocal operation, etc. Taking the battery parameters as an example, in the process of processing the battery parameters, the data processing involved includes: determining the tridiagonal matrix, finding the eigenvalues ​​of the tridiagonal matrix, etc. When finding the eigenvalues ​​of the tridiagonal matrix, an inverse calculation is performed.

[0036] S120. When there is at least one data to be transformed that meets the inverse processing condition, input each data to be transformed in parallel to the second processing unit of the chip for inverse transformation to obtain the inverse of each data to be transformed.

[0037] In this embodiment, the inverse processing condition can be understood as a condition for determining whether the data needs to be inversely calculated. The data to be transformed can be understood as data that needs to be inversely transformed. In the process of processing the data to be processed, the first unit to be processed can determine what kind of processing the data needs to be performed next according to the data processing rules or algorithms. The data described in this step can be the input data to be processed, or it can be an intermediate result generated during the processing of the data to be processed. When it is determined that the processing that needs to be performed on the data next is to calculate the inverse, it is determined that the data meets the inverse processing condition, and this part of the data is recorded as the data to be transformed. The data to be transformed can be one or more. For example, when determining the eigenvalue, multiple data to be transformed will be determined simultaneously according to the matrix, and the number of data to be transformed is related to the size of the matrix. After the first processing unit determines that there is at least one data to be transformed that meets the inverse processing condition during the data processing process, the first processing unit inputs each data to be transformed in parallel to the second processing unit of the chip; or, after the chip determines that there is at least one data to be transformed that meets the inverse processing condition among the data processed by the first processing unit, the chip inputs each data to be transformed in parallel to the second processing unit of the chip; the second processing unit receives each data to be transformed and performs inverse transformation on each data to be transformed in parallel to obtain the inverse of each data to be transformed.

[0038] The second processing unit of the chip performs an inverse transformation on the data to be transformed, including:

[0039] Step 1: Obtain preset parameters, and determine the absolute value, sign bit, and initial value of iteration of the data to be transformed based on the preset parameters.

[0040] In this embodiment, the preset parameter can be understood as a pre-set parameter, which can be determined according to the precision type of the data, which can be a double-precision floating point number, a single-precision floating point number, etc. There are multiple preset parameters, or there are multiple parameters included in the preset parameters.

[0041] The preset parameters are determined in advance and stored in the corresponding memory space. When processing data, the preset parameters stored in the memory space are read through addresses, pointers, etc. Based on different parameters in the preset parameters or different preset parameters, operations such as AND and OR are performed on the data to be transformed to obtain the absolute value, sign bit and iterative initial value of the data to be transformed.

[0042] Step 2: Iterate the absolute value and the initial value to obtain the target parameter that meets the accuracy requirements.

[0043] In this embodiment, the target parameter can be understood as the data obtained after performing multiple iterations on the initial value. The algorithm or formula for the iterative operation is determined in advance, and the absolute value and the initial value are brought into the algorithm or formula for calculation to obtain the result of the iteration, and to determine whether the accuracy requirement is met. For example, the accuracy requirement can be whether the number of iterations is greater than a certain number, whether the result of the iteration is within a certain range, etc. If the accuracy requirement is not met, the iteration continues; if the accuracy requirement is met, the target parameter is determined according to the result of the iteration.

[0044] Step 3: Assign the sign bit to the target parameter through fixed-point addition to obtain the reciprocal of the data to be transformed.

[0045] The sign bit is assigned to the target parameter through fixed-point addition, that is, the sign bit and the target parameter are added at a fixed point, and the result obtained is the reciprocal of the data to be transformed.

[0046] The data processing method provided by the embodiment of the present invention obtains data to be processed through an external interface of a chip, and transmits the data to be processed to a first processing unit of the chip for processing; when there is at least one data to be transformed that meets the inverse processing condition, each data to be transformed is input in parallel to the second processing unit of the chip for inverse transformation, so as to obtain the inverse of each data to be transformed; wherein, the inverse transformation of the data to be transformed by the second processing unit of the chip includes: obtaining preset parameters, determining the absolute value, sign bit and initial value of iteration of the data to be transformed based on the preset parameters; iteratively calculating the absolute value and the initial value to obtain the target parameter that meets the accuracy requirement; assigning the sign bit to the target parameter by fixed-point addition to obtain the inverse of the data to be transformed, thereby solving the problem of low serial calculation efficiency. After the data to be processed is obtained through the external interface of the chip, the data to be processed is processed by the first processing unit of the chip. When there is at least one data to be transformed that meets the inverse processing condition, each data to be transformed is processed in parallel by the second processing unit of the chip to determine the inverse of each data to be transformed, thereby realizing parallel calculation of the inverse, thereby improving the data processing efficiency of the chip.

[0047] Optionally, the data to be processed are battery parameters; the battery parameters include: electrolyte parameters and electrode parameters; the final processing result of the data to be processed is the energy generated by the reaction between the electrolyte and the electrode.

[0048] In this embodiment, the electrolyte parameter can be one or more electrolyte parameters such as the molecular structure of the compound, the electron density of the condensed state, and the wave function of multiple electrons, wherein the compound generally refers to the solute, solvent and other compounds of the electrolyte; the electrode parameter can be one or more electrode parameters such as the molecular structure of the compound, the electron density of the condensed state, and the wave function of multiple electrons, wherein the compound generally refers to the compound of the material constituting the electrode. After the data to be processed is processed, the energy generated by the reaction between the electrolyte and the electrode is finally obtained.

[0049] Battery parameters may also include: Hamiltonian of the system, where the system refers to a system consisting of electrodes and electrolyte.

[0050] Optionally, determining the absolute value and sign bit of the data to be transformed based on preset parameters includes:

[0051] Performing an AND operation on the first preset parameter among the preset parameters and the data to be transformed to obtain the absolute value of the data to be transformed;

[0052] An AND operation is performed on the second preset parameter in the preset parameters and the data to be transformed to obtain a sign bit of the data to be transformed.

[0053] In this embodiment, the first preset parameter and the second preset parameter are both pre-determined parameters, which can be determined according to the precision type of the data, for example, the precision type of the data is double floating point precision data. The first preset parameter and the second preset parameter in the preset parameters are pre-determined, and the first preset parameter is operated with the data to be transformed, and the data obtained is the absolute value of the data to be transformed; the second preset parameter is operated with the data to be transformed, and the data obtained is the sign bit of the data to be transformed.

[0054] Optionally, determining an initial value of the iteration of the data to be transformed based on a preset parameter includes:

[0055] Determine the base and exponent difference according to preset parameters and the data to be transformed;

[0056] The base is processed based on a preset formula to obtain an initial value base;

[0057] Perform fixed-point addition on the initial value base and the exponent difference to obtain the initial value of the iteration.

[0058] In this embodiment, the preset formula is a calculation formula in which an independent variable includes a base; the initial value base can be understood as the base used to calculate the initial value. The preset parameters include different parameters, and the data to be transformed are processed differently according to different parameters, for example, an AND operation, an OR operation, a NOT operation, etc. are performed to obtain the base and the exponent difference respectively. The base is substituted into the preset formula for operation, and the data obtained is the initial value base. The initial value base and the exponent difference are subjected to fixed-point addition operation to obtain the initial value of the iteration.

[0059] Exemplarily, the present application embodiment provides a preset formula:

[0060] y=ab*x; where y is the initial value base, x is the base, and a and b are two parameters.

[0061] Optionally, a=24 / 17, b=8 / 17.

[0062] Optionally, the base and the exponent difference are determined according to preset parameters and the data to be transformed, including:

[0063] Performing an AND operation on the third preset parameter in the preset parameters and the data to be transformed to obtain a first absolute value;

[0064] Perform an OR operation on a fourth preset parameter in the preset parameters and the first absolute value to obtain a base;

[0065] Performing an AND operation on the fifth preset parameter in the preset parameters and the data to be transformed to obtain an order code of the data to be transformed;

[0066] The order of the data to be transformed is subtracted from the order of the fourth preset parameter to obtain an order difference.

[0067] In this embodiment, the third preset parameter, the fourth preset parameter and the fifth preset parameter are all preset parameters, and the first preset parameter, the second preset parameter, the third preset parameter, the fourth preset parameter and the fifth preset parameter are different parameters, which can be set according to the precision type of the data. The first absolute value is the absolute value of the data to be transformed obtained by processing.

[0068] Predetermine a third preset parameter, a fourth preset parameter and a fifth preset parameter; perform an AND operation on the third preset parameter and the data to be transformed, and the obtained data is used as the first absolute value; perform an OR operation on the first absolute value and the fourth preset parameter, and the obtained data is the base.

[0069] The fifth preset parameter is ANDed with the data to be transformed, and the data obtained is the order of the data to be transformed; the order of the data to be transformed is subtracted from the order of the fourth preset parameter, and the order difference is obtained.

[0070] Optionally, the absolute value and the initial value are iterated to obtain the target parameter that meets the accuracy requirement, including:

[0071] Iteratively update the initial value based on the absolute value to obtain the iterated parameter and accumulate the current number of iterations;

[0072] Determine whether the current number of iterations is greater than the iteration number threshold, and if so, determine the parameters after the iteration as the target parameters;

[0073] If not, the iterated parameter is used as a new initial value, and the process returns to the step of iteratively updating the initial value based on the absolute value to obtain the iterated parameter and accumulating the current number of iterations.

[0074] In this embodiment, the current number of iterations can be understood as the number of iterative updates currently performed; the iteration number threshold can be pre-set, for example, 3 times, 4 times, etc., and can be set according to accuracy requirements.

[0075] Iterate and update the initial value according to the absolute value, for example, add the absolute value and the initial value, multiply the absolute value and the initial value, etc., to obtain the iterated parameter; and accumulate the current number of iterations, for example, add 1 cumulatively. Compare the current number of iterations with the iteration number threshold to determine whether the current number of iterations is greater than the iteration number threshold. If so, it can be considered that the data accuracy meets the requirements, and the iteration is terminated, and the parameter after this iteration is determined as the target parameter. If not, the iteration is not completed at this time, and the iterated parameter is used as the new initial value, and the iterative update of the initial value based on the absolute value is continued to be performed to obtain the iterated parameter, and the operation of accumulating the current number of iterations is performed, that is, the new initial value is iteratively updated based on the absolute value and subsequent operations are performed.

[0076] Optionally, the initial value is iteratively updated based on the absolute value to obtain the iterated parameters, including:

[0077] Multiply the initial value and the absolute value to obtain the first product;

[0078] The difference between the preset value and the first product is calculated, and the product of the initial value and the difference is used as the parameter after iteration.

[0079] In this embodiment, the preset value can be understood as a preset parameter, which can be set according to the precision type of the data. The preset value is set in advance, the initial value is multiplied by the absolute value, and the obtained product is recorded as the first product; the preset value is subtracted from the first product to obtain the difference, and the initial value is multiplied by the difference, and the obtained product is the iterated parameter.

[0080] For example, Figure 2An implementation example diagram for determining the reciprocal of the data to be transformed is provided. Taking the precision type of the data to be transformed as a double-precision floating-point number as an example, n double-precision floating-point numbers are input to the chip for parallel calculation at the same time. These n floating-point numbers will undergo the same processing. Taking a1 as an example, the processing process is as follows:

[0081] After some bit operations on auxiliary parameters, we can find out its base and order. Here, for the sake of simplicity, we take a few digits to represent a 64-bit number:

[0082] The first preset parameter: 0111

[0083] 011111111111111111111111111111111111111111111111111111111111, a total of 64 bits, are ANDed with the data to be transformed, and the absolute value is calculated to obtain the absolute value of the data to be transformed |a|;

[0084] The second preset parameter: 1000 means

[0085] 10000000000000000000000000000000000000000000000000000000000000000000000000000, a total of 64 bits, perform AND operation with the data to be transformed, find the sign, and get the sign bit of the data to be transformed;

[0086] The third preset parameter: 00111

[0087] 001111111111111111111111111111111111111111111111111111111111111, a total of 64 bits; the absolute value of a double-precision floating-point number can be obtained by performing an AND operation on the third preset parameter and a1, which is recorded as the first absolute value.

[0088] The fourth preset parameter: 00111000

[0089] 0011100000000000000000000000000000000000000000000000000000000000000000, a total of 64 bits.

[0090] The first absolute value is ORed with the fourth preset parameter to obtain the base of the double-precision floating point number. The base is processed based on a preset formula to obtain an initial value base.

[0091] The fifth preset parameter: 0111000

[0092] 011100000000000000000000000000000000000000000000000000000000000000000000000000, a total of 64 bits; the fifth preset parameter can obtain the exponent of the double-precision floating point number, that is, the exponent of the data to be transformed, through the AND operation with a1; then the exponent of 00111000 is subtracted from the exponent of the data to be transformed to obtain the exponent difference; the exponent of 00111000 is 1023, and 1023-exponent is the exponent difference.

[0093] By performing fixed-point addition on the initial value base and the exponent difference, we can get the initial value of the iteration. Then we iterate the initial value according to the iteration formula. After the accuracy is reached, we reassign the sign bit through fixed-point addition and finally get 1 / a1.

[0094] Exemplarily, the iteration formula is: initial value*(2-|a|*initial value), where 2 is a preset value. Taking the iteration number threshold as 3 as an example, a total of 4 iterations are performed.

[0095] The chip can simultaneously perform inverse transformation on a1-an, a total of n data to be transformed, to obtain the inverse of n data to be transformed. At this time, there are n groups of identical preset parameters, each group of preset parameters includes a first preset parameter, a second preset parameter, a third preset parameter, a fourth preset parameter and a fifth preset parameter, a total of 5 parameters participating in data processing.

[0096] The data processing method provided by the embodiment of the present invention solves the problem of low serial computing efficiency. After the data to be processed is obtained through the external interface of the chip, the first processing unit of the chip processes the data to be processed. When there is at least one data to be transformed that meets the inverse processing condition, the second processing unit of the chip simultaneously processes the data to be transformed in parallel, and the bit operation is assisted by preset parameters to determine the base and order of the data to be transformed, and then determine the inverse of each data to be transformed, so as to realize the parallel operation of the inverse and improve the data processing efficiency of the chip. The initial value is iteratively updated to obtain parameters that meet the accuracy requirements and improve the accuracy of the calculation results.

[0097] Figure 3 A schematic diagram of the structure of a chip provided by an embodiment of the present invention is shown in FIG. Figure 3 As shown, the chip includes: an external interface 21 , a first processing unit 22 and a second processing unit 23 .

[0098] The external interface 21 is used to obtain the data to be processed and transmit the data to be processed to the first processing unit;

[0099] The first processing unit 22 is used to process the data to be processed, and when there is at least one data to be transformed that meets the inverse processing condition, input each of the data to be transformed into the second processing unit in parallel;

[0100] The second processing unit 23 is used to perform inverse transformation on each to-be-transformed data in parallel to obtain the inverse of each to-be-transformed data;

[0101] Wherein, the second processing unit 23 is specifically used for:

[0102] Acquire preset parameters, and determine the absolute value, sign bit and initial value of iteration of the data to be transformed based on the preset parameters;

[0103] Iteratively calculating the absolute value and the initial value to obtain a target parameter that meets the accuracy requirement;

[0104] The sign bit is assigned to the target parameter by fixed-point addition to obtain the reciprocal of the data to be transformed.

[0105] The chip provided by the embodiment of the present invention solves the problem of low serial computing efficiency. After the data to be processed is obtained through the external interface of the chip, the data to be processed is processed by the first processing unit of the chip. When there is at least one data to be transformed that meets the inverse processing condition, the second processing unit of the chip simultaneously processes each data to be transformed in parallel, determines the inverse of each data to be transformed, realizes the parallel operation of the inverse, and improves the data processing efficiency of the chip.

[0106] Optionally, determining the absolute value and the sign bit of the to-be-transformed data based on the preset parameters includes:

[0107] Performing an AND operation on a first preset parameter among the preset parameters and the data to be transformed to obtain an absolute value of the data to be transformed;

[0108] An AND operation is performed on a second preset parameter among the preset parameters and the data to be transformed to obtain a sign bit of the data to be transformed.

[0109] Optionally, determining an initial value of the iteration of the data to be transformed based on the preset parameter includes:

[0110] Determine the base and the exponent difference according to the preset parameters and the data to be transformed;

[0111] Processing the base number based on a preset formula to obtain an initial value base number;

[0112] The initial value base and the exponent difference are added at a fixed point to obtain an initial value for iteration.

[0113] Optionally, determining the base and the exponent difference according to the preset parameters and the data to be transformed includes:

[0114] Performing an AND operation on a third preset parameter among the preset parameters and the data to be transformed to obtain a first absolute value;

[0115] Performing an OR operation on a fourth preset parameter among the preset parameters and the first absolute value to obtain a base;

[0116] Performing an AND operation on a fifth preset parameter among the preset parameters and the data to be transformed to obtain an order code of the data to be transformed;

[0117] The order of the data to be transformed is subtracted from the order of the fourth preset parameter to obtain an order difference.

[0118] Optionally, the iterative operation of the absolute value and the initial value to obtain a target parameter that meets the accuracy requirement includes:

[0119] Iteratively updating the initial value based on the absolute value to obtain an iterated parameter, and accumulating the current number of iterations;

[0120] Determine whether the current number of iterations is greater than an iteration number threshold, and if so, determine the parameters after the iteration as the target parameters;

[0121] If not, the iterated parameter is used as a new initial value, and the process returns to the step of iteratively updating the initial value based on the absolute value to obtain the iterated parameter, and accumulating the current number of iterations.

[0122] Optionally, the iteratively updating the initial value based on the absolute value to obtain an iterated parameter includes:

[0123] Multiplying the initial value by the absolute value to obtain a first product;

[0124] The difference between the preset value and the first product is calculated, and the product of the initial value and the difference is used as the iterated parameter.

[0125] Optionally, the data to be processed are battery parameters; the battery parameters include: electrolyte parameters and electrode parameters; the final processing result of the data to be processed is the energy generated by the reaction between the electrolyte and the electrode.

[0126] The chip provided in the embodiment of the present invention can execute the data processing method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.

[0127] Figure 4A schematic diagram of the structure of an electronic device provided for one embodiment of the present invention. The electronic device 40 is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital assistants, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or required herein.

[0128] like Figure 4 As shown, the electronic device 40 includes at least one chip 41, and a memory connected to the at least one chip 41, such as a read-only memory (ROM) 42, a random access memory (RAM) 43, etc., wherein the memory stores a computer program that can be executed by at least one chip, and the chip 41 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 42 or the computer program loaded from the storage unit 48 to the random access memory (RAM) 43. In the RAM 43, various programs and data required for the operation of the electronic device 40 can also be stored. The chip 41, the ROM 42, and the RAM 43 are connected to each other through a bus 44. An input / output (I / O) interface 45 is also connected to the bus 44.

[0129] A number of components in the electronic device 40 are connected to the I / O interface 45, including: an input unit 46, such as a keyboard, a mouse, etc.; an output unit 47, such as various types of displays, speakers, etc.; a storage unit 48, such as a disk, an optical disk, etc.; and a communication unit 49, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 49 allows the electronic device 40 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.

[0130] Chip 41 may be various general and / or special processing components with processing and computing capabilities. Some examples of chip 41 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special artificial intelligence (AI) computing chips, etc. Chip 41 performs the various methods and processes described above, such as data processing methods.

[0131] In some embodiments, the data processing method may be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 48. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 40 via the ROM 42 and / or the communication unit 49. When the computer program is loaded into the RAM 43 and executed by the chip 41, one or more steps of the data processing method described above may be performed. Alternatively, in other embodiments, the chip 41 may be configured to perform the data processing method in any other appropriate manner (e.g., by means of firmware).

[0132] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable chip, which can be a dedicated or general-purpose programmable chip that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0133] The computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a chip of a general-purpose computer, a special-purpose computer or other programmable data processing device, so that when the computer program is executed by the chip, the functions / operations specified in the flow chart and / or block diagram are implemented. The computer program may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.

[0134] An embodiment of the present invention provides a computer program product, which includes a computer program. When the computer program is executed by a chip, the data processing method described in any embodiment of the present invention is implemented.

[0135] In the context of the present invention, a computer-readable storage medium may be a tangible medium that may contain or store a computer program for use by or in combination with an instruction execution system, device or equipment. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0136] To provide interaction with a user, the systems and techniques described herein may be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices may also be used to provide interaction with the user; for example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form (including acoustic input, voice input, or tactile input).

[0137] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.

[0138] A computing system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The client and server relationship is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services.

[0139] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution of the present invention can be achieved, and this document does not limit this.

[0140] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims

1. A data processing method, characterized in that: include: Acquire data to be processed through an external interface of the chip, and transmit the data to be processed to a first processing unit of the chip for processing; When there is at least one data to be transformed that meets the inverse processing condition, each of the data to be transformed is input in parallel to the second processing unit of the chip for inverse transformation to obtain the inverse of each of the data to be transformed; The step of performing an inverse transformation on the data to be transformed by the second processing unit of the chip includes: Acquire preset parameters, and determine the absolute value, sign bit and initial value of iteration of the data to be transformed based on the preset parameters; Iteratively calculating the absolute value and the initial value to obtain a target parameter that meets the accuracy requirement; The sign bit is assigned to the target parameter by fixed-point addition to obtain the reciprocal of the data to be transformed.

2. The method according to claim 1, characterized in that Determining the absolute value and the sign bit of the to-be-converted data based on the preset parameters includes: Performing an AND operation on a first preset parameter among the preset parameters and the data to be transformed to obtain an absolute value of the data to be transformed; An AND operation is performed on a second preset parameter among the preset parameters and the data to be transformed to obtain a sign bit of the data to be transformed.

3. The method according to claim 1, characterized in that Determining the iterative initial value of the data to be transformed based on the preset parameter includes: Determine the base and the exponent difference according to the preset parameters and the data to be transformed; Processing the base number based on a preset formula to obtain an initial value base number; The initial value base and the exponent difference are added at a fixed point to obtain an initial value for iteration.

4. The method according to claim 3, characterized in that The step of determining the base and the exponent difference according to the preset parameters and the data to be transformed includes: Performing an AND operation on a third preset parameter among the preset parameters and the data to be transformed to obtain a first absolute value; Performing an OR operation on a fourth preset parameter among the preset parameters and the first absolute value to obtain a base; Performing an AND operation on a fifth preset parameter among the preset parameters and the data to be transformed to obtain an order code of the data to be transformed; The order of the data to be transformed is subtracted from the order of the fourth preset parameter to obtain an order difference.

5. The method according to claim 1, characterized in that: The iterative operation of the absolute value and the initial value to obtain a target parameter that meets the accuracy requirement includes: Iteratively updating the initial value based on the absolute value to obtain an iterated parameter, and accumulating the current number of iterations; Determine whether the current number of iterations is greater than an iteration number threshold, and if so, determine the parameters after the iteration as the target parameters; If not, the iterated parameter is used as a new initial value, and the process returns to the step of iteratively updating the initial value based on the absolute value to obtain the iterated parameter, and accumulating the current number of iterations.

6. The method according to claim 5, characterized in that The iterative updating of the initial value based on the absolute value to obtain an iterated parameter includes: Multiplying the initial value by the absolute value to obtain a first product; The difference between the preset value and the first product is calculated, and the product of the initial value and the difference is used as the iterated parameter.

7. The method according to any one of claims 1 to 6, characterized in that: The data to be processed are battery parameters; the battery parameters include: electrolyte parameters and electrode parameters; the final processing result of the data to be processed is the energy generated by the reaction between the electrolyte and the electrode.

8. A chip, characterized in that: include: An external interface, used to obtain data to be processed and transmit the data to be processed to the first processing unit; A first processing unit is used to process the data to be processed, and when there is at least one data to be transformed that meets the inverse processing condition, each of the data to be transformed is input in parallel to the second processing unit; A second processing unit is used to perform inverse transformation on each to-be-transformed data in parallel to obtain the inverse of each to-be-transformed data; Wherein, the second processing unit is specifically used for: Acquire preset parameters, and determine the absolute value, sign bit and initial value of iteration of the data to be transformed based on the preset parameters; Iteratively calculating the absolute value and the initial value to obtain a target parameter that meets the accuracy requirement; The sign bit is assigned to the target parameter by fixed-point addition to obtain the reciprocal of the data to be transformed.

9. An electronic device, characterized in that: The electronic device comprises: at least one chip, and a memory communicatively connected to the at least one chip; The memory stores a computer program executable by the at least one chip, and the computer program is executed by the at least one chip so that the at least one chip can execute the data processing method according to any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the data processing method according to any one of claims 1 to 7 when executed.