A data processing method, apparatus, and electronic device
By dividing the data stream into time slices and performing Fourier transform and inverse transform, the problem of insufficient computing resources of convolutional computing devices under large data volumes or high data rates is solved, which improves computing efficiency and reduces equipment demand.
Patent Information
- Application Number
- CN202311006638.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-08-10
- Publication Date
- 2025-07-22
- Estimated Expiration
- 2043-08-10
AI Technical Summary
In the prior art, when convolutional computing devices face large data volumes or high data rates, they lack computing resources, resulting in low computing efficiency and inability to effectively complete convolutional operations of massive data.
The data stream to be calculated is divided into preset number of time slices, Fourier transforms to obtain the frequency domain result, and then the frequency domain convolution operation is performed based on the preset convolution kernel frequency domain results, and the time domain convolution result is obtained through the inverse Fourier transform to finally determine the target data.
The amount of high-order convolution calculation is reduced, the efficiency of convolution operations is improved, and the scale of data computing equipment is reduced.
Smart Images

Figure CN118132909B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present invention relate to the technical field of data processing, and in particular, to a data processing method, apparatus, and electronic device. Background Art
[0002] Convolution operation is defined as a weighted summation processing method in traditional digital signal processing, and is widely used in simulation, analysis, and digital signal processing of linear systems in fields such as communication, electronics, and automation. In recent years, with the widespread rise of deep learning technology based on convolutional neural networks, the amount of computation in convolution operation has become increasingly large, and the selection of calculation methods and implementation means has become the key to ensuring calculation performance.
[0003] Currently, the operation process of the convolution algorithm is as follows: x(t) is the input data, g(t) is the convolution function, and the final calculation result is y(t)=∑x(t)g(n - t). When the amount of computation is very large or the speed of the input data is very fast, the number of multiplication and addition operations will double. However, the amount of computation that a convolution operation device can withstand is limited. If convolution operation of massive data is to be implemented, additional hardware devices capable of implementing convolution operation need to be added, thus consuming more computing resources. Otherwise, the operation cannot be completed, and there is a problem of low operation efficiency for massive data. Summary of the Invention
[0004] The embodiments of the present invention provide a data processing method, apparatus, and electronic device, which improve the convolution operation efficiency and reduce the scale of use of data operation devices.
[0005] In a first aspect, the present invention provides a data processing method, which includes:
[0006] Obtain a data stream to be operated;
[0007] Divide the data stream to be operated into sub-data streams corresponding to a preset number of time slices, perform Fourier transform on each sub-data stream, and obtain a data stream frequency domain result corresponding to each sub-data stream;
[0008] Based on a preset convolution kernel frequency domain result and each data stream frequency domain result, determine a frequency domain convolution result corresponding to each sub-data stream;
[0009] Perform inverse Fourier transform on each frequency domain convolution result to obtain a time domain convolution result corresponding to each sub-data stream, and determine target data based on multiple time domain convolution results.
[0010] In a second aspect, the present invention provides a data processing apparatus, which includes:
[0011] A data acquisition module, configured to obtain a data stream to be operated;
[0012] A frequency-domain result determination module, configured to divide the data stream to be operated into sub-data streams corresponding to a preset number of time slices, perform Fourier transform on each of the sub-data streams, and obtain a data stream frequency-domain result corresponding to each of the sub-data streams;
[0013] A frequency-domain convolution determination module, configured to determine a frequency-domain convolution result corresponding to each of the sub-data streams based on a preset convolution kernel frequency-domain result and each of the data stream frequency-domain results;
[0014] A target data determination module, configured to perform inverse Fourier transform on each of the frequency-domain convolution results to obtain a time-domain convolution result corresponding to each of the sub-data streams, and determine target data based on the multiple time-domain convolution results.
[0015] In a third aspect, the present invention provides an electronic device, including:
[0016] At least one processor; and
[0017] A memory communicatively connected to the at least one processor; wherein,
[0018] The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the data processing method according to any embodiment of the present invention.
[0019] In a fourth aspect, the present invention provides a computer-readable storage medium storing computer instructions for causing a processor to implement the data processing method according to any embodiment of the present invention when executed.
[0020] The technical solution provided by the embodiments of the present invention first obtains a data stream to be operated, then divides the data stream to be operated into sub-data streams corresponding to a preset number of time slices, performs Fourier transform on each sub-data stream to obtain a data stream frequency-domain result corresponding to each sub-data stream, and further determines a frequency-domain convolution result corresponding to each sub-data stream based on a preset convolution kernel frequency-domain result and each data stream frequency-domain result. Further, inverse Fourier transform is performed on each frequency-domain convolution result to obtain a time-domain convolution result corresponding to each sub-data stream, and target data is determined based on the multiple time-domain convolution results. The technical solution provided by the present invention improves the traditional time-domain convolution algorithm, reduces the high-order convolution calculation amount, improves the convolution operation efficiency, and reduces the usage scale of data operation devices.
[0021] It should be understood that the content described in this part is not intended to identify the key or important features of the embodiments of the present invention, nor is it used to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. Description of the Drawings
[0022] To more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the accompanying drawings required for the description of the embodiments. Obviously, the accompanying drawings in the following description are only some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other accompanying drawings can be obtained based on these drawings.
[0023] Figure 1 It is a flowchart of a data processing method provided in Embodiment 1 of the present invention;
[0024] Figure 2 It is a schematic diagram of determining the frequency-domain result of a data stream involved in Embodiment 1 of the present invention;
[0025] Figure 3 It is a flowchart of a data processing method provided in Embodiment 2 of the present invention;
[0026] Figure 4 It is a schematic diagram of the specific implementation steps of a data processing method provided in Embodiment 2 of the present invention;
[0027] Figure 5 It is a schematic diagram of the structure of a data processing device provided in Embodiment 3 of the present invention;
[0028] Figure 6 It is a schematic diagram of the structure of an electronic device provided in Embodiment 4 of the present invention. Detailed implementation manners
[0029] In order to enable those skilled in the art to better understand the solutions of the present invention, the following clearly and completely describes the technical solutions in the embodiments of the present invention with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, rather than all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.
[0030] It should be noted that the terms "first preset condition", "second preset condition", etc. in the specification and claims of the present invention and the above accompanying drawings are used to distinguish similar objects, and do not necessarily need to describe a specific order or sequence. It should be understood that such used data can be interchanged under appropriate circumstances so that the embodiments of the present invention described here can be implemented in an order other than those illustrated or described here. In addition, the terms "include" and "have" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product or device including a series of steps or units does not necessarily have to be limited to those steps or units clearly listed, but may include other steps or units not clearly listed or inherent to these processes, methods, products or devices.
[0031] Embodiment 1
[0032] Figure 1 FIG. is a flowchart of a data processing method provided in Embodiment 1 of the present invention. This embodiment is applicable to the situation of performing convolution operations on input data with a large amount of data or a high data input rate based on a data operation device, such as a Field Programmable Gate Array (FPGA). This method can be executed by a data processing device, which can be implemented in the form of hardware and / or software. This device can be configured on a computer device, which can be a notebook, a desktop computer, a smart tablet, etc. As Figure 1 shown, the method includes:
[0033] S110. Obtain the data stream to be operated on.
[0034] Among them, the data stream to be operated on is the data stream on which convolution operations will be performed. The data stream to be operated on can be a data stream with a large amount of data, for example, a data stream exceeding a preset data volume; it can also be a data stream with a data input rate greater than the working frequency of the data operation device. For example, the working frequency of the data operation device is 100 MHz, and the input rate of the data stream to be operated on is greater than 100 MHz.
[0035] In this embodiment, the data stream to be operated on can be pre-stored in a preset storage unit, and when convolution operations need to be performed on the data to be operated on, the data stream to be operated on is directly obtained from the preset storage unit. The data stream to be operated on can also be a real-time generated data stream, and the data processing device directly obtains the data stream to be operated on from the data generation device in real time.
[0036] S120. Divide the data stream to be operated on into sub-data streams corresponding to a preset number of time slices, and perform Fourier transform on each sub-data stream to obtain the data stream frequency domain result corresponding to each sub-data stream.
[0037] Among them, the number of time slices is determined in advance. Optionally, based on the data stream input rate of the data stream to be operated on and the maximum working frequency of the data operation device, the number of time slices is determined. For example, the data stream input rate of the data stream to be operated on is n, and the maximum working frequency of the data operation device is m, then the number of time slices is L = [n / m].
[0038] Optionally, the data stream to be operated is divided into sub-data streams corresponding to a preset number of time slices, which specifically includes the following steps: determining the number of points of the sub-data stream based on the preset number of Fourier transform operation points and the preset number of convolution kernel points to be operated; determining the time slice duration corresponding to the number of points of the sub-data stream based on the number of points of the sub-data stream and the data stream input rate of the data stream to be operated; for the data stream to be operated, dividing a sub-data stream every time slice duration to obtain sub-data streams corresponding to a preset number of time slices.
[0039] Among them, the number of Fourier transform operation points and the number of convolution kernel points to be operated are determined in advance according to actual operation requirements.
[0040] Exemplarily, if the preset number of Fourier transform operation points is FFTLen and the number of convolution kernel points to be operated is NumLen, then the number of points of the sub-data stream is FFTLen + NUMLen - 1. Since the data stream input rate of the data stream to be operated is determined, it is possible to determine how long it takes for the data with the number of points of the input sub-data stream to pass through. Based on this, the time slice duration corresponding to the number of points of the sub-data stream can be determined. Then, during the process of inputting the data stream to be operated into the data processing device, a sub-data stream is divided every time slice duration, and finally the data stream to be operated is divided into L sub-data streams with the number of points of FFTLen + NUMLen - 1. Subsequently, the remaining data stream to be operated that has not been completely divided is further divided into L sub-data streams with the number of points of FFTLen + NUMLen - 1, and so on until the data stream to be operated is completely divided.
[0041] In this embodiment, frequency domain filtering channels with the number of time slices are configured in the data operation device, and the divided multiple sub-data streams are respectively input into different frequency domain filtering channels for parallel Fourier transform, so as to obtain the data stream frequency domain results corresponding to each sub-data stream.
[0042] Exemplarily, for the schematic diagram of determining the data stream frequency domain result, see Figure 2 , as Figure 2 shown, the data stream x(t) to be operated is divided into L sub-data streams with the number of points of FFTLen + NUMLen - 1, which are respectively represented as sub-data stream x(t)1, sub-data stream x(t)2,..., sub-data stream x(t)L - 1, and sub-data stream x(t)L. The sub-data stream x(t)1 is input into frequency domain filtering channel 1 for Fourier transform to obtain the data stream frequency domain result 1; the sub-data stream x(t)2 is input into frequency domain filtering channel 2 for Fourier transform to obtain the data stream frequency domain result 2; the sub-data stream x(t)L - 1 is input into frequency domain filtering channel L - 1 for Fourier transform to obtain the data stream frequency domain result L - 1; the sub-data stream x(t)L is input into frequency domain filtering channel L for Fourier transform to obtain the data stream frequency domain result L.
[0043] S130. Determine the frequency domain convolution result corresponding to each sub-data stream based on the preset convolution kernel frequency domain result and the frequency domain results of each data stream.
[0044] In this embodiment, the preset convolution kernel is predetermined according to actual computing requirements, and the preset convolution kernel frequency domain result can be obtained by performing Fourier transform on the preset convolution kernel.
[0045] Optionally, determining the frequency domain convolution result corresponding to each sub-data stream is specifically as follows: determining the frequency domain convolution result corresponding to each sub-data stream according to the product result of the preset convolution kernel frequency domain result and the data stream frequency domain result.
[0046] In this embodiment, according to the formula F(x(t)*g(nt))=F(x(t))*F(g(nt)), it can be known that the time domain convolution result of the signal is equal to the frequency domain result of the signal multiplied. Based on this, the frequency domain convolution result of each sub-data stream is first determined. For each sub-data stream, the implementation process of determining the frequency domain convolution result is the same, and an exemplary description is given below using one of the sub-data streams as an example.
[0047] Exemplarily, the frequency domain result of the data stream corresponding to the sub-data stream x(t)1 is X(ω), and the frequency domain result of the preset convolution kernel g(t) corresponding to the preset convolution kernel is G(ω), then the frequency domain convolution result corresponding to the sub-data stream x(t)1 is Y(ω)1=X(ω)×G(ω). Similarly, the frequency domain convolution result corresponding to each sub-data stream can be obtained.
[0048] S140, performing inverse Fourier transform on each frequency domain convolution result to obtain a time domain convolution result corresponding to each sub-data stream, and determining target data based on multiple time domain convolution results.
[0049] The target data is the final result obtained after the convolution operation is performed on the data stream to be operated.
[0050] In this embodiment, each frequency domain convolution result obtained in step S130 is subjected to inverse Fourier transform to obtain a time domain convolution result corresponding to each sub-data stream. Further, the target data is determined based on multiple time domain convolution results, and the specific implementation method is: multiple time domain convolution results are sequentially spliced to obtain the target data corresponding to the data stream to be calculated.
[0051] Exemplarily, the Fourier inverse transform is performed on the frequency-domain convolution result Y(ω)1 of the sub-data stream x(t)1 to obtain the time-domain convolution result y(t)1. Similarly, the time-domain convolution result y(t)2 corresponding to the sub-data stream x(t)2, the time-domain convolution result y(t)L-1 corresponding to the sub-data stream x(t)L-1, and the time-domain convolution result y(t)L corresponding to the sub-data stream x(t)L are obtained. The finally determined target data can be expressed as: [y(t)1, y(t)2, …, y(t)L-1, y(t)L].
[0052] The technical solution provided by the embodiments of the present invention first obtains the data stream to be operated, then divides the data stream to be operated into sub-data streams corresponding to a preset number of time slices, performs Fourier transform on each sub-data stream to obtain the data stream frequency-domain results corresponding to each sub-data stream, and then determines the frequency-domain convolution results corresponding to each sub-data stream based on the preset convolution kernel frequency-domain results and the data stream frequency-domain results. Further, the Fourier inverse transform is performed on each frequency-domain convolution result to obtain the time-domain convolution results corresponding to each sub-data stream, and the target data is determined based on the multiple time-domain convolution results. The technical solution provided by the present invention improves the traditional time-domain convolution algorithm, reduces the high-order convolution calculation amount, improves the convolution operation efficiency, and reduces the use scale of data operation devices.
[0053] Embodiment 2
[0054] Figure 3 It is a flowchart of a data processing method provided by Embodiment 2 of the present invention. Based on the above embodiments, the steps of "performing Fourier transform on each of the sub-data streams to obtain the data stream frequency-domain results corresponding to each of the sub-data streams" and "performing Fourier inverse transform on each of the frequency-domain convolution results to obtain the time-domain convolution results corresponding to each of the sub-data streams" are further refined. The embodiments of the present invention can be combined with each optional solution in one or more of the above embodiments. As Figure 3 shown, the data processing method includes the following steps:
[0055] S210. Obtain the data stream to be operated.
[0056] S220. Divide the data stream to be operated into sub-data streams corresponding to a preset number of time slices.
[0057] S230. Determine the standard number of points corresponding to each sub-data stream based on the preset number of convolution kernel points to be operated.
[0058] In this embodiment, 2 is required for Fourier transform processing nThere are [number of sampling points] sampling points, and the number of data points corresponding to each time slice is FFTLen + NUMLen - 1, which does not meet the design requirements for performing Fourier transform. Therefore, it is necessary to determine the standard number of data points for the sub-data streams to meet the design requirements of Fourier transform. The standard number of points corresponding to each sub-data stream is the number of data points corresponding to a time slice, FFTLen + NUMLen - 1, plus NUMLen - 1. Based on this, the standard number of points corresponding to each sub-data stream is FFTLen + NUMLen - 1 + (NUMLen - 1) = FFTLen + 2NUMLen - 2.
[0059] S240. Perform zero-padding processing on each sub-data stream based on the standard number of points to obtain multiple sub-data streams with the standard number of points.
[0060] In this embodiment, the number of points in each sub-data stream is FFTLen + NUMLen - 1. By adding NUMLen - 1 data with a value of 0 at the end of the sub-data stream, the zero-padding processing can be completed, thereby obtaining multiple sub-data streams with the standard number of points.
[0061] S250. Input each sub-data stream with the standard number of points into a plurality of pre-configured frequency-domain filtering channels respectively to perform Fourier transform, and obtain the frequency-domain results of the data streams corresponding to each sub-data stream with the standard number of points.
[0062] S260. Perform Fourier transform on the preset convolution kernel to be operated, and obtain the frequency-domain result of the preset convolution kernel.
[0063] Among them, the preset convolution kernel to be operated is a preset function participating in the convolution operation.
[0064] In this embodiment, before determining the frequency-domain convolution result of each sub-data stream, the preset convolution kernel to be operated needs to be converted into frequency-domain data. Based on this, it is necessary to perform Fourier transform on the preset convolution kernel to be operated, so as to obtain the frequency-domain result of the preset convolution kernel corresponding to the preset convolution kernel to be operated.
[0065] S270. Determine the frequency-domain convolution result corresponding to each sub-data stream based on the frequency-domain result of the preset convolution kernel and the frequency-domain results of each data stream.
[0066] S280. Perform inverse Fourier transform on the frequency-domain result of the data stream corresponding to each sub-data stream with the standard number of points to obtain the time-domain convolution result with the standard number of points corresponding to the sub-data stream with the standard number of points.
[0067] In this embodiment, since S240 performs zero-padding processing on the sub-data stream to obtain the sub-data stream with the standard number of points, in this step, it is to perform inverse Fourier transform on the frequency-domain result of the data stream corresponding to the sub-data stream with the standard number of points to obtain the time-domain convolution result with the standard number of points corresponding to the sub-data stream with the standard number of points.
[0068] S290. Truncate the invalid data corresponding to the data points with zero padding in the time-domain convolution result of each standard number of points to obtain the time-domain convolution result of the number of points of the sub-data stream, and determine the target data based on multiple time-domain convolution results.
[0069] Based on the above embodiments, since the time-domain convolution result of the standard number of points includes the operation results corresponding to the invalid data with zero padding, it is useless for the final convolution result of the data stream to be operated on. Therefore, it is necessary to delete the invalid data corresponding to the data points with zero padding and only retain the time-domain convolution result corresponding to the original number of points of the sub-data stream.
[0070] It should be particularly noted that when directly performing convolution operations in the time domain, assuming the number of points of the convolution kernel is NUMLen, each movement of the convolution kernel requires NUMLen^2 multiplications and NUMLen^2 additions to obtain the result. When the amount of input data is huge or the input data rate is very fast, the amount of calculation required to implement the convolution operation is quite large, and there is a problem of low operation efficiency. The operation method provided by the embodiments of the present invention divides the huge input data into multiple operation units for parallel operation. The calculation amount of the output result of each operation unit is small, effectively improving the convolution operation efficiency. Taking the 2-base FFT as an example, the total multiplication calculation amount required by the original time-domain convolution operation method is 12×FFTLen×(log2(FFTLenlog)) + 3×FFTLenlog^2, and the addition calculation amount is 4×FFTLen×(log2(FFTLenlog)), and finally the result of FFTLen points is obtained. Using the operation method provided by this embodiment, the required multiplication calculation amount is 12×(log2(FFTLenlog)) + 3×FFTLenlog, and the addition calculation amount is 4×(log2(FFTLenlog)), and finally the result of FFTLen points is obtained. It can be seen that the amount of calculation of this solution is reduced to 1 / FFTLenlog of the original amount of calculation, significantly improving the convolution operation efficiency.
[0071] The technical solution provided by the embodiments of the present invention performs zero-padding processing on the data stream before performing Fourier transform on each sub-data stream. Subsequently, when performing inverse Fourier transform on the frequency-domain convolution result of each sub-data stream, the invalid data with zero padding is truncated. The final obtained target data is the same as the result of directly performing time-domain convolution on the data stream to be operated on, reducing the amount of calculation, while ensuring the calculation accuracy and improving the convolution operation efficiency.
[0072] As an optional embodiment of the above embodiments, the implementation steps of the above method are shown in Figure 4It can be summarized as follows: the data stream x(t) to be operated is divided into L sub-data streams with the number of data stream points being FFTLen + NUMLen - 1. For each sub-data stream, based on the preset number of convolution kernel points to be operated, the standard number of points corresponding to the sub-data stream is determined; then, based on the standard number of points, zero-padding processing is performed on each sub-data stream to obtain a sub-data stream with the standard number of points. Further, Fourier transform is performed on the sub-data stream with the standard number of points to obtain the frequency-domain result of the data stream corresponding to the sub-data stream with the standard number of points; subsequently, the frequency-domain result of the data stream is multiplied by the preset frequency-domain result of the convolution kernel to obtain the frequency-domain convolution result; then, inverse Fourier transform is performed on the frequency-domain convolution result to obtain the time-domain convolution result with the standard number of points corresponding to the sub-data stream with the standard number of points; next, the invalid data corresponding to the zero-padding processed data points in the time-domain convolution result with the standard number of points is truncated to obtain the time-domain convolution result with the number of sub-data stream points. Finally, the time-domain convolution results corresponding to each sub-data stream are sequentially concatenated to obtain the target data y(t) corresponding to the data stream to be operated.
[0073] Embodiment III
[0074] Figure 5 FIG. 7 is a schematic structural diagram of a data processing apparatus provided in Embodiment III of the present invention. The apparatus can execute the data processing method provided in the embodiments of the present invention. The apparatus includes: a data acquisition module 310, a frequency-domain result determination module 320, a frequency-domain convolution determination module 330, and a target data determination module 340.
[0075] Among them, the data acquisition module 310 is configured to acquire the data stream to be operated;
[0076] The frequency-domain result determination module 320 is configured to divide the data stream to be operated into sub-data streams corresponding to a preset number of time slices, and perform Fourier transform on each sub-data stream to obtain the frequency-domain result of the data stream corresponding to each sub-data stream;
[0077] The frequency-domain convolution determination module 330 is configured to determine the frequency-domain convolution result corresponding to each sub-data stream based on the preset frequency-domain result of the convolution kernel and the frequency-domain results of each data stream;
[0078] The target data determination module 340 is configured to perform inverse Fourier transform on each frequency-domain convolution result to obtain the time-domain convolution result corresponding to each sub-data stream, and determine the target data based on the multiple time-domain convolution results.
[0079] The technical solution provided by the embodiment of the present invention first obtains the data stream to be calculated, then divides the data stream to be calculated into sub-data streams corresponding to a preset number of time slices, performs Fourier transform on each sub-data stream to obtain the data stream frequency domain result corresponding to each sub-data stream, and then determines the frequency domain convolution result corresponding to each sub-data stream based on the preset convolution kernel frequency domain result and each data stream frequency domain result. Further, performs inverse Fourier transform on each frequency domain convolution result to obtain the time domain convolution result corresponding to each sub-data stream, and determines the target data based on multiple time domain convolution results. The technical solution provided by the present invention improves the traditional time domain convolution algorithm, reduces the high-order convolution calculation amount, improves the convolution operation efficiency, and reduces the usage scale of data operation devices.
[0080] Based on the above technical solutions, the data processing device further includes: a slice number determination unit, configured to determine the number of time slices based on the data stream input rate of the data stream to be calculated and the maximum operating frequency of the data operation device.
[0081] Based on the above technical solutions, the frequency domain result determination module 320 includes:
[0082] A sub-data stream point determination unit, configured to determine the number of sub-data stream points based on the preset number of Fourier transform operation points and the preset number of convolution kernels to be calculated;
[0083] A slice duration determination unit, configured to determine the time slice duration corresponding to the number of sub-data stream points based on the number of sub-data stream points and the data stream input rate of the data stream to be calculated;
[0084] A sub-data stream determination unit, configured to divide the data stream to be calculated into a sub-data stream every time slice duration to obtain sub-data streams corresponding to a preset number of time slices.
[0085] Based on the above technical solutions, the frequency domain result determination module 320 further includes:
[0086] A standard point determination unit, configured to determine the standard number of points corresponding to each sub-data stream based on the preset number of convolution kernels to be calculated;
[0087] A standard data stream determination unit, configured to perform zero-padding processing on each sub-data stream based on the standard number of points to obtain multiple standard number of points sub-data streams;
[0088] A frequency domain result determination unit, configured to input each standard number of points sub-data stream into a plurality of pre-configured frequency domain filtering channels for Fourier transform to obtain the data stream frequency domain result corresponding to each standard number of points sub-data stream.
[0089] Based on the above technical solutions, the data processing device further includes: a convolution kernel frequency domain result determination unit, configured to perform a Fourier transform on a preset convolution kernel to be operated to obtain a preset convolution kernel frequency domain result.
[0090] Based on the above technical solutions, the target data determination module 340 includes:
[0091] A standard time domain convolution determination unit, configured to perform an inverse Fourier transform on the data stream frequency domain result corresponding to each of the standard number of data sub-streams to obtain a standard number of time domain convolution results corresponding to the standard number of data sub-streams;
[0092] A time domain convolution determination unit, configured to truncate the invalid data corresponding to the zero-padded data points in each of the standard number of time domain convolution results to obtain a time domain convolution result with the number of data sub-streams.
[0093] Based on the above technical solutions, the target data determination module 340 is further configured to sequentially splice a plurality of the time domain convolution results to obtain target data corresponding to the data stream to be operated.
[0094] Based on the above technical solutions, the frequency domain convolution determination module 330 is specifically configured to: determine a frequency domain convolution result corresponding to each of the sub-data streams according to the product result of the preset convolution kernel frequency domain result and the data stream frequency domain result.
[0095] The data processing device provided by the embodiments of the present disclosure can execute the data processing method provided by any embodiment of the present disclosure, and has corresponding functional modules and beneficial effects for executing the method.
[0096] It should be noted that the various units and modules included in the above device are only divided according to functional logic, but are not limited to the above division, as long as the corresponding functions can be achieved; in addition, the specific names of the functional units are only for the convenience of mutual distinction and do not limit the protection scope of the embodiments of the present disclosure.
[0097] Embodiment 4
[0098] Figure 6A schematic structural diagram of an electronic device provided in the fourth embodiment of the present invention. The electronic device 10 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 processors, cellular phones, smart phones, wearable electronic 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 claimed herein.
[0099] As Figure 6 shown, the electronic device 10 includes at least one processor 11 and a memory communicatively connected to the at least one processor 11, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc. The memory stores a computer program executable by the at least one processor. The processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 into the random access memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 can also be stored. The processor 11, the ROM 12, and the RAM 13 are connected to each other through a bus 13. The input / output (I / O) interface 15 is also connected to the bus 13.
[0100] Multiple components in the electronic device 10 are connected to the I / O interface 15, including: an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a disk, an optical disc, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other electronic devices through a computer network such as the Internet and / or various telecommunication networks.
[0101] The processor 11 can be various general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 11 executes the various methods and processes described above, such as the data processing method.
[0102] In some embodiments, the data processing method may be implemented as a computer program tangibly embodied in a computer-readable storage medium, such as storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or installed onto the electronic device 10 via the ROM 12 and / or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of the data processing method described above may be performed. Alternatively, in other embodiments, the processor 11 may be configured to execute the data processing method by any other suitable means (e.g., by means of firmware).
[0103] Various embodiments of the systems and techniques described above in this document can be implemented in digital electronic circuitry, integrated circuit systems, field-programmable gate arrays (FPGA), application specific integrated circuits (ASIC), application specific standard products (ASSP), systems-on-chip (SOC), complex programmable logic devices (CPLD), computer hardware, firmware, software, and / or combinations thereof. These various embodiments can include: implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special-purpose or general-purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit the data and instructions to the storage system, the at least one input device, and the at least one output device.
[0104] The computer program for implementing the method of the present invention can be written in any combination of one or more programming languages. These computer programs can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when the computer program is executed by the processor, the functions / operations specified in the flowchart and / or block diagram are implemented. The computer program can be executed entirely on the machine, partially on the machine, as a stand-alone software package partially on the machine and partially on a remote machine, or entirely on a remote machine or server.
[0105] In the context of the present invention, a computer-readable storage medium can be a tangible medium that can contain or store a computer program for use by or in connection with an instruction execution system, apparatus, or electronic device. The computer-readable storage medium can include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. Alternatively, the computer-readable storage medium can be a machine-readable signal medium. More specific examples of the machine-readable storage medium would include an electrical connection based on one or more wires, 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 block), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0106] In order to provide interaction with a user, the systems and techniques described herein can 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 a trackball) by which the user can provide input to the electronic device. Other kinds of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).
[0107] The systems and techniques described herein can 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 having a graphical user interface or a web browser through which the user can interact with an implementation 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 can be interconnected to each other by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local area network (LAN), wide area network (WAN), blockchain network, and the Internet.
[0108] A computing system may include a client and a server. The client and the server are generally far from each other and usually interact via a communication network. The relationship between the client and the server is created by computer programs running on respective 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 a cloud host, which is a host product in the cloud computing service system, solving the defects of difficult management and weak business scalability existing in traditional physical hosts and VPS services. It should be understood that various forms of processes shown above can be used, with steps reordered, added or deleted. 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 no limitation is imposed herein. The above specific embodiments do not constitute a limitation on the protection scope of the present invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principle of the present invention shall be included within the protection scope of the present invention.
Claims
1. A data processing method, characterized in that, including: obtaining a data stream to be operated; dividing the data stream to be operated into sub-data streams corresponding to a preset number of time slices, and performing Fourier transform on each of the sub-data streams to obtain a data stream frequency domain result corresponding to each sub-data stream; wherein, the number of the time slices is determined based on the division result of the data stream input rate of the data stream to be operated and the maximum working frequency of the data operation device; determining a frequency domain convolution result corresponding to each sub-data stream based on a preset convolution kernel frequency domain result and each of the data stream frequency domain results; performing inverse Fourier transform on each of the frequency domain convolution results to obtain a time domain convolution result corresponding to each sub-data stream, and determining target data based on the multiple time domain convolution results; wherein, the dividing the data stream to be operated into sub-data streams corresponding to a preset number of time slices includes: determining the number of points of the sub-data stream based on a preset number of points for Fourier transform operation and a preset number of points of the convolution kernel to be operated; determining a time slice duration corresponding to the number of points of the sub-data stream based on the number of points of the sub-data stream and the data stream input rate of the data stream to be operated; dividing the data stream to be operated into a sub-data stream every time slice duration to obtain sub-data streams corresponding to a preset number of time slices; the performing Fourier transform on each of the sub-data streams to obtain a data stream frequency domain result corresponding to each sub-data stream includes: determining a standard number of points corresponding to each sub-data stream based on a preset number of points of the convolution kernel to be operated; the standard number of points corresponding to each sub-data stream is FFTLen + 2NUMLen - 2, where FFTLen represents the preset number of points for Fourier transform operation and NUMLen represents the preset number of points of the convolution kernel to be operated; performing zero-padding processing on each of the sub-data streams based on the standard number of points to obtain multiple sub-data streams with the standard number of points; inputting each of the sub-data streams with the standard number of points into a plurality of pre-configured frequency domain filtering channels respectively to perform Fourier transform to obtain a data stream frequency domain result corresponding to each sub-data stream with the standard number of points.
2. The method according to claim 1, characterized in that, the performing inverse Fourier transform on each of the frequency domain convolution results to obtain a time domain convolution result corresponding to each sub-data stream includes: performing inverse Fourier transform on the data stream frequency domain result corresponding to each sub-data stream with the standard number of points to obtain a standard number of points time domain convolution result corresponding to the sub-data stream with the standard number of points; truncating the invalid data corresponding to the zero-padding processed data points in each of the standard number of points time domain convolution results to obtain a time domain convolution result with the number of points of the sub-data stream.
3. The method according to claim 1, wherein Before the determining a frequency domain convolution result corresponding to each sub-data stream based on a preset convolution kernel frequency domain result and each of the data stream frequency domain results, it further includes: performing Fourier transform on a preset convolution kernel to be operated to obtain a preset convolution kernel frequency domain result; wherein, the preset convolution kernel to be operated is a preset function participating in convolution operation.
4. The method according to claim 1, wherein the determining a frequency domain convolution result corresponding to each sub-data stream based on a preset convolution kernel frequency domain result and each of the data stream frequency domain results includes: Determine the frequency-domain convolution result corresponding to each of the sub-data streams according to the product result of the preset convolution kernel frequency-domain result and the data stream frequency-domain result.
5. The method according to claim 1, characterized in that, The determining the target data based on the multiple time-domain convolution results includes: Sequentially splice the multiple time-domain convolution results to obtain the target data corresponding to the data stream to be operated.
6. A data processing device, characterized in that, It includes: A data acquisition module, configured to acquire a data stream to be operated. A frequency-domain result determination module, configured to divide the data stream to be operated into sub-data streams corresponding to a preset number of time slices, and perform Fourier transform on each of the sub-data streams to obtain a data stream frequency-domain result corresponding to each of the sub-data streams; wherein, the number of the time slices is determined based on the division result of the data stream input rate of the data stream to be operated and the maximum working frequency of the data operation device. A frequency-domain convolution determination module, configured to determine the frequency-domain convolution result corresponding to each of the sub-data streams based on the preset convolution kernel frequency-domain result and each of the data stream frequency-domain results. A target data determination module, configured to perform inverse Fourier transform on each of the frequency-domain convolution results to obtain a time-domain convolution result corresponding to each of the sub-data streams, and determine the target data based on the multiple time-domain convolution results. Wherein, the frequency-domain result determination module includes: A sub-data stream point determination unit, configured to determine the number of sub-data stream points based on a preset Fourier transform operation point number and a preset convolution kernel point number to be operated. A slice duration determination unit, configured to determine the time slice duration corresponding to the number of sub-data stream points based on the number of sub-data stream points and the data stream input rate of the data stream to be operated. A sub-data stream determination unit, configured to divide the data stream to be operated into sub-data streams corresponding to a preset number of time slices at intervals of the time slice duration. Wherein, the frequency-domain convolution determination module includes: A standard point number determination unit, configured to determine the standard point number corresponding to each of the sub-data streams based on the preset convolution kernel point number to be operated; the standard point number corresponding to each of the sub-data streams is FFTLen + 2NUMLen - 2, where FFTLen represents the preset Fourier transform operation point number, and NUMLen represents the preset convolution kernel point number to be operated. A standard data stream determination unit, configured to perform zero-padding processing on each of the sub-data streams based on the standard point number to obtain multiple standard point number sub-data streams. A frequency-domain result determination unit, configured to input each of the standard point number sub-data streams into a plurality of pre-configured frequency-domain filtering channels respectively to perform Fourier transform to obtain a data stream frequency-domain result corresponding to each of the standard point number sub-data streams.
7. An electronic device, characterized in that, The electronic device includes: At least one processor; and A memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the data processing method according to any one of claims 1-5.
Citation Information
Patent Citations
Convolution calculation method and apparatus
CN109325589A
Convolutional neural network operation method and device
CN112200300A