CN118132909A - Data processing method and device and electronic equipment - Google Patents

Data processing method and device and electronic equipment Download PDF

Info

Publication number
CN118132909A
CN118132909A CN202311006638.1A CN202311006638A CN118132909A CN 118132909 A CN118132909 A CN 118132909A CN 202311006638 A CN202311006638 A CN 202311006638A CN 118132909 A CN118132909 A CN 118132909A
Authority
CN
China
Prior art keywords
data stream
sub
data
frequency domain
result
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202311006638.1A
Other languages
Chinese (zh)
Inventor
徐琪
单立超
朱进军
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Queentest Technology Co ltd
Original Assignee
Beijing Queentest Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Queentest Technology Co ltd filed Critical Beijing Queentest Technology Co ltd
Priority to CN202311006638.1A priority Critical patent/CN118132909A/en
Publication of CN118132909A publication Critical patent/CN118132909A/en
Pending legal-status Critical Current

Links

Landscapes

  • Complex Calculations (AREA)

Abstract

The invention discloses a data processing method, a data processing device and electronic equipment. Acquiring 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 carrying out Fourier transform on each sub-data stream to obtain a data stream frequency domain result corresponding to each sub-data stream; determining 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; and carrying out 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 a plurality of time domain convolution results, thereby improving convolution operation efficiency and reducing the use scale of data operation equipment.

Description

Data processing method and device and electronic equipment
Technical Field
The embodiment of the invention relates to the technical field of data processing, in particular to a data processing method and device and electronic equipment.
Background
The convolution operation is defined as a weighted summation processing mode on the traditional digital signal processing, and is widely applied to the aspects of simulation, analysis, digital signal processing and the like of a linear system in the fields of communication, electronics, automation and the like. In recent years, deep learning technology based on convolutional neural networks is widely developed, the operation amount of convolutional operation is increasingly large, and the selection of a calculation method and an implementation means becomes a key point for guaranteeing the calculation performance.
At present, the operation process of the convolution algorithm is as follows: x (t) is input data, g (t) is a convolution function, and the final calculation result is y (t) = Σx (t) g (n-t). When the operation amount is large or the speed of inputting data is high, the operation times of multiplication and addition are doubled, the bearable operation amount of the convolution operation equipment is limited, if the convolution operation of mass data is to be realized, hardware equipment capable of realizing the convolution operation is required to be added, so that more operation resources are consumed, otherwise, the operation cannot be completed, and the problem of low operation efficiency of the mass data exists.
Disclosure of Invention
The embodiment of the invention provides a data processing method, a data processing device and electronic equipment, which improve convolution operation efficiency and reduce the use scale of the data operation equipment.
In a first aspect, the present invention provides a data processing method, the method comprising:
Acquiring a data stream to be operated;
Dividing the data stream to be calculated into sub-data streams corresponding to a preset number of time slices, and performing Fourier transform on each sub-data stream to obtain a data stream frequency domain result corresponding to each sub-data stream;
determining 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;
And carrying out 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 a plurality of time domain convolution results.
In a second aspect, the present invention provides a data processing apparatus, the apparatus comprising:
the data acquisition module is used for acquiring a data stream to be operated;
the frequency domain result determining module is used for dividing the data stream to be calculated into sub-data streams corresponding to the preset number of time slices, and carrying out Fourier transform on each sub-data stream to obtain a data stream frequency domain result corresponding to each sub-data stream;
the frequency domain convolution determining module is used for determining 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;
And the target data determining module is used for carrying out 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 a plurality of time domain convolution results.
In a third aspect, the present invention provides an electronic device, comprising:
at least one processor; and
A memory communicatively coupled to the at least one processor; wherein,
The memory stores a computer program executable by the at least one processor to enable the at least one processor to perform the data processing method of any one of the embodiments of the present invention.
In a fourth aspect, the present invention provides a computer readable storage medium storing computer instructions for causing a processor to perform a data processing method according to any one of the embodiments of the present invention.
According to the technical scheme provided by the embodiment of the invention, the data stream to be operated is firstly obtained, then the data stream to be operated is divided into the sub-data streams corresponding to the preset number of time slices, the sub-data streams are subjected to Fourier transform to obtain the data stream frequency domain result corresponding to each sub-data stream, the frequency domain convolution result corresponding to each sub-data stream is further determined based on the preset convolution kernel frequency domain result and the data stream frequency domain result, further, the inverse Fourier transform is performed on each frequency domain convolution result to obtain the time domain convolution result corresponding to each sub-data stream, and the target data is determined based on a plurality of time domain convolution results. The technical scheme provided by the invention improves the traditional time domain convolution algorithm, reduces the calculation amount of higher-order convolution, improves the convolution operation efficiency and reduces the use scale of data operation equipment.
It should be understood that the description in this section is not intended to identify key or critical features of the embodiments of the invention or to delineate the scope of the invention. Other features of the present invention will become apparent from the description that follows.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for the description of the embodiments will be briefly described below, and it is apparent that the drawings in the following description are only some embodiments of the present invention, and other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flowchart of a data processing method according to a first embodiment of the present invention;
FIG. 2 is a schematic diagram of determining a data stream frequency domain result according to an embodiment of the present invention;
FIG. 3 is a flowchart of a data processing method according to a second embodiment of the present invention;
Fig. 4 is a schematic diagram of steps of a data processing method according to a second embodiment of the present invention;
FIG. 5 is a schematic diagram of a data processing apparatus according to a third embodiment of the present invention;
fig. 6 is a schematic structural diagram of an electronic device according to a fourth embodiment of the present invention.
Detailed Description
In order that those skilled in the art will better understand the present invention, a technical solution in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in which it is apparent that the described embodiments are only some embodiments of the present invention, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the present invention without making any inventive effort, shall fall within the scope of the present invention.
It should be noted that, in the description and claims of the present invention and the above figures, the terms "first preset condition", "second preset condition", and the like are used to distinguish similar objects, and are not necessarily used to describe a specific order or precedence. It is to be understood that the data so used may be interchanged where appropriate such that the embodiments of the invention described herein may be implemented in sequences other than those illustrated or otherwise described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
Example 1
Fig. 1 is a flowchart of a data processing method according to a first embodiment of the present invention, which is applicable to a case of performing convolution operation on input data with a large data amount or a fast data input rate based on a data operation device, such as a field programmable gate array (Field Programmable GATE ARRAY, FPGA). The method may be performed by a data processing apparatus, which may be implemented in hardware and/or software, which may be configured on a computer device, which may be a notebook, desktop computer, smart tablet, etc. As shown in fig. 1, the method includes:
S110, acquiring a data stream to be operated.
The data stream to be operated is the data stream to be subjected to convolution operation. The data stream to be operated may be a data stream with a huge data volume, for example, a data stream exceeding a preset data volume; the data stream may also be a data stream having a data input rate greater than the operating frequency of the data computing device, for example, the operating frequency of the data computing device is 100MHz, and the data stream to be computed has an input rate greater than 100MHz.
In this embodiment, the data stream to be operated may be stored in a preset storage unit in advance, and when the data to be operated needs to be convolved, the data stream to be operated is directly obtained from the preset storage unit. The data stream to be operated can also be a data stream generated in real time, and the data processing equipment directly acquires the data stream to be operated from the data generating device in real time.
S120, dividing the data stream to be operated into sub-data streams corresponding to the preset number of time slices, and carrying out Fourier transform on each sub-data stream to obtain a data stream frequency domain result corresponding to each sub-data stream.
Wherein the number of time slices is predetermined. Optionally, the number of time slices is determined based on a data stream input rate of the data stream to be operated and a maximum operating frequency of the data operation device. For example, if the data stream input rate of the data stream to be operated is n and the maximum operating frequency of the data operation device is m, the number of time slices is l= [ n/m ].
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 sub-data stream points based on the number of preset Fourier transform operation points and the number of preset convolution kernels to be operated; determining the time slice duration corresponding to the point number of the sub data stream based on the point number of the sub data stream and the data stream input rate of the data stream to be operated; dividing a sub-data stream into a plurality of sub-data streams at intervals of time slices to obtain the sub-data streams corresponding to the preset number of time slices.
The number of the Fourier transform operation points and the number of the convolution kernel points to be operated are predetermined according to actual operation requirements.
For example, if the number of the preset fourier transform operation points is FFTLen and the number of convolution kernels to be operated is NumLen, the number of the sub-data stream points is FFTLen + NUMLen-1. Since the data stream input rate of the data stream to be operated is determined, how long the data of the number of input sub-data streams needs to go through can be determined, and based on this, the time slice duration corresponding to the number of sub-data streams can be determined. And in the process of inputting the data stream to be operated to the data processing equipment, dividing one sub-data stream every time slice duration, and finally dividing the data to be operated into L sub-data streams with the number of FFTLen + NUMLen-1. And then, dividing the undivided data stream to be operated into L sub-data streams with the number of points of FFTLen + NUMLen-1, and the like until the division of the data stream to be operated is finished.
In this embodiment, frequency domain filtering channels with the number of time slices are configured in the data computing device, and the divided multiple sub-data streams are respectively input into different frequency domain filtering channels to perform parallel fourier transformation, so as to obtain a data stream frequency domain result corresponding to each sub-data stream.
For example, referring to fig. 2, a schematic diagram of determining a data stream frequency domain result is shown in fig. 2, where a 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 denoted as a sub-data stream x (t) 1, sub-data streams x (t) 2, …, a sub-data stream x (t) L-1, and a sub-data stream x (t) L. Inputting the sub-data stream x (t) 1 into a frequency domain filtering channel 1 to carry out Fourier transform to obtain a data stream frequency domain result 1; inputting the sub-data stream x (t) 2 into a frequency domain filtering channel 2 for Fourier transformation to obtain a data stream frequency domain result 2; inputting the sub data stream x (t) L-1 into a frequency domain filtering channel L-1 to carry out Fourier transform to obtain a data stream frequency domain result L-1; inputting the sub data stream x (t) L into a frequency domain filtering channel L to carry out Fourier transform, and obtaining a data stream frequency domain result L.
S130, determining 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.
In this embodiment, the preset convolution kernel is predetermined according to an actual operation requirement, and fourier transform is performed on the preset convolution kernel, so that a preset convolution kernel frequency domain result can be obtained.
Optionally, determining the frequency domain convolution result corresponding to each sub-data stream specifically includes: and determining a frequency domain convolution result corresponding to each sub data stream according to a product result of a preset convolution kernel frequency domain result and a data stream frequency domain result.
In this embodiment, according to the formula F (x (t)) g (n-t))=f (x (t)) F (g (n-t)), the time domain convolution result of the signal is known to be equal to the multiplication of the frequency domain result of the signal. Based on this, the frequency domain convolution result of each sub-data stream is first determined. The implementation of determining the frequency domain convolution result is the same for each sub-data stream, and an exemplary description will be given below taking one of the sub-data streams as an example.
Illustratively, if the frequency domain result of the data stream corresponding to the sub-data stream X (t) 1 is X (ω), the frequency domain result of the preset convolution kernel corresponding to the preset convolution kernel G (t) is G (ω), and the frequency domain convolution result corresponding to the sub-data stream X (t) 1 is Y (ω) 1=x (ω) ×g (ω). And similarly, a frequency domain convolution result corresponding to each sub-data stream can be obtained.
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 a plurality of time domain convolution results.
The target data is a final result obtained after the data stream to be operated is subjected to convolution operation.
In this embodiment, inverse fourier transform is performed on each frequency domain convolution result obtained in step S130, so as to obtain a time domain convolution result corresponding to each sub-data stream. Further, the target data is determined based on a plurality of time domain convolution results, and the specific implementation mode is as follows: and sequentially splicing the plurality of time domain convolution results to obtain target data corresponding to the data stream to be operated.
Illustratively, the inverse fourier transform is performed on the frequency domain convolution result Y (ω) 1 of the sub-data stream x (t) 1, resulting in the time domain convolution result Y (t) 1. Similarly, a time domain convolution result y (t) 2 corresponding to the sub-data stream x (t) 2, a time domain convolution result y (t) L-1 corresponding to the sub-data stream x (t) L-1, and a time domain convolution result y (t) L corresponding to the sub-data stream x (t) L are obtained. The final determined target data may be expressed as: [ y (t) 1, y (t) 2, …, y (t) L-1, y (t) L ].
According to the technical scheme provided by the embodiment of the invention, the data stream to be operated is firstly obtained, then the data stream to be operated is divided into the sub-data streams corresponding to the preset number of time slices, the sub-data streams are subjected to Fourier transform to obtain the data stream frequency domain result corresponding to each sub-data stream, the frequency domain convolution result corresponding to each sub-data stream is further determined based on the preset convolution kernel frequency domain result and the data stream frequency domain result, further, the inverse Fourier transform is performed on each frequency domain convolution result to obtain the time domain convolution result corresponding to each sub-data stream, and the target data is determined based on a plurality of time domain convolution results. The technical scheme provided by the invention improves the traditional time domain convolution algorithm, reduces the calculation amount of higher-order convolution, improves the convolution operation efficiency and reduces the use scale of data operation equipment.
Example two
Fig. 3 is a flowchart of a data processing method according to a second embodiment of the present invention, where the steps of "performing 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" and "performing 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" are further refined on the basis of the foregoing embodiments, and the embodiments of the present invention may be combined with each of the alternatives in the foregoing one or more embodiments. As shown in fig. 3, the data processing method includes the steps of:
S210, acquiring a data stream to be operated.
S220, dividing the data stream to be operated into sub-data streams corresponding to the preset number of time slices.
S230, determining the standard point corresponding to each sub-data stream based on the number of the convolution kernels to be calculated.
In this embodiment, 2 n sampling points are required for performing the fourier transform processing, and the number of data points corresponding to each time slice is FFTLen + NUMLen-1, which does not meet the design requirement for performing the fourier transform, so that standard data points of the sub-data stream meeting the design requirement for the fourier transform are required to be determined. The number of standard points corresponding to each sub-data stream is FFTLen + NUMLen-1 and NUMLen-1, which are the number of data points corresponding to one time slice, and the number of standard points corresponding to each sub-data stream is FFTLen + NUMLen-1+ (NUMLen-1) = FFTLen +2NUMLen-2.
S240, carrying out data zero padding processing on each sub-data stream based on the standard point number to obtain a plurality of standard point number sub-data streams.
In this embodiment, the number of points of each sub-data stream is FFTLen + NUMLen-1, and NUMLen-1 data with a value of 0 is added at the tail of the sub-data stream, so that zero padding processing can be completed, and a plurality of standard point sub-data streams are obtained.
S250, inputting the standard point sub-data streams into a plurality of pre-configured frequency domain filtering channels respectively for Fourier transformation to obtain a data stream frequency domain result corresponding to each standard point sub-data stream.
And S260, carrying out Fourier transform on a convolution kernel to be operated to obtain a frequency domain result of the convolution kernel.
The convolution kernel to be calculated in advance is a preset function participating in convolution operation.
In this embodiment, before determining the frequency domain convolution result of each sub-data stream, the convolution kernel to be calculated is converted into data of the frequency domain. And carrying out Fourier transform on the convolution kernel to be calculated based on the requirement, so as to obtain a preset convolution kernel frequency domain result corresponding to the convolution kernel to be calculated.
S270, determining 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.
S280, carrying out inverse Fourier transform on the data stream frequency domain result corresponding to each standard point sub-data stream to obtain a standard point time domain convolution result corresponding to the standard point sub-data stream.
In this embodiment, since the zero padding process is performed on the sub-data stream in S240 to obtain the standard point sub-data stream, in this step, the inverse fourier transform is performed on the data stream frequency domain result corresponding to the standard point sub-data stream to obtain the standard point time domain convolution result corresponding to the standard point sub-data stream.
S290, performing truncation processing on invalid data corresponding to zero padding processing data points in each standard point time domain convolution result to obtain a time domain convolution result of the sub-data stream points, and determining target data based on a plurality of time domain convolution results.
On the basis of the embodiment, the final convolution result of the data stream to be operated is useless because the standard point time domain convolution result comprises the operation result corresponding to the zero padding invalid data. Therefore, invalid data corresponding to the zero padding data point needs to be deleted, and only a time domain convolution result corresponding to the original sub-data stream point number is reserved.
It should be noted that, when the convolution operation is directly performed in the time domain, the number of points of the convolution kernel is NUMLen, and NUMLen times of 2 times of multiplication and NUMLen times of 2 times of addition are required for each movement of the convolution kernel to obtain the result. When the data amount of input data is huge or the input data rate is fast, the calculation amount required for realizing convolution operation is quite large, and the operation efficiency is low. According to the operation method provided by the embodiment of the invention, the input data with huge volume is divided into a plurality of operation units to perform parallel operation, the calculated amount of the output result of each operation unit is small, and the convolution operation efficiency is effectively improved. Taking 2-base FFT as an example, the total multiplication amount required by the original time domain convolution operation mode is 12X FFTLen X (log 2 (FFTLenlog))+3X FFTLenlog X2, the addition amount is 4X FFTLen X (log 2 (FFTLenlog) and a result of FFTLen points is finally obtained, the operation method provided by the embodiment is adopted, the required multiplication amount is 12X (log 2 (FFTLenlog))+3X FFTLenlog, the addition amount is 4X (log 2 (FFTLenlog), and a result of FFTLen points is finally obtained.
According to the technical scheme provided by the embodiment of the invention, before carrying out Fourier transform on each sub-data stream, zero padding is carried out on the data stream, then when carrying out Fourier inverse transform on the frequency domain convolution result of each sub-data stream, zero padding invalid data is truncated, and finally obtained target data is identical with the result of directly carrying out time domain convolution on the data stream to be calculated, so that the calculation amount is reduced, the calculation precision is ensured, and the convolution calculation efficiency is improved.
As an alternative to the above embodiment, the implementation steps of the above method are shown in fig. 4. Can be summarized as: 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. Determining the standard point number corresponding to each sub data stream based on the number of the convolution kernels to be calculated in advance; performing data zero padding processing on the sub-data streams based on the standard points to obtain standard point sub-data streams, and further performing Fourier transformation on the standard point sub-data streams to obtain data stream frequency domain results corresponding to the standard point sub-data streams; then multiplying the data stream frequency domain result with a preset convolution kernel frequency domain result to obtain a frequency domain convolution result; performing inverse Fourier transform on the frequency domain convolution result to obtain a standard point time domain convolution result corresponding to the standard point sub-data stream; and then, carrying out truncation processing on invalid data corresponding to zero padding processing data points in the standard point time domain convolution result to obtain the time domain convolution result of the sub-data stream points. And finally, sequentially splicing the time domain convolution results corresponding to the sub data streams to obtain target data y (t) corresponding to the data stream to be operated.
Example III
Fig. 5 is a schematic structural diagram of a data processing apparatus according to a third embodiment of the present invention, where the apparatus may execute the data processing method according to the first embodiment of the present invention. The device comprises: 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.
The data acquisition module 310 is configured to acquire a data stream to be operated;
The frequency domain result determining module 320 is configured to divide the data stream to be calculated into sub-data streams corresponding to a preset number of time slices, and perform fourier transform on each sub-data stream to obtain a data stream frequency domain result corresponding to each sub-data stream;
A frequency domain convolution determining module 330, 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;
the target data determining module 340 is 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 a plurality of the time domain convolution results.
According to the technical scheme provided by the embodiment of the invention, the data stream to be operated is firstly obtained, then the data stream to be operated is divided into the sub-data streams corresponding to the preset number of time slices, the sub-data streams are subjected to Fourier transform to obtain the data stream frequency domain result corresponding to each sub-data stream, the frequency domain convolution result corresponding to each sub-data stream is further determined based on the preset convolution kernel frequency domain result and the data stream frequency domain result, further, the inverse Fourier transform is performed on each frequency domain convolution result to obtain the time domain convolution result corresponding to each sub-data stream, and the target data is determined based on a plurality of time domain convolution results. The technical scheme provided by the invention improves the traditional time domain convolution algorithm, reduces the calculation amount of higher-order convolution, improves the convolution operation efficiency and reduces the use scale of data operation equipment.
On the basis of the above technical solutions, the data processing apparatus further includes: and the slice number determining unit is used for determining the number of time slices based on the data stream input rate of the data stream to be operated and the maximum operating frequency of the data operation equipment.
Based on the above aspects, the frequency domain result determining module 320 includes:
The sub data stream point determining unit is used for determining the number of sub data stream points based on the number of preset Fourier transform operation points and the number of preset convolution kernels to be operated;
The slice duration determining unit is used for determining the time slice duration corresponding to the sub-data stream point number based on the sub-data stream point number and the data stream input rate of the data stream to be operated;
And the sub-data stream determining unit is used for dividing one sub-data stream for the data stream to be operated at intervals of time slice duration to obtain sub-data streams corresponding to the preset number of time slices.
Based on the above technical solutions, the frequency domain result determining module 320 further includes:
The standard point determining unit is used for determining the standard point corresponding to each sub-data stream based on the preset convolution kernel point to be operated;
The standard data stream determining unit is used for respectively carrying out data zero padding processing on each sub-data stream based on the standard point number to obtain a plurality of standard point sub-data streams;
And the frequency domain result determining unit is used for respectively inputting the standard point sub-data streams into a plurality of preset frequency domain filtering channels to carry out Fourier transformation, so as to obtain a data stream frequency domain result corresponding to each standard point sub-data stream.
On the basis of the above technical solutions, the data processing apparatus further includes: the convolution kernel frequency domain result determining unit is used for carrying out Fourier transformation on a preset convolution kernel to be operated to obtain a preset convolution kernel frequency domain result.
Based on the above aspects, the target data determining module 340 includes:
The standard time domain convolution determining unit is used for carrying out inverse Fourier transform on the data stream frequency domain result corresponding to each standard point sub-data stream to obtain a standard point time domain convolution result corresponding to the standard point sub-data stream;
And the time domain convolution determining unit is used for carrying out truncation processing on invalid data corresponding to the zero padding processing data points in each standard point time domain convolution result to obtain a time domain convolution result of the sub-data stream points.
Based on the above technical solutions, the target data determining module 340 is further configured to sequentially splice the multiple time domain convolution results to obtain target data corresponding to the data stream to be calculated.
Based on the above aspects, the frequency domain convolution determining module 330 is specifically configured to: and determining a frequency domain convolution result corresponding to each sub data stream according to a product result of a preset convolution kernel frequency domain result and a data stream frequency domain result.
The data processing device provided by the embodiment of the disclosure can execute the data processing method provided by any embodiment of the disclosure, and has the corresponding functional modules and beneficial effects of the execution method.
It should be noted that each unit and module included in the above apparatus are only divided according to the functional logic, but not limited to the above division, so long as the corresponding functions can be implemented; in addition, the specific names of the functional units are also only for convenience of distinguishing from each other, and are not used to limit the protection scope of the embodiments of the present disclosure.
Example IV
Fig. 6 is a schematic structural diagram of an electronic device according to a fourth embodiment of the present invention. The electronic device 10 is intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular telephones, smartphones, wearable electronic devices (e.g., helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be exemplary only, and are not meant to limit implementations of the inventions described and/or claimed herein.
As shown in fig. 6, the electronic device 10 includes at least one processor 11, and a memory, such as a Read Only Memory (ROM) 12, a Random Access Memory (RAM) 13, etc., communicatively connected to the at least one processor 11, in which the memory stores a computer program executable by the at least one processor, and the processor 11 may 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 may also be stored. The processor 11, the ROM 12 and the RAM 13 are connected to each other via a bus 13. An input/output (I/O) interface 15 is also connected to bus 13.
Various 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, and the like; a storage unit 18 such as a magnetic disk, an optical disk, or the like; and a communication unit 19 such as a network card, modem, wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information/data with other electronic devices via a computer network, such as the internet, and/or various telecommunication networks.
The processor 11 may be a variety of general and/or special purpose processing components having processing and computing capabilities. Some examples of processor 11 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various specialized Artificial Intelligence (AI) computing chips, various processors running machine learning model algorithms, digital Signal Processors (DSPs), and any suitable processor, controller, microcontroller, etc. The processor 11 performs the various methods and processes described above, such as data processing methods.
In some embodiments, the data processing method may be implemented as a computer program tangibly embodied on a computer-readable storage medium, such as the 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. One or more of the steps of the data processing method described above may be performed when the computer program is loaded into RAM 13 and executed by processor 11. Alternatively, in other embodiments, the processor 11 may be configured to perform the data processing method in any other suitable way (e.g. by means of firmware).
Various implementations of the systems and techniques described here above may be implemented in digital electronic circuitry, integrated circuit systems, field Programmable Gate Arrays (FPGAs), application Specific Integrated Circuits (ASICs), application Specific Standard Products (ASSPs), systems On Chip (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs, the one or more computer programs may be executed and/or interpreted on a programmable system including at least one programmable processor, which may be a special purpose or general-purpose programmable processor, that may receive data and instructions from, and transmit data and instructions to, a storage system, at least one input device, and at least one output device.
A computer program for carrying out 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 processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus, such that the computer programs, when executed by the processor, cause the functions/acts specified in the flowchart and/or block diagram block or blocks to be implemented. The computer program may execute entirely on the machine, partly on the machine, as a stand-alone software package, partly on the machine and partly on a remote machine or entirely on the remote machine or server.
In the context of the present invention, a computer-readable storage medium may 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 device. The computer readable storage medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or electronic device, or any suitable combination of the foregoing. Alternatively, the computer readable storage medium may be a machine readable signal medium. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, 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 disc read-only memory (CD-ROM), an optical storage electronic device, a magnetic storage electronic device, or any suitable combination of the foregoing.
To provide for interaction with a user, the systems and techniques described here 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 a user; and a keyboard and a pointing device (e.g., a mouse or a trackball) through which a user can provide input to the electronic device. Other kinds of devices may also be used to provide for interaction with a user; for example, 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, speech input, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a background component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such background, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), wide Area Networks (WANs), blockchain networks, and the internet.
The computing system may include clients and servers. The client and server are typically remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The server can be a cloud server, also called a cloud computing server or a cloud host, and is a host product in a cloud computing service system, so that the defects of high management difficulty and weak service expansibility in the traditional physical hosts and VPS service are overcome. It should be appreciated that various forms of the flows shown above may be used to reorder, add, or delete steps. For example, the steps described in the present invention may be performed in parallel, sequentially, or in a different order, so long as the desired results of the technical solution of the present invention are achieved, and the present invention is not limited herein. The above embodiments do not limit the scope of the present invention. It will be apparent to those skilled in the art that various modifications, combinations, sub-combinations and alternatives are possible, depending on design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the scope of the present invention.

Claims (10)

1. A method of data processing, comprising:
Acquiring a data stream to be operated;
Dividing the data stream to be calculated into sub-data streams corresponding to a preset number of time slices, and performing Fourier transform on each sub-data stream to obtain a data stream frequency domain result corresponding to each sub-data stream;
determining 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;
And carrying out 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 a plurality of time domain convolution results.
2. The method of claim 1, further comprising, after obtaining the data stream to be operated on:
And determining the number of time slices based on the data stream input rate of the data stream to be operated and the maximum operating frequency of the data operation equipment.
3. The method of claim 1, wherein the dividing the data stream to be operated into sub-data streams corresponding to a preset number of time slices comprises:
determining the number of sub-data stream points based on the number of preset Fourier transform operation points and the number of preset convolution kernels to be operated;
Determining the time slice duration corresponding to the number of the sub-data stream points based on the number of the sub-data stream points and the data stream input rate of the data stream to be operated;
And dividing one sub-data stream for the data stream to be calculated at intervals of time slice duration to obtain sub-data streams corresponding to the preset number of time slices.
4. The method of claim 1, wherein said fourier transforming each of said sub-data streams to obtain a data stream frequency domain result corresponding to each of said sub-data streams, comprises:
determining the standard point number corresponding to each sub data stream based on the preset convolution kernel point number to be operated;
Performing data zero padding processing on each sub-data stream based on the standard point numbers to obtain a plurality of standard point sub-data streams;
And respectively inputting the standard point sub-data streams into a plurality of frequency domain filtering channels configured in advance to carry out Fourier transform, and obtaining a data stream frequency domain result corresponding to each standard point sub-data stream.
5. The method of claim 4, wherein said performing inverse fourier transform on each of said frequency domain convolution results to obtain a corresponding time domain convolution result for each of said sub-data streams comprises:
Performing inverse Fourier transform on the data stream frequency domain result corresponding to each standard point sub-data stream to obtain a standard point time domain convolution result corresponding to the standard point sub-data stream;
and carrying out truncation processing on invalid data corresponding to the zero padding processing data points in each standard point time domain convolution result to obtain a time domain convolution result of the sub-data stream points.
6. The method of claim 1, further comprising, prior to said determining a frequency domain convolution result for each of said sub-data streams based on a predetermined convolution kernel frequency domain result and each of said data stream frequency domain results:
Performing Fourier transform on a convolution kernel to be calculated to obtain a frequency domain result of the convolution kernel; wherein the convolution kernel to be calculated in advance is a preset function participating in convolution operation.
7. The method of claim 1, wherein the determining the frequency domain convolution result for each of the sub-data streams based on the preset convolution kernel frequency domain result and each of the data stream frequency domain results comprises:
And determining a frequency domain convolution result corresponding to each sub data stream according to a product result of a preset convolution kernel frequency domain result and a data stream frequency domain result.
8. The method of claim 1, wherein the determining target data based on the plurality of time domain convolution results comprises:
and sequentially splicing the time domain convolution results to obtain target data corresponding to the data stream to be operated.
9. A data processing apparatus, comprising:
the data acquisition module is used for acquiring a data stream to be operated;
the frequency domain result determining module is used for dividing the data stream to be calculated into sub-data streams corresponding to the preset number of time slices, and carrying out Fourier transform on each sub-data stream to obtain a data stream frequency domain result corresponding to each sub-data stream;
the frequency domain convolution determining module is used for determining 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;
And the target data determining module is used for carrying out 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 a plurality of time domain convolution results.
10. An electronic device, the electronic device comprising:
at least one processor; and
A memory communicatively coupled to the at least one processor; wherein,
The memory stores a computer program executable by the at least one processor to enable the at least one processor to perform the data processing method of any one of claims 1-8.
CN202311006638.1A 2023-08-10 2023-08-10 Data processing method and device and electronic equipment Pending CN118132909A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311006638.1A CN118132909A (en) 2023-08-10 2023-08-10 Data processing method and device and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311006638.1A CN118132909A (en) 2023-08-10 2023-08-10 Data processing method and device and electronic equipment

Publications (1)

Publication Number Publication Date
CN118132909A true CN118132909A (en) 2024-06-04

Family

ID=91228783

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311006638.1A Pending CN118132909A (en) 2023-08-10 2023-08-10 Data processing method and device and electronic equipment

Country Status (1)

Country Link
CN (1) CN118132909A (en)

Similar Documents

Publication Publication Date Title
CN112561078B (en) Distributed model training method and related device
CN115150471B (en) Data processing method, apparatus, device, storage medium, and program product
CN114564149B (en) Data storage method, device, equipment and storage medium
CN115438007A (en) File merging method and device, electronic equipment and medium
CN118132909A (en) Data processing method and device and electronic equipment
CN113360736B (en) Internet data capturing method and device
CN114998649A (en) Training method of image classification model, and image classification method and device
CN115292662B (en) Convolution acceleration operation method and device, electronic equipment and storage medium
CN113343064B (en) Data processing method, apparatus, device, storage medium, and computer program product
CN116468824B (en) Animation redirection method, device, electronic equipment and storage medium
CN116579914B (en) Execution method and device of graphic processor engine, electronic equipment and storage medium
CN117271840B (en) Data query method and device of graph database and electronic equipment
CN117076720B (en) Embedded table access method and device, electronic equipment and storage medium
CN116402141B (en) Model reasoning method and device, electronic equipment and storage medium
CN114816758B (en) Resource allocation method and device
CN115511047B (en) Quantification method, device, equipment and medium of Softmax model
CN113762510B (en) Data processing method and device for target model, electronic equipment and medium
CN117632431A (en) Scheduling method, device, equipment and storage medium for cloud computing task
CN117273069A (en) Reasoning method, device, equipment and medium based on neural network model
CN114648112A (en) Data processing method, device, equipment and storage medium
CN117892050A (en) Matrix operation method, device, equipment and medium based on multi-core hardware
CN118152717A (en) Signal conversion method based on multifunctional sine interpolation structure
CN117687992A (en) Data migration method, device, equipment and storage medium
CN117422108A (en) Method, device, equipment and storage medium for determining convolution kernel
CN115358378A (en) Data caching method, system, device, equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination