A distributed power data processing method, system, electronic device and medium

Through the distributed processing method of power data, the Transformer network model is used to process power data in parallel on multiple computing nodes, which solves the problems of low processing efficiency and single point failure of traditional centralized servers, and achieves efficient power data processing and accurate Prediction and classification.

CN118332268BActive Publication Date: 2024-10-18STATE GRID SHANDONG ELECTRIC POWER CO BINZHOU ZHANHUA DISTRICT POWER SUPPLY CO
View PDF 9 Cites 0 Cited by

Patent Information

Application Number
CN202410765914.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-06-14
Publication Date
2024-10-18
Estimated Expiration
2044-06-14

AI Technical Summary

Technical Problem

Traditional centralized servers have performance bottlenecks and insufficient scalability when processing massive power data, which cannot meet the needs of real-time data processing. There is also the risk of single point failure, which affects the stable operation of the power system.

Method used

Using a distributed processing method, the Transformer network model is used to process power data in parallel. By dividing the data into multiple blocks and assigning them to multiple computing nodes for feature extraction and correlation determination, a Transformer network with a multi-head self-attention mechanism is constructed. Model to handle timing and long-term dependencies.

Benefits of technology

It improves data processing efficiency, enhances the accuracy of prediction and classification of power data, reduces the risk of single point failure, and meets the needs of real-time data processing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118332268B_ABST
    Figure CN118332268B_ABST
Patent Text Reader

Abstract

The embodiment of the present invention provides a distributed power data processing method, system, electronic device and medium, which belongs to the field of power system. The method includes: obtaining the power data to be processed, dividing the power data into multiple data blocks, and distributing them to multiple computing nodes for parallel processing; pre-constructing a Transformer network model, and on each computing node, using the pre-constructed Transformer network model to extract features from the allocated data blocks to obtain feature data, and determine the correlation between each feature data, and reintegrate the data blocks on each computing node according to the correlation to obtain the target power data. By using the Transformer network model, a large amount of power data can be processed in a distributed manner, improving data processing efficiency, and by using the self-attention mechanism to capture long dependencies and patterns in power data, the accuracy of prediction and classification can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of power systems, and in particular to a distributed power data processing method, system, electronic equipment and medium. Background Art

[0002] With the widespread application of smart grid and Internet of Things technologies, the power system is undergoing an unprecedented data revolution. The amount of data generated in the power system is growing explosively, covering everything from the real-time operating status of power equipment to the detailed electricity consumption behavior of users to the ever-changing transaction data in the energy market.

[0003] Traditionally, the processing of power data mainly relies on centralized servers. However, with the continuous growth of data volume and the increasing real-time requirements, this processing method has gradually exposed its limitations. When processing massive amounts of data, centralized servers often face performance bottlenecks and insufficient scalability, resulting in low data processing efficiency and failure to meet the demand for rapid response to real-time data. In addition, centralized processing also has the risk of single point failure. Once a server fails, the entire data processing system will be affected, posing a potential threat to the stable operation of the power system. Therefore, it is necessary to introduce distributed data processing technology. Summary of the invention

[0004] The purpose of the embodiments of the present invention is to provide a distributed power data processing method, system, electronic device and medium, which can process a large amount of power data in a distributed manner with the help of a Transformer network model, improve data processing efficiency, and accurately predict or classify power data.

[0005] In order to achieve the above object, an embodiment of the present invention provides a distributed power data processing method, comprising:

[0006] Acquire power data to be processed, divide the power data into multiple data blocks, and distribute them to multiple computing nodes for parallel processing;

[0007] Pre-build the Transformer network model to handle the temporal dependencies and long-term dependencies in power data;

[0008] On each computing node, use the pre-built Transformer network model to extract features from the assigned data blocks, obtain feature data corresponding to each data block, and determine the correlation between each feature data;

[0009] According to the association relationship, the data blocks on each computing node are reintegrated to obtain the target power data.

[0010] Optionally, the acquiring power data to be processed, dividing the power data into a plurality of data blocks, and distributing the data blocks to a plurality of computing nodes for parallel processing includes:

[0011] Determining a data block partitioning strategy according to the characteristics of the power data to be processed;

[0012] Dividing the power data to be processed into multiple data blocks according to the partitioning strategy, and marking the attribute information of each data block;

[0013] Each data block marked with attribute information is distributed to multiple computing nodes for parallel processing, wherein the parallel computing processing includes at least one of time series analysis, association rule mining or load forecasting.

[0014] Optionally, the construction process of the Transformer network model includes:

[0015] Acquire historical power data, and divide the historical power data into a training set, a test set, and a validation set;

[0016] Design the input layer, encoder structure, decoder structure, fully connected layer, Softmax layer and output layer to build the initial Transformer network model, where the encoder structure adopts a multi-head self-attention mechanism;

[0017] Using the training set to train the initial Transformer network model;

[0018] The trained initial Transformer network model is tested using the test set, and the parameters of the trained initial Transformer network model are optimized using a back propagation algorithm according to the test results to obtain an optimized Transformer network model;

[0019] The optimized Transformer network model is verified using the verification set to obtain a target Transformer network model.

[0020] Optionally, the process of using the back propagation algorithm to optimize the parameters of the trained initial Transformer network model includes:

[0021] Input the test set into the trained initial Transformer network model, calculate the output of each layer, and save the activation value and weight of each layer;

[0022] Select the loss function to measure the difference between the predicted value and the true value according to the task type;

[0023] Starting from the output layer, the chain rule is used to calculate the partial derivative of each parameter with respect to the loss function layer by layer, and the gradient descent optimization method is used to update the parameters of the trained initial Transformer network model based on the gradient information.

[0024] Optionally, the characteristic data corresponding to each data block is calculated according to the following formula:

[0025]

[0026] Where m represents the total number of power data blocks, represents the characteristic data of data block j, represents the average value of data block j in each data block i, represents the average value of data block j in the entire power data.

[0027] Optionally, the correlation between the feature data is calculated according to the following formula:

[0028]

[0029] In the formula, K represents the different association numbers listed, i represents the different data clusters associated when the association number is K, p represents the different data samples in data cluster i, q represents the number of samples in data cluster i, represents the value of data sample p, represents the mean of the data samples in data cluster i, Represents the sample mean of all data for the parametric association analysis.

[0030] On each computing node, a pre-built Transformer network model is used to extract features and predict the assigned data blocks, including:

[0031] Load the pre-trained Transformer network model parameters to each computing node;

[0032] The assigned data block is input into the Transformer network model, and forward propagation calculation is performed to obtain the prediction result.

[0033] In another aspect, the present invention provides a distributed power data processing system, comprising:

[0034] An acquisition unit, used for acquiring power data to be processed, dividing the power data into a plurality of data blocks, and distributing the data to a plurality of computing nodes for parallel processing;

[0035] A construction unit for pre-building a Transformer network model to handle temporal dependencies and long-term dependencies in power data;

[0036] A processing unit is used to extract features from the allocated data blocks using a pre-built Transformer network model on each computing node, obtain feature data corresponding to each data block, and determine the correlation between each feature data;

[0037] The integration unit is used to reintegrate the data blocks on each computing node according to the association relationship to obtain target power data.

[0038] On the other hand, the present invention provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the above-mentioned method for processing distributed power data when executing the program.

[0039] On the other hand, the present invention provides a non-transitory computer-readable storage medium having a computer program stored thereon, wherein the computer program implements the steps of the above-mentioned method for processing distributed power data when executed by a processor.

[0040] Through the above technical solution, with the help of the Transformer network model, a large amount of power data can be processed in a distributed manner to improve data processing efficiency. In addition, by utilizing the self-attention mechanism to capture long dependencies and patterns in power data, the accuracy of prediction or classification can be improved.

[0041] Other features and advantages of the embodiments of the present invention will be described in detail in the subsequent detailed description. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] The accompanying drawings are used to provide a further understanding of the embodiments of the present invention and constitute a part of the specification. Together with the following specific implementations, they are used to explain the embodiments of the present invention, but do not constitute a limitation on the embodiments of the present invention. In the accompanying drawings:

[0043] Figure 1 is an implementation flow chart of a distributed power data processing method provided by an embodiment of the present invention;

[0044] Figure 2 is a detailed implementation flow chart of a distributed power data processing method provided by an embodiment of the present invention;

[0045] Figure 3 It is a structural schematic diagram of a distributed power data processing system provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0046] The specific implementation of the embodiment of the present invention is described in detail below in conjunction with the accompanying drawings. It should be understood that the specific implementation described here is only used to illustrate and explain the embodiment of the present invention, and is not used to limit the embodiment of the present invention.

[0047] See also Figure 1 As shown, it is an implementation flow chart of a distributed power data processing method provided by an embodiment of the present invention, comprising the following execution steps:

[0048] Step 100: Obtain power data to be processed, divide the power data into multiple data blocks, and distribute them to multiple computing nodes for parallel processing.

[0049] Specifically, when executing step 100, the following steps may be specifically performed:

[0050] S1000: Determine a data block partitioning strategy according to characteristics of the power data to be processed.

[0051] S1001: Divide the power data to be processed into multiple data blocks according to a partitioning strategy, and mark attribute information of each data block.

[0052] S1002: Allocate each data block marked with attribute information to multiple computing nodes for parallel processing, wherein the parallel computing processing includes at least one of time series analysis, association rule mining or load forecasting.

[0053] Step 101: Pre-build a Transformer network model to handle temporal dependencies and long-term dependencies in power data.

[0054] In some implementations, the construction of the Transformer network model in step 101 may be performed according to the following steps:

[0055] S1010: Acquire historical power data, and divide the historical power data into a training set, a test set, and a validation set.

[0056] S1011: Design the input layer, encoder structure, decoder structure, fully connected layer, Softmax layer, and output layer to build the initial Transformer network model.

[0057] The encoder structure adopts a multi-head self-attention mechanism, and both the self-attention layer and the feed-forward fully connected layer have a residual connection layer (Add&Norm). The self-attention layer in the decoder is a Masked Multi-HeadAttention layer, which is before the Softmax step of the ordinary SelfAttention and is combined with (&) a mask matrix M. The formula is as follows:

[0058]

[0059] In the formula, Q represents the query vector, K represents the key vector, and V represents the value vector. Represents the vector dimension.

[0060] Among them, the calculation formula of the residual connection layer is as follows:

[0061]

[0062] Where X represents the input of Multi-Head Attention, and Multi-HeadAttention(X) represents the output.

[0063] Since the residual connection layer can better transmit gradient information, the network can converge to the optimal solution faster, further improving the convergence speed of the Transformer network model.

[0064] S1012: Using the training set to train the initial Transformer network model.

[0065] S1013: Using the test set to test the trained initial Transformer network model, and using a back propagation algorithm to optimize the parameters of the trained initial Transformer network model according to the test results to obtain an optimized Transformer network model.

[0066] In some embodiments, the process of using the back propagation algorithm to optimize the parameters of the trained initial Transformer network model in step S1013 includes: inputting the test set into the trained initial Transformer network model, calculating the output of each layer, and saving the activation value and weight of each layer; selecting a loss function to measure the difference between the predicted value and the true value according to the task type; starting from the output layer, using the chain rule to calculate the partial derivative of each parameter with respect to the loss function layer by layer, and updating the parameters of the trained initial Transformer network model using the gradient descent optimization method according to the gradient information.

[0067] S1014: Using the verification set to verify the optimized Transformer network model to obtain a target Transformer network model.

[0068] Step 102: On each computing node, use the pre-built Transformer network model to extract features from the assigned data blocks, obtain feature data corresponding to each data block, and determine the correlation between each feature data;

[0069] In some implementations, the feature data corresponding to each data block is calculated according to the following formula:

[0070]

[0071] Where m represents the total number of power data blocks, represents the characteristic data of data block j, represents the average value of data block j in each data block i, represents the average value of data block j in the entire power data.

[0072] In some implementations, the correlation between the feature data is calculated according to the following formula:

[0073]

[0074] In the formula, K represents the different association numbers listed, i represents the different data clusters associated when the association number is K, p represents the different data samples in data cluster i, q represents the number of samples in data cluster i, represents the value of data sample p, represents the mean of the data samples in data cluster i, Represents the sample mean of all data for the parametric association analysis.

[0075] Step 103: According to the association relationship, the data blocks on each computing node are reintegrated to obtain target power data.

[0076] See also Figure 2 As shown, it is a detailed implementation flow chart of a distributed power data processing method provided by an embodiment of the present invention, including the following execution steps:

[0077] S200: Acquire power data to be processed, and determine a data block division strategy according to characteristics of the power data to be processed.

[0078] S201: Divide the power data to be processed into multiple data blocks according to a partitioning strategy, and mark attribute information of each data block.

[0079] S202: Allocate each data block marked with attribute information to multiple computing nodes for parallel processing.

[0080] S203: Acquire historical power data, and divide the historical power data into a training set, a test set, and a validation set.

[0081] S204: Design the input layer, encoder structure, decoder structure, fully connected layer, Softmax layer and output layer to build the initial Transformer network model.

[0082] S205: Using the training set to train the initial Transformer network model.

[0083] S206: Using the test set to test the trained initial Transformer network model, and using a back propagation algorithm to optimize the parameters of the trained initial Transformer network model according to the test results to obtain an optimized Transformer network model.

[0084] S207: Using the verification set to verify the optimized Transformer network model to obtain a target Transformer network model.

[0085] S208: On each computing node, use the pre-built Transformer network model to extract features from the allocated data blocks, obtain feature data corresponding to each data block, and determine the association relationship between each feature data.

[0086] S209: According to the association relationship, reintegrate the data blocks on each computing node to obtain target power data.

[0087] The technical effects achieved by this application are as follows: improving data processing efficiency by processing power data in parallel through distributed Transformer encoders; using the self-attention mechanism to capture long dependencies and patterns in power data to improve the accuracy of prediction or classification; and further improving the performance of the model by adding encoding layers or improving the structure of the encoding layers.

[0088] See also Figure 3 FIG. 1 is a schematic diagram of a distributed power data processing system provided by an embodiment of the present invention, comprising:

[0089] The acquisition unit 300 is used to acquire power data to be processed, divide the power data into multiple data blocks, and distribute them to multiple computing nodes for parallel processing;

[0090] A construction unit 301 is used to pre-construct a Transformer network model to process temporal dependency and long-term dependency in power data;

[0091] The processing unit 302 is used to extract features from the allocated data blocks using the pre-built Transformer network model on each computing node, obtain feature data corresponding to each data block, and determine the correlation between each feature data;

[0092] The integration unit 303 is used to reintegrate the data blocks on each computing node according to the association relationship to obtain target power data.

[0093] On the other hand, the present invention provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the distributed power data processing method described in any one of the above embodiments when executing the program.

[0094] On the other hand, the present invention provides a non-transitory computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the steps of the method for processing distributed power data described in any one of the above embodiments are implemented.

[0095] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.

[0096] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0097] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0098] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0099] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.

[0100] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.

[0101] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.

[0102] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.

[0103] The above are only embodiments of the present application and are not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included within the scope of the claims of the present application.

Claims

1. A method for processing distributed power data, characterized in that: include: Acquire power data to be processed, and divide the power data into multiple data blocks; Pre-build the Transformer network model to handle the temporal dependencies and long-term dependencies in power data; On each computing node, use the pre-built Transformer network model to extract features from the assigned data blocks, obtain feature data corresponding to each data block, and determine the correlation between each feature data; According to the association relationship, the data blocks on each computing node are reintegrated to obtain the target power data; The correlation between the characteristic data is calculated according to the following formula: ; In the formula, K represents the different association numbers listed, i represents the different data clusters associated when the association number is K, p represents the different data samples in data cluster i, q represents the number of samples in data cluster i, represents the value of data sample p, represents the mean of the data samples in data cluster i, Represents the sample mean of all data for the parametric association analysis.

2. The processing method according to claim 1, characterized in that: The acquiring of power data to be processed and dividing the power data into a plurality of data blocks comprises: Determining a data block partitioning strategy according to the characteristics of the power data to be processed; The power data to be processed is divided into multiple data blocks according to the division strategy, and the attribute information of each data block is marked.

3. The processing method according to claim 1, characterized in that: The construction process of the Transformer network model includes: Acquire historical power data, and divide the historical power data into a training set, a test set, and a validation set; Design the input layer, encoder structure, decoder structure, fully connected layer, Softmax layer and output layer to build the initial Transformer network model, where the encoder structure adopts a multi-head self-attention mechanism; Using the training set to train the initial Transformer network model; The trained initial Transformer network model is tested using the test set, and the parameters of the trained initial Transformer network model are optimized using a back propagation algorithm according to the test results to obtain an optimized Transformer network model; The optimized Transformer network model is verified using the verification set to obtain a target Transformer network model.

4. The processing method according to claim 3, characterized in that: The process of using the back-propagation algorithm to optimize the parameters of the trained initial Transformer network model includes: Input the test set into the trained initial Transformer network model, calculate the output of each layer, and save the activation value and weight of each layer; Select the loss function to measure the difference between the predicted value and the true value according to the task type; Starting from the output layer, the chain rule is used to calculate the partial derivative of each parameter with respect to the loss function layer by layer, and the gradient descent optimization method is used to update the parameters of the trained initial Transformer network model based on the gradient information.

5. A distributed power data processing system applied to the distributed power data processing method according to any one of claims 1 to 4, characterized in that: include: An acquisition unit, used for acquiring power data to be processed and dividing the power data into a plurality of data blocks; A construction unit for pre-building a Transformer network model to handle temporal dependencies and long-term dependencies in power data; A processing unit is used to extract features from the allocated data blocks using a pre-built Transformer network model on each computing node, obtain feature data corresponding to each data block, and determine the correlation between each feature data; The integration unit is used to reintegrate the data blocks on each computing node according to the association relationship to obtain target power data.

6. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the steps of the distributed power data processing method according to any one of claims 1 to 4 are implemented.

7. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the distributed power data processing method according to any one of claims 1 to 4 are implemented.

Citation Information

Patent Citations

  • Method, device and equipment for optimizing composite maintenance strategy of wind turbine generator of offshore wind plant

    CN115392577A

  • Power transformer load prediction method based on Transform model

    CN115622047A

  • Distributed photovoltaic cluster division method and system based on agglomerated hierarchical clustering algorithm

    CN116646976A

  • Dynamic resource allocation method and system based on distributed system environment

    CN116662010A

  • Power Internet of Things anomaly detection method and device and storage medium

    CN117596191A