Hybrid parallel computing method and device for power grid computing deduction generality service

By introducing complexity and density indices to cluster sample data in power grid computation simulation and splitting model layers hierarchically, the problems of unreasonable task division and unbalanced load in power grid computation are solved, achieving efficient hybrid parallel computing and improving the overall effect of power grid computation simulation.

CN120909764APending Publication Date: 2025-11-07CHINA ELECTRIC POWER RESEARCH INSTITUTE CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510876737.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-27
Publication Date
2025-11-07

AI Technical Summary

Technical Problem

Existing single parallel computing technologies cannot meet the high real-time requirements of data in power grid calculation and simulation. They suffer from problems such as unreasonable task division and unbalanced load, which limits the overall effect.

Method used

The sample data is clustered based on its complexity and density, and the clustering results are distributed to each device cluster as training data. The artificial intelligence model is split into layers according to its hierarchy, and the model layers are distributed to parallel computing devices within each device cluster. The model layers are adjusted based on the computing task time within the device cluster to achieve hybrid parallel computing.

Benefits of technology

It enables fine-grained partitioning of power grid application data and training models, improves the execution efficiency of algorithm models, balances the computational load within the equipment cluster, avoids the problem of excessively long training time caused by data imbalance, and improves the overall effect of power grid computation and simulation services.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120909764A_ABST
    Figure CN120909764A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of computers, and particularly provides a hybrid parallel computing method and device for power grid computing deduction generality service, and the method comprises the steps: carrying out the clustering of sample data based on the complexity and intensity of the sample data, and distributing each cluster in a clustering result to each equipment cluster as training data; splitting the artificial intelligence model according to layers, and distributing the split model layers to parallel computing equipment in each equipment cluster; calculating the task parallel complexity of each equipment cluster based on the time required for executing the calculation task by the parallel calculation equipment in each equipment cluster; and based on the task parallel complexity of each equipment cluster, adjusting the model layer allocated by the parallel computing equipment in each equipment cluster. According to the technical scheme provided by the invention, data and a training model required by power grid application are divided more finely, efficient execution of an algorithm model is realized, and the overall effect of power grid calculation deduction service is improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of computer, in particular to a hybrid parallel computing method and device for power grid computing deduction common service. BACKGROUND

[0002] In recent years, with the access of massive new energy power generation equipment in the power system and the strong uncertainty brought by external extreme events, the system operation mode is more diversified, and higher requirements are put forward for the trend deduction of the power system. Artificial intelligence technologies represented by deep learning, knowledge graph, image recognition, etc. can effectively support power business scenarios, deduce and predict the trend of the power system, and improve the collaborative interaction ability of source, grid, load and storage, but when dealing with highly complex models and massive data, a large amount of time and hardware resources will be consumed, resulting in low overall operation efficiency. Parallel computing technology can decompose tasks to multiple computing nodes for parallel processing, not only significantly shortening the computing time to meet the high real-time requirements of the power system, but also supporting load mode identification and prediction driven by big data, so as to effectively cope with the challenge of massive data in power grid business.

[0003] At present, in the actual business scenario of power grid, parallel computing can be mainly divided into model parallel, data parallel and pipeline parallel three categories, and single parallel computing technology cannot meet the high real-time requirement of data. Hybrid parallel computing technology faces problems such as unreasonable task division and unbalanced load, which limits the overall effect of subsequent deduction and prediction. SUMMARY

[0004] In order to overcome the above defects, the present application provides a hybrid parallel computing method and device for power grid computing deduction common service.

[0005] In the first aspect, a hybrid parallel computing method for power grid computing deduction common service is provided, which comprises:

[0006] Clustering sample data based on the complexity and density of the sample data, and distributing each cluster in the clustering result to each device cluster as training data;

[0007] Splitting the artificial intelligence model by level, and distributing the split model layer to the parallel computing devices in each device cluster;

[0008] Calculating the task parallel complexity of each device cluster based on the time required for the parallel computing devices in each device cluster to execute the computing task;

[0009] Adjusting the model layer allocated to the parallel computing devices in each device cluster based on the task parallel complexity of each device cluster, so that the parallel computing devices in each device cluster execute hybrid parallel computing tasks.

[0010] Preferably, the complexity of the sample data is as follows:

[0011]

[0012] In the above formula, h i is the complexity of the sample data i, C i is the normalized feature of the sample data i processed by the L2 norm, K is the number of sample data within a preset distance range around the sample data i, and D(x n ,x n+1 ) is the Euclidean distance between the nth sample data x n closest to the sample data i and the (n+1)th sample data x n+1 closest to the sample data i.

[0013] Further, the density of the sample data is as follows:

[0014]

[0015] In the above formula, r i is the density of the sample data i, α is the first weight, C j is the normalized feature of the sample data j processed by the L2 norm, Similarity(C i ,C j ) is the cosine similarity of C i and C j .

[0016] Further, the clustering of the sample data based on the complexity and the density of the sample data comprises:

[0017] Clustering the sample data based on the weighted result of the complexity and the density of the sample data, wherein the weighted result of the complexity and the density of the sample data is as follows:

[0018] Value i = θ * h i + (1-θ) * r i

[0019] In the above formula, Value i is the weighted result of the complexity and the density of the sample data i, and θ is the second weight.

[0020] Preferably, the task parallel complexity of the device cluster is as follows:

[0021]

[0022] In the above formula, Par is the task parallel complexity of the device cluster, n is the number of parallel computing devices in the device cluster, T i is the time required for the i-th parallel computing device to perform a computing task according to the assigned training data and model layer, is the average value of the time required for each parallel computing device in the device cluster to perform a computing task according to the assigned training data and model layer.

[0023] Preferably, the adjusting of the model layer assigned to each parallel computing device in each device cluster based on the task parallel complexity of each device cluster comprises:

[0024] determining whether the task parallel complexity of the device cluster is less than a preset threshold, if yes, the adjusting ends, otherwise, numbering each parallel computing device in the device cluster, and defining the time required for the parallel computing device with the maximum execution time to perform a computing task according to the assigned training data and model layer as l max , defining the time required for the parallel computing device with the minimum execution time to perform a computing task according to the assigned training data and model layer as l min , and adjusting the model layer assigned to each parallel computing device in each device cluster based on the execution time of each parallel computing device in the device cluster.

[0025] Further, the adjusting of the model layer assigned to each parallel computing device in each device cluster based on the execution time of each parallel computing device in the device cluster comprises:

[0026] Step a. obtaining the time l max required for the parallel computing device with the maximum execution time to perform a computing task according to the assigned training data and model layer;

[0027] Step b. obtaining the time l min required for the parallel computing device with the minimum execution time to perform a computing task according to the assigned training data and model layer;

[0028] Step c. when l max > l min , moving the last layer of the model layer of the parallel computing device numbered h-1 to the parallel computing device with the minimum execution time, and when l max ≤ l min , moving the first layer of the model layer of the parallel computing device numbered h+1 to the parallel computing device with the minimum execution time;

[0029] Step d. if the number corresponding to the parallel computing device l max is equal to h, performing step e, otherwise, performing step b;

[0030] Step e. judging whether the task parallel complexity of the device cluster is less than a preset threshold, if yes, ending the operation, otherwise, returning to step a;

[0031] wherein, h is the number of the parallel computing device with the minimum time required for the calculation task.

[0032] In a second aspect, a hybrid parallel computing device for grid computing deduction common service is provided, which comprises:

[0033] a clustering module, configured to cluster the sample data based on the complexity and density of the sample data, and assign each cluster in the clustering result to each device cluster as training data;

[0034] a splitting module, configured to split the artificial intelligence model by level, and assign the split model layers to the parallel computing devices in each device cluster;

[0035] a computing module, configured to calculate the task parallel complexity of each device cluster based on the time required for the parallel computing devices in each device cluster to perform the calculation task;

[0036] an adjusting module, configured to adjust the model layers assigned to the parallel computing devices in each device cluster based on the task parallel complexity of each device cluster, so that the parallel computing devices in each device cluster perform hybrid parallel computing tasks.

[0037] Preferably, the complexity of the sample data is as follows:

[0038]

[0039] In the above formula, h i is the complexity of sample data i, C i is the normalized feature of sample data i after L2 norm processing, K is the number of sample data within a preset distance range around sample data i, D(x n ,x n+1 ) is the Euclidean distance between the nth sample data x n closest to sample data i and the (n+1)th sample data x n+1 closest to sample data i,

[0040] Further, the density of the sample data is as follows:

[0041]

[0042] In the above formula, r i is the density of sample data i, α is the first weight, Cj is the normalized feature of the sample data j after L2 norm processing, Similarity(C i , C j ) is the cosine similarity of C i and C j ,

[0043] Further, the sample data is clustered based on the complexity and density of the sample data, comprising:

[0044] The sample data is clustered based on the weighted result of the complexity and density of the sample data, wherein the weighted result of the complexity and density of the sample data is as follows:

[0045] Value i = θ * h i + (1-θ) * r i

[0046] In the above formula, Value i is the weighted result of the complexity and density of the sample data i, and θ is the second weight.

[0047] Preferably, the task parallel complexity of the device cluster is as follows:

[0048]

[0049] In the above formula, Par is the task parallel complexity of the device cluster, n is the number of parallel computing devices in the device cluster, T i is the time required for the i-th parallel computing device to perform a computing task according to the assigned training data and model layer, is the average value of the time required for each parallel computing device in the device cluster to perform a computing task according to the assigned training data and model layer.

[0050] Preferably, the task parallel complexity of each device cluster is used to adjust the model layer assigned to each parallel computing device in the device cluster, comprising:

[0051] If the task parallel complexity of the device cluster is less than a preset threshold, the adjustment is ended, otherwise, each parallel computing device in the device cluster is numbered, and the parallel computing device with the maximum time required to perform a computing task according to the assigned training data and model layer is defined as l max , the parallel computing device with the minimum time required to perform a computing task according to the assigned training data and model layer is defined as l min , and the model layer assigned to each parallel computing device in the device cluster is adjusted based on the execution time of each parallel computing device in the device cluster.

[0052] Furthermore, adjusting the model layer allocated to each parallel computing device within the device cluster based on the execution time of each parallel computing device within the device cluster includes:

[0053] Step a. Obtain the time required for the parallel computing device to execute the computational task based on the allocated training data and model layers. max ;

[0054] Step b. Obtain the parallel computing device with the minimum time required to execute the computational task based on the allocated training data and model layers. min ;

[0055] Step c. When l max >l min When the last model layer of the parallel computing device numbered h-1 is moved to the parallel computing device that requires the least time to execute the computation task, when l max ≤l min At that time, the first model layer of the parallel computing device numbered h+1 is moved to the parallel computing device that requires the least time to execute the computing task;

[0056] Step d. If the l max If the device number is equal to h, then proceed to step e; otherwise, proceed to step b.

[0057] Step e. Determine whether the task parallel complexity of the device cluster is less than a preset threshold. If yes, end the operation; otherwise, return to step a.

[0058] Where h is the number of the parallel computing device that requires the least amount of time to compute the task.

[0059] Thirdly, a computer device is provided, comprising: one or more processors;

[0060] The processor is used to store one or more programs;

[0061] When the one or more programs are executed by the one or more processors, the hybrid parallel computing method for common services of power grid calculation and deduction is implemented.

[0062] Fourthly, a computer-readable storage medium is provided, on which a computer program is stored, wherein when the computer program is executed, the hybrid parallel computing method for common services of power grid calculation and deduction is implemented.

[0063] The above-described technical solutions of the present invention have at least one or more of the following beneficial effects:

[0064] The application provides a hybrid parallel computing method and device for power grid computing deduction common service, comprising: clustering sample data based on complexity and density of the sample data, and distributing each cluster in the clustering result to each device cluster as training data; splitting an artificial intelligence model by levels, and distributing the split model layers to parallel computing devices in each device cluster; calculating task parallel complexity of each device cluster based on time required by the parallel computing devices in each device cluster to execute a computing task; and adjusting the model layers distributed to the parallel computing devices in each device cluster based on the task parallel complexity of each device cluster, so that the parallel computing devices in each device cluster execute a hybrid parallel computing task. The technical solution provided by the application performs more fine division on data and training models required by power grid applications, realizes efficient execution of algorithm models, and improves the overall effect of power grid computing deduction service. Specifically:

[0065] The application introduces complexity and density measurement indexes into the clustering model, preferentially selects power data samples with high data value and strong correlation, and realizes efficient division of data among the device clusters. By learning the internal features of the associated data in the sample center, the overall deduction effect of the model is improved. Further, the application introduces parallel complexity as a measurement in the model parallel process, dynamically updates the model levels in each device according to the parallel complexity, balances the overall computing amount of each device, avoids the problem of too long device training time caused by unbalanced data in the device cluster, and realizes efficient execution of the model. BRIEF DESCRIPTION OF DRAWINGS

[0066] Figure 1 is a main step flow diagram of the hybrid parallel computing method for power grid computing deduction common service of the embodiment of the application;

[0067] Figure 2 is a principle block diagram of the hybrid parallel computing method for power grid computing deduction common service of the embodiment of the application. DETAILED DESCRIPTION

[0068] The specific embodiments of the application will be further described in detail below with reference to the accompanying drawings.

[0069] To make the purpose, technical solution and advantages of the embodiments of the application clearer, the technical solution in the embodiments of the application will be clearly and completely described below with reference to the drawings in the embodiments of the application. Obviously, the described embodiments are part of the embodiments of the application, rather than all the embodiments of the application. Based on the embodiments in the application, all other embodiments obtained by those skilled in the art without creative labor fall within the protection scope of the application.

[0070] As disclosed in the background, in recent years, with the access of a large number of new energy power generation equipment in the power system and the strong uncertainty brought by external extreme events, the system operation mode is more diversified, and higher requirements are put forward for the trend inference of the power system. Artificial intelligence technologies represented by deep learning, knowledge graph, image recognition, etc. can effectively support the power business scenario, infer and predict the trend of the power system, and improve the collaborative interaction ability of source, network, load and storage, but when dealing with highly complex models and massive data, a large amount of time and hardware resources are consumed, resulting in low overall operation efficiency. Parallel computing technology can decompose tasks to multiple computing nodes for parallel processing, not only significantly shortening the computing time to meet the high real-time requirements of the power system, but also supporting load pattern recognition and prediction driven by big data, thereby effectively coping with the challenge of massive data in power grid business.

[0071] Currently, in the actual business scenario of the power grid, parallel computing can be mainly divided into model parallel, data parallel and pipeline parallel, and a single parallel computing technology cannot meet the high real-time requirements of data. Hybrid parallel computing technology faces problems such as unreasonable task division and unbalanced load, which limits the overall effect of subsequent inference and prediction.

[0072] In order to improve the above problems, the present application provides a hybrid parallel computing method and device for power grid computing and inference common service, comprising: clustering sample data based on the complexity and density of the sample data, and distributing each cluster in the clustering result to each device cluster as training data; splitting the artificial intelligence model by level, and distributing the split model layer to the parallel computing devices in each device cluster; calculating the task parallel complexity of each device cluster based on the time required by the parallel computing devices in each device cluster to execute the computing task; adjusting the model layer distributed to the parallel computing devices in each device cluster based on the task parallel complexity of each device cluster, so that the parallel computing devices in each device cluster execute hybrid parallel computing tasks. The technical solution provided by the present application more finely divides the data and training model required by the power grid application, realizes efficient execution of the algorithm model, and improves the overall effect of the power grid computing and inference service. Specifically:

[0073] The present application introduces complexity and density measurement indicators into the clustering model, preferentially selects power data samples with high data value and strong correlation, and realizes efficient division of data among devices clusters. By learning the internal characteristics of the associated data in the sample center, the overall inference effect of the model is improved. Further, the present application introduces parallel complexity as a measure in the model parallel process, dynamically updates the model levels in each device according to the parallel complexity, balances the overall computing amount of each device, avoids the problem of too long device training time caused by unbalanced data in the device cluster, and realizes efficient execution of the model.

[0074] The application can make the model have higher data value and correlation of power data samples by introducing complexity and density measurement indexes in the clustering model, make the data division between devices more efficient and reasonable, avoid long training time caused by data imbalance, and further introduce parallel complexity as a measurement in the model parallel process, dynamically update the model level in each device according to the parallel complexity, balance the overall calculation amount of each device, realize efficient execution of the model, and further improve the overall effect of power grid calculation deduction service. The above scheme is described in detail below.

[0075] Embodiment 1

[0076] Referring to the accompanying Figure 1 , Figure 1 is the main step flowchart of the hybrid parallel computing method for power grid calculation deduction common service of an embodiment of the application. As Figure 1 shown, the hybrid parallel computing method for power grid calculation deduction common service in the embodiment of the application mainly includes the following steps:

[0077] Step S101: clustering the sample data based on the complexity and density of the sample data, and distributing each clustering cluster in the clustering result to each device cluster as training data;

[0078] Step S102: splitting the artificial intelligence model by level, and distributing the split model layer to the parallel computing device in each device cluster;

[0079] Step S103: calculating the task parallel complexity of each device cluster based on the time required for the parallel computing device in each device cluster to execute the computing task;

[0080] Step S104: adjusting the model layer distributed to the parallel computing device in each device cluster based on the task parallel complexity of each device cluster, so that the parallel computing device in each device cluster executes the hybrid parallel computing task.

[0081] In one embodiment, the principle block diagram of the hybrid parallel computing method for power grid calculation deduction common service of an embodiment of the application is as shown in Figure 2 , in which N is the number of parallel computing devices in a device cluster, and X1 and X2 are the horizontal and vertical axes corresponding to the sample data coordinate system.

[0082] In this embodiment, in view of the poor performance of the clustering model in processing complex samples located at the boundary of the clustering cluster, the complexity is first introduced to identify the complex samples located at the boundary of the clustering cluster. The complexity of the sample data is as follows:

[0083]

[0084] In the above formula, h i is the complexity of sample data i, C i is the normalized feature of sample data i after L2 norm processing, K is the number of sample data within a preset distance range around sample data i, and D(x n , x n+1 ) is the Euclidean distance between the nth sample data x n closest to sample data i and the (n+1)th sample data x n+1 closest to sample data i.

[0085] In an embodiment, if only the complexity of the sample is used as a measure for clustering the sample, too much attention is paid to the complex sample at the boundary, but there are often outliers in the complex sample, thereby affecting the overall generalization performance of the model. The present application simultaneously introduces density as a measure, and considers the sample located in the high-density area as the sample center. The density of the sample data is as follows:

[0086]

[0087] In the above formula, r i is the density of sample data i, a is the first weight, C j is the normalized feature of sample data j after L2 norm processing, Similarity(C i , C j ) is the cosine similarity of C i and C j .

[0088] In an embodiment, the clustering of the sample data based on the complexity and density of the sample data comprises:

[0089] The sample data is clustered based on the weighted result of the complexity and density of the sample data, wherein the weighted result of the complexity and density of the sample data is as follows:

[0090] Value i = θ * h i + (1- θ) * r i

[0091] In the above formula, Value i is the weighted result of the complexity and density of sample data i, and θ is the second weight.

[0092] In this embodiment, the formed partition data is transmitted to the device cluster in the form of batch processing. When artificial intelligence models such as neural networks and self-attention mechanism models are used to process data, due to the high requirements of power business scenarios for real-time performance and accuracy, more stringent constraints are also put forward for model performance, and the model construction becomes more complex, which is manifested as a deeper network model architecture. The model trained by a single device will have a hardware memory bottleneck and cannot accommodate complex deep models. The present application introduces model parallelism in the device cluster, divides the model into multiple partitions, and analyzes the load balancing situation to balance the overall computing amount in each device.

[0093] First, the model is split by level, the partition set is initialized, and the model level is initially uniformly split according to the number of devices in the device cluster. Then, the execution time of the layered model on each device is calculated, and the time is standardized to eliminate dimensional differences.

[0094]

[0095] wherein, t i represents the execution time of the i th device after standardization, t represents the execution time of the i th device before standardization, min(t) represents the minimum execution time, and max(t) represents the maximum execution time. i t i represents the execution time of the i th device after standardization, t represents the execution time of the i th device before standardization, min(t) represents the minimum execution time, and max(t) represents the maximum execution time.

[0096] After standardization, the load in the device cluster is dynamically updated according to the required execution time. Therefore, the task parallel complexity based on the device cluster adjusts the model layer allocated to the parallel computing device in the device cluster, including:

[0097] If the task parallel complexity of the device cluster is less than the preset threshold, the adjustment is ended. Otherwise, each parallel computing device in the device cluster is numbered, and the parallel computing device with the maximum execution time of the computing task is defined as l max , the parallel computing device with the minimum execution time of the computing task is defined as l min , and the model layer allocated to the parallel computing device in the device cluster is adjusted based on the execution time of each parallel computing device in the device cluster.

[0098] In one embodiment, the model layer allocated to the parallel computing device in the device cluster is adjusted based on the execution time of each parallel computing device in the device cluster, including:

[0099] Step a. the parallel computing device requiring the maximum time to execute the computing task according to the assigned training data and model layer executes the computing task requiring time l max ;

[0100] Step b. the parallel computing device requiring the minimum time to execute the computing task according to the assigned training data and model layer executes the computing task requiring time l min ;

[0101] Step c. when l max >l min , the last model layer of the parallel computing device numbered h-1 is moved to the parallel computing device requiring the minimum time to execute the computing task, and when l max ≤l min , the first model layer of the parallel computing device numbered h+1 is moved to the parallel computing device requiring the minimum time to execute the computing task;

[0102] Step d. if the l max device corresponds to the number h, step e is executed, otherwise, step b is executed;

[0103] Step e. it is judged whether the task parallel complexity of the device cluster is less than a preset threshold, if yes, the operation is ended, otherwise, step a is returned;

[0104] Wherein, h is the number of the parallel computing device requiring the minimum time to execute the computing task.

[0105] Specifically, the task parallel complexity of the device cluster is as follows:

[0106]

[0107] In the above formula, Par is the task parallel complexity of the device cluster, n is the number of parallel computing devices in the device cluster, T i is the time required for the i-th parallel computing device to execute the computing task according to the assigned training data and model layer, is the average value of the time required for each parallel computing device in the device cluster to execute the computing task according to the assigned training data and model layer.

[0108] Embodiment 2

[0109] Based on the same inventive concept, the application also provides a hybrid parallel computing device for power grid computing deduction common service, which comprises:

[0110] A clustering module is configured to cluster sample data based on the complexity and density of the sample data, and assign each clustering cluster in the clustering result to each device cluster as training data.

[0111] a splitting module configured to split the artificial intelligence model hierarchically and distribute the split model layers to parallel computing devices in each device cluster;

[0112] a calculating module configured to calculate task parallel complexity of each device cluster based on time required for the parallel computing devices in each device cluster to perform the computing task;

[0113] an adjusting module configured to adjust the model layers distributed to the parallel computing devices in each device cluster based on the task parallel complexity of each device cluster, so that the parallel computing devices in each device cluster perform the hybrid parallel computing task.

[0114] Preferably, the complexity of the sample data is as follows:

[0115]

[0116] In the above formula, h i is the complexity of sample data i, C i is the normalized feature of sample data i processed by L2 norm, K is the number of sample data within a preset distance range around sample data i, D(x n ,x n+1 ) is the Euclidean distance between the nth sample data x n closest to sample data i and the (n+1)th sample data x n+1 closest to sample data i,

[0117] Further, the density of the sample data is as follows:

[0118]

[0119] In the above formula, r i is the density of sample data i, a is a first weight, C j is the normalized feature of sample data j processed by L2 norm, Similarity(C i ,C j ) is the cosine similarity of C i and C j ,

[0120] Further, the clustering of the sample data based on the complexity and the density of the sample data comprises:

[0121] clustering the sample data based on the weighted result of the complexity and the density of the sample data, wherein the weighted result of the complexity and the density of the sample data is as follows:

[0122] Value i = θ * h i + (1- θ) * r i

[0123] In the above formula, Value i is the weighted result of the complexity and density of the sample data i, and θ is the second weight.

[0124] Preferably, the task parallel complexity of the device cluster is as follows:

[0125]

[0126] In the above formula, Par is the task parallel complexity of the device cluster, n is the number of parallel computing devices in the device cluster, T i is the time required for the i-th parallel computing device to perform a computing task according to the assigned training data and model layer, is the average value of the time required for each parallel computing device in the device cluster to perform a computing task according to the assigned training data and model layer.

[0127] Preferably, the adjustment of the model layer assigned to each parallel computing device based on the task parallel complexity comprises:

[0128] determining whether the task parallel complexity is less than a preset threshold, if yes, the adjustment is ended, otherwise, numbering each parallel computing device, and defining the time required for the parallel computing device with the maximum computing task execution time to perform a computing task according to the assigned training data and model layer as l max , and the time required for the parallel computing device with the minimum computing task execution time to perform a computing task according to the assigned training data and model layer as l min , when l max > l min , moving the last layer of model layer of the parallel computing device numbered h-1 to the parallel computing device with the minimum computing task execution time, when l max ≤ l min , moving the first layer of model layer of the parallel computing device numbered h+1 to the parallel computing device with the minimum computing task execution time, until the task parallel complexity is less than the preset threshold, wherein h is the number of the parallel computing device with the minimum computing task execution time.

[0129] The application provides a hybrid parallel computing method and device for power grid computing deduction common service, comprising: clustering sample data based on complexity and density of the sample data, and distributing each cluster in the clustering result to each device cluster as training data; splitting an artificial intelligence model according to levels, and distributing the split model layer to parallel computing devices in each device cluster; calculating task parallel complexity of each device cluster based on time required by parallel computing devices in each device cluster to execute a computing task; adjusting the model layer distributed to parallel computing devices in each device cluster based on the task parallel complexity of each device cluster, so that parallel computing devices in each device cluster execute a hybrid parallel computing task. The technical scheme provided by the application performs more fine division on data and training models required by power grid applications, realizes efficient execution of algorithm models, improves the overall effect of power grid computing deduction service, and specifically:

[0130] The application introduces complexity and density measurement indexes into the clustering model, preferentially selects power data samples with higher data value and strong correlation, and realizes efficient division of data among devices clusters. By learning the internal characteristics of the internal correlation data in the sample center, the overall deduction effect of the model is improved. Further, the application introduces parallel complexity as a measurement in the model parallel process, dynamically updates the model levels in each device according to the parallel complexity, balances the overall computing amount of each device, avoids the problem of too long device training time caused by unbalanced data in the device cluster, and realizes efficient execution of the model.

[0131] Embodiment 3

[0132] Based on the same inventive concept, the present application further provides a computer device, which comprises a processor and a memory, the memory is used to store a computer program, the computer program comprises program instructions, and the processor is used to execute the program instructions stored in the computer storage medium. The processor can be a central processing unit (CPU), and can also be other general-purpose processors, digital signal processors (DSP), application specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc., which are the computing core and control core of the terminal, and are suitable for implementing one or more instructions, and are specifically suitable for loading and executing one or more instructions in the computer storage medium to implement a corresponding method flow or a corresponding function, so as to implement the steps of the hybrid parallel computing method for power grid computing deduction common service in the embodiment.

[0133] Embodiment 4

[0134] Based on the same inventive concept, the present application further provides a storage medium, specifically a computer readable storage medium (Memory), which is a memory device in the computer device, and is used to store programs and data. It can be understood that the computer readable storage medium herein can include the built-in storage medium in the computer device, and of course can also include the expansion storage medium supported by the computer device. The computer readable storage medium provides a storage space, and the storage space stores the operating system of the terminal. Moreover, one or more instructions suitable for being loaded and executed by the processor are also stored in the storage space, and the instructions can be one or more computer programs (including program codes). It should be noted that the computer readable storage medium herein can be a high-speed RAM memory, or a non-volatile memory such as at least one disk memory. One or more instructions stored in the computer readable storage medium can be loaded and executed by the processor to implement the steps of the hybrid parallel computing method for power grid computing deduction common service in the embodiment.

[0135] Those skilled in the art will appreciate that embodiments of the application can be devised for a method, a system, or a computer program product. Accordingly, the present application can be embodied in the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present application can take the form of a computer program product on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROMs, optical storage devices, etc.) embodying computer readable program code.

[0136] The present application is described in reference to the flowchart illustrations and / or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart illustrations and / or block diagrams. Figure 1 one or more functions specified in the flowchart illustrations and / or block diagrams. Figure 1 one or more functions specified in the flowchart illustrations and / or block diagrams.

[0137] These computer program instructions can also be stored in a computer- readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instructions which implement the functions specified in the flowchart illustrations and / or block diagrams. Figure 1 one or more functions specified in the flowchart illustrations and / or block diagrams. Figure 1 one or more functions specified in the flowchart illustrations and / or block diagrams.

[0138] These computer program instructions can also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer-implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart illustrations and / or block diagrams. Figure 1 one or more functions specified in the flowchart illustrations and / or block diagrams. Figure 1 one or more functions specified in the flowchart illustrations and / or block diagrams.

[0139] Finally, it should be noted that the above-mentioned embodiments are merely intended for describing and illustrating, not limiting the technical solutions of the present application. Although the present application has been described in detail with reference to the above embodiments, those skilled in the art should understand that the specific embodiments of the present application can be modified or replaced by equivalents without departing from the spirit and scope of the present application, and any modifications or equivalent replacements without departing from the spirit and scope of the present application should be covered in the protection scope of the claims of the present application.

Claims

1. A hybrid parallel computing method for grid computing inference commonality service, characterized in that, The method comprises: clustering the sample data based on complexity and density of the sample data, and assigning each cluster in the clustering result to each device cluster as training data; splitting the artificial intelligence model by level, and assigning the split model layers to parallel computing devices in each device cluster; calculating task parallel complexity of each device cluster based on time required by the parallel computing devices in each device cluster to perform a computing task; adjusting the model layers assigned to the parallel computing devices in each device cluster based on the task parallel complexity of each device cluster, so that the parallel computing devices in each device cluster perform a hybrid parallel computing task.

2. The method of claim 1, wherein, The complexity of the sample data is as follows: In the above formula, h i is the complexity of sample data i, C i is the normalized feature of sample data i processed by L2 norm, K is the number of sample data within a preset distance range around sample data i, D(x n ,x n+1 ) is the Euclidean distance between the nth sample data x n closest to sample data i and the n+1th sample data x n+1 closest to sample data i, 3. The method of claim 2, wherein, The density of the sample data is as follows: In the above formula, r i Let α be the density of sample data i, α be the first weight, and C be the density of sample data i. j For sample data j, after standardization using the L2 norm, Similarity(C) i C j ) is C i and C j cosine similarity, 4. The method of claim 3, wherein, The clustering of the sample data based on complexity and density of the sample data comprises: The clustering of the sample data is based on a weighted result of complexity and density of the sample data, wherein the weighted result of complexity and density of the sample data is as follows: Value i = θ * h i + (1 - θ) * r i In the above formula, Value i is a weighted result of the complexity and density of the sample data i, and θ is a second weight.

5. The method of claim 1, wherein, The task parallel complexity of the device cluster is as follows: In the above formula, Par is the task parallel complexity of the device cluster, n is the number of parallel computing devices in the device cluster, T i is the time required for the i-th parallel computing device to perform a computing task according to the assigned training data and model layer, is the average value of the time required for each parallel computing device in the device cluster to perform a computing task according to the assigned training data and model layer.

6. The method of claim 1, wherein, The adjusting of the model layers assigned to the parallel computing devices in each device cluster based on the task parallel complexity of each device cluster comprises: determining whether the task parallel complexity of the device cluster is less than a preset threshold, if yes, the adjustment ends, otherwise, numbering each parallel computing device in the device cluster, and defining the maximum parallel computing device required for executing the computing task according to the assigned training data and model layer as l max , defining the minimum parallel computing device required for executing the computing task according to the assigned training data and model layer as l mim , adjusting the model layer assigned to each parallel computing device in the device cluster based on the execution time of each parallel computing device in the device cluster.

7. The method of claim 6, wherein, The adjusting of the model layers assigned to the parallel computing devices in each device cluster based on execution time of each parallel computing device in the device cluster comprises: Step a. The parallel computing device that takes the most time to perform the computing task performs the computing task according to the assigned training data and model layer in time l max ; Step b. The parallel computing device that requires the least time to perform the computing task performs the computing task according to the assigned training data and model layer time l required to perform the computing task min ; Step c. When l max >l min , the last layer model layer of the parallel computing device numbered h-1 is moved to the parallel computing device with the minimum time required to perform the computing task, when l max ≤l min , the first layer model layer of the parallel computing device numbered h+1 is moved to the parallel computing device with the minimum time required to perform the computing task; Step d. If the l max If the number corresponding to the device is equal to h, step e is performed, otherwise step b is performed. Step e. determining whether the task parallel complexity of the device cluster is less than a preset threshold, if yes, ending the operation, otherwise, returning to step a; wherein h is the number of the parallel computing device with the minimum time required for the computing task.

8. A hybrid parallel computing device for grid computing co-evolution commonality services, characterized by, The device comprises: a clustering module configured to cluster the sample data based on complexity and density of the sample data, and assign each cluster in the clustering result to each device cluster as training data; a splitting module configured to split the artificial intelligence model by level, and assign the split model layers to parallel computing devices in each device cluster; a calculating module configured to calculate task parallel complexity of each device cluster based on time required by the parallel computing devices in each device cluster to perform a computing task; an adjusting module configured to adjust the model layers assigned to the parallel computing devices in each device cluster based on the task parallel complexity of each device cluster, so that the parallel computing devices in each device cluster perform a hybrid parallel computing task.

9. The apparatus of claim 8, wherein, The complexity of the sample data is as follows: In the above formula, h i is the complexity of sample data i, C i is the normalized feature of sample data i processed by L2 norm, K is the number of sample data within a preset distance range around sample data i, D(x n ,x n+1 ) is the Euclidean distance between the nth sample data x n closest to sample data i and the n+1th sample data x n+1 closest to sample data i, 10. The apparatus of claim 9, wherein, The density of the sample data is as follows: In the above formula, r i is the density of sample data i, a is the first weight, C j is the normalized feature of sample data j processed by L2 norm, i Similarity(C j ,C i ) is the cosine similarity of C j and C 11. The apparatus of claim 10, wherein, The clustering of the sample data based on complexity and density of the sample data comprises: The clustering of the sample data is based on a weighted result of complexity and density of the sample data, wherein the weighted result of complexity and density of the sample data is as follows: Value i = θ * h i + (1 - θ) * r i In the above formula, Value i is a weighted result of the complexity and density of the sample data i, and θ is a second weight.

12. The apparatus of claim 8, wherein, The task parallel complexity of the device cluster is as follows: In the above formula, Par is the task parallel complexity of the device cluster, n is the number of parallel computing devices in the device cluster, T i is the time required for the i-th parallel computing device to perform a computing task according to the assigned training data and model layer, is the average value of the time required for each parallel computing device in the device cluster to perform a computing task according to the assigned training data and model layer.

13. The apparatus of claim 8, wherein, The adjusting of the model layers assigned to the parallel computing devices in each device cluster based on the task parallel complexity of each device cluster comprises: determining whether the task parallel complexity of the device cluster is less than a preset threshold, if yes, the adjustment ends, otherwise, numbering each parallel computing device in the device cluster, and defining the maximum parallel computing device required for executing the computing task according to the assigned training data and model layer as l max , defining the minimum parallel computing device required for executing the computing task according to the assigned training data and model layer as l min , adjusting the model layer assigned to each parallel computing device in the device cluster based on the execution time of each parallel computing device in the device cluster.

14. The apparatus of claim 13, wherein, The adjusting of the model layers assigned to the parallel computing devices in each device cluster based on execution time of each parallel computing device in the device cluster comprises: Step a. The parallel computing device that takes the most time to perform the computing task performs the computing task according to the assigned training data and model layer takes time l max ; Step b. The parallel computing device that requires the least time to perform the computing task performs the computing task according to the assigned training data and model layer time l required to perform the computing task min ; Step c. when l max >l min the last model layer of the parallel computing device numbered h-1 is moved to the parallel computing device that requires the least time to perform the computing task, when l max ≤l min the first model layer of the parallel computing device numbered h+1 is moved to the parallel computing device that requires the least time to perform the computing task; Step d. If the l max If the number corresponding to the device is equal to h, step e is performed, otherwise step b is performed. Step e. determining whether the task parallel complexity of the device cluster is less than a preset threshold, if yes, ending the operation, otherwise, returning to step a; wherein h is the number of parallel computing devices with the minimum time required for the computing task.

15. A computer device, comprising: Comprise: one or more processors; the processor, for executing one or more programs; when the one or more programs are executed by the one or more processors, the hybrid parallel computing method for grid computing deduction common service is realized.

16. A computer readable storage medium characterized by: The computer program is stored thereon, and the computer program is executed to realize the hybrid parallel computing method for grid computing deduction common service as claimed in any one of claims 1 to 7.