A method for generating a power grid service identification model and a power grid service identification method

By generating a power grid service identification model at the edge of the distribution network and utilizing knowledge distillation techniques from teacher and student networks, the problems of low model recognition accuracy and high latency were solved, enabling efficient processing of multi-service data.

CN120146719BActive Publication Date: 2026-01-30BEIJING SMARTCHIP MICROELECTRONICS TECHNOLOGY CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202510226072.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-02-27
Publication Date
2026-01-30
Estimated Expiration
2045-02-27

AI Technical Summary

Technical Problem

Existing methods for deploying deep neural network models at the edge of power distribution networks suffer from low model recognition accuracy, high latency, and inability to handle multi-service data.

Method used

By acquiring a training sample set, a power grid business identification model is generated using knowledge distillation techniques from the teacher network model and the student network model. The model is then combined with training samples from classification and regression tasks to calculate a loss function based on response and channel, and backpropagation training is performed until the iterative convergence condition is met, thus generating a power grid business identification model suitable for the edge side.

Benefits of technology

It improves the model's recognition accuracy, reduces data recognition latency, and enhances data processing efficiency, enabling it to handle multi-business data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120146719B_ABST
    Figure CN120146719B_ABST
Patent Text Reader

Abstract

This invention discloses a method for generating a power grid service identification model and a method for identifying power grid services. The method includes: acquiring a training sample set formed by power grid service data; inputting the training samples and the type of the model task into a teacher network model for identification, obtaining a first identification result; inputting the training samples and the type of the model task into a student network model to be trained for identification, obtaining a second identification result; determining a first loss function and a second loss function based on the first identification result, the second identification result, and label data; calculating a fitting loss function based on the first and second loss functions; performing backpropagation on the student network model to be trained based on the fitting loss function to obtain a student network model to be trained for the next iteration, until the iteration convergence condition is met, thus obtaining the power grid service identification model; and solving the problems of low model identification accuracy, high latency, and inability to handle multi-service data.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of power distribution Internet of Things, and in particular to a power grid service identification model generation method and a power grid service identification method. BACKGROUND

[0002] In recent years, with the large-scale development of distributed new energy in the distribution network and the continuous increase of user-side load types, the operation and control of the distribution network present high complexity and uncertainty, and power data also presents characteristics such as scale, randomness and diversity. Deep learning models are less affected by noise, can accurately extract features of input data, output stable results, and can fully explore the correlation between data, and have been widely used in distribution network construction. However, in the face of massive distributed data, the traditional method of deploying deep learning models in the cloud to process massive data will bring great pressure to network bandwidth, resulting in a great reduction in efficiency and interaction delay. With the continuous deepening of the digital transformation of the power grid, emerging services are continuously emerging in the distribution network, and the computing and storage resources of edge intelligent fusion terminals are limited, and the edge cannot meet the increasing demand for service computing resources.

[0003] There are mainly two ways for the current deployment of deep neural network models on the edge side of the distribution network: one is to deploy small models on the edge side that meet the terminal computing power, but small models cannot fully explore data correlation, resulting in a decrease in accuracy; the other is to process and compress large-scale data on the edge side and then transmit the data to the cloud for model training. Although this method significantly reduces the amount of communication data, transmitting data from a remote edge side to the cloud for calculation still causes a delay that cannot be ignored. Moreover, the current two deployment methods are only suitable for the deployment of a single service model in the distribution network and cannot handle multi-service data. SUMMARY

[0004] The present application provides a power grid service identification model generation method and a power grid service identification method to solve the problems of low model identification accuracy, high delay and inability to handle multi-service data.

[0005] According to an aspect of the present application, a power grid service identification model generation method is provided, comprising:

[0006] obtaining a training sample set formed by power grid service data, the training sample set including at least two training samples and label data corresponding to the training samples, each training sample corresponding to at least two types of model tasks, and the types of model tasks including at least classification tasks and regression tasks;

[0007] input the training sample under the current iteration and the type of the model task corresponding to the training sample into a pre-trained teacher network model for recognition to obtain a first recognition result, and input the training sample under the current iteration and the type of the model task corresponding to the training sample into a to-be-trained student network model for recognition to obtain a second recognition result;

[0008] determine a first loss function and a second loss function according to the first recognition result, the second recognition result and label data, the first loss function being a response-based knowledge distillation loss function, and the second loss function being a channel knowledge distillation loss function;

[0009] calculate a fitting loss function according to the first loss function and the second loss function, perform back propagation on the to-be-trained student network model based on the fitting loss function to obtain a to-be-trained student network model for a next iteration, and repeat the process until an iteration convergence condition is met to obtain a power grid service identification model.

[0010] According to another aspect of the present application, a power grid service identification method applied to an edge device in a power distribution network is provided, which comprises:

[0011] obtaining to-be-identified power grid service data and the type of a model task corresponding to the to-be-identified power grid service data;

[0012] inputting the to-be-identified power grid service data and the type of the model task into a power grid service identification model, the power grid service identification model being obtained by model training using the method for generating a power grid service identification model according to any one of the embodiments of the present application;

[0013] determining a service identification result according to an output of the power grid service identification model;

[0014] performing operation and maintenance response according to the service identification result.

[0015] According to another aspect of the present application, a device for generating a power grid service identification model is provided, which comprises:

[0016] a sample set obtaining module configured to obtain a training sample set formed by power grid service data, the training sample set comprising at least two training samples and label data corresponding to the training samples, each of the training samples corresponding to at least two types of model tasks, and the types of the model tasks at least including a classification task and a regression task;

[0017] a sample recognition module configured to input a training sample under a current iteration and the type of a model task corresponding to the training sample into a pre-trained teacher network model for recognition to obtain a first recognition result, and input the training sample under the current iteration and the type of the model task corresponding to the training sample into a to-be-trained student network model for recognition to obtain a second recognition result.

[0018] The loss function calculation module is used to determine a first loss function and a second loss function based on the first identification result, the second identification result and the label data. The first loss function is a loss function based on response-based knowledge distillation, and the second loss function is a loss function based on channel-based knowledge distillation.

[0019] The loss function fitting module is used to calculate the fitting loss function based on the first loss function and the second loss function, and to perform backpropagation on the student network model to be trained based on the fitting loss function to obtain the student network model to be trained for the next iteration, until the iteration convergence condition is met to obtain the power grid business identification model.

[0020] According to another aspect of the present invention, a power grid service identification device is provided, applied to edge equipment in a distribution network, comprising:

[0021] The data acquisition module is used to acquire the power grid business data to be identified and the type of the model task corresponding to the power grid business data to be identified.

[0022] The model input module is used to input the power grid business data to be identified and the type of the model task into the power grid business identification model. The power grid business identification model is obtained by model training using the power grid business identification model generation method described in any embodiment of the present invention.

[0023] The service identification result determination module is used to determine the service identification result based on the output of the power grid service identification model.

[0024] The operation and maintenance response module is used to provide operation and maintenance responses based on the service identification results.

[0025] According to another aspect of the present invention, an electronic device is provided, the electronic device comprising:

[0026] At least one processor, and a memory communicatively connected to said at least one processor;

[0027] The memory stores a computer program that can be executed by the at least one processor, and the computer program is executed by the at least one processor to enable the at least one processor to execute the power grid service identification model generation method or the power grid service identification method according to any embodiment of the present invention.

[0028] According to another aspect of the present invention, a computer-readable storage medium is provided, the computer-readable storage medium storing computer instructions, the computer instructions being configured to cause a processor to execute and implement the method for generating a power grid service identification model or the power grid service identification method according to any embodiment of the present invention.

[0029] According to another aspect of the present invention, a computer program product is provided, the computer program product comprising a computer program that, when executed by a processor, implements the method for generating a power grid service identification model or the power grid service identification method according to any embodiment of the present invention.

[0030] The technical solution of this invention involves acquiring a training sample set formed from power grid business data. The training sample set includes at least two training samples and corresponding label data. Each training sample corresponds to at least two types of model tasks, with the model tasks including at least classification and regression tasks. The training samples and their corresponding model task types in the current iteration are input into a pre-trained teacher network model for identification, yielding a first identification result. The training samples and their corresponding model task types in the current iteration are then input into a student network model to be trained for identification, yielding a second identification result. A first loss function and a second loss function are determined based on the first identification result, the second identification result, and the label data. The first loss function is a response-based knowledge distillation loss function, and the second loss function is a channel-based knowledge distillation loss function. A fitting loss function is calculated based on the first and second loss functions. Backpropagation is then performed on the student network model to be trained based on the fitting loss function to obtain a student network model to be trained for the next iteration, until the iteration convergence condition is met, resulting in a power grid business identification model. This solution addresses the problems of low model identification accuracy, high latency, and inability to perform model identification. To address the issue of processing multi-service data, training samples are generated through at least two types of model tasks, including at least classification and regression tasks. This enables multi-task recognition and thus multi-service data processing. The training samples and their corresponding model task types are simultaneously input into a trained teacher network model and a student network model to be trained for recognition, yielding a first recognition result and a second recognition result. The teacher network model guides the training of the student network model, calculating a first loss function and a second loss function. The first loss function is a response-based knowledge distillation loss function, and the second loss function is a channel-based knowledge distillation loss function. A fitting loss function is calculated based on the first and second loss functions, and backpropagation is performed on the student network model to be trained. This embodiment of the application can simultaneously consider different types of model tasks during model training, ensuring that the student network model to be trained can accurately recognize different types of service data. The model training through knowledge distillation results in a high accuracy rate for the power grid service recognition model, and the small model size allows for direct deployment on edge devices, enabling edge devices to directly recognize power grid service data, reducing data recognition latency and improving data processing efficiency.

[0031] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of the present invention, nor is it intended to limit the scope of the invention. Other features of the invention will become readily apparent from the following description. Attached Figure Description

[0032] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying 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.

[0033] Figure 1 This is a flowchart of a method for generating a power grid service identification model according to Embodiment 1 of the present invention;

[0034] Figure 2 This is a flowchart of a method for generating a power grid service identification model according to Embodiment 2 of the present invention;

[0035] Figure 3 This is a flowchart of a power grid service identification method provided according to Embodiment 3 of the present invention;

[0036] Figure 4 This is an example diagram illustrating a model deployment according to Embodiment 3 of the present invention;

[0037] Figure 5 This is a schematic diagram of the structure of a power grid service identification model generation device according to Embodiment 4 of the present invention;

[0038] Figure 6 This is a schematic diagram of the structure of a power grid service identification device according to Embodiment 5 of the present invention;

[0039] Figure 7 This is a schematic diagram of the structure of an electronic device provided according to Embodiment Six of the present invention. Detailed Implementation

[0040] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.

[0041] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0042] Example 1

[0043] Figure 1 This is a flowchart of a method for generating a power grid service identification model according to Embodiment 1 of the present invention. This embodiment is applicable to situations requiring accurate identification of power grid services. The method can be executed by a device for generating a power grid service identification model, which can be implemented in hardware and / or software and can be configured in an electronic device. Figure 1 As shown, the method includes:

[0044] S101. Obtain a training sample set formed by power grid business data. The training sample set includes at least two training samples and the label data corresponding to the training samples. Each training sample corresponds to at least two types of model tasks. The types of model tasks include at least classification tasks and regression tasks.

[0045] In this embodiment, power grid business data can be data generated in the distribution network, such as one or more types of data including power grid operation data, power company marketing data, power grid model data, real-time power grid data, non-electrical data, and power big data. Power grid operation data includes one or more types of data including the power grid's operating status and equipment monitoring and detection data. Power company marketing data includes one or more types of data involving transaction prices, electricity sales, and electricity customers. Power grid model data mainly includes one or more types of data such as equipment topology and equipment static parameter information, which are typically stored in relational databases. Real-time power grid data includes one or more types of data such as equipment remote signaling information and telemetry information, reflecting the current operating status of the power grid. Non-electrical data includes one or more types of data such as meteorological data, flood data, and substation monitoring data. Power big data includes not only structured data, such as transaction prices and electricity sales, but also unstructured data, such as video surveillance images.

[0046] The training sample set can be understood as a dataset composed of training samples; the label data is the real label of the training samples; the model task can be understood as the model training task, such as topology identification, power quality monitoring, fault early warning, load forecasting, etc.; the types of model tasks include at least classification tasks and regression tasks. For example, topology identification and load forecasting are regression tasks, while power quality monitoring and fault early warning are classification tasks.

[0047] The process involves pre-collecting power grid business data generated during the operation of the distribution network, processing this data to form training samples, labeling these training samples, determining the corresponding tag data, and forming a training sample set based on the training samples and their corresponding tag data. This embodiment of the application can collect data corresponding to different types of model tasks to form training samples.

[0048] S102. Input the training samples and their corresponding model task types under the current iteration into the pre-trained teacher network model for recognition to obtain the first recognition result. Input the training samples and their corresponding model task types under the current iteration into the student network model to be trained for recognition to obtain the second recognition result.

[0049] In this embodiment, the student network model to be trained can be understood as the student network model that needs to be trained. The student network model can learn the teacher network model through knowledge distillation. The first recognition result can be understood as the data obtained by the teacher network model recognizing the training samples; the second recognition result can be understood as the data obtained by the student network model to be trained recognizing the training samples.

[0050] The teacher network model is pre-trained. The training samples of the current iteration and their corresponding model task types are input into the trained teacher network model. The teacher network model identifies the training samples based on the learned knowledge and obtains the first identification result. The training samples of the current iteration and their corresponding model task types are input into the student network model to be trained for identification and obtain the second identification result output by the student network model to be trained.

[0051] S103. Determine a first loss function and a second loss function based on the first identification result, the second identification result, and the tag data. The first loss function is a loss function based on response-based knowledge distillation, and the second loss function is a loss function based on channel-based knowledge distillation.

[0052] In this embodiment, the first loss function and the second loss function are loss functions calculated in two different ways; wherein, the first loss function is calculated using response-based knowledge distillation, for example, the first loss function is calculated based on the neural response of the last layer of the teacher network model; the second loss function is calculated using channel knowledge distillation, for example, the second loss function is calculated based on the data of each channel identified by the teacher network model.

[0053] Using the first identification result as a soft label, a loss function based on response-based knowledge distillation is used to calculate the loss between the first and second identification results. Using the label data as the real label, the loss between the second identification result and the label data is calculated using the same response-based knowledge distillation loss function. These two losses are then combined to obtain the first loss function. Similarly, using the first identification result as a soft label, a loss function based on response-channel knowledge distillation is used to calculate the loss between the first and second identification results. Using the label data as the real label, the loss between the second identification result and the label data is calculated using the same channel knowledge distillation loss function. These two losses are then combined to obtain the second loss function.

[0054] S104. Calculate the fitting loss function based on the first loss function and the second loss function. Perform backpropagation on the student network model to be trained based on the fitting loss function to obtain the student network model to be trained for the next iteration until the iteration convergence condition is met, and obtain the power grid business identification model.

[0055] In this embodiment, the fitting loss function can be understood as a loss function obtained by fitting multiple loss functions; the power grid business identification model can be understood as a neural network model that identifies business data in the distribution network, such as identifying equipment faults and topology based on power grid business data. The iterative convergence condition can be one or more conditions such as the model's accuracy exceeding an accuracy threshold, the training time exceeding a time threshold, or the number of training iterations exceeding a number of iterations threshold.

[0056] The first and second loss functions are combined and calculated, for example, by weighted summation or by substituting them into a pre-defined fitting formula. A fitted loss function is obtained by fitting the two loss functions. Backpropagation is then performed on the student network model to be trained based on the fitted loss function, adjusting the network parameters to obtain the student network model for the next iteration, until the iteration convergence condition is met, resulting in the power grid service identification model.

[0057] The method provided in this application allows for the pre-training of a high-performance but complex teacher model in the cloud. This teacher model then guides the training of a simpler, less computationally intensive student model. A multi-task-based channel knowledge distillation algorithm ensures that the student model's performance closely approximates that of the teacher model, making it suitable for most distribution network services. Finally, the distilled student model is distributed and deployed on the edge of the distribution network IoT network, where computing resources are limited. Data processing and recognition are performed directly at the edge, improving the efficiency of processing massive amounts of data in the distribution network and reducing interaction latency. This addresses the current problems of low efficiency in processing massive amounts of data, high interaction latency, and limited edge computing resources in the distribution network, providing an optimized deployment scheme for deep neural network models on the distribution network edge. This scheme can be applied to various distribution network services.

[0058] This invention provides a method for generating a power grid service identification model, solving the problems of low model recognition accuracy, high latency, and inability to handle multi-service data. Training samples are generated through at least two types of model tasks, including at least classification and regression tasks, enabling multi-task recognition and thus multi-service data processing. The training samples and their corresponding model task types are simultaneously input into a trained teacher network model and a student network model to be trained for recognition, yielding a first recognition result and a second recognition result. The teacher network model guides the training of the student network model, calculating a first loss function and a second loss function. The first loss function is based on response... The first loss function is a knowledge distillation loss function, and the second loss function is a channel knowledge distillation loss function. The fitting loss function is calculated based on the first loss function and the second loss function, and backpropagation is performed on the student network model to be trained. In the model training process, this embodiment can simultaneously take into account different types of model tasks, ensuring that the student network model to be trained can accurately identify different types of business data. By training the model through knowledge distillation, the power grid business identification model obtained has a high recognition accuracy, and the model is small enough to be directly deployed on edge devices so that edge devices can directly identify power grid business data, reduce data recognition latency, and improve data processing efficiency.

[0059] Example 2

[0060] Figure 2 This is a flowchart of a method for generating a power grid service identification model according to Embodiment 2 of the present invention. This embodiment is a refinement based on the above embodiments. Figure 2 As shown, the method includes:

[0061] S201. Obtain a training sample set formed by power grid business data. The training sample set includes at least two training samples and the label data corresponding to the training samples. Each training sample corresponds to at least two types of model tasks. The types of model tasks include at least classification tasks and regression tasks.

[0062] S202. Input the training samples and their corresponding model task types under the current iteration into the pre-trained teacher network model for recognition to obtain the first recognition result. Input the training samples and their corresponding model task types under the current iteration into the student network model to be trained for recognition to obtain the second recognition result.

[0063] After determining the first and second identification results, the first loss function is calculated using methods S203-S207, and the second loss function is calculated using methods S208-S213.

[0064] S203. Determine the first neural response result output by the last layer of the teacher network model based on the first recognition result.

[0065] In this embodiment, the first neural response result can be understood as the neural response output by the last layer of the teacher network model. The first identification result output by the teacher network model can include the neural responses output by each layer of the teacher network model, and the neural responses of each layer are labeled separately for easy differentiation. Analyzing the first identification result, the first neural response result output by the last layer of the teacher network model is determined.

[0066] S204. Determine the second neural response result output by the last layer of the student network model to be trained based on the second recognition result.

[0067] In this embodiment, the second neural response result can be understood as the neural response output by the last layer of the student network model to be trained. The second recognition result output by the student network model to be trained can include the neural responses output by each layer of the student network model to be trained, and the neural responses of each layer are labeled separately for easy differentiation. By analyzing the second recognition result, the second neural response result output by the last layer of the student network model to be trained is determined.

[0068] S205. Calculate the first target loss function based on the results of the first neural response and the second neural response.

[0069] In this embodiment, the first target loss function can be understood as a loss function, which may be the cross-entropy loss function. The first target loss function is obtained by substituting the first neural response result and the second neural response result into the calculation formula of the loss function.

[0070] S206. Calculate the second target loss function based on the second neural response results and the label data.

[0071] In this embodiment, the second target loss function can be understood as a loss function, such as the cross-entropy loss function. The second neural response result and the labeled data are substituted into the calculation formula of the loss function to obtain the second target loss function.

[0072] S207. Weight the first objective loss function and the second objective loss function to obtain the first loss function.

[0073] Determine the weights, and then weight the first objective loss function and the second objective loss function according to the weights to obtain the first loss function. The weights can be preset.

[0074] Response-based knowledge typically refers to the neural response output by the last layer of the teacher model. The main idea behind this type of knowledge distillation algorithm is to use the soft knowledge from the teacher model's final predictions to guide the training of the student model. This method is commonly used for classification tasks. For training data with real labels, using both the student model's real labels and the soft labels generated by the teacher model simultaneously when training the student network yields better results. Therefore, the loss function for the teacher training the student network is a combination of the student's own loss function and the distillation loss function.

[0075] For example, this application provides a formula for calculating a first loss function:

[0076] L KD (x,W)=λ×L CE (y,σ(z S ;T=1))+(1-λ)×L CE (σ(z T ;T=τ),σ(z S ;T=τ)) (1)

[0077] Where x is the input data; W represents the parameters of the student network model to be trained; λ is the weight coefficient; L CE Cross-entropy loss; y is the true label; σ is the softmax function after adding the temperature parameter T; τ is the user-defined distillation temperature; z S and z T These are the output Logits of the student network model and the teacher model, respectively; where λ and τ are adjusted according to different tasks.

[0078] S208. Based on the first recognition result, determine the first feature activation corresponding to each first feature layer in the teacher network model. The first feature layer includes at least one first channel, each first channel contains at least one first feature activation, and each first feature activation corresponds to a spatial location.

[0079] In this embodiment, the first feature layer can be understood as the feature layer of the teacher network model; the first feature activation can be understood as feature data obtained after processing by the first feature layer; the first channel can be understood as the channel of each feature layer of the teacher network model; in the neural network model, multi-channel refers to the multiple channels output by the convolutional layer, allowing the model to process data from multiple dimensions. Each feature layer includes at least one first channel, each first channel contains at least one first feature activation, and each first feature activation corresponds to a spatial location.

[0080] When the teacher network model processes power grid business data, the data is processed sequentially through different first feature layers. Each first feature layer outputs the first feature activation corresponding to that layer. Analyzing the first recognition results, the first feature activation corresponding to each first feature layer in the teacher network model is determined. The number of channels corresponding to the data output by each feature layer is at least one; that is, the data output by each feature layer includes at least one first channel, each first channel contains at least one first feature activation, and each first feature activation corresponds to a spatial location.

[0081] For example, the teacher network model includes 5 first feature layers. The data output by each first feature layer includes 3 first feature activations in the first channel. Each first channel includes W*H first feature activations, where W and H are the size of the data output by the first feature layer, and each first feature activation corresponds to a spatial location.

[0082] S209. Based on the second recognition result, determine the second feature activation corresponding to each second feature layer in the student network model to be trained. The second feature layer includes at least one second channel, each second channel contains at least one second feature activation, and each second feature activation corresponds to a spatial location.

[0083] In this embodiment, the second feature layer can be understood as the feature layer of the teacher network model; the second feature activation can be understood as feature data obtained after processing by the second feature layer; the second channel can be understood as the channel of each feature layer of the student network model to be trained; each feature layer includes at least one second channel, each second channel contains at least one second feature activation, and each second feature activation corresponds to a spatial location.

[0084] When the learning network model processes power grid business data, the data is processed sequentially through different second feature layers. Each second feature layer outputs the corresponding second feature activation. Analyzing the second recognition results, the second feature activation corresponding to each second feature layer in the teacher network model is determined. The number of channels corresponding to the data output by each feature layer is at least one; that is, the data output by each feature layer includes at least one second channel, each second channel contains at least one second feature activation, and each second feature activation corresponds to a spatial location.

[0085] S210. Perform feature layer and channel mapping on the first feature layer and the first channel to determine at least one first feature layer corresponding to each second feature layer, and at least one first channel corresponding to each second channel of the second feature layer.

[0086] Because the teacher network model and the student network model to be trained have different structures, the number of their feature layers usually also differs. Generally, the teacher network model has a more complex structure, therefore, it has more feature layers than the student network model to be trained; that is, the first feature layer has more feature layers than the second feature layer. The number of channels in the output data of the feature layers of the teacher network model and the student network model to be trained may also differ, requiring channel mapping.

[0087] Mapping is performed on the feature layers and channels respectively to determine at least one first feature layer corresponding to each second feature layer, and at least one first channel corresponding to each second channel of the second feature layer. For example, if the first feature layers include T1, T2, T3, and T4, and the second feature layers include S1 and S2, then through feature layer mapping, the second feature layer S1 corresponds to the first feature layers T1 and T2, and the second feature layer including S2 corresponds to the first feature layers T3 and T4. Alternatively, if the first feature layers include T1, T2, and T3, and the second feature layers include S1 and S2, then through feature layer mapping, the second feature layer S1 corresponds to the first feature layers T1 and T2, and the second feature layer including S2 corresponds to the first feature layers T2 and T3. For example, if the first channels include R1, R2, and R3, and the second channels include A1 and A2, then through channel mapping, the second channel A1 corresponds to the first channels R1 and R2, and the second channel A2 corresponds to the first channel R3.

[0088] S211. Based on at least one first feature layer corresponding to the second feature layer, and at least one first channel corresponding to each second channel of the second feature layer, calculate the loss function based on the probability distribution to obtain the third target loss function.

[0089] In this embodiment, the third objective loss function can be understood as a loss function based on probability distribution. Each second feature layer and its corresponding first feature layer are analyzed to unify the feature layer data. Simultaneously, at least one first channel corresponding to each second channel of the second feature layer is analyzed to unify the channel data. The first feature activation corresponding to the second feature activation is determined. Then, the loss function is calculated based on the second feature activation and its corresponding first feature activation. The loss function is calculated using a probability distribution-based loss function approach to obtain the third objective loss function.

[0090] S212. Based on the model recognition results and label data in the second recognition results, calculate the mean error loss function to obtain the fourth target loss function.

[0091] In this embodiment, the fourth objective loss function can be understood as a loss function, specifically the mean error loss function. The model recognition result is the final output of the student network model to be trained, i.e., the data output from the last layer of the student network model. The model recognition result and label data from the second recognition result are substituted into the loss function to calculate the mean error loss function, thus obtaining the fourth objective loss function.

[0092] S213. Weight the third objective loss function and the fourth objective loss function to obtain the second loss function.

[0093] Determine the weighting coefficients, and then perform a weighted summation of the third and fourth objective loss functions based on these coefficients to obtain the second loss function.

[0094] Response-based knowledge distillation is used for classification problems. Regression problems typically use the mean squared error function for model training and prediction. It is not possible to directly use the neural response output by the last layer of the teacher model to guide the training of the student model. Therefore, channel knowledge distillation is introduced to use information cues from the intermediate feature layers of the teacher network to help train the student network.

[0095] The channel knowledge distillation method normalizes the feature activation values ​​of each channel in a feature layer of both the teacher and student to obtain their corresponding probability distributions. Then, it minimizes the KL divergence between the teacher and student channel probability distributions. During the distillation process, it guides the student network to focus more on learning regions with significant activation values ​​in each channel. For example, let the teacher model be denoted as t, the student model as s, and the corresponding feature activations as y. t and y s Distillation loss L CD The formula for calculating the third objective loss function is as follows:

[0096]

[0097] Where c is the channel index, C is the total number of channel indices; i corresponds to the spatial location of channel c; T is the distillation temperature; increasing T makes the probability distribution smoother, indicating a focus on a wider spatial region in each channel. W and H are the width and height, respectively.

[0098] The logits score of each channel output is converted into a probability distribution using formula (3), thereby eliminating the influence of amplitude scale between the teacher and student networks. If the number of channels between the teacher and student networks is mismatched, a 1×1 convolutional layer is used to upsample the number of channels in the student network. In the channel knowledge distillation method, the loss value L for the teacher model to guide the training of the student model is... CWD The formula is shown in equation (4).

[0099] L CWD =αL MSE +(1-α)L CD (4)

[0100] Among them, L CWD For the second loss function, L MSE The mean error loss function is used for normal training of the student model, which is the fourth objective loss function, and α is the weight coefficient.

[0101] S214. Determine the first weight and the second weight based on the first loss function and the second loss function.

[0102] Analyze the first loss function and the second loss function, and calculate the first weight corresponding to the first loss function and the second weight corresponding to the second loss function. For example, weights corresponding to loss functions of different sizes can be pre-generated, and the matching weights can be selected as the first weight and / or the second weight based on the size of the first loss function and / or the second loss function; or, two weight sizes can be pre-set, the size of the first loss function and the second loss function can be compared, and the matching weights can be selected based on the size, and so on.

[0103] As an optional embodiment, this optional embodiment further optimizes the determination of the first weight and the second weight based on the first loss function and the second loss function as follows: summing the first loss function and the second loss function to obtain the loss function sum; calculating the ratio of the first loss function to the loss function sum to obtain the first weight; and calculating the ratio of the second loss function to the loss function sum to obtain the second weight.

[0104] S215. The first loss function is weighted according to the first weight to obtain the first weighted loss function.

[0105] In this embodiment, the first weighted loss function can be understood as a loss function obtained by weighting the first loss function. The first loss function is weighted according to the first weights, that is, the first weights and the first loss function are multiplied together to obtain the first weighted loss function.

[0106] S216. The second loss function is weighted according to the second weight to obtain the second weighted loss function.

[0107] In this embodiment, the second weighted loss function can be understood as a loss function obtained by weighting the second loss function. The second loss function is weighted according to the second weights; that is, the second weights are multiplied by the second loss function to obtain the second weighted loss function.

[0108] S217. Summing the first weighted loss function and the second weighted loss function yields the fitting loss function.

[0109] For example, this application provides a formula for calculating the fitting loss function:

[0110] L MT-DL =ωL CWD +(1-ω)L KD (5)

[0111]

[0112] Among them, L MT-DL Let L be the fitting loss function, ω be the second weight, and L be the weight. CWD The second loss function is ω; 1-ω is the first weight, and L is the second loss function. KD This is the first loss function.

[0113] To further enhance the learning effect of the student model from the teacher model, this application embodiment trains a student model that meets the multi-service requirements of the distribution network. It can simultaneously satisfy both classification and regression problems of distribution network services. Based on response knowledge distillation and channel knowledge distillation, a multi-task-based hybrid knowledge distillation algorithm is added. The student model learns both response knowledge and channel-level knowledge from the teacher model at the same time, thereby improving the student model's ability to learn multiple types of tasks.

[0114] S218. Backpropagation is performed on the student network model to be trained based on the fitting loss function to obtain the student network model to be trained for the next iteration, until the iteration convergence condition is met, and the power grid business identification model is obtained.

[0115] As an optional embodiment, this optional embodiment is further optimized to include: obtaining a service identification result, wherein the service identification result is obtained by the power grid service identification model based on the power grid service data to be identified and the type of model task corresponding to the power grid service data to be identified; detecting that the service identification result meets the model update condition, generating new training samples based on the service identification result; and training and updating the power grid service identification model based on the new training samples.

[0116] In this embodiment, the service identification result can be understood as the result obtained by the trained power grid service identification model identifying power grid service data. The power grid service data to be identified can be understood as power grid service data with identification requirements; the model update condition can be understood as the condition for determining whether to update the power grid service identification model, such as whether the service identification result is accurate, whether the service identification result is new service data, etc.

[0117] The well-trained power grid service identification model is highly accurate, small in size, and consumes few resources, thus it can be deployed on edge devices. The power grid service data to be identified, along with the type of the corresponding model task, is input into the power grid service identification model for identification. The model uses its learned knowledge to identify the service and obtain the identification result. This execution device acquires the service identification result obtained by the power grid service identification model from the power grid service data to be identified. Model update conditions are pre-set, and the service identification results are analyzed to determine if the conditions are met. If so, new training samples are generated based on the service identification results. The power grid service identification model is then trained again using these new training samples, updating the model. During the continued training of the power grid service identification model, a teacher network model can be trained first using the new training samples. After the teacher network model completes its training, it guides the training of the power grid service identification model.

[0118] Optionally, the model update conditions include at least one of the following:

[0119] The confidence level of the business identification result is not greater than the preset confidence level threshold and the business identification result is new business data;

[0120] The comparison between the business identification result and its corresponding actual business data does not meet the business accuracy condition, and the business identification result is new business data.

[0121] In this embodiment, the confidence threshold can be preset; the business accuracy condition can be that the accuracy of the business identification result is not lower than the preset threshold. After receiving the business identification result, if the business identification is a classification task, the confidence of the business identification result is analyzed. If the confidence of the business identification result is not greater than the preset confidence threshold, it is determined whether the business identification result is new business data. If the confidence of the business identification result is not greater than the preset confidence threshold and the business identification result is new business data, it can be considered that the model update condition is met. After receiving the business identification result, if the business identification result is a regression task, the actual business data corresponding to the business identification result can be monitored. During idle time, the business identification result is compared with its corresponding actual business data to determine whether the comparison result meets the business accuracy condition. If it does not meet the condition, it is determined whether the business identification result is new business data. If the comparison result between the business identification result and its corresponding actual business data does not meet the business accuracy condition and the business identification result is new business data, it can be considered that the model update condition is met. Alternatively, both of the above conditions can be met simultaneously to confirm that the model update condition is met.

[0122] As an optional embodiment, this optional embodiment further optimizes the generation of new training samples based on the business identification results as follows: constructing a business mathematical model based on the business identification results; performing simulation based on the business mathematical model to generate simulation data corresponding to the business identification results; and generating new training samples based on the simulation data.

[0123] In this embodiment, the business mathematical model can be understood as a mathematical model describing business data, which describes the relationships between business data. The business identification results are analyzed, and a business mathematical model is constructed based on the data type corresponding to the business identification results and the relationships between the business identification results and other data. The business identification results are then simulated using the business mathematical model to generate simulation data corresponding to the business identification results. New training samples are generated based on the simulation data.

[0124] This invention provides a method for generating a power grid service identification model, solving the problems of low model recognition accuracy, high latency, and inability to handle multi-service data. Training samples are generated through at least two types of model tasks, including at least classification and regression tasks, enabling multi-task recognition and thus multi-service data processing. During model training, this method can simultaneously handle different types of model tasks, ensuring the trained student network model can accurately identify different types of service data. Based on multi-task hybrid knowledge distillation, model distillation for problems such as classification and regression can be performed, improving the generalization ability of the student model and meeting the multi-service needs of the distribution network. The power grid service identification model obtained through knowledge distillation has high recognition accuracy and is relatively small, allowing direct deployment on edge devices. This enables edge devices to directly identify power grid service data, improving the generalization ability of the edge-side model and meeting the multi-service needs of the distribution network. Even with limited edge computing resources, the accuracy of the distribution network edge-side model is guaranteed. This reduces the amount of data transmitted in the distribution network, minimizes latency caused by transmission distance, and improves the processing efficiency of massive amounts of data in the distribution network.

[0125] Example 3

[0126] Figure 3 This is a flowchart illustrating a power grid service identification method provided in Embodiment 3 of the present invention. This embodiment is applicable to situations requiring accurate identification of power grid services. The method is applied to edge devices in a distribution network and can be executed by a power grid service identification device. This device can be implemented in hardware and / or software and can be configured in an electronic device. Figure 3 As shown, the method includes:

[0127] S301. Obtain the power grid business data to be identified and the type of model task corresponding to the power grid business data to be identified.

[0128] The power grid business data to be identified can be power grid business data collected in real time through hardware devices, or power grid business data processed or calculated by software, etc. The type of the power grid business data to be identified and its corresponding model task needs to be obtained. The type of model task can be determined by classifying and identifying the power grid business data to be identified, or it can be determined manually by staff or through other methods.

[0129] S302. Input the type of the power grid business data to be identified and the model task into the power grid business identification model. The power grid business identification model is obtained by training the model using the power grid business identification model generation method of any embodiment of the present invention.

[0130] A power grid service identification model is obtained by pre-training a model using the knowledge distillation method provided in any embodiment of this application. The trained power grid service identification model is then deployed on edge devices in the distribution network. The power grid service data to be identified and its corresponding model task type are input into the power grid service identification model for processing. The power grid service identification model identifies the power grid service data to be identified based on the type of the pattern task and the knowledge learned during training, and obtains and outputs the identification result.

[0131] S303. Determine the service identification result based on the output of the power grid service identification model.

[0132] After completing data identification, the power grid service identification model can directly output service identification results. For example, if the model task is topology identification, the corresponding service identification result can be the topology structure; if the model task is power quality monitoring, the corresponding service identification result can be power disturbance; if the model task is fault early warning, the corresponding service identification result can be whether a fault exists, the type of fault, the location of the fault, etc.; if the model task is load forecasting, the corresponding service identification result can be the trend of voltage and / or current.

[0133] S304. Response to maintenance issues based on business identification results.

[0134] The service identification results are analyzed to determine whether relevant maintenance operations are required, and maintenance responses are implemented accordingly. For example, if the service identification result indicates a fault, the faulty device is restarted. Alternatively, the service identification results are uploaded to the cloud, and control commands issued from the cloud are received to perform maintenance responses.

[0135] This invention provides a power grid service identification method that solves the problems of low model recognition accuracy, high latency, and inability to handle multi-service data. By pre-training the model through knowledge distillation, a power grid service identification model with a simple structure and low computational load is obtained. This model is directly deployed on edge devices to identify power grid service data, achieving high accuracy and enabling multi-task identification, thus facilitating the processing of multi-service data. Model training based on multi-task hybrid knowledge distillation allows for model distillation for problems such as classification and regression, improving the generalization ability of student models and meeting the multi-service needs of distribution networks. Even with limited edge computing resources, the accuracy of the distribution network edge model is guaranteed. Furthermore, it reduces the amount of data transmitted in the distribution network, minimizes latency caused by transmission distance, and improves the processing efficiency of massive amounts of distribution network data.

[0136] Optionally, the model task type is a classification task, and the operation and maintenance response is based on the business identification results, including:

[0137] A1. Determine the confidence level of the business identification results and upload the business identification results and confidence level to the cloud.

[0138] When the model task is a classification task, the power grid business identification model outputs the confidence level of the business identification result along with the business identification result. The edge device uploads the business identification result and confidence level to the cloud.

[0139] A2. Receive the first control instruction sent from the cloud. The first control instruction is generated by the cloud based on the business identification result when the confidence level is greater than the preset confidence level threshold, or the first control instruction is generated by the cloud based on the user operation when the confidence level is not greater than the preset confidence level threshold.

[0140] In this embodiment, the first control command can be understood as an instruction to control hardware devices in the power grid. The confidence threshold can be preset, for example, 0.9; the confidence threshold can be set according to the accuracy requirements of the actual service type. After receiving the service identification result and its corresponding confidence level, the cloud compares the confidence level with the confidence threshold. If the confidence level is greater than the confidence threshold, the service identification result is reliable, and the cloud can directly generate the first control command based on the service identification result. If the confidence level is not greater than the confidence threshold, the service identification result is considered unreliable, and the service identification result is displayed to the user for viewing, or the user is prompted to view it. After viewing the service identification result, the user triggers relevant operations, the cloud receives the user's operation, and generates the corresponding first control command based on the user's operation. The cloud sends the first control command to the edge device, and the edge device receives the first control command sent by the cloud.

[0141] A3. Control the equipment accordingly based on the first control command.

[0142] Identify the equipment that needs to be controlled, and perform corresponding control on the equipment according to the first control command, such as controlling the equipment to restart, controlling the equipment parameters to update or correct, etc.

[0143] Optionally, the model task type is a regression task, and the operation and maintenance response is based on the business identification results, including:

[0144] B1. Upload the business identification results to the cloud.

[0145] When the model task is a regression task, the business recognition results are directly uploaded to the cloud.

[0146] B2. Receive the second control command issued by the cloud. The second control command is generated by the cloud based on the business identification result.

[0147] In this embodiment, the second control command can be understood as a command to control equipment in the power distribution network. The cloud receives the service identification result, analyzes and processes the result, determines the second control command, and sends it to the edge device.

[0148] B3. Control the equipment accordingly based on the second control command.

[0149] Identify the equipment that needs to be controlled, and perform corresponding control on the equipment according to the first control command, such as controlling the equipment to restart, controlling the equipment parameters to update or correct, etc.

[0150] The power grid service identification model used in this application embodiment can identify different types of power grid service data and output different prediction results for different types of model tasks. It can provide effective prediction data for different types of tasks to assist in operation and maintenance work. The cloud issues a first control command or a second control command based on the output results, instructing the edge device to perform operation and maintenance response. When the model accuracy is low and the data is new, the model is retrained to improve the model identification / prediction accuracy.

[0151] For example, Figure 4 An example diagram of model deployment is provided, including the following steps:

[0152] S1. Collect and generate historical datasets in the cloud.

[0153] The cloud-based system generates labeled datasets based on mathematical models and incorporates historical datasets to provide training samples for the original teacher and student models in the cloud. The cloud can also generate simulation datasets, and use these simulation datasets and historical datasets to generate training samples.

[0154] S2. The teacher network model guides the student network model to be trained using the knowledge distillation algorithm.

[0155] A convolutional neural network is built in the cloud (a teacher network model and a student network model can be selected according to different business needs of the power distribution network). The generated training samples are input into the teacher model to train it first. Then, a multi-task-based hybrid knowledge distillation algorithm is used to allow the teacher network model to guide the student network model in training. After training, the model is saved to the cloud server.

[0156] S3, Distribution of student network models.

[0157] The student network model trained in the cloud is distributed to each intelligent converged terminal on the edge via wireless communication to complete the model deployment at the edge. The student network model is the trained power grid business recognition model.

[0158] S4. Data preprocessing is performed after the power distribution network data is transmitted to the edge equipment.

[0159] S5, Student Network Model for Identification / Prediction.

[0160] S6. Determine whether the identification / prediction is accurate. If yes, proceed to S7; otherwise, proceed to S8.

[0161] After receiving data from the terminal, the intelligent fusion terminal at the edge node performs simple data processing, adjusts it into a data format that can be input into the model, and temporarily saves it before inputting it into the student network model on the edge side. For classification tasks, the system obtains the output value of each softmax channel and determines whether the probability of the category with the highest output value exceeds 90%, i.e., whether the recognition is accurate. If it exceeds 90%, proceed to S7; otherwise, proceed to S8. For regression tasks, the edge-side student model's prediction fitting result is directly processed in S7. During system downtime, the actual data and the predicted business recognition results are compared at the edge. If the data point fitting accuracy exceeds 90%, the data is uploaded and saved to the cloud historical database; otherwise, proceed to S8.

[0162] S7. Based on the model judgment, perform operation and maintenance response. The response process is as follows: upload the business identification result to the cloud, then the cloud issues the corresponding instructions, and then the edge side transmits the instructions to the terminal to control the device status.

[0163] S8, Upload data to the cloud.

[0164] S9. The cloud determines whether a model update has been triggered. If so, execute S10; otherwise, execute S7.

[0165] S10. Generate new simulation data.

[0166] S11. Retrain the teacher model based on the established model, and return to execute S2.

[0167] When the edge side cannot identify or predict accurately, the signal data needs to be uploaded to the cloud in a timely manner to trigger the model update. A mathematical model is constructed for the newly emerging signal data, and simulation data of the signal is generated in the cloud. Based on the established teacher model, the new simulation data is used to train and update it. That is, steps S1-S3 are repeated to update the student model on the edge side.

[0168] Example 4

[0169] Figure 5 This is a schematic diagram of the structure of a power grid service identification model generation device provided in Embodiment 4 of the present invention. Figure 5 As shown, the device includes: a sample set acquisition module 41, a sample identification module 42, a loss function calculation module 43, and a loss function fitting module 44.

[0170] The sample set acquisition module 41 is used to acquire a training sample set formed by power grid business data. The training sample set includes at least two training samples and label data corresponding to the training samples. Each training sample corresponds to at least two types of model tasks. The types of model tasks include at least classification tasks and regression tasks.

[0171] The sample recognition module 42 is used to input the training samples and their corresponding model task types under the current iteration into the pre-trained teacher network model for recognition to obtain the first recognition result, and to input the training samples and their corresponding model task types under the current iteration into the student network model to be trained for recognition to obtain the second recognition result.

[0172] The loss function calculation module 43 is used to determine a first loss function and a second loss function based on the first identification result, the second identification result and the label data. The first loss function is a loss function based on response knowledge distillation and the second loss function is a loss function based on channel knowledge distillation.

[0173] The loss function fitting module 44 is used to calculate the fitting loss function based on the first loss function and the second loss function, and to perform backpropagation on the student network model to be trained based on the fitting loss function to obtain the student network model to be trained for the next iteration, until the iteration convergence condition is met to obtain the power grid business identification model.

[0174] This invention provides a device for generating a power grid service identification model, solving the problems of low model recognition accuracy, high latency, and inability to process multi-service data. Training samples are generated through at least two types of model tasks, including at least classification and regression tasks, enabling multi-task recognition and thus multi-service data processing. The training samples and their corresponding model task types are simultaneously input into a trained teacher network model and a student network model to be trained for recognition, yielding a first recognition result and a second recognition result. The teacher network model guides the training of the student network model, calculating a first loss function and a second loss function. The first loss function is based on response... The first loss function is a knowledge distillation loss function, and the second loss function is a channel knowledge distillation loss function. The fitting loss function is calculated based on the first loss function and the second loss function, and backpropagation is performed on the student network model to be trained. In the model training process, this embodiment can simultaneously take into account different types of model tasks, ensuring that the student network model to be trained can accurately identify different types of business data. By training the model through knowledge distillation, the power grid business identification model obtained has a high recognition accuracy, and the model is small enough to be directly deployed on edge devices so that edge devices can directly identify power grid business data, reduce data recognition latency, and improve data processing efficiency.

[0175] Optionally, the loss function calculation module 43 includes:

[0176] The first response determination unit is used to determine the first neural response result output by the last layer of the teacher network model based on the first recognition result;

[0177] The second response determination unit is used to determine the second neural response result output by the last layer of the student network model to be trained based on the second recognition result.

[0178] The first objective function calculation unit is used to calculate a first objective loss function based on the first neural response result and the second neural response result;

[0179] The second objective function calculation unit is used to calculate the second objective loss function based on the second neural response result and the label data;

[0180] The first loss function calculation unit is used to weight the first target loss function and the second target loss function to obtain the first loss function.

[0181] Optionally, the loss function calculation module 43 includes:

[0182] The first feature activation determination unit is used to determine the first feature activation corresponding to each first feature layer in the teacher network model according to the first recognition result. The first feature layer includes at least one first channel, each first channel contains at least one first feature activation, and each first feature activation corresponds to a spatial location.

[0183] The second feature activation determination unit is used to determine the second feature activation corresponding to each second feature layer in the student network model to be trained based on the second recognition result. The second feature layer includes at least one second channel, each second channel contains at least one second feature activation, and each second feature activation corresponds to a spatial location.

[0184] The mapping unit is used to perform feature layer and channel mapping on the first feature layer and the first channel, and to determine at least one first feature layer corresponding to each second feature layer, and at least one first channel corresponding to each second channel of the second feature layer.

[0185] The third objective function calculation unit is used to calculate a loss function based on a probability distribution according to at least one first feature layer corresponding to the second feature layer and at least one first channel corresponding to each second channel of the second feature layer, so as to obtain the third objective loss function.

[0186] The fourth objective function calculation unit is used to calculate the mean error loss function based on the model recognition result in the second recognition result and the label data, and obtain the fourth objective loss function;

[0187] The second loss function calculation unit is used to weight the third objective loss function and the fourth objective loss function to obtain the second loss function.

[0188] Optionally, the loss function fitting module 44 includes:

[0189] A weight determination unit is used to determine a first weight and a second weight based on the first loss function and the second loss function;

[0190] The first weighting unit is used to weight the first loss function according to the first weight to obtain the first weighted loss function;

[0191] The second weighting unit is used to weight the second loss function according to the second weight to obtain the second weighted loss function;

[0192] The function fitting unit is used to sum the first weighted loss function and the second weighted loss function to obtain the fitting loss function.

[0193] Optionally, the weight determination unit is specifically used for:

[0194] Summing the first loss function and the second loss function yields the sum of the loss functions;

[0195] Calculate the ratio of the first loss function to the sum of the loss functions to obtain the first weight;

[0196] The second weight is obtained by calculating the ratio of the second loss function to the sum of the loss functions.

[0197] Optionally, the device may also include:

[0198] The service identification result acquisition module is used to acquire the service identification result, which is the power grid service identification model;

[0199] The training sample update module is used to detect when the business identification result meets the model update condition and generate new training samples based on the business identification result.

[0200] The model update module is used to train and update the power grid service identification model based on the new training samples.

[0201] Optionally, the model update conditions include at least one of the following:

[0202] The confidence level of the business identification result is not greater than the preset confidence level threshold, and the business identification result is new business data;

[0203] The comparison between the business identification result and its corresponding actual business data does not meet the business accuracy condition, and the business identification result is new business data.

[0204] Optionally, the training sample update module includes:

[0205] A model building unit is used to build a business mathematical model based on the business identification results;

[0206] Simulation is intended to perform simulations based on the business mathematical model and generate simulation data corresponding to the business identification results.

[0207] The training sample update unit is used to generate new training samples based on the simulation data.

[0208] The power grid service identification model generation device provided in this embodiment of the invention can execute the power grid service identification model generation method provided in any embodiment of the invention, and has the corresponding functional modules and beneficial effects of the execution method.

[0209] Example 5

[0210] Figure 6This is a schematic diagram of the structure of a power grid service identification device provided in Embodiment 5 of the present invention, which is applied to edge equipment in a distribution network. Figure 6 As shown, the device includes: a data acquisition module 51 to be identified, a model input module 52, a business identification result determination module 53, and an operation and maintenance response module 54.

[0211] The data acquisition module 51 is used to acquire the power grid business data to be identified and the type of the model task corresponding to the power grid business data to be identified;

[0212] The model input module 52 is used to input the power grid business data to be identified and the type of the model task into the power grid business identification model, wherein the power grid business identification model is obtained by model training using the power grid business identification model generation method as described in any one of claims 1-5;

[0213] The service identification result determination module 53 is used to determine the service identification result based on the output of the power grid service identification model.

[0214] The operation and maintenance response module 54 is used to perform operation and maintenance responses based on the service identification results.

[0215] This invention provides a power grid service identification device that solves the problems of low model recognition accuracy, high latency, and inability to handle multi-service data. It pre-trains the model through knowledge distillation to obtain a power grid service identification model with a simple structure and low computational load. This model is directly deployed on edge devices to identify power grid service data, achieving high accuracy and enabling multi-task identification, thus facilitating the processing of multi-service data. Model training based on multi-task hybrid knowledge distillation allows for model distillation for problems such as classification and regression, improving the generalization ability of student models and meeting the multi-service needs of distribution networks. Even with limited edge computing resources, it ensures the accuracy of the distribution network edge model. It also reduces the amount of data transmitted in the distribution network, minimizes latency caused by transmission distance, and improves the processing efficiency of massive amounts of data in the distribution network.

[0216] Optionally, the model task is a classification task, and the operation and maintenance response module includes:

[0217] The first data uploading unit is used to determine the confidence level of the business identification result and upload the business identification result and the confidence level to the cloud;

[0218] The first instruction receiving unit is configured to receive a first control instruction issued by the cloud, wherein the first control instruction is generated by the cloud based on the service identification result when the confidence level is greater than a preset confidence level threshold, or the first control instruction is generated by the cloud based on the user operation when the confidence level is not greater than a preset confidence level threshold.

[0219] The first control unit is used to control the device accordingly based on the first control command.

[0220] Optionally, the model task is a regression task, and the operation and maintenance response module includes:

[0221] The second data uploading unit is used to upload the business identification result to the cloud.

[0222] The second instruction receiving unit is used to receive a second control instruction sent by the cloud, wherein the second control instruction is generated by the cloud based on the service identification result;

[0223] The second control unit is used to control the device accordingly based on the second control command.

[0224] The power grid service identification device provided in this embodiment of the invention can execute the power grid service identification method provided in any embodiment of the invention, and has the corresponding functional modules and beneficial effects of the method.

[0225] Example 6

[0226] Figure 7 This is a schematic diagram of an electronic device according to Embodiment 6 of the present invention. The electronic device 60 can be used to implement any of the methods provided in the embodiments of the present invention. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital assistants, cellular phones, smartphones, wearable devices (such as helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the invention described and / or claimed herein.

[0227] like Figure 7As shown, the electronic device 60 includes at least one processor 61 and a memory, such as a read-only memory (ROM) 62 and a random access memory (RAM) 63, communicatively connected to the at least one processor 61. The memory stores computer programs executable by the at least one processor. The processor 61 can perform various appropriate actions and processes based on the computer program stored in the ROM 62 or loaded into the RAM 63 from storage unit 68. The RAM 63 may also store various programs and data required for the operation of the electronic device 60. The processor 61, ROM 62, and RAM 63 are interconnected via a bus 64. An input / output (I / O) interface 65 is also connected to the bus 64.

[0228] Multiple components in electronic device 60 are connected to I / O interface 65, including: input unit 66, such as keyboard, mouse, etc.; output unit 67, such as various types of monitors, speakers, etc.; storage unit 68, such as disk, optical disk, etc.; and communication unit 69, such as network card, modem, wireless transceiver, etc. Communication unit 69 allows electronic device 60 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.

[0229] Processor 61 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of processor 61 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. Processor 61 performs the various methods and processes described above, such as methods for generating power grid service identification models or power grid service identification methods.

[0230] In some embodiments, the method for generating a power grid service identification model or the power grid service identification method may be implemented as a computer program tangibly contained in a computer-readable storage medium, such as storage unit 68. In some embodiments, part or all of the computer program may be loaded and / or installed on electronic device 60 via ROM 62 and / or communication unit 69. When the computer program is loaded into RAM 63 and executed by processor 61, one or more steps of the method for generating a power grid service identification model or the power grid service identification method described above may be performed. Alternatively, in other embodiments, processor 61 may be configured to execute the method for generating a power grid service identification model or the power grid service identification method by any other suitable means (e.g., by means of firmware).

[0231] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-a-chip (SoCs), payload-programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.

[0232] Computer programs used to implement the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when executed by the processor, the computer programs cause the functions / operations specified in the flowcharts and / or block diagrams to be performed. The computer programs may be executed entirely on a machine, partially on a machine, or as a standalone software package, partially on a machine and partially on a remote machine, or entirely on a remote machine or server.

[0233] This invention provides a computer program product, which includes a computer program that, when executed by a processor, implements the power grid service identification model generation method or the power grid service identification method described in any embodiment of this invention.

[0234] In the context of this invention, a computer-readable storage medium can be a tangible medium that may contain or store a computer program for use by or in conjunction with an instruction execution system, apparatus, or device. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination thereof. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.

[0235] To provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the electronic device. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).

[0236] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as data servers), or computing systems that include middleware components (e.g., application servers), or computing systems that include frontend components (e.g., user computers with graphical user interfaces or web browsers through which users can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., communication networks). Examples of communication networks include local area networks (LANs), wide area networks (WANs), blockchain networks, and the Internet.

[0237] A computing system can include clients and servers. Clients and servers are generally located far apart and typically interact through communication networks. The client-server relationship is created by computer programs running on the respective computers and having a client-server relationship with each other. The server can be a cloud server, also known as a cloud computing server or cloud host, which is a hosting product within the cloud computing service system to address the shortcomings of traditional physical hosts and VPS services, such as high management difficulty and weak business scalability.

[0238] It should be understood that the various forms of processes shown above can be used, with steps reordered, added, or deleted. For example, the steps described in this invention can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution of this invention can be achieved, and this is not limited herein.

[0239] The specific embodiments described above do not constitute a limitation on the scope of protection of this invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this invention should be included within the scope of protection of this invention.

Claims

1. A method for generating a power grid service identification model, characterized in that, The method comprises the following steps: obtaining a training sample set formed by power grid business data, the training sample set comprising at least two training samples and label data corresponding to the training samples, each training sample corresponding to at least two types of model tasks, the types of model tasks comprising at least a classification task and a regression task, wherein the regression task comprises topology identification and load prediction, and the classification task comprises power quality monitoring and fault warning; inputting the training sample under the current iteration and the type of model task corresponding thereto into a pre-trained teacher network model to obtain a first identification result, and inputting the training sample under the current iteration and the type of model task corresponding thereto into a to-be-trained student network model to obtain a second identification result; determining a first loss function and a second loss function according to the first identification result, the second identification result and the label data, the first loss function being a loss function based on response-based knowledge distillation, and the second loss function being a loss function based on channel knowledge distillation; calculating a fitting loss function according to the first loss function and the second loss function, and performing back propagation on the to-be-trained student network model based on the fitting loss function to obtain a to-be-trained student network model for the next iteration, until an iteration convergence condition is met, thereby obtaining a power grid business identification model.

2. The method of claim 1, wherein, The determination of the first loss function according to the first identification result, the second identification result and the label data comprises the following steps: determining a first neural response result output by a last layer of the teacher network model according to the first identification result; determining a second neural response result output by a last layer of the to-be-trained student network model according to the second identification result; calculating a first target loss function according to the first neural response result and the second neural response result; calculating a second target loss function according to the second neural response result and the label data; weighting the first target loss function and the second target loss function to obtain the first loss function.

3. The method of claim 1, wherein, The determination of the second loss function according to the first identification result, the second identification result and the label data comprises the following steps: determining a first feature activation corresponding to each first feature layer in the teacher network model according to the first identification result, wherein the first feature layer comprises at least one first channel, each first channel comprises at least one first feature activation, and each first feature activation corresponds to a spatial position; determining a second feature activation corresponding to each second feature layer in the to-be-trained student network model according to the second identification result, wherein the second feature layer comprises at least one second channel, each second channel comprises at least one second feature activation, and each second feature activation corresponds to a spatial position; performing feature layer and channel mapping on the first feature layer and the first channel to determine at least one first feature layer corresponding to each second feature layer and at least one first channel corresponding to each second channel of the second feature layer. According to the at least one first feature layer corresponding to the second feature layer and the at least one first channel corresponding to each second channel of the second feature layer, a loss function based on a probability distribution is calculated to obtain a third target loss function; According to the model recognition result in the second recognition result and the label data, a mean error loss function is calculated to obtain a fourth target loss function; The third target loss function and the fourth target loss function are weighted to obtain a second loss function.

4. The method of claim 1, wherein, The calculation of the fitting loss function according to the first loss function and the second loss function comprises: According to the first loss function and the second loss function, a first weight and a second weight are determined; The first loss function is weighted according to the first weight to obtain a first weighted loss function; The second loss function is weighted according to the second weight to obtain a second weighted loss function; The first weighted loss function and the second weighted loss function are summed to obtain a fitting loss function.

5. The method of claim 4, wherein, The determination of the first weight and the second weight according to the first loss function and the second loss function comprises: The first loss function and the second loss function are summed to obtain a loss function sum; The ratio of the first loss function to the loss function sum is calculated to obtain a first weight; The ratio of the second loss function to the loss function sum is calculated to obtain a second weight.

6. The method according to any one of claims 1 to 5, characterized in that, Further comprising: Obtaining a business recognition result, wherein the business recognition result is obtained by a power grid business identification model according to to-be-identified power grid business data and a type of a model task corresponding to the to-be-identified power grid business data; Detecting that the business recognition result meets a model update condition, and generating a new training sample according to the business recognition result; Training and updating the power grid business identification model according to the new training sample.

7. The method of claim 6, wherein, The model update condition comprises at least one of the following: The confidence of the business recognition result is not greater than a preset confidence threshold, and the business recognition result is new business data; The comparison result of the business recognition result and actual business data corresponding to the business recognition result does not meet a business accuracy condition, and the business recognition result is new business data.

8. The method of claim 6, wherein, The generation of the new training sample according to the business recognition result comprises: Constructing a business mathematical model according to the business recognition result; Generating simulation data corresponding to the business recognition result according to simulation based on the business mathematical model; Generating a new training sample according to the simulation data.

9. A method of power grid service identification, characterized by, An edge device applied to a distribution network comprises: Obtaining to-be-identified power grid business data and a type of a model task corresponding to the to-be-identified power grid business data; Inputting the to-be-identified power grid business data and the type of the model task into a power grid business identification model, wherein the power grid business identification model is trained by using a generation method of the power grid business identification model according to any one of claims 1-5; Determining a business recognition result according to an output of the power grid business identification model; Performing operation and maintenance response according to the business recognition result.

10. The method of claim 9, wherein, The type of the model task is a classification task, and the operation and maintenance response according to the business identification result comprises: determining a confidence of the business identification result, and uploading the business identification result and the confidence to a cloud; receiving a first control instruction issued by the cloud, the first control instruction being generated by the cloud according to the business identification result when the confidence is greater than a preset confidence threshold, or the first control instruction being generated by the cloud according to a user operation when the confidence is not greater than the preset confidence threshold; controlling a device according to the first control instruction.

11. The method of claim 9, wherein, The type of the model task is a regression task, and the operation and maintenance response according to the business identification result comprises: uploading the business identification result to a cloud; receiving a second control instruction issued by the cloud, the second control instruction being generated by the cloud according to the business identification result; controlling a device according to the second control instruction.

12. An apparatus for generating a power grid service identification model, the apparatus comprising: comprise: a sample set acquisition module, configured to acquire a training sample set formed by power grid business data, the training sample set comprising at least two training samples and label data corresponding to the training samples, each of the training samples corresponding to at least two types of model tasks, the types of the model tasks comprising at least a classification task and a regression task, wherein the regression task comprises topology identification and load prediction, and the classification task comprises power quality monitoring and fault early warning; a sample identification module, configured to input a training sample under a current iteration and a type of a model task corresponding to the training sample into a pre-trained teacher network model to obtain a first identification result, and input the training sample under the current iteration and the type of the model task corresponding to the training sample into a to-be-trained student network model to obtain a second identification result; a loss function calculation module, configured to determine a first loss function and a second loss function according to the first identification result, the second identification result and label data, the first loss function being a loss function based on response-based knowledge distillation, and the second loss function being a loss function based on channel knowledge distillation; a loss function fitting module, configured to calculate a fitted loss function according to the first loss function and the second loss function, perform back propagation on the to-be-trained student network model based on the fitted loss function to obtain a to-be-trained student network model for a next iteration, and obtain a power grid business identification model until an iteration convergence condition is met.

13. The apparatus of claim 12, wherein, The loss function calculation module comprises: a first response determination unit, configured to determine a first neural response result output by a last layer of the teacher network model according to the first identification result; a second response determination unit, configured to determine a second neural response result output by a last layer of the to-be-trained student network model according to the second identification result; a first target function calculation unit, configured to calculate a first target loss function according to the first neural response result and the second neural response result; a second target function calculation unit, configured to calculate a second target loss function according to the second neural response result and the label data; The first loss function calculation unit is configured to weight the first target loss function and the second target loss function to obtain a first loss function.

14. The apparatus of claim 12, wherein, The loss function calculation module comprises: The first feature activation determination unit is configured to determine, according to the first recognition result, first feature activations corresponding to each first feature layer in the teacher network model, wherein the first feature layer comprises at least one first channel, each first channel comprises at least one first feature activation, and each first feature activation corresponds to a spatial position. The second feature activation determination unit is configured to determine, according to the second recognition result, second feature activations corresponding to each second feature layer in the student network model to be trained, wherein the second feature layer comprises at least one second channel, each second channel comprises at least one second feature activation, and each second feature activation corresponds to a spatial position. The mapping unit is configured to perform feature layer and channel mapping on the first feature layer and the first channel, to determine at least one first feature layer corresponding to each second feature layer, and at least one first channel corresponding to each second channel of the second feature layer. The third target function calculation unit is configured to calculate a loss function based on a probability distribution according to the at least one first feature layer corresponding to each second feature layer and the at least one first channel corresponding to each second channel of the second feature layer, to obtain a third target loss function. The fourth target function calculation unit is configured to calculate a mean error loss function according to a model recognition result in the second recognition result and the label data, to obtain a fourth target loss function. The second loss function calculation unit is configured to weight the third target loss function and the fourth target loss function to obtain a second loss function.

15. The apparatus of claim 12, wherein, The loss function fitting module comprises: The weight determination unit is configured to determine a first weight and a second weight according to the first loss function and the second loss function. The first weighting unit is configured to weight the first loss function according to the first weight to obtain a first weighted loss function. The second weighting unit is configured to weight the second loss function according to the second weight to obtain a second weighted loss function. The function fitting unit is configured to sum the first weighted loss function and the second weighted loss function to obtain a fitted loss function.

16. The apparatus of claim 15, wherein, The weight determination unit is specifically configured to: sum the first loss function and the second loss function to obtain a loss function sum; calculate a ratio of the first loss function to the loss function sum to obtain the first weight; and calculate a ratio of the second loss function to the loss function sum to obtain the second weight.

17. The apparatus of any of claims 12-16, wherein, Further comprising: The business recognition result acquisition module is configured to acquire a business recognition result, wherein the business recognition result is a power grid business recognition model. The training sample updating module is configured to, when detecting that the business recognition result meets a model updating condition, generate a new training sample according to the business recognition result. The model updating module is configured to train and update the power grid business recognition model according to the new training sample.

18. The apparatus of claim 17, wherein, The model updating condition comprises at least one of the following: The confidence of the service identification result is not greater than a preset confidence threshold, and the service identification result is new service data. The comparison result of the service identification result and actual service data corresponding to the service identification result does not satisfy a service accuracy condition, and the service identification result is new service data.

19. The apparatus of claim 17, wherein, The training sample updating module comprises: A model construction unit configured to construct a service mathematical model according to the service identification result; A simulation unit configured to generate simulation data corresponding to the service identification result according to the service mathematical model; A training sample updating unit configured to generate new training samples according to the simulation data.

20. A power grid service identification apparatus characterized by comprising: An edge device applied to a power distribution network comprises: A to-be-identified data acquisition module configured to acquire to-be-identified power grid service data and a type of a model task corresponding to the to-be-identified power grid service data; A model input module configured to input the to-be-identified power grid service data and the type of the model task into a power grid service identification model, the power grid service identification model being trained by using a method for generating a power grid service identification model according to any one of claims 1 to 5; A service identification result determination module configured to determine a service identification result according to an output of the power grid service identification model; An operation and maintenance response module configured to perform operation and maintenance response according to the service identification result.

21. The apparatus of claim 20, wherein, The type of the model task is a classification task, and the operation and maintenance response module comprises: A first data uploading unit configured to determine a confidence of the service identification result and upload the service identification result and the confidence to a cloud side; A first instruction receiving unit configured to receive a first control instruction issued by the cloud side, the first control instruction being generated by the cloud side according to the service identification result when the confidence is greater than a preset confidence threshold, or the first control instruction being generated by the cloud side according to user operation when the confidence is not greater than the preset confidence threshold; A first control unit configured to control a device according to the first control instruction.

22. The apparatus of claim 20, wherein, The type of the model task is a regression task, and the operation and maintenance response module comprises: A second data uploading unit configured to upload the service identification result to a cloud side; A second instruction receiving unit configured to receive a second control instruction issued by the cloud side, the second control instruction being generated by the cloud side according to the service identification result; A second control unit configured to control a device according to the second control instruction.

23. An electronic device, comprising: The electronic device comprises: At least one processor, and a memory connected to the at least one processor in communication; The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor to enable the at least one processor to execute the method for generating a power grid service identification model according to any one of claims 1 to 8 or the power grid service identification method according to any one of claims 9 to 11.

24. A computer-readable storage medium, characterized in that, The computer readable storage medium stores computer instructions for causing the processor to implement the generation method of the power grid service identification model according to any one of claims 1-8 or the power grid service identification method according to any one of claims 9-11 when executed.

25. A computer program product, characterised in that, The computer program product comprises a computer program which, when executed by the processor, implements the generation method of the power grid service identification model according to any one of claims 1-8 or the power grid service identification method according to any one of claims 9-11.

Citation Information

Patent Citations

  • Cloud-edge co-learning power transmission inspection method and system

    CN115272981A

  • Network model compression method and device, electronic equipment and readable medium

    CN116796824A

  • Artificial intelligence-based employee automatic business process processing method and system

    CN119477208A