Data processing method and device and electronic equipment
By processing multiple independent regions in parallel in pyramid image processing and adjusting data reading and calculation rates, the problem of low processing performance in the prior art is solved, and efficient image processing and system responsiveness are achieved.
Patent Information
- Application Number
- CN202411403680.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-09
- Publication Date
- 2025-01-10
AI Technical Summary
In the existing pyramid image processing technology, since the in-layer computing depends on the results of the previous layer, the processing process is serially performed, with low performance, and complex data transmission and synchronization, difficult computing resource management, and complex processing order optimization.
By processing multiple independent areas in parallel within the same layer of the pyramid image, using the processing results as input to the next layer, and adjusting the bandwidth or parallelism according to the data reading and calculation rate, ensuring that the difference does not exceed the threshold, so as to achieve parallel processing and data flow.
It greatly improves computing speed, makes full use of multi-core processors, reduces memory usage, avoids repeated calculations, improves resource utilization, adapts to image processing tasks of different scales and complexities, and improves processing efficiency and system responsiveness.
Smart Images

Figure CN119295291A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present disclosure relate to the field of image processing technology, and in particular, to a data processing method, device and electronic device. Background Art
[0002] At present, in the use of the pyramid structure, each layer of the pyramid image needs to perform the intra-layer pyramid calculation based on the calculation results of the first layer of the pyramid, and then process each layer of the pyramid in turn according to the above process, and finally complete the overall algorithm. When calculating within the pyramid layer, there is a specific algorithm that needs to calculate multiple independent areas, namely key areas, in the image, and the data reading of the next layer of a single independent area needs to rely on the intra-layer calculation results of the previous layer. Therefore, only after the intra-layer calculation of the previous layer is completed can the data reading and intra-layer calculation of the next layer be performed.
[0003] In the existing scheme, since the data reading and intra-layer calculation of the next layer can only be performed after the intra-layer calculation of the previous layer is completed, in the existing scheme, the above algorithm is in the order of performing multiple pyramid cycles in order to obtain the result of a single key area, that is, first perform the intra-layer calculation of the Nth layer of the pyramid of a key area, read the corresponding key area of the N-1th layer according to the calculation result, and then perform the intra-layer calculation of the N-1th layer of the pyramid, and so on, until the highest layer of the pyramid, obtain the algorithm calculation result of the key area, and then perform the calculation of the next key area from the lowest layer to the highest layer of the pyramid. Therefore, in the existing scheme, the calculation of multiple key areas is performed in series, and the performance is low. Summary of the invention
[0004] In view of this, the embodiments of the present disclosure provide a data processing method, device and electronic device, which are helpful to solve the problem of poor processing performance in the prior art.
[0005] In a first aspect, an embodiment of the present disclosure provides a data processing method, including:
[0006] Receive image data, wherein the image is a pyramid image with N layers, and each layer of the pyramid image includes M regions; wherein both N and M are natural numbers not less than 1, and the M regions are independent of each other;
[0007] At least one region in at least one layer of the pyramid image is processed separately according to the order of the layers of the pyramid image to obtain a processing result of the last layer of the pyramid image.
[0008] According to a specific implementation manner of the embodiment of the present disclosure, at least one region in at least one layer of the pyramid image is processed separately according to a processing rule of using processing results of any m regions of the nth layer of the pyramid image as inputs of m regions corresponding to the n+1th layer; wherein n is a natural number not less than 1 and not greater than N-1, and m is a natural number not less than 1 and not greater than M.
[0009] According to a specific implementation manner of the embodiment of the present disclosure, when processing at least one area of the m areas corresponding to the n+1th layer of the pyramid image, at least one area of the first area of any layer with a layer number less than n+1 is processed at the same time; wherein the first area is an area that has not been processed in the layer.
[0010] According to a specific implementation of the embodiment of the present disclosure, the separately processing at least one area in at least one layer of the pyramid image according to the order of the layers of the pyramid image includes:
[0011] Regions in any layer of the pyramid image are processed in parallel.
[0012] According to a specific implementation of the embodiment of the present disclosure, the parallel processing of the regions in any layer of the pyramid image includes:
[0013] m areas are selected for parallel processing, where m is a natural number not less than 2 and not greater than M.
[0014] According to a specific implementation manner of an embodiment of the present disclosure, the processing includes data reading and data calculation, and the regions in any layer of the pyramid image are processed in parallel in the order of completing the data reading of the mth region and then performing data calculation on the mth region; wherein m is a natural number not less than 1 and not greater than M.
[0015] According to a specific implementation of the embodiment of the present disclosure, after the data of the mth area is read, data calculation is performed on the mth area, further comprising:
[0016] Obtaining the rates of the data reading and the data calculation and calculating the difference;
[0017] If the difference exceeds the threshold, the data reading rate is adjusted by increasing or decreasing the data reading bandwidth so that the difference is not greater than the threshold; wherein the threshold is the maximum allowable difference between the data reading rate and the data calculation rate.
[0018] According to a specific implementation of the embodiment of the present disclosure, if the difference exceeds the threshold, the rate of data calculation is adjusted by increasing or decreasing the parallelism of data calculation so that the difference is not greater than the threshold.
[0019] In a second aspect, an embodiment of the present disclosure provides a data processing device, including:
[0020] A receiving module, used for receiving image data, wherein the image is a pyramid image with N layers, and each layer of the pyramid image includes M regions; wherein both N and M are natural numbers not less than 1, and the M regions are independent of each other;
[0021] The calculation module is used to process at least one area in at least one layer of the pyramid image respectively according to the order of the layers of the pyramid image, so as to obtain a processing result of the last layer of the pyramid image.
[0022] In a third aspect, an embodiment of the present disclosure further provides an electronic device, the electronic device comprising:
[0023] at least one processor; and,
[0024] a memory communicatively connected to the at least one processor; wherein,
[0025] The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the data processing method in the aforementioned first aspect or any implementation of the first aspect.
[0026] The beneficial effects of the embodiments of the present disclosure are as follows: through the scheme of the present disclosure, in order to solve the problem of poor performance of the traditional method, considering that multiple key areas in the same layer of the pyramid are independent and have no coupling relationship in data reading, by processing multiple areas at the same time, the calculation speed can be greatly improved, and the advantages of multi-core processors can be fully utilized; the layer-by-layer processing and feedback method allows the results of each layer to be used for the calculation of subsequent layers more quickly, thereby improving the overall efficiency; only the required regional data needs to be loaded in the current processing layer, reducing the memory usage, which is more obvious when processing high-resolution images; by caching the results of the processed areas, repeated calculations can be avoided and resource utilization can be improved; the flexible setting of adjustable parameters: N and M allows the scheme to adapt to image processing tasks of different scales and complexities; in the future, new processing layers or areas can be added as needed, or new algorithms can be introduced for optimization, which significantly improves processing acceleration and efficiency, enables the system to process large-scale image data more efficiently, and realizes data reading optimization, calculation pipeline optimization and system responsiveness improvement. BRIEF DESCRIPTION OF THE DRAWINGS
[0027] In order to more clearly illustrate the technical solutions of the embodiments of the present disclosure, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present disclosure. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0028] Figure 1 A flowchart of a data processing method provided by an embodiment of the present disclosure;
[0029] Figure 2 A schematic diagram of a multi-layer pyramid image data processing flow provided by an embodiment of the present disclosure;
[0030] Figure 3 A schematic diagram of a flow chart of regional data reading and calculation pipeline provided in an embodiment of the present disclosure;
[0031] Figure 4 A schematic diagram of the structure of a data processing device provided in an embodiment of the present disclosure;
[0032] Figure 5 A schematic diagram of an electronic device provided in an embodiment of the present disclosure. DETAILED DESCRIPTION
[0033] The embodiments of the present disclosure are described in detail below with reference to the accompanying drawings.
[0034] The following describes the embodiments of the present disclosure through specific examples, and those skilled in the art can easily understand other advantages and effects of the present disclosure from the contents disclosed in this specification. Obviously, the described embodiments are only a part of the embodiments of the present disclosure, rather than all of the embodiments. The present disclosure can also be implemented or applied through other different specific embodiments, and the details in this specification can also be modified or changed in various ways based on different viewpoints and applications without departing from the spirit of the present disclosure. It should be noted that the following embodiments and features in the embodiments can be combined with each other without conflict. Based on the embodiments in the present disclosure, all other embodiments obtained by ordinary technicians in the field without making creative work are within the scope of protection of the present disclosure.
[0035] It should be noted that various aspects of the embodiments within the scope of the appended claims are described below. It should be apparent that the aspects described herein may be embodied in a wide variety of forms, and any specific structure and / or function described herein is merely illustrative. Based on the present disclosure, it should be understood by those skilled in the art that an aspect described herein may be implemented independently of any other aspect, and two or more of these aspects may be combined in various ways. For example, any number of aspects described herein may be used to implement the device and / or practice the method. In addition, other structures and / or functionalities other than one or more of the aspects described herein may be used to implement this device and / or practice this method.
[0036] It should also be noted that the illustrations provided in the following embodiments are only schematic illustrations of the basic concept of the present disclosure. The drawings only show components related to the present disclosure rather than being drawn according to the number, shape and size of components in actual implementation. In actual implementation, the type, quantity and proportion of each component may be changed arbitrarily, and the component layout may also be more complicated.
[0037] Additionally, in the following description, specific details are provided to facilitate a thorough understanding of the examples. However, it will be understood by those skilled in the art that the aspects described may be practiced without these specific details.
[0038] The shortcomings of existing multi-layer pyramid image processing mainly include the following aspects:
[0039] Dependence on the results of the previous layer: Multi-layer pyramid image processing usually involves relying on the results of the previous layer of the pyramid to generate the features or information of the current layer. This dependency leads to the order of the processing flow, that is, the processing of the previous layer must be completed before the processing of the next layer can be carried out. This order leads to the existing technology using serial processing when processing pyramid images.
[0040] Data transfer and synchronization: Data transfer and synchronization between pyramid layers is also a challenge. Although each layer can be processed in an independent computing unit, in the process of data pipelining, it is necessary to ensure that the previous layer is processed and the results are available before the data is passed to the next layer. This data transfer and synchronization will introduce additional delays and complexity, especially in applications with high processing speed requirements and strong real-time requirements.
[0041] Computational resource allocation: Different levels of the pyramid may require different computing resources. For example, high-resolution layers may require more computing resources to process more complex image information. When performing pipeline processing, these computing resources need to be managed and allocated effectively to avoid resource competition and processing delays.
[0042] Processing order optimization: Although the overall performance can be optimized by adjusting the processing order, in practical applications, how to determine the optimal processing order is a complex issue. Different processing orders may affect the quality of the final result and real-time performance, and it is necessary to comprehensively consider various factors to weigh and optimize.
[0043] In summary, the difficulty of implementing pipeline processing of multi-layer pyramid images mainly stems from its inherent data dependency, data transmission and synchronization issues, computing resource management, and optimization requirements for processing order. To overcome these difficulties, it is necessary to comprehensively consider factors such as algorithm design, hardware support, and system architecture optimization to achieve efficient pipeline processing of multi-layer pyramid images.
[0044] The embodiment of the present disclosure provides a data processing method, which can be applied in an image processing process.
[0045] See also Figure 1 , is a flow chart of a data processing method provided by an embodiment of the present disclosure. Figure 1 As shown, the data processing method mainly includes the following steps:
[0046] Receive image data, wherein the image is a pyramid image with N layers, and each layer of the pyramid image includes M regions; wherein both N and M are natural numbers not less than 1, and the M regions are independent of each other;
[0047] At least one region in at least one layer of the pyramid image is processed separately according to the order of the layers of the pyramid image to obtain a processing result of the last layer of the pyramid image.
[0048] In specific implementation, a pyramid image with N layers can be first received through an image data input interface, and corresponding algorithm parameters can be obtained through an algorithm parameter data input interface. Each layer of the pyramid image contains M regions. Considering that the regions in the layer are independent of each other and have no coupling relationship with each other in data reading, at least one region in at least one layer of the pyramid image can be processed separately according to the order of the layers of the pyramid image to obtain the processing result of the last layer of the pyramid image. The method disclosed in the present invention realizes independent and parallel processing of each region in the layer through layered processing and regional independence, and reads the pyramid image and algorithm parameters through an input interface, and gradually processes the image from the first layer to the last layer. The result of each layer is the input of the next layer, and finally a complete processing result is obtained. This method is efficient and easy to manage, and provides a clear idea for complex image processing tasks.
[0049] On the basis of the above embodiment, at least one region in at least one layer of the pyramid image is processed respectively according to a processing rule of using processing results of any m regions of the nth layer of the pyramid image as inputs of m regions corresponding to the n+1th layer; wherein n is a natural number not less than 1 and not greater than N-1, and m is a natural number not less than 1 and not greater than M.
[0050] In specific implementation, when processing the pyramid image, according to a rule, the processing results of certain areas in the current layer (nth layer) are used as the input of the corresponding areas in the next layer (n+1th layer) for processing. Specifically:
[0051] Pyramid image: refers to an image with a hierarchical structure, each layer may have different resolutions or features.
[0052] Layer number (n): indicates the layer currently being processed, ranging from 1 to N-1 (N is the total number of layers);
[0053] Region (m): refers to the region selected in the current layer, ranging from 1 to M (M is the total number of regions in this layer).
[0054] Processing result transfer: The result of the current layer processing will affect the processing of the next layer. This method can improve the effect and accuracy of image processing through information transfer between layers, and enhance the coherence and depth of image analysis; through the processing results of the previous layer, the subsequent layers can more accurately identify and analyze features and reduce errors; layer-by-layer processing can effectively capture subtle changes in the image and improve the overall image quality; processing rules can be adjusted as needed to adapt to different types of image analysis tasks; using inter-layer results, reduce redundant calculations and improve processing efficiency.
[0055] In another embodiment, the specific steps are as follows:
[0056] 1. Construct pyramid image:
[0057] Given an input image, we first construct a pyramid image that contains N layers, with each layer having a gradually decreasing resolution. For example, the first layer is the original image, the second layer is the downsampled image, and so on, until the Nth layer.
[0058] 2. Define the area:
[0059] In each layer, the image is divided into M regions. For example, in the second layer image, it can be divided into 4 regions (m=1, 2, 3, 4), each region corresponding to a different part of the image.
[0060] 3. Regional processing:
[0061] For each region in the nth layer (assuming n=2), a specific processing algorithm is applied, such as edge detection, blur processing, or feature extraction. For example, edge detection is performed on region 1 of the second layer to obtain processing result A1, blur processing is performed on region 2 to obtain processing result A2, and so on.
[0062] 4. Input to the next layer:
[0063] The processing results of each region in the nth layer are used as the input of the n+1th layer. For example, the processing results A1, A2, etc. are used as the input of the corresponding regions in the third layer. In this way, the processing results of region 1 may be used for the feature re-extraction process of region 1 in the third layer, the results of region 2 are used for region 2 in the third layer, and so on.
[0064] 5. Iteration layer by layer:
[0065] Continue processing according to the above rules until all regions are processed in layer N. Finally, feature maps of each layer are obtained, which can be used for subsequent classification, detection and other tasks.
[0066] Based on the above embodiment, when processing at least one region among m regions corresponding to the n+1th layer of the pyramid image, at least one region of the first region of any layer whose number of layers is less than n+1 is processed at the same time; wherein the first region is a region that has not been processed in the layer.
[0067] In specific implementation, when processing a certain area of the n+1th layer of the pyramid image, the areas smaller than the n+1th layer are also processed. This multi-layer processing can utilize features from different levels to improve the overall analysis effect. The first area refers to the area that has not been processed in this layer. This means that features can be extracted from new areas, avoiding repeated processing and increasing the diversity of information.
[0068] By processing regions from different layers simultaneously, feature information from each layer can be integrated together to obtain a more comprehensive understanding. Lower-level regions may contain important contextual information that helps improve the analysis quality of higher-level regions. By processing regions from different layers in parallel, the overall processing speed can be accelerated, avoiding the inefficiency of processing a single layer one by one.
[0069] The introduction of unprocessed areas can help the model better learn complex features and improve its ability to understand images.
[0070] In another embodiment, the specific steps are as follows:
[0071] 1. Construct pyramid image
[0072] Suppose we have a high-resolution natural scene image. We construct a pyramid image consisting of 3 layers: Layer 1 (original image, resolution 512x512)
[0073] Layer 2 (downsampled image, resolution 256x256)
[0074] Layer 3 (downsampled again to 128x128 resolution)
[0075] 2. Divide the area:
[0076] In each layer, the image is divided into multiple regions. For example, layer 1 is divided into 4 regions (A1, A2, A3, A4)
[0077] Layer 2 is divided into 4 corresponding areas (B1, B2, B3, B4)
[0078] Layer 3 is divided into 4 corresponding areas (C1, C2, C3, C4)
[0079] 3. Processing layers and areas:
[0080] Processing area in layer 1: Start processing the area in layer 1. For example, perform edge detection on areas A1 and A2.
[0081] Processing area of layer 2: Start processing the area in layer 2. For example, perform edge detection on area B1.
[0082] At the same time, the unprocessed area of layer 1 (which is a layer smaller than the currently processed layer 2) is processed: In this process, the unprocessed area A3 of layer 1 is fuzzy processed. When the area of layer 1 is divided, A3 has not been processed before, so it can be processed at this stage.
[0083] 4. Result delivery:
[0084] After processing area B1 of layer 2, a feature map B1' (edge detection result) is obtained. At the same time, after processing area A3 of layer 1, a blur result A3' is obtained.
[0085] The features of B1' are combined with A3' for processing in subsequent layers. This method can improve the richness of information and effectively combine features at different levels.
[0086] 5. Continue to iterate:
[0087] Enter the processing stage of layer 3. When processing area C1 of layer 3, the unprocessed area A4 of layer 1 can be selected at the same time for feature extraction (such as color histogram analysis).
[0088] After processing, the layer 3 region C1 obtains the C1' feature map, and after processing, A4 obtains the A4' feature map.
[0089] 6. Final integration:
[0090] After all levels of processing are completed, the processing results of all levels and regions are collected, and comprehensive feature analysis can be performed for image classification or target detection.
[0091] In summary, this step helps to improve the effect and efficiency of image analysis through interactive processing between layers, while avoiding information loss and repeated calculations.
[0092] Furthermore, the separately processing at least one region in at least one layer of the pyramid image according to the order of the layers of the pyramid image includes:
[0093] Regions in any layer of the pyramid image are processed in parallel.
[0094] In practice, the hierarchical structure of the pyramid image allows processing of regions at different resolutions and levels of detail. Each layer represents a different feature abstraction, which provides rich context for image analysis.
[0095] Parallel processing can significantly improve processing efficiency because multiple regions can be operated on at the same time, making full use of computing resources. By processing multiple regions simultaneously in the same layer or different layers, the features of each region can be extracted and learned faster, especially in high-dimensional data. In traditional sequential processing, the processing time increases linearly with the complexity of the image, while parallel processing can shorten this time, especially in multi-core or distributed computing environments. Parallel processing enables the model to be exposed to more diverse features and regions, enhancing its overall understanding and robustness of the image. This approach can help the model better cope with changes and noise.
[0096] Processing multiple regions simultaneously requires well-designed parallel strategies and data management to ensure consistency and accuracy of processing. This may involve techniques such as task partitioning, load balancing, and result integration. This processing approach allows flexible adjustment of processing strategies based on different image features and task requirements to better meet the needs of specific applications.
[0097] For the processing of inter-layer areas, parallel processing can be adopted. Assuming that there are M key areas in a layer, you can choose to read or calculate only one area at a time in a layer, or you can read or calculate m areas in parallel at a time in a layer. In this case, the overall processing time of M areas can be shortened by m times under m parallelism.
[0098] In summary, parallel processing according to the order of the layers of the pyramid image can effectively improve the efficiency and accuracy of image analysis, while enhancing the learning ability and adaptability of the model.
[0099] Based on the above embodiment, the parallel processing of the regions in any layer of the pyramid image includes:
[0100] m areas are selected for parallel processing, where m is a natural number not less than 2 and not greater than M.
[0101] In specific implementation, when performing parallel processing of regions at any layer of the pyramid image, the step of selecting m regions is crucial. First, setting the range of m to a natural number not less than 2 and not greater than M can effectively ensure the flexibility of processing and the optimal use of resources. Through parallelization, multiple regions can be processed simultaneously, significantly improving computational efficiency. Selecting a suitable m value can be dynamically adjusted according to the complexity of the specific task and available resources to ensure load balancing and task coordination. In addition, ensuring that the calculation is performed after the data is read helps maintain data integrity and avoid errors, thereby improving the accuracy and reliability of the final processing results.
[0102] In another embodiment, the specific steps are as follows:
[0103] 1. Construct pyramid image:
[0104] Starting from a 512x512 color image, build a 3-layer pyramid image: Layer 1 (original image, resolution 512x512)
[0105] Layer 2 (256x256)
[0106] Layer 3 (128x128)
[0107] 2. Divide the area:
[0108] Each layer of the image is divided into 4 regions (A1, A2, A3, A4; B1, B2, B3, B4; C1, C2, C3, C4), for a total of 12 regions.
[0109] 3. Select areas for parallel processing:
[0110] Assume that areas A1 and A2 of layer 1 are selected for parallel processing.
[0111] Use multithreading or multiprocessing techniques to process these 2 areas simultaneously.
[0112] 4. Parallel processing tasks:
[0113] Area A1: Perform color histogram analysis.
[0114] Area A2: Perform edge detection (such as Canny algorithm).
[0115] 5. Result synthesis:
[0116] Synchronously collect the processing results of each area: the color histogram of area A1.
[0117] Edge feature map of area A2.
[0118] 6. Further processing:
[0119] Combine all processing results, for example, concatenate the color histogram with the edge feature map.
[0120] The texture feature map is fused with the smoothed image for subsequent classification or recognition tasks.
[0121] 7. Final integration:
[0122] Integrate features from all levels and input them into a classification model (such as SVM or deep learning network) for image classification or target detection.
[0123] Furthermore, the processing includes data reading and data calculation, and the regions in any layer of the pyramid image are processed in parallel in the order of completing the data reading of the mth region and then performing data calculation on the mth region; wherein m is a natural number not less than 1 and not greater than M.
[0124] In the specific implementation, in the parallel processing process, the order of data reading and calculation is emphasized, that is, the calculation is performed after the data reading is completed. By separating data reading from calculation, the processing speed and accuracy are improved. In this process, data is first read in parallel from different areas of the image, which means that data from multiple areas can be extracted at the same time, which can effectively utilize system resources and improve overall efficiency. After that, for each area, specific calculation analysis will be performed only after its data is fully read. This sequential execution method ensures the integrity of the data during calculation and avoids potential errors. In addition, the flexibility of area selection (using the natural number m to represent the area from 1 to M) allows us to adjust the processing tasks according to needs, thereby optimizing feature extraction, which is particularly suitable for application scenarios that require processing high-resolution images, such as computer vision or image recognition. In this way, the processing performance can be significantly improved and better results can be obtained in practical applications. Specifically, the information read by the data includes the coordinate values corresponding to the N-1 layer area and the corresponding area selection range value.
[0125] For example, the coordinate values corresponding to the area are:
[0126] Assume that in the second layer (low resolution), the read area coordinates are: upper left corner coordinate (x1, y1) = (50, 50), lower right corner coordinate (x2, y2) = (100, 100), which means that a 100x100 pixel area is selected in this layer.
[0127] The area selection range values are:
[0128] The selected range value corresponding to this area may be a certain feature, for example: average color value: the average RGB value of the area.
[0129] Comparison of N-1 layer areas:
[0130] Assuming that layer N-1 is the first layer (higher resolution), the same coordinates can be used for comparison: the corresponding area coordinates of the first layer are also (25,25) to (50,50).
[0131] The corresponding feature values may include more detailed color values and texture information.
[0132] After the calculation of each layer area is completed, the calculation result within the layer is obtained. In addition to the processing result of the area within the current layer, the calculation result also includes the calculation result of the reading information and algorithm parameter data of the corresponding area of the next layer.
[0133] In another embodiment, for example, medical images such as CT or MRI images are processed and the structure of the pyramid image is used to improve the accuracy of tumor detection.
[0134] In this embodiment, the medical image is first converted into a pyramid image to form multiple resolution levels, each of which includes multiple regions that may represent different tissue features.
[0135] Data reading: Using multithreading technology, image data is read in parallel from various regions of the pyramid image (such as layer 1, layer 2, etc.). For example, in the first layer, there are 5 regions (R1, R2, R3, R4, R5), and data reading can be performed simultaneously, that is, extracting data from R1, R2, R3, R4, and R5.
[0136] Sequential calculation: Once the data reading of the mth region (assuming it is R3) is completed, the system immediately performs data calculations on R3, such as applying convolutional neural networks (CNN) for feature extraction and tumor identification. Only after the calculation of R3 is completed will the next region (such as R4) be processed.
[0137] Iterative processing: This process continues until the data of all regions has been read and calculated. Specifically, when the data of regions R1 to R5 of layer 2 is read, the calculations are performed in sequence to ensure that each region can be fully analyzed.
[0138] This design ensures the correctness of data dependencies and avoids calculation errors caused by reading incomplete data. Through parallel reading and calculation, the entire processing process can be divided into multiple small tasks, so that it can be completed quickly even when the amount of data is large, improving processing efficiency. When implementing parallel processing, an effective task scheduling mechanism is required to ensure that the processing of m regions can be efficiently coordinated. For example, a thread pool or asynchronous processing mechanism can be used to manage parallel tasks. For different regions, dynamic load balancing may be required based on their complexity and size to ensure that the resource utilization of each processing unit is maximized to avoid some regions being processed too quickly while other regions lag behind. During parallel processing, if the processing of a certain region fails, a rollback mechanism or a retry mechanism can be designed to improve the robustness of the entire processing flow. By dynamically adjusting the value of m, it can adapt to different scenarios and needs, thereby achieving higher flexibility and adaptability when processing complex images.
[0139] In summary, this step aims to improve the processing efficiency and accuracy of pyramid images by parallelizing regional processing and reasonably arranging data reading and calculation, while ensuring the robustness and adaptability of the system.
[0140] On the basis of the above embodiment, after the data of the mth area is read, data calculation is performed on the mth area, further comprising:
[0141] Obtaining the rates of the data reading and the data calculation and calculating the difference;
[0142] If the difference exceeds the threshold, the data reading rate is adjusted by increasing or decreasing the data reading bandwidth so that the difference is not greater than the threshold; wherein the threshold is the maximum allowable difference between the data reading rate and the data calculation rate.
[0143] In the specific implementation, in the parallel processing of the pyramid image, it is key to ensure the efficient coordination of data reading and calculation. Ensure that the data of the mth area is read before the data calculation is performed to avoid the problem of incomplete data during the calculation process. This order maintains the accuracy and consistency of data processing.
[0144] Obtaining the rate of data reading and calculation can monitor the performance between the two in real time. The calculation difference is an important indicator for evaluating system efficiency and reflects the balance of data processing. Setting a maximum allowable difference (threshold) is to prevent excessive imbalance between calculation and reading. This control mechanism can effectively avoid performance bottlenecks caused by data lag. When the difference exceeds the threshold, the bandwidth of data reading is adjusted to balance the reading and calculation rates. Increasing the bandwidth can speed up data reading, while reducing the bandwidth can slow down the reading speed and avoid excessive computing burden. This dynamic adjustment mechanism helps optimize resource usage and ensure smooth operation of the system.
[0145] This adjustment mechanism enables the system to flexibly respond to actual load and performance feedback, adapt to different processing conditions, and maintain an efficient working state. Through real-time monitoring and dynamic adjustment, performance problems caused by too fast or too slow reading speeds, such as memory overflow or idle computing resources, can be effectively prevented. This mechanism not only improves processing efficiency, but also reduces system latency and improves user experience, which is especially important when processing large-scale data.
[0146] In summary, this step ensures the balance between data reading and calculation through real-time monitoring and dynamic adjustment, thereby improving the overall efficiency and stability of pyramid image processing.
[0147] Furthermore, if the difference exceeds the threshold, the rate of data calculation is adjusted by increasing or decreasing the parallelism of data calculation so that the difference is not greater than the threshold.
[0148] In practice, when processing data, it is an important strategy to manage the rate by adjusting the parallelism of data calculations to ensure efficiency and stability. Parallelism refers to the number of computing tasks executed at the same time. By increasing the parallelism, more data can be processed at the same time, thereby increasing the computing rate.
[0149] Monitor the data reading rate and the calculation rate and calculate the difference between the two. This step ensures that performance imbalances can be identified in a timely manner. Set the maximum allowable difference (threshold) to determine when to adjust the parallelism. This threshold helps maintain the efficiency of the system and avoids calculation delays caused by excessive differences.
[0150] If the calculation rate is lower than the reading rate, the number of parallel tasks can be increased to speed up the calculation and utilize more processing resources. On the contrary, if the calculation rate is too fast and the data reading is insufficient, the parallel tasks can be appropriately reduced to avoid excessive calculation requests causing resource waste and calculation overload. Dynamic adjustment of parallelism can optimize the use of computing resources such as CPU and memory, ensure that resources are reasonably allocated, and avoid idleness or overload. This dynamic adjustment mechanism enables the system to flexibly adapt to different load conditions based on real-time performance data and improve overall processing efficiency.
[0151] By adjusting the degree of parallelism, we can effectively prevent performance bottlenecks caused by mismatches between computing speed and data reading speed, ensuring smooth system operation. Maintaining high efficiency and low latency in data processing not only improves system performance, but also improves user experience, especially in application scenarios that require fast response.
[0152] In summary, by adjusting the parallelism of data calculation to manage the rate, the relationship between data reading and calculation can be effectively balanced, thereby improving the overall efficiency and responsiveness of the system.
[0153] The data processing method provided in this embodiment has a series relationship between layers in the key area of the pyramid algorithm. Under the premise that there is no coupling relationship between the data reading between the areas in the layer, by adjusting the calculation order of the key area of the multi-layer pyramid, and by streamlining the calculation and data reading, multiple areas are processed at the same time, which can greatly improve the calculation speed and make full use of the advantages of multi-core processors; the layer-by-layer processing and feedback method enables the results of each layer to be used for the calculation of the subsequent layer more quickly, thereby improving the overall efficiency; only the required regional data needs to be loaded in the current processing layer, reducing the memory usage, which is more obvious when processing high-resolution images; by caching the results of the processed area, repeated calculations can be avoided and resource utilization can be improved; the flexible setting of adjustable parameters: N and M enables the scheme to adapt to image processing tasks of different scales and complexities; in the future, new processing layers or areas can be added as needed, or new algorithms can be introduced for optimization, which significantly improves the processing acceleration and efficiency, enables the system to process large-scale image data more efficiently, and realizes data reading optimization, calculation pipeline optimization and system responsiveness improvement.
[0154] The method of the present disclosure will be further described below in conjunction with a specific embodiment. When in use, after receiving the external input multi-layer pyramid image data and algorithm parameter data, the corresponding processing flow can be as follows: Figure 2 As shown:
[0155] After receiving the pyramid image and algorithm parameters, data processing begins. There are two sets of loop processing. The first set of loop processing is for multi-layer pyramids, and the second set of loop processing is for multiple key areas in a single-layer pyramid. The data reading and calculation of each key area in the second set of loop processing is pipelined. The pipeline process is shown in the attached figure. Figure 3 shown.
[0156] Depending on the algorithm and image size, the time consumption of the two-stage pipeline (data reading and calculation) may be inconsistent. In order to improve the utilization of hardware resources while maintaining the same performance, the two-stage pipeline time is kept close. The data reading rate is adjusted by increasing / decreasing the data reading bandwidth, and the data calculation rate is adjusted by increasing / decreasing the parallelism of data calculation.
[0157] At the same time, in the process of intra-layer calculation, multiple regions can be processed in parallel, that is, multiple regions can be read and calculated in parallel. For example, there are M key regions in a layer, and the present invention reads or calculates one key region at a time in a layer. Here, m regions can be read or calculated at a time in a layer, and the overall processing time of M regions is shortened by m times under m parallelism.
[0158] In the disclosed embodiment, the pyramid layers are described in the order of L_K layer, L_K-1 layer to L_0 layer, but the layer number here can be adjusted according to the algorithm requirements. For example, the processing order is changed to L_0 layer, L_K layer, L_K-2 layer, L_K-1 layer, ..., and a random order like this is also acceptable. The specific order can be adjusted and set according to the algorithm requirements.
[0159] In some image processing algorithms, it is necessary to combine pyramid fusion to calculate multiple key areas of the image. There will be multiple key areas in one frame of the picture. Although the key areas are in the same picture, the processing between key areas is independent from the perspective of image processing. For example, in the anti-shake scene, the key area refers to the image area centered on an image corner point. In anti-shake, there will be 50 corner points in an image that need to be tracked. Each key area is the area centered on each corner point. The final processing result is also the offset of the 50 corner points. The offset of each corner point is obtained by the corresponding corner point of the previous frame image and the corresponding corner point of the current frame image through pyramid fusion, that is, the corner point offset calculation is performed on each layer of the pyramid. At this time, the traditional processing method is to perform pyramid fusion on each key area in turn. For example, there are 3 key areas, A, B, and C, and the pyramid fusion is 3 layers. The processing order is:
[0160] 1. Read the first layer of pyramid of A;
[0161] 2. A's first-level pyramid calculation;
[0162] 3. Read the second pyramid level of A;
[0163] 4. The second level of pyramid calculation of A;
[0164] 5. Read the third pyramid level of A;
[0165] 6. Calculation of the third level of pyramid of A;
[0166] 7. The first level of pyramid reading of B;
[0167] 8. Calculation of the first level of pyramid of B;
[0168] 9. The second level of pyramid reading of B;
[0169] 10.B's second level pyramid calculation;
[0170] 11. The third level of pyramid reading of B;
[0171] 12.3rd level pyramid calculation of B;
[0172] 13.C's first pyramid read;
[0173] 14.C's first level pyramid calculation;
[0174] 15.C's second pyramid read;
[0175] 16.C's second level pyramid calculation;
[0176] 17.C's third pyramid read;
[0177] 18.C's 3rd level pyramid calculation.
[0178] The defect of the traditional method is that since the pyramid fusion processing requires the processing results of the N-1 layer before the Nth layer can be processed, if the processing is performed in the order of the key areas, each layer of the pyramid can only be processed serially in the process, but the hardware can only use the processing resources of one layer of the pyramid in the same time period.
[0179] By using the data processing method disclosed in the present invention, the processing process of the above case is as follows:
[0180] 1. Read the first layer of pyramid of A;
[0181] 2. The first level of pyramid of A is calculated, and the first level of pyramid of B is read at the same time;
[0182] 3. The first level of pyramid of B is calculated, and the first level of pyramid of C is read at the same time;
[0183] 4. The first level of C's pyramid is calculated, and the second level of A's pyramid is read at the same time;
[0184] 5. The second level pyramid of A is calculated, and the second level pyramid of B is read at the same time;
[0185] 6. The second level pyramid of B is calculated, and the second level pyramid of C is read at the same time;
[0186] 7. The second level pyramid of C is calculated, and the third level pyramid of A is read at the same time;
[0187] 5. The third level pyramid of A is calculated, and the third level pyramid of B is read at the same time;
[0188] 6. The third level pyramid of B is calculated, and the third level pyramid of C is read at the same time;
[0189] 7.3rd level pyramid calculation of C.
[0190] In another embodiment, there are four key areas A, B, C, and D, and the pyramid fusion is three layers. Then, the pyramid fusion processing flow of the four key areas is as follows:
[0191] 1. Initial Setup
[0192] Key areas and pyramid levels:
[0193] Four key areas: A, B, C, D.
[0194] Number of pyramid levels: Each key area has three pyramid levels.
[0195] 2. Processing Flow
[0196] First round of processing:
[0197] A's first level pyramid reads.
[0198] A's first-level pyramid is calculated, while B's first-level pyramid is read.
[0199] The first level of B's pyramid is calculated, while the first level of C's pyramid is read.
[0200] The first level of C's pyramid is calculated, while the first level of D's pyramid is read.
[0201] The first level of pyramid calculation of D.
[0202] Second round of processing:
[0203] A's 2nd level pyramid reads.
[0204] A's second-level pyramid is calculated, while B's second-level pyramid is read.
[0205] The second level of B's pyramid is calculated, while the second level of C's pyramid is read.
[0206] The second level pyramid of C is calculated, and the second level pyramid of D is read at the same time.
[0207] The second level of pyramid calculation of D.
[0208] The third round of processing:
[0209] A's 3rd level pyramid reads.
[0210] A's 3rd level pyramid is calculated, while B's 3rd level pyramid is read.
[0211] The 3rd level pyramid of B is calculated, while the 3rd level pyramid of C is read.
[0212] The third level of C's pyramid is calculated, while the third level of D's pyramid is read.
[0213] The third level of pyramid calculation of D.
[0214] Each key area is calculated and data exchanged in each layer of the three-layer pyramid, and finally the respective pyramid fusion results are obtained.
[0215] This processing flow ensures that at each pyramid level, data from four different key areas are fully calculated and interacted to achieve the final pyramid fusion effect.
[0216] In another embodiment, the above specific steps may also be as follows:
[0217] First round of processing:
[0218] Read the first layer of pyramid for regions A, B, C, and D: Read data for regions A, B, C, and D from low-resolution images to collect basic information.
[0219] The first-level pyramid calculation of A, B, C, and D: Apply a basic segmentation algorithm (such as threshold segmentation) to the read data to generate preliminary segmentation areas.
[0220] Second round of processing:
[0221] The second-layer pyramid reading of A, B, C, D: reads the data of regions A, B, C, and D from the medium-resolution image to obtain richer feature information.
[0222] The second-level pyramid calculation of A, B, C, and D: Use more advanced segmentation algorithms (such as edge-based segmentation) to process medium-resolution data and improve segmentation accuracy.
[0223] The third round of processing:
[0224] The third-level pyramid read of A, B, C, D: Read the data of the A, B, C, D areas from the high-resolution image to obtain the most detailed information.
[0225] The third-layer pyramid calculation of A, B, C, and D: Apply a deep learning model (such as U-Net) for final accurate segmentation and output high-quality segmentation results and region identification.
[0226] The above embodiment is a data reading and data calculation method adopted when the parallelism is very high. When the parallelism of the application environment is limited, the data reading and data calculation can be performed in a manner of reducing the parallelism, for example:
[0227] First round of processing:
[0228] A's first level pyramid reads.
[0229] A's first-level pyramid is calculated, while B's first-level pyramid is read.
[0230] B's first level pyramid calculation.
[0231] Second round of processing:
[0232] A's 2nd level pyramid reads.
[0233] A's second-level pyramid is calculated, while B's second-level pyramid is read.
[0234] B's second-level pyramid is calculated, while C's first-level pyramid is read.
[0235] C's first level pyramid calculation.
[0236] The third round of processing:
[0237] A's 3rd level pyramid reads.
[0238] A's 3rd level pyramid is calculated, while B's 3rd level pyramid is read.
[0239] B's 3rd level pyramid is calculated, while C's 2nd level pyramid is read.
[0240] The second level of C's pyramid is calculated, while the first level of D's pyramid is read.
[0241] The first level of pyramid calculation of D.
[0242] Fourth round of processing:
[0243] The third level of the pyramid reads C.
[0244] The third level of C's pyramid is calculated, while the second level of D's pyramid is read.
[0245] The second level of pyramid calculation of D.
[0246] Fifth round of processing:
[0247] D's 3rd level pyramid reads.
[0248] The third level of pyramid calculation of D.
[0249] Corresponding to the above method embodiment, see Figure 4 The present disclosure also provides a data processing device 40, including:
[0250] The receiving module 401 is used to receive image data, wherein the image is a pyramid image with N layers, and each layer of the pyramid image includes M regions; wherein both N and M are natural numbers not less than 1, and the M regions are independent of each other;
[0251] The calculation module 402 is used to process at least one region in at least one layer of the pyramid image respectively according to the order of the layers of the pyramid image, so as to obtain a processing result of the last layer of the pyramid image.
[0252] Figure 4 The device shown can correspondingly execute the contents of the above method embodiment. For the parts not described in detail in this embodiment, refer to the contents recorded in the above method embodiment and will not be repeated here.
[0253] See also Figure 5 The embodiment of the present disclosure further provides an electronic device 50, which includes: at least one processor and a memory connected to the at least one processor. The memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the data processing method in the aforementioned method embodiment.
[0254] The embodiment of the present disclosure also provides a non-transitory computer-readable storage medium, which stores computer instructions, and the computer instructions are used to enable the computer to execute the data processing method in the aforementioned method embodiment.
[0255] The embodiments of the present disclosure also provide a computer program product, which includes a computer program stored on a non-transitory computer-readable storage medium. The computer program includes program instructions, which, when executed by a computer, enable the computer to execute the data processing method in the aforementioned method embodiment.
[0256] Reference below Figure 5, which shows a schematic diagram of the structure of an electronic device 50 suitable for implementing the embodiment of the present disclosure. The electronic device in the embodiment of the present disclosure may include, but is not limited to, mobile terminals such as mobile phones, notebook computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 5 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.
[0257] like Figure 5 As shown, the electronic device 50 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 501, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 502 or a program loaded from a storage device 508 into a random access memory (RAM) 503. In the RAM 503, various programs and data required for the operation of the electronic device 50 are also stored. The processing device 501, the ROM 502, and the RAM 503 are connected to each other via a bus 504. An input / output (I / O) interface 505 is also connected to the bus 504.
[0258] Typically, the following devices may be connected to the I / O interface 505: input devices 506 including, for example, a touch screen, a touchpad, a keyboard, a mouse, an image sensor, a microphone, an accelerometer, a gyroscope, etc.; output devices 507 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; storage devices 508 including, for example, a magnetic tape, a hard disk, etc.; and communication devices 509. The communication device 509 may allow the electronic device 50 to communicate with other devices wirelessly or by wire to exchange data. Although the electronic device 50 with various devices is shown in the figure, it should be understood that it is not required to implement or have all the devices shown. More or fewer devices may be implemented or have alternatively.
[0259] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program contains program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device 509, or installed from a storage device 508, or installed from a ROM 502. When the computer program is executed by the processing device 501, the above-mentioned functions defined in the method of the embodiment of the present disclosure are executed.
[0260] It should be noted that the computer-readable medium disclosed above may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that may be used by or in combination with an instruction execution system, device or device. In the present disclosure, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, in which a computer-readable program code is carried. This propagated data signal may take a variety of forms, including but not limited to an electromagnetic signal, an optical signal, or any suitable combination of the above. The computer readable signal medium may also be any computer readable medium other than a computer readable storage medium, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer readable medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.
[0261] The computer-readable medium may be included in the electronic device, or may exist independently without being incorporated into the electronic device.
[0262] The computer-readable medium carries one or more programs. When the one or more programs are executed by the electronic device, the electronic device can execute the relevant steps of the method embodiment.
[0263] Alternatively, the computer-readable medium carries one or more programs, and when the one or more programs are executed by the electronic device, the electronic device can perform the relevant steps of the method embodiment.
[0264] Computer program code for performing the operations of the present disclosure may be written in one or more programming languages, or a combination thereof, including object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0265] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some implementations as replacements, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0266] The units involved in the embodiments described in the present disclosure may be implemented by software or by hardware.
[0267] It should be understood that various parts of the present disclosure may be implemented in hardware, software, firmware, or a combination thereof.
[0268] The above is only a specific implementation of the present disclosure, but the protection scope of the present disclosure is not limited thereto. Any changes or substitutions that can be easily thought of by a person skilled in the art within the technical scope disclosed in the present disclosure should be included in the protection scope of the present disclosure. Therefore, the protection scope of the present disclosure should be based on the protection scope of the claims.
Claims
1. A data processing method, characterized in that: include: Receive image data, wherein the image is a pyramid image with N layers, and each layer of the pyramid image includes M regions; wherein both N and M are natural numbers not less than 1, and the M regions are independent of each other; At least one region in at least one layer of the pyramid image is processed separately according to the order of the layers of the pyramid image to obtain a processing result of the last layer of the pyramid image.
2. The data processing method according to claim 1, characterized in that: At least one region in at least one layer of the pyramid image is processed respectively according to a processing rule of using processing results of any m regions of the nth layer of the pyramid image as inputs of m regions corresponding to the n+1th layer; wherein n is a natural number not less than 1 and not greater than N-1, and m is a natural number not less than 1 and not greater than M.
3. The data processing method according to claim 2, characterized in that: When processing at least one of the m corresponding regions of the n+1th layer of the pyramid image, at least one of the first regions of any layer whose number of layers is less than n+1 is processed simultaneously; wherein the first region is a region that has not been processed in the layer.
4. The data processing method according to claim 1, characterized in that: The separately processing at least one area in at least one layer of the pyramid image according to the order of the layers of the pyramid image comprises: Regions in any layer of the pyramid image are processed in parallel.
5. The data processing method according to claim 4, characterized in that: The parallel processing of the regions in any layer of the pyramid image comprises: m areas are selected for parallel processing, where m is a natural number not less than 2 and not greater than M.
6. The data processing method according to claim 4, characterized in that: The processing includes data reading and data calculation, and the regions in any layer of the pyramid image are processed in parallel in the order of completing the data reading of the mth region and then performing data calculation on the mth region; wherein m is a natural number not less than 1 and not greater than M.
7. The data processing method according to claim 6, characterized in that: The step of calculating data on the mth region after the data of the mth region is read is also as follows: Obtaining the rates of the data reading and the data calculation and calculating the difference; If the difference exceeds the threshold, the data reading rate is adjusted by increasing or decreasing the data reading bandwidth so that the difference is not greater than the threshold; wherein the threshold is the maximum allowable difference between the data reading rate and the data calculation rate.
8. The data processing method according to claim 7, characterized in that: If the difference exceeds the threshold, the rate of data calculation is adjusted by increasing or decreasing the parallelism of data calculation so that the difference is not greater than the threshold.
9. A data processing device, characterized in that: include: A receiving module, used for receiving image data, wherein the image is a pyramid image with N layers, and each layer of the pyramid image includes M regions; wherein both N and M are natural numbers not less than 1, and the M regions are independent of each other; The calculation module is used to process at least one area in at least one layer of the pyramid image respectively according to the order of the layers of the pyramid image, so as to obtain a processing result of the last layer of the pyramid image.
10. An electronic device, characterized in that: The electronic device comprises: at least one processor; and, a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the data processing method according to any one of claims 1 to 8.