Orthophoto fusion method of optical satellite remote sensing images based on CPU and GPU collaborative processing
By decomposing and allocating the orthofusion task of optical satellite remote sensing images to CPU or GPU, real-time monitoring and dynamic adjustment of resource allocation strategies, the problems of low processing efficiency and insufficient resource utilization caused by poor resource allocation rationality in the prior art are solved. , realize efficient resource utilization and task processing.
Patent Information
- Application Number
- CN202411599840.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-11
- Publication Date
- 2025-02-11
- Estimated Expiration
- 2044-11-11
AI Technical Summary
In the prior art, there is a problem that the processing efficiency and insufficient resource utilization rate due to poor rationality of processing resource allocation.
By decomposing the orthogonal fusion task of optical satellite remote sensing images into several fusion sub-tasks, and allocating it to the CPU or GPU according to the calculation complexity and preset standard complexity, real-time monitoring of resource occupancy and execution time, dynamically adjusting the task processing order and Resource allocation strategy.
It realizes that while ensuring efficient execution of tasks, it optimizes resource allocation and task priority ranking, maximizes resource utilization, reduces resource waste, adapts to the fluctuations in resource occupation, and improves processing efficiency.
Smart Images

Figure CN119127511B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of remote sensing data processing, and in particular to an optical satellite remote sensing image orthophoto fusion method based on CPU and GPU collaborative processing. Background Art
[0002] With the rapid development of remote sensing technology, optical satellite images are increasingly used in environmental monitoring, urban planning, agricultural management and other fields. At the same time, the complexity of image processing and the rapid increase in data volume have put forward higher requirements on computing resources. Traditional image processing methods often face the challenges of slow processing speed and insufficient resource utilization. Therefore, developing efficient processing methods to fully utilize the collaborative computing power of CPU and GPU has become the key to improving the efficiency of remote sensing image processing.
[0003] The patent document of Chinese patent application publication number CN103020620A discloses a remote sensing image orthorectification method based on CPU and GPU collaborative processing. The method includes the following steps: Step 1, copy the image to be corrected and DEM from the host-side memory to the global memory of the GPU; Step 2, copy the correction transformation model parameters to the constant memory of the GPU; Step 3, dynamically adjust the on-chip cache, including allocating more on-chip cache to the first-level cache when the shared memory is unavailable; Step 4, set the GPU thread block size and determine the number of GPU thread blocks; Step 5, perform orthorectification on the image to be corrected on the GPU to obtain the corrected image; Step 6, copy the corrected image from the GPU global memory back to the host-side memory; wherein steps 1, 2, 3, 4, and 6 are executed by the CPU, and step 5 is executed by the GPU.
[0004] It can be seen that this method delegates most of the processing steps (such as memory copying and setting thread blocks) to the CPU for execution, which may lead to a waste of CPU resources, while the parallel processing capabilities of the GPU are not fully utilized; in steps 1, 2, 3, 4, and 6, the operations performed by the CPU increase the overall processing time, especially in large-scale image processing, where the CPU's serial processing becomes a bottleneck; the strategy for dynamically adjusting the on-chip cache is relatively fixed, and the optimal cache utilization rate cannot be achieved in different processing scenarios; real-time monitoring of resource usage and dynamic adjustment of task allocation strategies are not considered, resulting in the inability to effectively adjust task priorities and resource allocation when the load is high. Summary of the invention
[0005] To this end, the present invention provides an optical satellite remote sensing image orthophoto fusion method based on CPU and GPU collaborative processing, so as to overcome the problems of low processing efficiency and insufficient resource utilization caused by poor rationality of processing resource allocation in the prior art.
[0006] To achieve the above object, the present invention provides an optical satellite remote sensing image orthophoto fusion method based on CPU and GPU collaborative processing, comprising:
[0007] The orthophoto fusion task of optical satellite remote sensing images is divided into several fusion subtasks according to the calculation type of the received orthophoto fusion task;
[0008] Obtain the computational complexity of each fusion subtask, assign each fusion subtask to the CPU or GPU according to the computational complexity and the preset standard complexity, and assign a preset priority score to each fusion subtask;
[0009] Execute each fusion subtask based on the sorting result of the preset priority score, and obtain the real-time resource occupancy rate and real-time execution duration during the execution process in real time;
[0010] Determine a number of short-term tasks according to the real-time execution duration and the preset standard execution duration, monitor the real-time resource occupancy rate of each short-term task, and determine the processing order according to the real-time resource occupancy rate and the preset standard occupancy rate;
[0011] executing the short-term tasks according to the processing order;
[0012] Determine an occupancy rate fluctuation value according to the real-time resource occupancy rate within a preset correction time, and adjust the preset standard complexity according to the occupancy rate fluctuation value and the preset standard occupancy fluctuation value until the occupancy rate fluctuation value is less than or equal to the preset standard occupancy fluctuation value, thereby forming a corrected standard complexity;
[0013] Monitoring the real-time utilization rate and the number of real-time tasks during the execution of the short-term tasks in the processing sequence formed based on the modified standard complexity;
[0014] Determine an adjustment result according to the real-time usage rate, determine an adjustment ratio according to the adjustment result, and adjust the corresponding number of real-time tasks according to the adjustment ratio, or adjust the preset priority score according to the adjustment result;
[0015] The adjustment ratio includes a CPU adjustment ratio and a GPU adjustment ratio, the real-time usage rate includes a real-time CPU usage rate and a real-time GPU usage rate, and the real-time task quantity includes a real-time CPU task quantity and a real-time GPU task quantity.
[0016] Further, determining the processing order according to the real-time resource occupancy rate and the preset standard occupancy rate includes:
[0017] When the real-time resource occupancy rate is greater than the preset standard occupancy rate, it is determined that the short-term task needs to be processed first, forming a number of comparative short-term tasks, and sorting the real-time resource occupancy rates of all comparative short-term tasks to form a first processing order.
[0018] Furthermore, determining the processing order according to the real-time resource occupancy rate and the preset standard occupancy rate also includes:
[0019] When the real-time resource occupancy rate is less than or equal to the preset standard occupancy rate, the short-term tasks are determined to have strong merging properties, and a number of the short-term tasks are merged according to a preset merging number to form a number of merged short-term tasks. The real-time resource occupancy rates of all merged short-term tasks are sorted to form a second processing order.
[0020] Further, executing the short-term task according to the processing order includes:
[0021] When the process of executing the short-term tasks according to the first processing order is completed, the short-term tasks are executed according to the second processing order.
[0022] Further, determining an occupancy rate fluctuation value according to the real-time resource occupancy rate within a preset correction time length, adjusting the preset standard complexity according to the occupancy rate fluctuation value and the preset standard occupancy fluctuation value until the occupancy rate fluctuation value is less than or equal to the preset standard occupancy fluctuation value, and forming the corrected standard complexity includes:
[0023] Calculate the standard deviation of the real-time resource occupancy rate to form the occupancy rate fluctuation value. When the occupancy rate fluctuation value is greater than the preset standard occupancy fluctuation value, determine that the preset standard complexity needs to be adjusted. Increase the preset standard complexity according to the occupancy rate fluctuation value, the preset standard occupancy fluctuation value and the preset complexity coefficient to form a corrected standard complexity.
[0024] Further, the determining an adjustment result according to the real-time usage rate, determining an adjustment ratio according to the determined adjustment result, and adjusting the corresponding number of real-time tasks according to the adjustment ratio includes:
[0025] When the real-time CPU usage is greater than the preset standard CPU usage and the GPU usage is less than or equal to the preset standard GPU usage, a CPU adjustment ratio is calculated according to the real-time CPU usage and the preset standard CPU usage, and the number of real-time CPU tasks is reduced according to the CPU adjustment ratio and a preset task number coefficient;
[0026] When the real-time GPU usage is greater than the preset standard GPU usage and the CPU usage is less than or equal to the preset standard CPU usage, the GPU adjustment ratio is calculated according to the real-time GPU usage and the preset standard GPU usage, and the real-time GPU task quantity is reduced according to the GPU adjustment ratio and the preset task quantity coefficient.
[0027] Further, adjusting the preset priority score according to the determination adjustment result includes:
[0028] When the real-time CPU usage is greater than the preset standard usage, and the GPU usage is greater than the preset standard usage, the difference between the real-time CPU usage and the preset standard usage is calculated to form a CPU usage difference, the difference between the real-time GPU usage and the preset standard usage is calculated to form a GPU usage difference, and the preset priority score is increased according to the CPU usage difference, the GPU usage difference, the preset CPU usage weight, and the preset GPU usage weight.
[0029] Furthermore, the obtaining of the computational complexity of each fusion subtask and assigning each fusion subtask to the CPU or GPU according to the computational complexity and the preset standard complexity includes:
[0030] When the computational complexity is greater than the preset standard complexity, allocating the fusion subtask to the GPU;
[0031] When the computational complexity is less than or equal to the preset standard complexity, the fusion subtask is allocated to the CPU.
[0032] Furthermore, the determining of a number of short-term tasks according to the real-time execution duration and the preset standard execution duration includes:
[0033] When the real-time execution duration is less than the preset standard execution duration, the fusion subtask is determined to be a short-term task.
[0034] Furthermore, when the real-time execution duration is greater than or equal to a preset standard execution duration, the fusion subtask is determined to be a long-term task.
[0035] Compared with the prior art, the beneficial effect of the present invention lies in that, through collaborative processing based on CPU and GPU, while ensuring efficient task execution, resource allocation and task priority sorting are optimized, and the execution strategy can be dynamically adjusted to maximize resource utilization and reduce resource waste. At the same time, through real-time monitoring and adjustment, it can effectively cope with fluctuations in resource occupancy, and is more flexible and efficient in processing optical satellite remote sensing image fusion tasks, effectively solving the problem of low processing efficiency and insufficient resource utilization caused by poor rationality of processing resource allocation.
[0036] Furthermore, by assigning tasks with high computational complexity to the GPU, the processing speed of complex tasks can be accelerated, while low-complexity tasks are processed by the CPU, thereby avoiding the waste of GPU resources, achieving the collaborative work of the CPU and GPU, and improving the overall processing efficiency.
[0037] Furthermore, by identifying tasks with shorter execution times as short-term tasks, these tasks can be processed with priority, thereby speeding up the overall processing speed.
[0038] Furthermore, by identifying tasks with longer execution times as long-term tasks, resources can be allocated more reasonably to avoid high-complexity tasks occupying too many resources and affecting the execution efficiency of other tasks.
[0039] Furthermore, by giving priority to short-term tasks with high resource usage, key resources can be released in a timely manner, the efficiency of task execution can be improved, resource bottlenecks can be avoided, and the balance and smoothness of overall task processing can be maintained.
[0040] Furthermore, by merging short-term tasks with low resource usage, the overhead of task scheduling can be reduced, processing efficiency can be improved, and resource utilization can be optimized to ensure more efficient operation under lower load conditions.
[0041] Furthermore, by merging and processing low-priority tasks, the complexity of task scheduling is reduced, thereby improving stability and flexibility under different workloads.
[0042] Furthermore, by dynamically adjusting the standard complexity, it is possible to effectively respond to fluctuations in resource usage, thereby optimizing resource allocation and scheduling strategies. This adaptability enhances flexibility, ensures stable performance under different loads, improves overall processing efficiency and responsiveness, and ultimately helps improve the overall effect of ortho-fusion of optical satellite remote sensing images.
[0043] Furthermore, through an adjustment mechanism based on real-time usage, it can flexibly respond to fluctuations in resource usage, improve computing efficiency and task processing speed, and ensure load balancing between the CPU and GPU.
[0044] Furthermore, by dynamically adjusting the priority score according to real-time usage, resource allocation can be effectively optimized, the flexibility and efficiency of task processing can be improved, and it can adapt to changing resource requirements, thereby ensuring stable operating performance under high load conditions and reducing potential computing bottlenecks. BRIEF DESCRIPTION OF THE DRAWINGS
[0045] Figure 1 This is a flow chart of the optical satellite remote sensing image orthophoto fusion method based on CPU and GPU collaborative processing in this embodiment;
[0046] Figure 2 A decision logic diagram for determining allocation to a CPU or a GPU for this embodiment;
[0047] Figure 3 Determine the decision logic diagram of the short-term task for this embodiment;
[0048] Figure 4 Decision logic diagram for determining the processing order for this embodiment. DETAILED DESCRIPTION
[0049] In order to make the objects and advantages of the present invention more clearly understood, the present invention is further described below in conjunction with embodiments; it should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.
[0050] The preferred embodiments of the present invention are described below with reference to the accompanying drawings. It should be understood by those skilled in the art that these embodiments are only used to explain the technical principles of the present invention and are not intended to limit the protection scope of the present invention.
[0051] It should be noted that, in the description of the present invention, terms such as "up", "down", "left", "right", "inside" and "outside" indicating directions or positional relationships are based on the directions or positional relationships shown in the drawings. This is merely for the convenience of description and does not indicate or imply that the device or element must have a specific orientation, be constructed and operated in a specific orientation. Therefore, it cannot be understood as a limitation on the present invention.
[0052] In addition, it should be noted that in the description of the present invention, unless otherwise clearly specified and limited, the terms "installed", "connected", and "connected" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection, or it can be indirectly connected through an intermediate medium, or it can be the internal communication of two components. For those skilled in the art, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.
[0053] See also Figure 1 As shown, it is a flow chart of the optical satellite remote sensing image orthophoto fusion method based on CPU and GPU collaborative processing in this embodiment;
[0054] This embodiment provides an optical satellite remote sensing image orthophoto fusion method based on CPU and GPU collaborative processing, the method comprising:
[0055] The orthophoto fusion task of the optical satellite remote sensing image is divided into several fusion subtasks according to the calculation type of the received orthophoto fusion task. The orthophoto fusion task is a task based on the optical satellite remote sensing image data.
[0056] Obtain the computational complexity of each fusion subtask based on the performance benchmark test, assign each fusion subtask to the CPU or GPU according to the computational complexity and the preset standard complexity, and assign a preset priority score to each fusion subtask;
[0057] Execute each fusion subtask based on the sorting result of the preset priority score, and obtain the real-time resource occupancy rate and real-time execution duration during the execution process in real time;
[0058] Determine a number of short-term tasks according to the real-time execution duration and the preset standard execution duration, monitor the real-time resource occupancy rate of each short-term task, and determine the processing order according to the real-time resource occupancy rate and the preset standard occupancy rate;
[0059] executing the short-term tasks according to the processing order;
[0060] Determine an occupancy rate fluctuation value according to the real-time resource occupancy rate within a preset correction time, and adjust the preset standard complexity according to the occupancy rate fluctuation value and the preset standard occupancy fluctuation value until the occupancy rate fluctuation value is less than or equal to the preset standard occupancy fluctuation value, thereby forming a corrected standard complexity;
[0061] Monitoring the real-time utilization rate and the number of real-time tasks during the execution of the short-term tasks in the processing sequence formed based on the modified standard complexity;
[0062] Determine an adjustment result according to the real-time usage rate, determine an adjustment ratio according to the adjustment result, and adjust the corresponding number of real-time tasks according to the adjustment ratio, or adjust the preset priority score according to the adjustment result;
[0063] The adjustment ratio includes a CPU adjustment ratio and a GPU adjustment ratio, the real-time usage rate includes a real-time CPU usage rate and a real-time GPU usage rate, and the real-time task quantity includes a real-time CPU task quantity and a real-time GPU task quantity.
[0064] The real-time resource occupancy rate is the total resource occupancy rate of the system at each moment during the execution process;
[0065] Computational complexity is a measure of the resources (such as time or space) required by an algorithm to execute, usually expressed as a function of the size of the input data and obtained using a recursive tree analysis;
[0066] The preset standard complexity refers to a complexity threshold set based on historical data or experience during the execution of a task, which is used to evaluate the computational difficulty of the task. It depends on the performance benchmark results of similar tasks in the past and the complexity of the algorithm. It is usually set between O(n) and O(n 2 ), in this embodiment, the preset standard complexity is set to O(n), with a value of 100, to accommodate most image processing tasks. Setting the preset standard complexity can help to reasonably allocate resources, avoid overload and improve task processing efficiency. O(n) means that the running time or space complexity of the algorithm is linearly related to the size n of the input data. As the input data increases, the running time of the algorithm or the memory space occupied will increase linearly.
[0067] The preset priority rating is a rating mechanism that quantifies the importance of different tasks and determines the order in which tasks are executed. It depends on factors such as the urgency of the task, the scope of impact, and the demand for computing resources. The range of the preset priority rating is usually set between 1 and 10. In this embodiment, the preset priority rating is a number from 1 to 10, which can ensure that key tasks are processed in a timely manner, thereby improving response speed and processing efficiency.
[0068] The preset standard execution time refers to the expected execution time of each task under ideal conditions. It depends on the complexity of the task, the processor performance, and the efficiency of the algorithm. It is usually set within the range of the average execution time of similar tasks in the past, between a few milliseconds and a few seconds. In this embodiment, the preset standard execution time is set to 2 seconds to adapt to the average time of most image fusion tasks. Ensure that the task is completed on time.
[0069] The preset standard occupancy rate refers to the ideal occupancy ratio of CPU or GPU resources when running a task. It depends on the hardware configuration and resource management policy. It is usually set between 60% and 80%. In this embodiment, the preset standard occupancy rate is set to 75% to maintain good performance under load.
[0070] The preset correction time refers to the maximum time range allowed for adjusting and optimizing the execution strategy during the task execution process. This parameter usually depends on the nature and complexity of the task and its real-time requirements. It is usually set between a few seconds and tens of seconds. In this embodiment, the preset correction time is set to 10 seconds to obtain sufficient reaction time during the dynamic adjustment process.
[0071] The preset standard occupancy fluctuation value refers to the maximum fluctuation range allowed during resource occupancy. It depends on the load capacity and resource management strategy. It is usually set between 5% and 15%. In this embodiment, it is set to 10% to adapt to the dynamic changes in resource occupancy.
[0072] First, the orthophoto fusion task is received and parsed, and the task is decomposed into several fusion subtasks. The computational complexity of each subtask is determined based on the performance benchmark test. According to the computational complexity and the preset standard complexity, the task is reasonably allocated to the CPU or GPU, and the preset priority score is set. During the task execution, by monitoring the real-time resource occupancy rate and execution time, the task processing order and allocation strategy are dynamically adjusted, and the standard complexity is corrected according to the occupancy rate fluctuation value. Finally, the utilization efficiency of CPU and GPU resources is optimized to achieve efficient fusion processing of tasks.
[0073] The embodiments of the present invention optimize resource allocation and task priority sorting while ensuring efficient task execution through collaborative processing based on CPU and GPU, and can dynamically adjust the execution strategy to maximize resource utilization and reduce resource waste. At the same time, through real-time monitoring and adjustment, it can effectively cope with fluctuations in resource occupancy, and is more flexible and efficient in processing optical satellite remote sensing image fusion tasks, effectively solving the problem of low processing efficiency and insufficient resource utilization caused by poor rationality of processing resource allocation.
[0074] Please continue reading Figure 2 As shown, it is a decision logic diagram for determining allocation to the CPU or GPU in this embodiment;
[0075] Specifically, obtaining the computational complexity of each fusion subtask and assigning each fusion subtask to the CPU or GPU according to the computational complexity and the preset standard complexity includes:
[0076] When the computational complexity is greater than the preset standard complexity, allocating the fusion subtask to the GPU;
[0077] When the computational complexity is less than or equal to the preset standard complexity, the fusion subtask is allocated to the CPU.
[0078] First, the computational complexity of each fusion subtask is identified and compared with the preset standard complexity. If the computational complexity of the subtask is higher than the preset standard, it is assigned to the GPU for processing; conversely, if the computational complexity is less than or equal to the preset standard complexity, the task is assigned to the CPU for processing. In this way, reasonable resource allocation based on task complexity is achieved.
[0079] By assigning tasks with high computational complexity to the GPU, the processing speed of complex tasks can be accelerated, while low-complexity tasks are processed by the CPU, thus avoiding the waste of GPU resources, achieving the collaborative work of the CPU and GPU, and improving the overall processing efficiency.
[0080] Please continue reading Figure 3 As shown, it is a decision logic diagram for determining short-term tasks in this embodiment;
[0081] Specifically, the determining of a number of short-term tasks according to the real-time execution duration and the preset standard execution duration includes:
[0082] When the real-time execution duration is less than the preset standard execution duration, the fusion subtask is determined to be a short-term task.
[0083] In this step, short-term tasks are determined by comparing the real-time execution time of the fused subtask with the preset standard execution time. When the real-time execution time is less than the preset standard execution time, the task is determined to be a short-term task. This process monitors the progress of task execution in real time in order to classify different types of tasks.
[0084] Short-term tasks refer to subtasks with short computing cycles and relatively low resource consumption that are decomposed from the entire orthophoto fusion task. These subtasks have short execution times and frequently update their status. They are used to dynamically monitor and adjust the resource usage of the system. The purpose of dividing subtasks into short-term tasks is to timely detect and feedback changes in system resource occupancy, so as to flexibly adjust the task processing order according to resource usage to improve overall processing efficiency.
[0085] By identifying tasks with shorter execution times as short-term tasks, these tasks can be prioritized, thereby speeding up overall processing.
[0086] Specifically, when the real-time execution time is greater than or equal to the preset standard execution time, the fusion subtask is determined to be a long-term task.
[0087] When the real-time execution time is greater than or equal to the preset standard execution time, the fusion subtask is identified as a long-term task. This determination method distinguishes the complexity of the task and the required processing resources by monitoring the task execution time.
[0088] By identifying tasks with longer execution times as long-term tasks, resources can be allocated more reasonably to avoid high-complexity tasks occupying too many resources and affecting the execution efficiency of other tasks.
[0089] Please continue reading Figure 4 As shown, it is a decision logic diagram for determining the processing order in this embodiment;
[0090] Specifically, determining the processing order according to the real-time resource occupancy rate and the preset standard occupancy rate includes:
[0091] When the real-time resource occupancy rate is greater than the preset standard occupancy rate, it is determined that the short-term task needs to be processed first, forming a number of comparative short-term tasks, and sorting the real-time resource occupancy rates of all comparative short-term tasks to form a first processing order.
[0092] When the real-time resource occupancy rate exceeds the preset standard occupancy rate, the short-term task is determined as a task that needs to be processed with priority. Subsequently, the real-time resource occupancy rates of all short-term tasks are sorted to determine the priority task order, thereby forming a first processing order.
[0093] By giving priority to short-term tasks with high resource usage, key resources can be released in a timely manner, the efficiency of task execution can be improved, resource bottlenecks can be avoided, and the balance and smoothness of overall task processing can be maintained.
[0094] Specifically, determining the processing order according to the real-time resource occupancy rate and the preset standard occupancy rate also includes:
[0095] When the real-time resource occupancy rate is less than or equal to the preset standard occupancy rate, the short-term tasks are determined to have strong merging properties, and a number of the short-term tasks are merged according to a preset merging number to form a number of merged short-term tasks. The real-time resource occupancy rates of all merged short-term tasks are sorted to form a second processing order.
[0096] The preset merge number refers to the number of tasks when several short-term tasks are merged and processed when the resource utilization rate is low. It depends on the load situation and task complexity, and is usually set between 2 and 5 to ensure that the complexity of the merged tasks does not exceed the processing capacity. In this embodiment, the preset merge number is set to 3, which has the advantage of balancing resource utilization and task processing efficiency while reducing scheduling overhead.
[0097] When the real-time resource occupancy rate is less than or equal to the preset standard occupancy rate, the short-term task is determined to have strong merging property. According to the preset merging quantity, multiple short-term tasks are merged into one group, and the real-time resource occupancy rates of the merged short-term tasks are sorted to form a second processing order.
[0098] By merging short-term tasks with low resource usage, we can reduce the overhead of task scheduling, improve processing efficiency, and optimize resource utilization, ensuring more efficient operation under lower load conditions.
[0099] Specifically, executing the short-term task according to the processing order includes:
[0100] When the process of executing the short-term tasks according to the first processing order is completed, the short-term tasks are executed according to the second processing order.
[0101] When executing short-term tasks, the tasks with high real-time resource occupancy rate are processed first according to the first processing order to achieve priority processing and ensure that high-priority tasks are executed in time. When these short-term tasks are completed, the merged short-term tasks are executed according to the second processing order, thereby effectively integrating resources and optimizing the overall processing flow.
[0102] By merging low-priority tasks, the complexity of task scheduling is reduced, thereby improving stability and flexibility under different workloads.
[0103] Specifically, determining an occupancy rate fluctuation value according to the real-time resource occupancy rate within a preset correction duration, adjusting the preset standard complexity according to the occupancy rate fluctuation value and the preset standard occupancy fluctuation value until the occupancy rate fluctuation value is less than or equal to the preset standard occupancy fluctuation value, and forming the modified standard complexity includes:
[0104] Calculate the standard deviation of the real-time resource occupancy rate to form the occupancy rate fluctuation value. When the occupancy rate fluctuation value is greater than the preset standard occupancy fluctuation value, determine that the preset standard complexity needs to be adjusted. Increase the preset standard complexity according to the occupancy rate fluctuation value, the preset standard occupancy fluctuation value and the preset complexity coefficient to form a corrected standard complexity. The corrected standard complexity is calculated by multiplying the preset standard complexity by an adjustment factor, wherein the adjustment factor includes 1 plus the preset complexity coefficient multiplied by the relative deviation between the real-time resource occupancy rate fluctuation value and the preset standard occupancy fluctuation value.
[0105] The preset complexity coefficient is an important parameter used to adjust the preset standard complexity. Its main function is to control the adjustment range of the standard complexity when the resource usage of the computing task fluctuates greatly. It usually takes a value between 0 and 1. The specific value can be set according to the characteristics of the task and the performance requirements. In this embodiment, it is set to 0.5, which can reasonably adjust the standard complexity when the resource usage fluctuates greatly, avoiding waste of resources or system instability caused by excessive adjustment.
[0106] In the process of correcting the standard complexity, the standard deviation of the real-time resource occupancy rate is first calculated to obtain the occupancy rate fluctuation value. When it is found that the fluctuation value is greater than the preset standard occupancy fluctuation value, it is determined that adjustment is required. Subsequently, based on the occupancy rate fluctuation value, the preset standard occupancy fluctuation value and the preset complexity coefficient, the preset standard complexity is gradually increased, and finally the corrected standard complexity is formed to ensure more balanced and efficient resource use.
[0107] By dynamically adjusting the standard complexity, it is possible to effectively respond to fluctuations in resource usage, thereby optimizing resource allocation and scheduling strategies. This adaptability enhances flexibility, ensures stable performance under different loads, improves overall processing efficiency and responsiveness, and ultimately helps improve the overall effect of ortho-fusion of optical satellite remote sensing images.
[0108] Specifically, determining the adjustment result according to the real-time usage rate, determining the adjustment ratio according to the determined adjustment result, and adjusting the corresponding number of real-time tasks according to the adjustment ratio includes:
[0109] When the real-time CPU usage is greater than the preset standard CPU usage and the GPU usage is less than or equal to the preset standard GPU usage, a CPU adjustment ratio is calculated according to the real-time CPU usage and the preset standard CPU usage, and the number of real-time CPU tasks is reduced according to the CPU adjustment ratio and a preset task number coefficient;
[0110] When the real-time GPU usage is greater than the preset standard GPU usage and the CPU usage is less than or equal to the preset standard CPU usage, the GPU adjustment ratio is calculated according to the real-time GPU usage and the preset standard GPU usage, and the real-time GPU task quantity is reduced according to the GPU adjustment ratio and the preset task quantity coefficient.
[0111] The preset task number coefficient is a parameter used to adjust the number of real-time tasks, and is usually used to control the change range of the number of tasks under different resource usage conditions. The value range of this coefficient is generally set between 0 and 1 to ensure the flexibility and rationality of the adjustment. In this embodiment, the preset task number coefficient is set to 0.1, so that when the real-time utilization rate is adjusted, the change in the number of tasks can be kept within a reasonable range, avoiding the instability of the system caused by frequent fluctuations in the number of tasks.
[0112] The preset standard CPU usage rate refers to the CPU usage rate threshold value set according to historical data or experience during the task execution process, which is usually set between 30% and 70%. In this embodiment, the preset standard CPU usage rate is set to 50%. The advantage of such a setting is that it can ensure sufficient CPU resources while avoiding performance degradation caused by overload.
[0113] The preset standard GPU usage rate refers to the GPU usage rate threshold set according to historical data or experience during the task execution process, which is usually set between 40% and 80%. In this embodiment, the preset standard GPU usage rate is set to 60%. Through this setting, the GPU load can be effectively balanced to ensure the efficient execution of the image processing task.
[0114] This process dynamically adjusts the number of real-time tasks based on the comparison between real-time resource usage and preset standard usage. When the real-time CPU usage exceeds the preset standard and the GPU usage is below the standard, the CPU adjustment ratio is calculated and the number of real-time CPU tasks is optimized accordingly; conversely, when the real-time GPU usage exceeds the standard and the CPU usage is below the standard, the GPU adjustment ratio is calculated and the number of real-time GPU tasks is optimized. This dynamic adjustment ensures efficient use of system resources and avoids overloading of a certain resource.
[0115] Through an adjustment mechanism based on real-time usage, it can flexibly respond to fluctuations in resource usage, improve computing efficiency and task processing speed, and ensure load balancing between the CPU and GPU.
[0116] Specifically, adjusting the preset priority score according to the determination adjustment result includes:
[0117] When the real-time CPU usage is greater than the preset standard usage, and the GPU usage is greater than the preset standard usage, the difference between the real-time CPU usage and the preset standard usage is calculated to form a CPU usage difference, the difference between the real-time GPU usage and the preset standard usage is calculated to form a GPU usage difference, and the preset priority score is increased according to the CPU usage difference, the GPU usage difference, the preset CPU usage weight, and the preset GPU usage weight.
[0118] The preset CPU usage weight and the preset GPU usage weight are coefficients used to adjust the priority score, which respectively reflect the importance of the CPU and GPU in the task execution process. The preset CPU usage weight is used to measure the relative importance of CPU usage in the overall task execution. Its value can be set according to system requirements and task characteristics. Typically, the preset CPU usage weight is set between 0.6 and 0.8. In this embodiment, the preset CPU usage weight is set to 0.7, and the preset GPU usage weight is set to 0.3.
[0119] According to the comparison between the real-time CPU and GPU usage and the preset standard usage, when both usage exceed the preset value, the CPU and GPU usage difference is first calculated, and then the preset weight coefficient is used to comprehensively consider the two differences to increase the preset priority score. This process ensures that when the resource pressure is high, the priority score can be reasonably adjusted to allocate computing resources more efficiently.
[0120] By dynamically adjusting the priority score according to the real-time usage rate, resource allocation can be effectively optimized, the flexibility and efficiency of task processing can be improved, and it can adapt to the ever-changing resource requirements, thereby ensuring that stable operating performance can be maintained under high load conditions and reducing potential computing bottlenecks. So far, the technical scheme of the present invention has been described in conjunction with the preferred implementation modes shown in the accompanying drawings. However, it is easy for those skilled in the art to understand that the scope of protection of the present invention is obviously not limited to these specific implementation modes. Without departing from the principles of the present invention, those skilled in the art may make equivalent changes or substitutions to the relevant technical features, and the technical schemes after these changes or substitutions will fall within the scope of protection of the present invention.
[0121] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A method for orthophoto fusion of optical satellite remote sensing images based on CPU and GPU collaborative processing, characterized in that: include: The orthophoto fusion task of optical satellite remote sensing images is divided into several fusion subtasks according to the calculation type of the received orthophoto fusion task; Obtain the computational complexity of each fusion subtask, assign each fusion subtask to the CPU or GPU according to the computational complexity and the preset standard complexity, and assign a preset priority score to each fusion subtask; Execute each fusion subtask based on the sorting result of the preset priority score, and obtain the real-time resource occupancy rate and real-time execution duration during the execution process in real time; Determine a number of short-term tasks according to the real-time execution duration and the preset standard execution duration, monitor the real-time resource occupancy rate of each short-term task, and determine the processing order according to the real-time resource occupancy rate and the preset standard occupancy rate; Determining a number of short-term tasks according to the real-time execution duration and the preset standard execution duration includes: When the real-time execution duration is less than the preset standard execution duration, determining that the fusion subtask is a short-term task; executing the short-term tasks according to the processing order; Determine an occupancy rate fluctuation value according to the real-time resource occupancy rate within a preset correction time, and adjust the preset standard complexity according to the occupancy rate fluctuation value and the preset standard occupancy fluctuation value until the occupancy rate fluctuation value is less than or equal to the preset standard occupancy fluctuation value, thereby forming a corrected standard complexity; Monitoring the real-time utilization rate and the number of real-time tasks during the execution of the short-term tasks in the processing sequence formed based on the modified standard complexity; Determine an adjustment result according to the real-time usage rate, determine an adjustment ratio according to the adjustment result, and adjust the corresponding number of real-time tasks according to the adjustment ratio, or adjust the preset priority score according to the adjustment result; The adjustment ratio includes a CPU adjustment ratio and a GPU adjustment ratio, the real-time usage rate includes a real-time CPU usage rate and a real-time GPU usage rate, and the real-time task quantity includes a real-time CPU task quantity and a real-time GPU task quantity.
2. The method for orthophoto fusion of optical satellite remote sensing images based on CPU and GPU collaborative processing according to claim 1, characterized in that: Determining the processing order according to the real-time resource occupancy rate and the preset standard occupancy rate includes: When the real-time resource occupancy rate is greater than the preset standard occupancy rate, it is determined that the short-term task needs to be processed first, forming a number of comparative short-term tasks, and sorting the real-time resource occupancy rates of all comparative short-term tasks to form a first processing order.
3. The method for orthophoto fusion of optical satellite remote sensing images based on CPU and GPU collaborative processing according to claim 2 is characterized in that: The determining of the processing order according to the real-time resource occupancy rate and the preset standard occupancy rate also includes: When the real-time resource occupancy rate is less than or equal to the preset standard occupancy rate, the short-term tasks are determined to have strong merging properties, and a number of the short-term tasks are merged according to a preset merging number to form a number of merged short-term tasks. The real-time resource occupancy rates of all merged short-term tasks are sorted to form a second processing order.
4. The method for orthophoto fusion of optical satellite remote sensing images based on CPU and GPU collaborative processing according to claim 3 is characterized in that: The executing the short-term task according to the processing order comprises: When the process of executing the short-term tasks according to the first processing order is completed, the short-term tasks are executed according to the second processing order.
5. The method for orthophoto fusion of optical satellite remote sensing images based on CPU and GPU collaborative processing according to claim 4 is characterized in that: Determining an occupancy rate fluctuation value according to the real-time resource occupancy rate within a preset correction time, adjusting the preset standard complexity according to the occupancy rate fluctuation value and the preset standard occupancy fluctuation value until the occupancy rate fluctuation value is less than or equal to the preset standard occupancy fluctuation value, and forming the corrected standard complexity includes: Calculate the standard deviation of the real-time resource occupancy rate to form the occupancy rate fluctuation value. When the occupancy rate fluctuation value is greater than the preset standard occupancy fluctuation value, determine that the preset standard complexity needs to be adjusted. Increase the preset standard complexity according to the occupancy rate fluctuation value, the preset standard occupancy fluctuation value and the preset complexity coefficient to form a corrected standard complexity.
6. The method for orthophoto fusion of optical satellite remote sensing images based on CPU and GPU collaborative processing according to claim 5, characterized in that: The determining of the adjustment result according to the real-time usage rate, determining the adjustment ratio according to the determined adjustment result, and adjusting the corresponding number of real-time tasks according to the adjustment ratio includes: When the real-time CPU usage is greater than the preset standard CPU usage and the GPU usage is less than or equal to the preset standard GPU usage, a CPU adjustment ratio is calculated according to the real-time CPU usage and the preset standard CPU usage, and the number of real-time CPU tasks is reduced according to the CPU adjustment ratio and a preset task number coefficient; When the real-time GPU usage is greater than the preset standard GPU usage and the CPU usage is less than or equal to the preset standard CPU usage, the GPU adjustment ratio is calculated according to the real-time GPU usage and the preset standard GPU usage, and the real-time GPU task quantity is reduced according to the GPU adjustment ratio and the preset task quantity coefficient.
7. The method for orthophoto fusion of optical satellite remote sensing images based on CPU and GPU collaborative processing according to claim 6, characterized in that: The adjusting the preset priority score according to the determination adjustment result comprises: When the real-time CPU usage is greater than the preset standard usage, and the GPU usage is greater than the preset standard usage, the difference between the real-time CPU usage and the preset standard usage is calculated to form a CPU usage difference, the difference between the real-time GPU usage and the preset standard usage is calculated to form a GPU usage difference, and the preset priority score is increased according to the CPU usage difference, the GPU usage difference, the preset CPU usage weight, and the preset GPU usage weight.
8. The method for orthophoto fusion of optical satellite remote sensing images based on CPU and GPU collaborative processing according to claim 7, characterized in that: The obtaining of the computational complexity of each fusion subtask and assigning each fusion subtask to the CPU or GPU according to the computational complexity and the preset standard complexity includes: When the computational complexity is greater than the preset standard complexity, allocating the fusion subtask to the GPU; When the computational complexity is less than or equal to the preset standard complexity, the fusion subtask is allocated to the CPU.
9. The method for orthophoto fusion of optical satellite remote sensing images based on CPU and GPU collaborative processing according to claim 8, characterized in that: When the real-time execution time is greater than or equal to the preset standard execution time, the fusion subtask is determined to be a long-term task.
Citation Information
Patent Citations
Remote-sensing image ortho-rectification method based on central processing unit (CPU) and graphics processing unit (GPU) coprocessing
CN103020620A
Real-time parallel processing system and real-time parallel processing method for satellite remote sensing images
CN104063835A
Satellite mission planning algorithm research method based on parallel computing
CN108804220A