Data processing method, device, electronic device and readable storage medium
By controlling the processing time and method of processing units in the field programmable gate array and microprocessor, the problem of slow data processing speed and blockage is solved, and efficient and reliable data processing is achieved.
Patent Information
- Application Number
- CN202210500632.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-05-06
- Publication Date
- 2024-11-22
- Estimated Expiration
- 2042-05-06
AI Technical Summary
In the prior art, data processing speed is slow, and the processing time of each data is different, resulting in data blockage or overwrite, which in turn causes data processing errors.
By determining the processing steps of multiple sets of pending data in the field programmable gate array and microprocessor, and controlling the processing time of the processing unit so that it is the longest processing time, the data is processed in a pipeline manner to ensure that all processing units are The processing time is consistent to avoid data blockage and errors.
It improves the speed and accuracy of data processing, avoids data blockage and errors caused by different processing times, and enhances the reliability of data processing.
Smart Images

Figure CN114841849B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data processing technology, and in particular to a data processing method, device, electronic device and readable storage medium. Background Art
[0002] With the advent of the big data era, data processing has become more and more applicable and important in more and more scenarios, and data processing speed is a key indicator of data processing.
[0003] The data processing methods in the prior art are as follows Figure 1 As shown in the figure, the next set of data can only be processed after the previous set of data has been processed. If it is assumed that the time taken for each data processing process is t1, t2…t n , then the total time required to complete the processing of one set of data is T = t1 + t2 + ... + t n , the total time required to complete the processing of m groups of data is T m =(t1+t2+…+t n )*m. Since the next set of data can only be processed after the previous set of data is completed, the data processing speed is slow when there are many sets of data. In addition, since the time consumption of each data processing process is different, if the later steps take a long time (i.e., the processing is slower), the data processed in the previous steps will be faster than the later steps, which may cause the data in the later steps to be blocked or overwritten, resulting in calculation errors.
[0004] Therefore, there is an urgent need to provide a data processing method, device, electronic device and readable storage medium to solve the technical problems existing in the prior art, such as slow data processing speed and different data processing times, which lead to data blockage or overwriting in certain data processing steps, and thus cause data processing errors. Summary of the invention
[0005] In view of this, it is necessary to provide a data processing method, device, electronic device and readable storage medium to solve the technical problems existing in the prior art, such as slow data processing speed and different data processing times, which lead to data blockage or overwriting in certain data processing steps, and thus cause data processing errors.
[0006] In one aspect, the present invention provides a data processing method for processing multiple groups of to-be-processed data based on a field programmable gate array and a microprocessor, wherein the field programmable gate array includes at least one first processing unit, and the microprocessor includes at least one second processing unit; the data processing method comprises:
[0007] Determining a plurality of processing steps for each group of data to be processed in a plurality of groups of data to be processed;
[0008] determining at least one first processing step processed by the at least one first processing unit and at least one second processing step processed by the at least one second processing unit among the plurality of processing steps;
[0009] Acquire multiple initial processing durations corresponding to the multiple processing steps, and determine a longest processing duration according to the multiple initial processing durations;
[0010] Controlling the processing duration of each first processing unit in the at least one first processing unit and each second processing unit in the at least one second processing unit so that the processing duration of the first processing unit and the second processing unit are both the longest processing duration;
[0011] The at least one first processing unit and the at least one second processing unit are controlled to process the multiple groups of to-be-processed data in a pipeline manner.
[0012] In some possible implementations, the determining of multiple processing steps for each group of data to be processed in the multiple groups of data to be processed includes:
[0013] Determining a plurality of initial processing steps of the data to be processed based on a preset division rule;
[0014] The multiple initial processing steps are merged based on a preset merging rule to obtain the multiple processing steps.
[0015] In some possible implementations, determining at least one first processing step processed by the at least one first processing unit and at least one second processing step processed by the at least one second processing unit among the multiple processing steps includes:
[0016] Obtaining a step feature of each of the multiple processing steps;
[0017] At least one first processing step processed by the at least one first processing unit and at least one second processing step processed by the at least one second processing unit among the multiple processing steps are determined based on a preset division rule and the step characteristics.
[0018] In some possible implementations, controlling the processing duration of the at least one first processing unit and the at least one second processing unit so that the processing duration of each first processing unit in the at least one first processing unit and the processing duration of each second processing unit in the at least one second processing unit are both the longest processing duration, includes:
[0019] Obtaining initial processing durations of each of the first processing units and each of the second processing units;
[0020] Determine a processing time difference according to the initial processing time and the maximum processing time;
[0021] The start and stop of each of the first processing units and each of the second processing units are controlled according to the processing time difference, so that the processing time of each of the first processing units and each of the second processing units is the longest processing time.
[0022] In some possible implementations, the multiple groups of data to be processed include first data to be processed and second data to be processed, the first data to be processed and the second data to be processed both include sequentially arranged first target processing steps and second target processing steps, the at least one first processing unit includes a first target processing unit that processes the first target processing step, and the at least one second processing unit includes a second target processing unit that processes the second target processing step.
[0023] In some possible implementations, controlling the at least one first processing unit and the at least one second processing unit to process the multiple groups of to-be-processed data in a pipeline manner includes:
[0024] Acquire a processing signal, the first target processing unit responds to the processing signal, and processes a first target processing step of the first data to be processed, and generates a first processing completion signal when the first target processing step of the first data to be processed is completed;
[0025] The second target processing unit responds to the first processing completion signal and processes a second target processing step of the first data to be processed, and generates a second processing completion signal when the second target processing step of the first data to be processed is completed;
[0026] The first target processing unit responds to the first processing completion signal and processes the first target processing step of the second data to be processed;
[0027] The second target processing unit responds to the second processing completion signal and processes a second target processing step of the second data to be processed.
[0028] In some possible implementations, the multiple groups of data to be processed include m groups of data to be processed, and the data to be processed include n processing steps, and the data processing method further includes:
[0029] Constructing n storage areas corresponding to the n processing steps one by one;
[0030] Obtaining processing results of each group of the data to be processed;
[0031] The i*n+jth group of data to be processed is stored in the jth storage area;
[0032] Among them, i=0,1,…;j=1,2,…n;n=2,3,…;m=2,3,….
[0033] On the other hand, the present invention further provides a data processing device for processing multiple groups of to-be-processed data based on a field programmable gate array and a microprocessor, wherein the field programmable gate array includes at least one first processing unit, and the microprocessor includes at least one second processing unit; the data processing device includes:
[0034] A processing step determination module, used to determine a plurality of processing steps for each group of data to be processed in a plurality of groups of data to be processed;
[0035] a processing step division module, configured to determine at least one first processing step processed by the at least one first processing unit and at least one second processing step processed by the at least one second processing unit among the plurality of processing steps;
[0036] A processing duration acquisition module, used to acquire multiple initial processing durations corresponding to the multiple processing steps, and determine a maximum processing duration according to the multiple initial processing durations;
[0037] a processing duration control module, used to control the processing durations of the at least one first processing unit and the at least one second processing unit, so that the processing durations of each first processing unit in the at least one first processing unit and each second processing unit in the at least one second processing unit are both the longest processing duration;
[0038] The data processing module is used to control the at least one first processing unit and the at least one second processing unit to process the multiple groups of data to be processed in a pipeline manner.
[0039] On the other hand, the present invention also provides an electronic device, including a memory and a processor, wherein:
[0040] The memory is used to store programs;
[0041] The processor is coupled to the memory and is used to execute the program stored in the memory to implement the steps in the data processing method described in any one of the above implementations.
[0042] On the other hand, the present invention also provides a computer-readable storage medium for storing computer-readable programs or instructions, which, when executed by a processor, can implement the steps of the data processing method described in any of the above implementations.
[0043] The beneficial effect of adopting the above-mentioned embodiment is as follows: the data processing method provided by the present invention improves the serial and parallel processing capabilities of the data processing method by setting up a field programmable gate array and a microprocessor to process multiple groups of data to be processed, takes advantage of the field programmable gate array's high-speed processing of large amounts of data and the flexible programming characteristics of the microprocessor, and improves the processing speed of processing multiple groups of data to be processed.
[0044] Furthermore, the present invention controls the processing time of at least one first processing unit and at least one second processing unit so that the processing time of each first processing unit in the at least one first processing unit and the processing time of each second processing unit in the at least one second processing unit are the longest processing time, so as to achieve the purpose of equal processing time for all processing units, avoid technical problems such as data blockage or overwriting due to different data processing time, avoid data processing errors, and improve the correctness and reliability of the data processing process.
[0045] Furthermore, the present invention can further improve the data processing speed of the data processing method by controlling at least one first processing unit and at least one second processing unit to process multiple groups of data to be processed in a pipeline manner. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.
[0047] Figure 1 It is a schematic diagram of the structure of an embodiment of a data processing method in the prior art;
[0048] Figure 2 A schematic flow chart of an embodiment of a data processing method provided by the present invention;
[0049] Figure 3 A schematic diagram of the structure of an embodiment of the data processing architecture provided by the present invention;
[0050] Figure 4 For the present invention Figure 2 A schematic flow chart of an embodiment of S201;
[0051] Figure 5 For the present invention Figure 2 A schematic flow chart of an embodiment of S202;
[0052] Figure 6A schematic structural diagram of an embodiment of a data processing architecture provided by the present invention when the data to be processed is 3D camera data;
[0053] Figure 7 For the present invention Figure 2 A schematic flow chart of an embodiment of S204;
[0054] Figure 8 For the present invention Figure 2 A schematic flow chart of an embodiment of S205;
[0055] Fig. 9 A schematic diagram of a flow chart of an embodiment of storing processing results provided by the present invention;
[0056] Fig.10 A schematic diagram of the structure of an embodiment of a data processing device provided by the present invention;
[0057] Fig.11 A schematic structural diagram of an embodiment of an electronic device provided by the present invention. DETAILED DESCRIPTION
[0058] The technical solutions in the embodiments of the present invention will be described clearly and completely below in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.
[0059] It should be understood that the schematic drawings are not drawn to scale. The flow chart used in the present invention shows the operations implemented according to some embodiments of the present invention. It should be understood that the operations of the flow chart can be implemented out of order, and the steps without logical context can be reversed or implemented simultaneously. In addition, those skilled in the art can add one or more other operations to the flow chart under the guidance of the content of the present invention, and can also remove one or more operations from the flow chart.
[0060] In the description of the embodiments of the present invention, "and / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B may represent three situations: A exists alone, A and B exist at the same time, and B exists alone.
[0061] Some of the block diagrams shown in the accompanying drawings are functional entities that do not necessarily correspond to physically or logically independent entities. These functional entities can be implemented in software form, or in one or more hardware modules or integrated circuits, or in different networks and / or processor systems and / or microcontroller systems.
[0062] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present invention. The appearance of the phrase in various places in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.
[0063] The embodiments of the present invention provide a data processing method, device, electronic device and readable storage medium, which are described below respectively.
[0064] Figure 2 A schematic flow chart of an embodiment of the data processing method provided by the present invention is shown in FIG. Figure 3 A schematic diagram of an embodiment of the data processing architecture provided by the present invention is shown in FIG. Figure 2 and Figure 3 As shown, the data processing method is used to process multiple groups of to-be-processed data based on a field programmable gate array (FPGA) 100 and a microprocessor (ARM) 200, wherein the field programmable gate array 100 includes at least one first processing unit 110, and the microprocessor 200 includes at least one second processing unit 210; the data processing method includes:
[0065] S201, determining multiple processing steps for each group of data to be processed in multiple groups of data to be processed;
[0066] S202, determining at least one first processing step processed by at least one first processing unit 110 and at least one second processing step processed by at least one second processing unit 210 among a plurality of processing steps;
[0067] S203, obtaining multiple initial processing durations corresponding to multiple processing steps, and determining a longest processing duration according to the multiple initial processing durations;
[0068] S204, controlling the processing duration of at least one first processing unit 110 and at least one second processing unit 210, so that the processing duration of each first processing unit 110 in the at least one first processing unit 110 and the processing duration of each second processing unit 210 in the at least one second processing unit 210 are both the longest processing duration;
[0069] S205 , controlling at least one first processing unit 110 and at least one second processing unit 210 to process multiple groups of to-be-processed data in a pipeline manner.
[0070] Compared with the prior art, the data processing method provided in the embodiment of the present invention improves the serial and parallel processing capabilities of the data processing method by setting up a field programmable gate array 100 and a microprocessor 200 to process multiple groups of data to be processed, takes advantage of the field programmable gate array 100 for high-speed processing of large amounts of data and the flexible programming characteristics of the microprocessor 200, and improves the processing speed of processing multiple groups of data to be processed.
[0071] Furthermore, the embodiment of the present invention controls the processing time of at least one first processing unit 110 and at least one second processing unit 210 so that the processing time of each first processing unit 110 in the at least one first processing unit 110 and the processing time of each second processing unit 210 in the at least one second processing unit 210 are the longest processing time, so as to achieve the purpose of equal processing time for all processing units, avoid technical problems such as data blockage or overwriting due to different data processing time, avoid data processing errors, and improve the correctness and reliability of the data processing process.
[0072] Furthermore, the embodiment of the present invention can further improve the data processing speed of the data processing method by controlling at least one first processing unit 110 and at least one second processing unit 210 to process multiple groups of to-be-processed data in a pipeline manner.
[0073] In some embodiments of the present invention, the field programmable gate array 100 and the microprocessor 200 may be a control chip, through which multiple groups of data to be processed are processed. Compared with using independent field programmable gate arrays 100 and microprocessors 200, the design difficulty can be reduced and the data transmission between the field programmable gate array 100 and the microprocessor 200 can be made more stable.
[0074] In a specific embodiment of the present invention, the control chip may be XCZU3EG.
[0075] In some embodiments of the present invention, Figure 4 As shown, step S201 includes:
[0076] S401, determining a plurality of initial processing steps of the data to be processed based on a preset division rule;
[0077] S402: Merge multiple initial processing steps based on a preset merging rule to obtain multiple processing steps.
[0078] The embodiment of the present invention combines multiple initial processing steps based on a preset merging rule to obtain multiple processing steps, which can reduce the number of first processing units 110 in the field programmable gate array 100 and / or the number of second processing units 210 in the microprocessor 200, thereby reducing costs. In addition, the difference between the initial processing time and the maximum processing time can be reduced, further improving the data processing speed of the data processing method.
[0079] In a specific embodiment of the present invention, the division rule preset in step S401 may be the processing flow of the data to be processed. The merging rule preset in step S402 may be the processing time of each initial processing step.
[0080] It should be noted that the preset division rules and the preset merging rules can be adjusted according to actual conditions and will not be described in detail here.
[0081] In a specific application scenario of the present invention, the data to be processed is 3D camera data. The initial processing steps include data acquisition, image processing, phase solution, sorting, phase matching, three-dimensional calculation and data compression. Considering that the processing time of data acquisition and image processing is short, data acquisition and image data are combined and combined into the first processing step, so 3D camera data includes six processing steps.
[0082] In some embodiments of the present invention, Figure 5 As shown, step S202 includes:
[0083] S501, obtaining a step feature of each processing step in a plurality of processing steps;
[0084] S502: Determine at least one first processing step processed by at least one first processing unit 110 and at least one second processing step processed by at least one second processing unit 210 among a plurality of processing steps based on a preset division rule and step characteristics.
[0085] The embodiment of the present invention can further fully utilize the advantages of the field programmable gate array 100 for high-speed processing of large amounts of data and the flexible programming characteristics of the microprocessor 200 by determining the first processing step and the second processing step based on preset division rules and step characteristics, thereby further improving the processing speed of processing multiple groups of data to be processed.
[0086] In some embodiments of the present invention, step characteristics include but are not limited to the number of conditional judgments and serial operation characteristics of each processing step. Specifically: when the number of conditional judgments is large and the serial operation characteristics are strong, the processing step is a second processing step processed by the second processing unit 210.
[0087] In a specific embodiment of the present invention, Figure 6As shown, when the data to be processed is 3D camera data, since the three-dimensional calculation processing step has more condition judgments and a strong serial operation characteristic, the microprocessor 200 includes a second processing unit 210 for processing the three-dimensional calculation processing step. The field programmable gate array 100 includes five first processing units 110, which are respectively used to process the five processing steps of data acquisition and image processing, phase resolution, sorting, phase matching and data compression.
[0088] In some embodiments of the present invention, Figure 7 As shown, step S204 includes:
[0089] S701, obtaining the initial processing duration of each first processing unit 110 and each second processing unit 210;
[0090] S702, determining a processing time difference according to the initial processing time and the maximum processing time;
[0091] S703 , controlling the start and stop of each first processing unit 110 and each second processing unit 210 according to the processing time difference, so that the processing time of each first processing unit 110 and each second processing unit 210 is the longest processing time.
[0092] In a specific embodiment of the present invention, if the initial processing time of one of the first processing units 110 is 0.3 seconds faster than the longest processing time, that is, the processing time difference is 0.3 seconds, then the first processing unit 110 can be controlled to pause for 0.3 seconds during the processing process so that the processing time of the first processing unit 110 is the longest processing time.
[0093] In some other specific embodiments of the present invention, if the initial processing time of one of the first processing units 110 is 0.3 seconds faster than the longest processing time, that is, the processing time difference is 0.3 seconds, then this first processing unit 110 can be controlled to wait for 0.3 seconds after the processing is completed, so that the total processing time of this first processing unit 110 is the longest processing time.
[0094] In some embodiments of the present invention, multiple groups of data to be processed include first data to be processed and second data to be processed, and the first data to be processed and the second data to be processed both include first target processing steps and second target processing steps arranged in sequence, and at least one first processing unit 110 includes a first target processing unit that processes the first target processing step, and at least one second processing unit 210 includes a second target processing unit that processes the second target processing step.
[0095] In some embodiments of the present invention, Figure 8 As shown, step S205 includes:
[0096] S801, obtaining a processing signal, a first target processing unit responding to the processing signal, and processing a first target processing step of first data to be processed, and generating a first processing completion signal when the first target processing step of the first data to be processed is completed;
[0097] S802, the second target processing unit responds to the first processing completion signal, and processes the second target processing step of the first data to be processed, and generates a second processing completion signal when the second target processing step of the first data to be processed is completed;
[0098] S803, the first target processing unit responds to the first processing completion signal, and processes the first target processing step of the second data to be processed;
[0099] S804: The second target processing unit responds to the second processing completion signal and processes the second target processing step of the second data to be processed.
[0100] From the above process, we can know that: if the processing time of each processing step is t, and a set of data to be processed includes n processing steps, then the time required to complete a set of data to be processed is T'=n*t, and the total time required to complete m sets of data to be processed is T m '=(m+n-1)*t, when m is much larger than n (for example, n=6, m=1000), T m '≈m*t, compared with T in the prior art m =(t1+t2+…+t n )*m, which greatly shortens the data processing time and improves the data processing speed.
[0101] In a specific embodiment of the present invention, when the data to be processed is 3D camera data, at least one first processing unit includes a data acquisition and image processing unit, a phase solution processing unit, a sorting processing unit, a phase matching processing unit, a three-dimensional calculation processing unit, and a data compression processing unit. The time consumption of the six processing steps of data acquisition and image processing, phase solution, sorting, phase matching, three-dimensional calculation, and data compression is t respectively. a ,t b ,t c ,t d ,t e ,t f , according to the characteristics of FPGA and ARM, t a ,t b ,t c ,t d ,t f is a fixed value, t e The time taken for the three-dimensional calculation is the longest, i.e., t max (t a,t b ,t c ,t d ,t e ,t f ) = t e By controlling the processing time of each processing unit, the processing time is t e , then step S205 is specifically as follows:
[0102] At time 0, all processing units are in idle state, and the data acquisition and image processing unit responds to the processing signal to acquire and process the first group of data to be processed;
[0103] t e At the moment, the data acquisition and image processing unit completes the processing and generates a first processing completion signal, the data acquisition and image processing unit is in an idle state, and other units are in an idle state. The de-phase processing unit responds to the first processing completion signal to process the first group of data to be processed; at the same time, the data acquisition and image processing unit responds to the first processing completion signal to acquire and perform image processing on the second group of data to be processed;
[0104] 2 times t e At the moment, the data acquisition and image processing unit and the phase solution processing unit have completed processing and are in an idle state, and the other processing units are in an idle state. The data acquisition and image processing unit acquires and processes the image of the third group of data to be processed, the phase solution processing unit performs phase solution processing on the second group of data to be processed, and the sorting processing unit sorts the first group of data to be processed;
[0105] 3 times t e At the moment, the data acquisition and image processing unit, the phase solution processing unit, and the sorting processing unit have all completed processing and are in an idle state, the data acquisition and image processing unit acquires and processes the fourth group of data to be processed, the phase solution processing unit performs phase solution processing on the third group of data to be processed, the sorting processing unit sorts the second group of data to be processed, and the phase matching processing unit performs phase matching on the first group of data to be processed;
[0106] 4 times t e At this moment, the data acquisition and image processing unit, the phase solution processing unit, the sorting processing unit, and the phase matching processing unit have all completed processing and are in an idle state, and the other modules are all in an idle state. The data acquisition and image processing unit acquires and processes the fifth group of data to be processed, the phase solution processing unit performs phase solution processing on the fourth group of data to be processed, the sorting processing unit sorts the third group of data to be processed, the phase matching processing unit performs phase matching on the second group of data to be processed, and the three-dimensional calculation processing unit performs matching operation on the first group of data to be processed;
[0107] 5 times te At this moment, the data acquisition and image processing unit, the phase solution processing unit, the sorting processing unit, the phase matching processing unit, and the three-dimensional calculation processing unit have all completed processing and are in an idle state, the data acquisition and image processing unit acquires and processes the sixth group of data to be processed, the phase solution processing unit performs phase solution processing on the fifth group of data to be processed, the sorting processing unit sorts the fourth group of data to be processed, the phase matching processing unit performs phase matching on the third group of data to be processed, the three-dimensional calculation processing unit performs matching operation on the second group of data to be processed, and the data compression processing unit compresses the first group of data to be processed;
[0108] And so on, n times t e At this moment, the data acquisition and image processing unit, the phase solution processing unit, the sorting processing unit, the phase matching processing unit, the three-dimensional calculation processing unit, and the data compression processing unit have all completed processing and are in an idle state. The data acquisition and image processing unit acquires and processes the n+1th group of data to be processed, the phase solution processing unit performs phase solution processing on the nth group of data to be processed, the sorting processing unit sorts the n-1th group of data to be processed, the phase matching power source performs phase matching on the n-2th group of data to be processed, the three-dimensional calculation processing unit performs matching operation on the n-3th group of data to be processed, and the data compression processing unit compresses the n-4th group of data to be processed.
[0109] In summary: at n times t e At this moment, the data compression processing unit has completed t e The compression of the group of pending data has been completed. e The time required to complete the whole process of n groups of data to be processed is (n+5)*t e .
[0110] In order to further prevent data errors during the process of processing multiple sets of data to be processed in a pipeline manner, in some embodiments of the present invention, the multiple sets of data to be processed include m sets of data to be processed, and the data to be processed include n processing steps. Figure 3 and Fig. 9 As shown, the data processing method also includes:
[0111] S901, constructing n storage areas 300 corresponding to n processing steps one by one;
[0112] S902, obtaining the processing results of each group of data to be processed;
[0113] S903, storing the i*n+jth group of to-be-processed data into the jth storage area 300;
[0114] Among them, i=0,1,…;j=1,2,…n;n=2,3,…;m=2,3,….
[0115] The embodiment of the present invention constructs n storage areas 300 corresponding to n processing steps one by one, and stores the i*n+jth group of data to be processed in the jth storage area 300, thereby realizing the storage of the processing results of each data to be processed, preventing the technical problem of data errors in the process of processing multiple groups of data to be processed in a pipeline manner, and further improving the accuracy and reliability of data processing of the data to be processed.
[0116] In a specific embodiment of the present invention, when the data to be processed is 3D camera data, there are six storage areas 300, namely a first storage area, a second storage area, a third storage area, a fourth storage area, a fifth storage area and a sixth storage area.
[0117] The processing results of the first group of data to be processed are stored in the first storage area; the processing results of the second group of data to be processed are stored in the second storage area; the processing results of the third group of data to be processed are stored in the third storage area; the processing results of the fourth group of data to be processed are stored in the fourth storage area; the processing results of the fifth group of data to be processed are stored in the fifth storage area; the processing results of the sixth group of data to be processed are stored in the sixth storage area; the processing results of the seventh group of data to be processed are stored in the first storage area; the processing results of the eighth group of data to be processed are stored in the second storage area, ... and so on.
[0118] In order to better implement the data processing method in the embodiment of the present invention, based on the data processing method, the embodiment of the present invention also provides a data processing device for processing multiple groups of to-be-processed data based on a field programmable gate array and a microprocessor, wherein the field programmable gate array includes at least one first processing unit, and the microprocessor includes at least one second processing unit; Fig.10 As shown, the data processing device 1000 includes:
[0119] A processing step determination module 1001 is used to determine a plurality of processing steps for each group of data to be processed in a plurality of groups of data to be processed;
[0120] A processing step division module 1002 is used to determine at least one first processing step processed by at least one first processing unit and at least one second processing step processed by at least one second processing unit among a plurality of processing steps;
[0121] The processing duration acquisition module 1003 is used to acquire multiple initial processing durations corresponding to multiple processing steps, and determine the longest processing duration according to the multiple initial processing durations;
[0122] The processing duration control module 1004 is used to control the processing duration of at least one first processing unit and at least one second processing unit, so that the processing duration of each first processing unit in the at least one first processing unit and the processing duration of each second processing unit in the at least one second processing unit are both the longest processing duration;
[0123] The data processing module 1005 is used to control at least one first processing unit and at least one second processing unit to process multiple groups of data to be processed in a pipeline manner. The data processing device 1000 provided in the above embodiment can implement the technical solution described in the above data processing method embodiment. The specific implementation principles of the above modules or units can refer to the corresponding contents in the above data processing method embodiment, which will not be repeated here.
[0124] like Fig.11 As shown, the present invention also provides an electronic device 1100. The electronic device 1100 includes a processor 1101, a memory 1102 and a display 1103. Fig.11 Only some components of the electronic device 1100 are shown, but it should be understood that it is not required to implement all of the components shown, and more or fewer components may be implemented instead.
[0125] In some embodiments, the processor 1101 may be a central processing unit (CPU), a microprocessor or other data processing chip, used to run program codes stored in the memory 1102 or process data, such as the data processing method of the present invention.
[0126] In some embodiments, the processor 1101 may be a single server or a server group. The server group may be centralized or distributed. In some embodiments, the processor 1101 may be local or remote. In some embodiments, the processor 1101 may be implemented in a cloud platform. In one embodiment, the cloud platform may include a private cloud, a public cloud, a hybrid cloud, a community cloud, a distributed cloud, an internal cloud, a multi-cloud, etc., or any combination thereof.
[0127] In some embodiments, the memory 1102 may be an internal storage unit of the electronic device 1100, such as a hard disk or memory of the electronic device 1100. In other embodiments, the memory 1102 may also be an external storage device of the electronic device 1100, such as a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc. equipped on the electronic device 1100.
[0128] Furthermore, the memory 1102 may include both an internal storage unit of the electronic device 1100 and an external storage device. The memory 1102 is used to store application software installed in the electronic device 1100 and various data.
[0129] In some embodiments, the display 1103 may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, an OLED (Organic Light-Emitting Diode) touch device, etc. The display 1103 is used to display information on the electronic device 1100 and to display a visual user interface. The components 1101-1103 of the electronic device 1100 communicate with each other via a system bus.
[0130] In some embodiments of the present invention, when the processor 1101 executes the data processing program in the memory 1102, the following steps may be implemented:
[0131] Determining a plurality of processing steps for each group of data to be processed in the plurality of groups of data to be processed;
[0132] determining at least one first processing step processed by at least one first processing unit and at least one second processing step processed by at least one second processing unit among a plurality of processing steps;
[0133] Obtaining multiple initial processing times corresponding to multiple processing steps, and determining a maximum processing time according to the multiple initial processing times;
[0134] Controlling the processing duration of at least one first processing unit and at least one second processing unit so that the processing duration of each first processing unit in the at least one first processing unit and the processing duration of each second processing unit in the at least one second processing unit are both the longest processing duration;
[0135] Controlling at least one first processing unit and at least one second processing unit to process multiple groups of to-be-processed data in a pipeline manner.
[0136] It should be understood that: when the processor 1101 executes the data processing program in the memory 1102, in addition to the above functions, other functions can also be implemented. For details, please refer to the description of the corresponding method embodiment above.
[0137] Furthermore, the embodiment of the present invention does not specifically limit the type of the electronic device 1100 mentioned, and the electronic device 1100 may be a portable electronic device such as a mobile phone, a tablet computer, a personal digital assistant (PDA), a wearable device, a laptop computer, etc. Exemplary embodiments of portable electronic devices include but are not limited to portable electronic devices equipped with IOS, Android, Microsoft or other operating systems. The above-mentioned portable electronic devices may also be other portable electronic devices, such as a laptop computer with a touch-sensitive surface (e.g., a touch panel). It should also be understood that in some other embodiments of the present invention, the electronic device 1100 may not be a portable electronic device, but a desktop computer with a touch-sensitive surface (e.g., a touch panel).
[0138] Accordingly, an embodiment of the present application also provides a computer-readable storage medium, which is used to store computer-readable programs or instructions. When the program or instructions are executed by a processor, the steps or functions in the data processing method provided in the above-mentioned method embodiments can be implemented.
[0139] Those skilled in the art will appreciate that all or part of the processes of the above-mentioned embodiments can be implemented by instructing related hardware (such as a processor, a controller, etc.) through a computer program, and the computer program can be stored in a computer-readable storage medium, wherein the computer-readable storage medium is a disk, an optical disk, a read-only storage memory, or a random access memory, etc.
[0140] The data processing method, device, electronic device and readable storage medium provided by the present invention are introduced in detail above. Specific examples are used in this article to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea. At the same time, for those skilled in the art, according to the idea of the present invention, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present invention.
Claims
1. A data processing method, characterized in that: Used to process multiple groups of to-be-processed data based on a field programmable gate array and a microprocessor, wherein the field programmable gate array includes at least one first processing unit, and the microprocessor includes at least one second processing unit; The data processing method comprises: Determining a plurality of processing steps for each group of data to be processed in a plurality of groups of data to be processed; determining at least one first processing step processed by the at least one first processing unit and at least one second processing step processed by the at least one second processing unit among the plurality of processing steps; Acquire multiple initial processing durations corresponding to the multiple processing steps, and determine a longest processing duration according to the multiple initial processing durations; Controlling the processing durations of the at least one first processing unit and the at least one second processing unit so that the processing durations of each first processing unit in the at least one first processing unit and each second processing unit in the at least one second processing unit are both the longest processing duration; The at least one first processing unit and the at least one second processing unit are controlled to process the multiple groups of to-be-processed data in a pipeline manner.
2. The data processing method according to claim 1, characterized in that: The step of determining a plurality of processing steps for each group of the data to be processed in the plurality of groups of data to be processed comprises: Determining a plurality of initial processing steps of the data to be processed based on a preset division rule; The multiple initial processing steps are merged based on a preset merging rule to obtain the multiple processing steps.
3. The data processing method according to claim 1, characterized in that: The determining of at least one first processing step processed by the at least one first processing unit and at least one second processing step processed by the at least one second processing unit among the plurality of processing steps comprises: Obtaining a step feature of each of the multiple processing steps; At least one first processing step processed by the at least one first processing unit and at least one second processing step processed by the at least one second processing unit among the multiple processing steps are determined based on a preset division rule and the step characteristics.
4. The data processing method according to claim 1, characterized in that: The controlling the processing duration of the at least one first processing unit and the at least one second processing unit so that the processing duration of each first processing unit in the at least one first processing unit and the processing duration of each second processing unit in the at least one second processing unit are both the longest processing duration, includes: Obtaining initial processing durations of each of the first processing units and each of the second processing units; Determine a processing time difference according to the initial processing time and the maximum processing time; The start and stop of each of the first processing units and each of the second processing units are controlled according to the processing time difference, so that the processing time of each of the first processing units and each of the second processing units is the longest processing time.
5. The data processing method according to claim 1, characterized in that: The multiple groups of data to be processed include first data to be processed and second data to be processed, the first data to be processed and the second data to be processed both include first target processing steps and second target processing steps arranged in sequence, the at least one first processing unit includes a first target processing unit that processes the first target processing step, and the at least one second processing unit includes a second target processing unit that processes the second target processing step.
6. The data processing method according to claim 5, characterized in that: The controlling the at least one first processing unit and the at least one second processing unit to process the plurality of groups of to-be-processed data in a pipeline manner comprises: Acquire a processing signal, the first target processing unit responds to the processing signal, and processes a first target processing step of the first data to be processed, and generates a first processing completion signal when the first target processing step of the first data to be processed is completed; The second target processing unit responds to the first processing completion signal and processes a second target processing step of the first data to be processed, and generates a second processing completion signal when the second target processing step of the first data to be processed is completed; The first target processing unit responds to the first processing completion signal and processes the first target processing step of the second data to be processed; The second target processing unit responds to the second processing completion signal and processes a second target processing step of the second data to be processed.
7. The data processing method according to claim 1, characterized in that: The multiple groups of data to be processed include m groups of data to be processed, and the data to be processed include n processing steps, and the data processing method further includes: Constructing n storage areas corresponding to the n processing steps one by one; Obtaining processing results of each group of the data to be processed; The i*n+jth group of data to be processed is stored in the jth storage area; Among them, i=0,1,…;j=1,2,…n;n=2,3,…;m=2,3,….
8. A data processing device, characterized in that: Used to process multiple groups of to-be-processed data based on a field programmable gate array and a microprocessor, wherein the field programmable gate array includes at least one first processing unit, and the microprocessor includes at least one second processing unit; The data processing device comprises: A processing step determination module, used to determine a plurality of processing steps for each group of data to be processed in a plurality of groups of data to be processed; a processing step division module, configured to determine at least one first processing step processed by the at least one first processing unit and at least one second processing step processed by the at least one second processing unit among the plurality of processing steps; A processing duration acquisition module, used to acquire multiple initial processing durations corresponding to the multiple processing steps, and determine a maximum processing duration according to the multiple initial processing durations; a processing duration control module, used to control the processing durations of the at least one first processing unit and the at least one second processing unit, so that the processing durations of each first processing unit in the at least one first processing unit and each second processing unit in the at least one second processing unit are both the longest processing duration; The data processing module is used to control the at least one first processing unit and the at least one second processing unit to process the multiple groups of data to be processed in a pipeline manner.
9. An electronic device, characterized in that: comprising a memory and a processor, wherein: The memory is used to store programs; The processor is coupled to the memory and is used to execute the program stored in the memory to implement the steps in the data processing method described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: Used to store computer-readable programs or instructions, which, when executed by a processor, can implement the steps of the data processing method described in any one of claims 1 to 7.
Citation Information
Patent Citations
Data processing method and device, electronic equipment and readable storage medium
CN112068965A
Task processing method and device based on heterogeneous chip, storage medium and electronic equipment
CN114296937A
System for configurating FPGA data and method therefor
KR1020150027391A
Bulk data processing method and apparatus, and computer device and storage medium
WO2020224216A1
