Power defect image simulation method using heterogeneous computing resource load balancing scheduling

By using a heterogeneous computing resource load balancing scheduling method, the large image defect simulation task is divided into small image sub-tasks. The resource allocation is optimized by using a task scheduling simulator, which solves the problems of insufficient computing resources and low efficiency in high-resolution large image simulation of power grids and achieves efficient simulation results.

CN115543626BActive Publication Date: 2026-05-29GUANGDONG POWER GRID CO LTD +1

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
GUANGDONG POWER GRID CO LTD
Filing Date
2022-10-14
Publication Date
2026-05-29

AI Technical Summary

Technical Problem

Existing technologies suffer from insufficient computational resources, low efficiency, and poor simulation results for small targets when simulating large-scale defects with high resolution in power grid links.

Method used

A heterogeneous computing resource load balancing scheduling method is adopted. The large image defect simulation task is divided into small image subtasks through image segmentation. The task scheduling simulator is used to plan the task scheduling, and the subtasks are allocated to heterogeneous computing resources for simulation. Finally, the subtasks are merged to obtain the final image.

Benefits of technology

It improves computational efficiency, ensures the simulation effect of high-resolution large-scale power grid defects, makes full use of heterogeneous computing resources, and reduces system power consumption.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115543626B_ABST
    Figure CN115543626B_ABST
Patent Text Reader

Abstract

The application provides a power defect image simulation method using heterogeneous computing resource load balancing scheduling, wherein a defect simulation task of a large image is split into defect simulation subtasks of several small images through image segmentation; then a task scheduling simulator is designed according to a cluster state of the heterogeneous computing resources and a defect simulation subtask state, the task scheduling simulator is used to plan task scheduling so that resource consumption is minimum; according to the planned task scheduling, the defect simulation subtasks are distributed to corresponding heterogeneous computing resources, and after image simulation, the defect simulation subtasks are combined to obtain a final defect simulation image. Through the use of the heterogeneous resources to schedule the small image defect simulation subtasks obtained by division, the average completion time of the simulation tasks is minimum, the computing efficiency is improved, and the defect simulation effect of the high-resolution large image of the power grid is ensured.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of power simulation and calculation technology, specifically relating to a power defect image simulation method using heterogeneous computing resource load balancing scheduling. Background Technology

[0002] With the development of intelligent power industry, intelligent power defect identification solutions based on artificial intelligence technology to replace manual inspections not only provide more reliable safety guarantees for power systems, but also adapt to the development trend of intelligent substations. However, most current deep learning methods for defect detection are based on building models with a large number of defect samples. The lack of defect samples leads to poor model training results and difficulty in deployment. Moreover, defects are generated by uncontrolled factors in the production and maintenance process, and the forms of defects are diverse. It is difficult to collect samples of all forms, which also limits the application of deep learning in the field of defect detection. Defect simulation based on real images can be used to expand small sample defect datasets, which is a major solution to the above problems. Common defect simulation solutions include automatic generation algorithms, such as DCGAN and WGAN, which can directly generate multiple real defect images from a single defect image. Semi-automatic generation algorithms include CGAN, CVAE, and Pix2Pix, which require manual interaction to specify the category or shape of the defect to be generated, and then generate the specified type of defect based on the given information.

[0003] However, for high-resolution large images in the power grid sector, such as 4K images, image simulation defect algorithms have two problems: 1. The large input image leads to high computational resource requirements for the simulation algorithm, and in single-node processing, computational resources may even be insufficient, resulting in low computational efficiency. 2. Directly simulating defects on the entire image is problematic when the defect is a small target. When simulating small targets on a large image, it is impossible to truly simulate environmental details, resulting in poor simulation effects. Summary of the Invention

[0004] In view of this, the present invention aims to solve the above-mentioned problems in existing defect simulation of large images with high resolution for power grid links.

[0005] To solve the above-mentioned technical problems, the present invention provides the following technical solution:

[0006] A power defect image simulation method employing heterogeneous computing resource load balancing scheduling includes the following steps:

[0007] Obtain the simulation image to be processed, perform image segmentation on the simulation image according to the defect to be simulated, and break down the defect simulation task into defect simulation subtasks.

[0008] The task scheduling simulator is used to plan task scheduling. The task scheduling simulator aims to minimize resource consumption and uses the constraint that heterogeneous computing resources meet the requirements of the defect simulation task to plan task scheduling.

[0009] According to the planned task scheduling, the defect simulation subtasks are allocated to the corresponding heterogeneous computing resources for image simulation.

[0010] The simulation images of various heterogeneous computing resources are merged to obtain the final defect simulation image.

[0011] Furthermore, based on the defects to be simulated, image segmentation is performed on the simulation images, breaking down the defect simulation task into defect simulation sub-tasks, specifically including:

[0012] The number of defects to be simulated is taken as the number of defect simulation subtasks that need to be broken down.

[0013] Image segmentation is performed using a dynamic sliding algorithm and a segmentation window that matches the defect target.

[0014] For the defect to be simulated, the size and number of segmented images are obtained to complete the creation of the defect simulation subtask.

[0015] Furthermore, the size of the segmentation window is determined based on the size of the defect target. The specific process for determining the size of the segmentation window is as follows:

[0016] Preset the size of several image sliding windows;

[0017] The sliding window selection area is calculated based on the area of ​​the defect target. The selection is made from several image sliding windows based on the sliding window selection area, and the smallest area among the image sliding windows that is larger than the sliding window selection area is taken as the segmentation window.

[0018] Furthermore, the specific formula for calculating the area selected by the sliding window is as follows:

[0019]

[0020] In the formula, This indicates that the area is selected via a sliding window. This represents the area of ​​the simulated defect. The area of ​​the image corresponding to the simulated defect. This represents the area of ​​the image to be simulated.

[0021] Furthermore, the formula for calculating the number of segmented images is as follows:

[0022]

[0023] In the formula, This indicates the number of images after segmentation. The length of the image to be simulated. The width of the image to be simulated. Slide the window size for the selected image. This is for rounding down.

[0024] Furthermore, the task scheduling simulator is designed based on the cluster state of heterogeneous computing resources and the state of defective simulation subtasks. It includes three parts: resource consumption recording, offline training and optimization, and online scheduling. The resource consumption recording specifically includes:

[0025] Build an initial heterogeneous cluster environment, which includes several available heterogeneous computing resources;

[0026] Create several simulation tasks, each of which contains at least several sub-simulation tasks, and each sub-simulation task performs image segmentation.

[0027] Record the computing status of each heterogeneous computing resource after each simulation task completes image simulation in the initial heterogeneous cluster environment. The computing status includes at least the time consumed by the simulation calculation and the waiting time.

[0028] Furthermore, offline training optimization specifically includes:

[0029] Obtain a scheduling model to be trained, and take the computing status of each heterogeneous computing resource and the status of the sub-simulation task recorded in the resource consumption record section as the input of the scheduling model, and output the probability of each heterogeneous computing resource being assigned a task.

[0030] The optimization signal is obtained through the reward function, which generates the optimization signal based on the simulation calculation time recorded in the resource consumption record section.

[0031] The scheduling model is optimized using an optimizer to obtain the optimized scheduling model;

[0032] The optimized scheduling model is repeatedly optimized using real-world data until it converges, resulting in the final task scheduling simulator.

[0033] Furthermore, online scheduling specifically includes:

[0034] The current state of the subtask to be simulated and the state of the heterogeneous computing resources are input into the final task scheduling simulator so that the task scheduling simulator can generate a probability distribution for allocating the current subtask to be simulated to various heterogeneous computing resources.

[0035] The allocation of heterogeneous computing resources with the highest probability in the probability distribution is used as the task scheduling in the planning.

[0036] Furthermore, the constraint is that heterogeneous computing resources must meet the requirements for running the defect simulation task, specifically:

[0037] A heterogeneous computing resource can only process one defect simulation subtask at a time, and the defect simulation subtask is assigned to the heterogeneous computing resource during its idle period.

[0038] Furthermore, based on the planned task scheduling, the defect simulation subtasks are allocated to corresponding heterogeneous computing resources, which also includes:

[0039] For the central processing unit and image processor in a heterogeneous computing environment, a corresponding execution process is generated for each data processing operation, and the corresponding statistics are recorded in the task queue of the central processing unit and the task queue of the image processor.

[0040] When the number of processes in the image processor's task queue exceeds the corresponding load threshold, the number of processes processed by the central processing unit (CPU) is reduced; conversely, the number of processes processed by the CPU is increased.

[0041] In summary, this invention provides a power grid defect image simulation method employing heterogeneous computing resource load balancing scheduling. It divides the large-image defect simulation task into several smaller-image defect simulation subtasks through image segmentation. Then, a task scheduling simulator is designed based on the cluster status of the heterogeneous computing resources and the status of the defect simulation subtasks. This simulator is used to plan task scheduling to minimize resource consumption. According to the planned task schedule, the defect simulation subtasks are allocated to the corresponding heterogeneous computing resources, and after image simulation, they are merged to obtain the final defect simulation image. This invention utilizes heterogeneous resources to schedule the divided small-image defect simulation subtasks, minimizing the average completion time of the simulation tasks, improving computational efficiency while ensuring the effectiveness of high-resolution large-image defect simulation of the power grid. Attached Figure Description

[0042] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0043] Figure 1 A flowchart of a power defect image simulation method using heterogeneous computing resource load balancing scheduling provided in an embodiment of the present invention;

[0044] Figure 2 A flowchart illustrating the power defect image simulation method provided in this embodiment of the invention;

[0045] Figure 3 This is a schematic diagram of the reinforcement learning process of the deep deterministic policy gradient algorithm provided in an embodiment of the present invention. Detailed Implementation

[0046] To make the objectives, features, and advantages of this invention more apparent and understandable, the technical solutions of the embodiments of this invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the embodiments described below are only some embodiments of this invention, and not all embodiments. Based on the embodiments of this invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this invention.

[0047] With the development of intelligent power industry, intelligent power defect identification solutions based on artificial intelligence technology to replace manual inspections not only provide more reliable safety guarantees for power systems, but also adapt to the development trend of intelligent substations. However, most current deep learning methods for defect detection are based on building models with a large number of defect samples. The lack of defect samples leads to poor model training results and difficulty in deployment. Moreover, defects are generated by uncontrolled factors in the production and maintenance process, and the forms of defects are diverse. It is difficult to collect samples of all forms, which also limits the application of deep learning in the field of defect detection. Defect simulation based on real images can be used to expand small sample defect datasets, which is a major solution to the above problems. Common defect simulation solutions include automatic generation algorithms, such as DCGAN and WGAN, which can directly generate multiple real defect images from a single defect image. Semi-automatic generation algorithms include CGAN, CVAE, and Pix2Pix, which require manual interaction to specify the category or shape of the defect to be generated, and then generate the specified type of defect based on the given information.

[0048] However, for high-resolution large images in the power grid sector, such as 4K images, image simulation defect algorithms have two problems: 1. The large input image leads to high computational resource requirements for the simulation algorithm, and in single-node processing, computational resources may even be insufficient, resulting in low computational efficiency. 2. Directly simulating defects on the entire image is problematic when the defect is a small target. When simulating small targets on a large image, it is impossible to truly simulate environmental details, resulting in poor simulation effects.

[0049] Based on this, the present invention provides a power defect image simulation method using heterogeneous computing resource load balancing scheduling. The method involves segmenting the image into sub-images, performing defect simulation on each sub-image, and then combining the simulated sub-images to obtain the final simulated image. Applying the sub-image defect simulation process to a heterogeneous computing environment leverages the advantages of a heterogeneous computing platform composed of different types of computing resources, including abundant computing resources, flexible and diverse architectures, and strong parallel processing capabilities. To improve image simulation processing speed, a heterogeneous parallel processing method for image simulation is adopted. The segmented sub-image simulation is treated as a sub-task, and computational tasks with different attributes are scheduled to corresponding dedicated processing units to ensure high-performance computing requirements. This method maximizes the utilization of heterogeneous computing resources, reduces system power consumption, and thus meets the ever-increasing computing demands.

[0050] The following is a detailed description of an embodiment of the power defect image simulation method of the present invention, which employs heterogeneous computing resource load balancing scheduling.

[0051] Please see Figure 1 and 2 This embodiment provides a power defect image simulation method using heterogeneous computing resource load balancing scheduling, including:

[0052] S100: Obtain the simulation image to be processed, perform image segmentation on the simulation image according to the defect to be simulated, and break down the defect simulation task into defect simulation sub-tasks.

[0053] An image segmentation program is pre-configured in the management node. When the management node receives an image to be processed, it executes the image segmentation program to segment the image into n sub-images. The image segmentation program is configured as follows:

[0054] This step constructs subtasks based on the number of defects and the size of the defect targets. First, the number of defects is used as the number of subtasks to be simulated. Each subtask corresponds to a specific defect that needs to be simulated, and the number of subtasks is defined as DN. Second, the preset image sliding window sizes are 128*128, 256*256, 512*512, 1024*1024, and 2048*2048. Image segmentation is performed using a dynamically sliding segmentation window. The appropriate sliding segmentation window is selected based on the size of the defect target. The formula for calculating the sliding window area is:

[0055] S = S Detect / S Detect_pic *S Simulation_pic

[0056] Where S is the selection area of ​​the sliding window, S Detect To simulate the defect area, S Detect_pic S is the area of ​​the image corresponding to the simulated defect.Simulation_pic is the area of the image to be simulated.

[0057] According to S, calculate the sliding window size M. If S <= 128 * 128, the sliding window size M = 128; if 128 * 128 < S <= 256 * 256, the sliding window size M = 256, and so on. Judge the preset values such as 128 * 128, 256 * 256, 512 * 512, 1024 * 1024, 2048 * 2048, etc. If all are not satisfied, select the original size and do not perform image segmentation.

[0058] The number of segmented images N for each type of defect = floor(L / M) * floor(W / M).

[0059] Where L is the length of the image, W is the width of the image to be simulated, and floor is the floor function for rounding down.

[0060] From this, the size M and the number N of the images to be segmented for each type of defect are calculated, and the construction of the simulation subtask is completed. Since in the defect simulation algorithm, the simulation images generally need to go through preprocessing and size transformation, the computational workload of each corresponding defect subtask is related to N and has nothing to do with M.

[0061] S200: Use the task scheduling simulator to plan task scheduling. The task scheduling simulator takes the minimum resource consumption as the goal and takes the operation of the heterogeneous computing resources to meet the defect simulation tasks as the constraint condition for task scheduling planning.

[0062] In a heterogeneous computing cluster with CPU, GPU, NPU, etc., there are significant differences in computing capabilities among different computing resources. In the existing parallel computing for defect simulation, static task scheduling techniques are usually adopted, and the heterogeneous characteristics of resources and the differences of different computing resources are not well considered, which may lead to the phenomenon that the GPU task needs to wait for a long time for the CPU to process tasks after completion, or the GPU undertakes all the computing processes while the CPU only plays an auxiliary computing role, resulting in a great waste of computing resources and seriously affecting the performance and scalability of high-speed computing for large-scale image defect simulation.

[0063] In order to make full use of heterogeneous computing resources, it is necessary to coordinate the scheduling and allocation of computing tasks on computing resources according to information such as the computing capabilities and network communication of heterogeneous resources, so as to match the computing processing capabilities and task loads, in order to improve the efficiency of the entire image defect simulation. A slight optimization of the task scheduling strategy in resource utilization can effectively reduce the task execution time and significantly reduce the service cost. In this embodiment, for image defect simulation, a task scheduling based on reinforcement learning of the deep deterministic policy gradient algorithm is designed, with the heterogeneous characteristics of resources, network transmission characteristics, and resource contention characteristics as the constraint conditions and the minimization of resource consumption as the goal.

[0064] The task scheduling system can better allocate tasks to computing resources based on the characteristics of heterogeneous resources and the running status of resource tasks through unified task scheduling, coordinate the load of computing nodes, ensure dynamic load balancing of computing nodes, and improve the parallel computing and real-time processing capabilities of heterogeneous computing clusters.

[0065] Specifically, we first assume that the computing environment processes only one subtask at a time on the same computing resource, and there is no simultaneous execution of multiple tasks. We design a task scheduling simulator to generate the optimal task schedule for the current computing environment. The design process consists of three parts: resource consumption recording, offline training and optimization, and online scheduling, which will be described in turn below:

[0066] (1) Resource consumption record: Record the status of heterogeneous computing resources and the time consumed by them to compute different tasks, so as to provide a reference for the next step of model optimization.

[0067] Define an initial heterogeneous cluster environment. Q represents any computer resource, such as the computing power of a CPU, GPU, or NPU, and m represents the number of available resources. This refers to the number of test tasks that the processor can handle within a preset time period. A test task can be a task that processes a specific image. For the bandwidth allocated to server k, The table shows the idle time periods of the k-th server in the i-th time period. It will change over time, specifically depending on the number of tasks being processed by the computer, and the settings at the start of the task. It is 0.

[0068] Create n simulation tasks, where each simulation task is represented as... .

[0069] Each simulation task can contain multiple sub-simulation tasks, i.e., a sub-simulation task There are Sub sub-simulation tasks, and the created sub-simulation tasks are represented as follows: Each subtask requires image segmentation, each... It can be represented as ,in Let be the number of images in the i-th subtask. Let be the size of the image for the i-th subtask.

[0070] During a single run, a resource consumption logger records the computational status of each heterogeneous computing resource, such as current power consumption, core temperature, fan time, computation time, and waiting time, and saves this time to the cache.

[0071] (2) Offline training and optimization: Offline training and optimization uses a reinforcement learning-based approach to train and update the scheduling algorithm.

[0072] This stage comprises three parts: the scheduling model, the reward function, and the optimizer. The scheduling model is a neural network that provides the specific scheduling strategy; the reward function serves as the training basis for the scheduling algorithm, providing optimization signals for the training of the scheduling model; and the optimizer performs the actual optimization training, receiving the given reward function optimization signals and updating the model.

[0073] The specific training process is as follows:

[0074] 1) Preset a baseline time consumption value, subtract this baseline value from the consumption time recorded by the resource consumption recording module to form the weight of each data. This weight can be positive or negative. A positive weight indicates that the scheduling operation is better than the baseline time, and a negative weight indicates that the scheduling operation is worse than the baseline time.

[0075] 2) The data recorded by the resource consumption recording module is divided into two parts: a training set and a validation set. Each part of the data includes resource status, subtask status, and actual scheduling operations. The resource status serves as the input to the scheduling model, and the output is the probability of each resource being assigned a task.

[0076] 3) The output probability value and the actual scheduling operation are used to construct the cross-entropy loss, and multiplied by the weight calculated in step one to form the reward function.

[0077] 4) Use an optimizer to optimize the reward function to obtain the optimized scheduling model.

[0078] 5) Introduce the optimized scheduling model into a real environment for testing, and use the resource consumption recording module to record the data;

[0079] 6) Repeat steps 1-4 to further optimize the scheduling model until convergence. Convergence criteria include, but are not limited to, stopping after a fixed number of rounds and the time consumed leveling off and no longer decreasing.

[0080] The training constraints of the task scheduling simulator are that only one subtask can be processed on a computing resource at the same time, multiple tasks cannot run simultaneously, and idle resources can be allocated to simulation subtasks for computation.

[0081] In practical implementation, the scheduling model can be a reinforcement learning policy network based on a deep deterministic policy gradient algorithm, with the following inputs and outputs:

[0082] Input: The policy network to be trained, the state of the training task, and the state of heterogeneous computing resources.

[0083] Output: A converged reinforcement learning policy network.

[0084] Reward function: The reward function of the deterministic policy gradient algorithm provides an immediate reward value at each update step. The goal is to minimize the average task completion time. α is a hyperparameter used to adjust the relative importance of waiting time and execution time. T k,wait δ is the waiting time required before execution. k The current processing capacity per unit time of heterogeneous computing resources:

[0085] r = -(α*N) i / δ k + (1-α) * T k,wait )

[0086] Environment: The state of heterogeneous computing resources and the state of simulation subtasks.

[0087] Action: Select simulation subtasks for resource scheduling and computation according to a certain strategy (such as a priority strategy or a random strategy).

[0088] Figure 3 The flowchart below shows the reinforcement learning process for the scheduling model. After training according to the aforementioned training process, the task scheduling simulator can be obtained.

[0089] (3) Online scheduling

[0090] Once the scheduling model is trained, it can be deployed in a real-world environment for task scheduling. The scheduling process is as follows: When a new batch of subtasks arrives, the current state of the heterogeneous resources and the subtask states are input into the scheduling model. The scheduling model outputs a probability distribution of allocating these tasks to various computing resources. The list of computing resources with the highest probability in the probability distribution is extracted as the planned task scheduler. Subtasks are then assigned to the corresponding heterogeneous computing resources according to the task scheduler.

[0091] Step 3: According to the planned task scheduling, the defect simulation subtask is assigned to the corresponding heterogeneous computing resources for image simulation. The simulation images from each heterogeneous computing resource are then merged to obtain the final defect simulation image.

[0092] While assigning defect simulation subtasks to corresponding heterogeneous computing resources for sub-image defect simulation, continuous optimization of these resources is performed during image distribution and merging in the defect simulation process. In the heterogeneous computing environment, operations such as data loading, cleaning, and network transmission are executed on the CPU, while computationally sensitive data computation operations are performed on the more computationally efficient GPU or NPU. The CPU-executed data loading, segmentation, and transmission operations, as well as the GPU-executed defect simulation operations, are abstracted into execution logic consistent with the computational operations. During data processing, a corresponding execution process is generated for each operation and counted in both the GPU and CPU task queues. When the number of processes in the GPU task queue exceeds the load threshold, the number of CPU processing processes and the number of ready simulation subtasks are reduced to ensure the number of processes in the GPU task queue remains below the load threshold, achieving normal GPU load. Conversely, the number of CPU processing processes and ready simulation subtasks is increased to fully utilize GPU or NPU computing resources, maintaining a balance between CPU and GPU and achieving global scheduling of heterogeneous resources during simulated image segmentation and merging.

[0093] This embodiment provides a power grid defect image simulation method using heterogeneous computing resource load balancing scheduling. The method involves dividing a large image defect simulation task into several smaller image defect simulation subtasks through image segmentation. Then, a task scheduling simulator is designed based on the cluster status of the heterogeneous computing resources and the status of the defect simulation subtasks. This simulator is used to plan task scheduling, minimizing the average completion time of the defect simulation tasks. According to the planned task schedule, the defect simulation subtasks are allocated to corresponding heterogeneous computing resources, and after image simulation, they are merged to obtain the final defect simulation image. This invention utilizes heterogeneous resources to schedule the divided small image defect simulation subtasks, minimizing the average completion time of the simulation tasks, improving computational efficiency while ensuring the effectiveness of high-resolution large-scale power grid defect simulation.

[0094] The above embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A power defect image simulation method employing heterogeneous computing resource load balancing scheduling, characterized in that, Includes the following steps: Obtain the simulation image to be processed, and perform image segmentation on the simulation image according to the defect to be simulated, thus breaking down the defect simulation task into defect simulation sub-tasks. Task scheduling is planned using a task scheduling simulator. The task scheduling simulator aims to minimize resource consumption and uses the constraint that heterogeneous computing resources meet the requirements of the defect simulation task to plan the task scheduling. According to the planned task scheduling, the defect simulation subtask is allocated to the corresponding heterogeneous computing resources for image simulation. The simulation images of various heterogeneous computing resources are merged to obtain the final defect simulation image; The task scheduling simulator is designed based on the cluster state and defect simulation subtask state of heterogeneous computing resources. It includes three parts: resource consumption record, offline training and optimization, and online scheduling. The resource consumption record specifically includes: Construct an initial heterogeneous cluster environment, which includes several available heterogeneous computing resources; Several simulation tasks are created, each of which contains at least several sub-simulation tasks, and each of the sub-simulation tasks performs image segmentation. Record the computing status of each heterogeneous computing resource after the image simulation of each simulation task is completed in the initial heterogeneous cluster environment. The computing status includes at least the time consumed by the simulation calculation and the waiting time. The offline training and optimization specifically includes: A scheduling model to be trained is obtained, and the computing status of each heterogeneous computing resource and the status of the sub-simulation task recorded in the resource consumption record section are used as inputs to the scheduling model. The output is the probability that each heterogeneous computing resource is assigned a task. An optimization signal is obtained through a reward function, which generates the optimization signal based on the simulation calculation time and waiting time recorded in the resource consumption record section. The scheduling model is optimized using an optimizer to obtain an optimized scheduling model; The optimized scheduling model is repeatedly optimized using actual test data until the scheduling model converges to obtain the final task scheduling simulator. The online scheduling specifically includes: The current state of the subtask to be simulated and the state of the heterogeneous computing resources are input into the final task scheduling simulator so that the task scheduling simulator can generate a probability distribution for allocating the current subtask to be simulated to each of the heterogeneous computing resources. The heterogeneous computing resource allocation with the highest probability in the probability distribution is used as the planned task scheduler.

2. The power defect image simulation method using heterogeneous computing resource load balancing scheduling according to claim 1, characterized in that, Based on the defect to be simulated, the simulation image is segmented to break down the defect simulation task into defect simulation sub-tasks, specifically including: The number of defects to be simulated is taken as the number of defect simulation subtasks that need to be split. Image segmentation is performed using a dynamic sliding algorithm and a segmentation window that matches the defect target. For the defect to be simulated, the size and number of segmented images are obtained to complete the creation of the defect simulation subtask.

3. The power defect image simulation method using heterogeneous computing resource load balancing scheduling according to claim 2, characterized in that, The size of the segmentation window is determined based on the size of the defect target. The specific process for determining the size of the segmentation window is as follows: Preset the size of several image sliding windows; The sliding window selection area is calculated based on the area of ​​the defect target. The selection is made from the plurality of image sliding windows based on the sliding window selection area, and the smallest area among all image sliding windows that is larger than the sliding window selection area is taken as the segmentation window.

4. The power defect image simulation method using heterogeneous computing resource load balancing scheduling according to claim 3, characterized in that, The formula for calculating the area selected by the sliding window is as follows: In the formula, This indicates the area selected by the sliding window. This represents the area of ​​the simulated defect. The area of ​​the image corresponding to the simulated defect. This represents the area of ​​the image to be simulated.

5. The power defect image simulation method using heterogeneous computing resource load balancing scheduling according to claim 3, characterized in that, The formula for calculating the number of segmented images is as follows: In the formula, This indicates the number of images after segmentation. The length of the image to be simulated. The width of the image to be simulated. Slide the window size for the selected image. This is for rounding down.

6. The power defect image simulation method using heterogeneous computing resource load balancing scheduling according to claim 1, characterized in that, The constraint is that heterogeneous computing resources must meet the requirements for running the defect simulation task. Specifically: A heterogeneous computing resource can process only one defect simulation subtask at a time, and the defect simulation subtask is allocated to the heterogeneous computing resource during a resource idle period.

7. The power defect image simulation method using heterogeneous computing resource load balancing scheduling according to claim 1, characterized in that, According to the planned task scheduling, the defect simulation subtasks are allocated to corresponding heterogeneous computing resources, and the process also includes: For a central processing unit and a graphics processing unit in a heterogeneous computing environment, a corresponding execution process is generated for each data processing operation and is counted in the task queue of the central processing unit and the task queue of the graphics processing unit. When the number of processes in the task queue of the image processor exceeds the corresponding load threshold, the number of processing processes of the central processing unit is reduced; conversely, the number of processing processes of the central processing unit is increased.