Intelligent power data acquisition method

By collecting, analyzing, and encrypting power data, the security risks caused by directly uploading and storing power data have been resolved, enabling secure collection and analysis of power data and supporting power dispatch.

CN116450663BActive Publication Date: 2026-04-17GUANGZHOU ZHUNJIE ELECTRONIC TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
GUANGZHOU ZHUNJIE ELECTRONIC TECH CO LTD
Filing Date
2023-04-18
Publication Date
2026-04-17

AI Technical Summary

Technical Problem

In existing technologies, power data is directly uploaded to a server for storage after collection without sufficient processing, posing a risk of data leakage and failing to effectively mine power grid data.

Method used

Electricity consumption data is collected by a first power data acquisition device, analyzed and encrypted by a second power data acquisition device, and stored on a server using public key encryption technology. The data is then processed and securely stored using an anomaly detection model and a regional electricity consumption prediction model.

Benefits of technology

It enables secure collection and analysis of power data, reduces the data processing pressure on the server, ensures data security, and can promptly detect power anomalies, supporting power dispatching.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116450663B_ABST
    Figure CN116450663B_ABST
Patent Text Reader

Abstract

The application discloses a kind of wisdom electric power data acquisition methods, comprising: the power consumption data of each user in continuous time period in the range of power consumption area is collected;The regional power consumption and regional power consumption power on the continuous time point in power consumption data are analyzed, and the power consumption analysis result is obtained;After the preprocessing of power consumption data, the preprocessed power consumption data is obtained, and after the association of preprocessed power consumption data and power consumption analysis result, the ciphertext power data is obtained after encryption using the public key of data storage server;Ciphertext power data is uploaded to data storage server for storage, and the collection of power data is completed.The application first collects power data and processes power data, then encrypts the processing result and power data, and finally stores them in the server, which can not only find useful information in power data, but also protect the security of power data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of power data processing, and specifically relates to a smart power data acquisition method. Background Technology

[0002] With the vigorous development of the national economy, the advancement of science and technology, and the modernization and intelligentization of the power grid, more and more power equipment is being put into operation. Whether for individual or corporate users, electricity consumption data needs to be collected for power dispatching or anomaly monitoring. However, current technologies often collect electricity data using meter readings or handheld devices. To address this issue, power data acquisition devices are currently installed on both the user side and the transformer side to collect and monitor electricity data. However, current technologies simply upload the collected data directly to the power grid server for storage without processing or fully exploring the power grid data. Furthermore, directly uploading the power data to the server poses a risk of data leakage. Summary of the Invention

[0003] This invention provides a smart power data acquisition method to solve the problems existing in the prior art.

[0004] A smart power data acquisition method, comprising:

[0005] The first power data acquisition device collects the electricity consumption data of each user within the power consumption area over a continuous time period. The electricity consumption data includes the electricity consumption and power consumption in each time period. Each user corresponds to one first power data acquisition device.

[0006] The second power data acquisition device collects power consumption data from all the first power data acquisition devices within the power consumption area, and analyzes the regional power consumption and power at continuous time points in the power consumption data to obtain power consumption analysis results.

[0007] After preprocessing the electricity consumption data in the second power data acquisition device, preprocessed electricity consumption data is obtained. The preprocessed electricity consumption data is then correlated with the electricity consumption analysis results to obtain correlated data. The correlated data is then encrypted using the public key of the data storage server to obtain encrypted power data.

[0008] The encrypted power data is uploaded to a data storage server for storage, completing the collection of power data, so that staff can use the private key of the data storage server to decrypt and view the encrypted power data.

[0009] In one possible implementation, the regional electricity consumption and power consumption at consecutive time points in the electricity consumption data are analyzed to obtain electricity consumption analysis results, including:

[0010] The environmental characteristics corresponding to the power consumption are obtained. These environmental characteristics include the average temperature characteristics, weather characteristics, and peak power consumption characteristics over a continuous time period. That is, each time period has corresponding power consumption and environmental characteristics. Different weather conditions are represented by different first digital strings. The peak power consumption characteristics include whether the time point is a peak power consumption period or not. Peak power consumption periods are represented by second digital strings, and non-peak power consumption periods are represented by third digital strings. The first, second, and third digital strings are all different.

[0011] A power consumption data feature matrix is ​​constructed using power consumption, temperature characteristics, weather characteristics, and peak power consumption characteristics at continuous time points. The power consumption data feature matrix is ​​then normalized to obtain a normalized power consumption data feature matrix.

[0012] Obtain the output power of the transformer in the power consumption area, calculate the line loss power from the transformer to the user, and subtract the line loss power from the output power to obtain the expected power consumption on the user side;

[0013] Determine whether the difference between the expected power consumption and the user's total power consumption is greater than the set first threshold. If so, determine the rate of change; otherwise, directly determine that the power consumption anomaly analysis result is that there is no anomaly.

[0014] Determine whether the number of days the difference between the expected power consumption and the user's total power consumption increases is greater than the second threshold. If so, obtain the power consumption anomaly analysis result based on the normalized power consumption data feature matrix; otherwise, directly determine that the power consumption anomaly analysis result is that there is no anomaly.

[0015] Using the normalized electricity consumption data feature matrix as input data for a pre-trained anomaly detection model, the abnormal electricity consumption analysis results corresponding to the users in the electricity consumption data feature matrix are obtained. The abnormal electricity consumption analysis results include whether there is an anomaly or not.

[0016] Based on each user's electricity consumption in different time periods, obtain the total electricity consumption of the electricity consumption area;

[0017] Acquire seasonal data, weather data, average temperature data, and date type data corresponding to each time period. The date type data includes: seasonal data (spring, summer, autumn, or winter), weather data (rainy, sunny, cloudy, or snowy), and date type data (weekdays or non-weekdays).

[0018] Based on the seasonal data, weather data, average temperature data, date type data, and total electricity consumption corresponding to each time period, a regional electricity consumption prediction model is trained.

[0019] Collect seasonal data, weather data, average temperature data, and date type data for a future time period, and use the seasonal data, weather data, average temperature data, and date type data as input data for the trained regional electricity consumption prediction model to obtain the predicted electricity consumption.

[0020] The results of abnormal electricity consumption analysis and the predicted electricity consumption are used together as the electricity consumption analysis results.

[0021] In one possible implementation, the electricity consumption data is preprocessed to obtain preprocessed electricity consumption data, including: handling missing values ​​and outliers in the electricity consumption data, and marking the missing values ​​and outliers to obtain preprocessed electricity consumption data.

[0022] In one possible implementation, the method for obtaining the pre-trained anomaly detection model includes:

[0023] A convolutional neural network was constructed and used as an anomaly detection model to identify the feature matrix of electricity consumption data.

[0024] The network parameters of the anomaly detection model are initialized using a chaotic mapping mechanism to obtain individual parameters.

[0025] Repeat the process of obtaining individual parameters multiple times, and then combine the obtained individual parameters into a training population;

[0026] Obtain the fitness of each individual parameter, sort the fitness in descending order, and select the optimal individual with the highest fitness from the training population;

[0027] Get the switching probability p and generate a random number rand between (0,1). Determine if the random number rand is less than the switching probability p. If it is, perform the first local update on the parameter individual based on the optimal individual with the highest fitness to obtain the updated training population. Otherwise, perform the second local update on the parameter individual based on the optimal individual with the highest fitness to obtain the updated training population.

[0028] For the optimal individual, a global search update method is used to update the optimal individual to obtain the updated optimal individual;

[0029] The updated optimal individual and the individual with the highest fitness in the updated training population are re-determined, and the re-determined individual is taken as the new optimal individual.

[0030] Determine whether the fitness value of the optimal individual is greater than a pre-set threshold or whether the current update round is greater than the maximum update round. If so, use the optimal individual as the final network parameter of the anomaly detection model to obtain the trained anomaly detection model. Otherwise, proceed to the next round of training and update the parameter individuals again.

[0031] In one possible implementation, the parameter individuals are first locally updated based on the optimal individual with the highest fitness, including:

[0032] X(t+1)=ω(t)*D'*e bl *cos(2πl)+X best (t)

[0033] ω(t)=ω i +(ω f -ω i )exp(-(αt / T max ) 2 )

[0034]

[0035] Among them, X best X(t) represents the optimal individual, X(t) represents the individual parameter to be updated, X(t+1) represents the updated individual parameter, ω(t) represents the update weight factor, D' represents the coefficient vector, e represents the natural constant, b represents a constant, l represents a random number between (-1, 1), π represents pi, and ω i ω represents the initial weighting factor. f Let α represent the final weighting factor, and α represent the convergence factor. α = 2 - (2 / (1+e)) -t / Tmax )), where t represents the current update round number, T max This represents the maximum number of update rounds set, and Levy(λ) represents a random search path following a Levy distribution. This indicates point-to-point product.

[0036] In one possible implementation, a second local update is performed on the parameter individuals based on the optimal individual with the highest fitness, including:

[0037] A1. Obtain the first coefficient vector A, where any element in the first coefficient vector A is 2α*r1-α, and r1 represents a random number between [0,1].

[0038] A2. Determine whether the modulus |A| of the first coefficient vector is less than or equal to 1. If yes, proceed to step A3; otherwise, proceed to step A4.

[0039] A3. Update the parameters of the individuals based on the optimal individual with the highest fitness, completing the second local update, which is as follows:

[0040] X(t+1)=X best (t)-A*D

[0041] D = |C*X best (t)-X(t)|

[0042] Where D represents the absolute value of the distance between the optimal individual and the individual whose parameters need to be updated, C represents the second coefficient vector, and each element in the second coefficient vector C is 2r2, where r2 represents a random number between [0,1].

[0043] A4. Update the parameters of the individuals based on the optimal individual with the highest fitness, completing the second local update, which is as follows:

[0044] X(t+1)=X rand (t)-A*D

[0045] D = |C*X rand (t)-X(t)|

[0046] Among them, X rand (t) represents a random parameter individual other than the individual whose parameter is to be updated.

[0047] In one possible implementation, a global search update method is used to update the optimal individual to obtain the updated optimal individual, including:

[0048] The search probability p is determined as follows:

[0049]

[0050] Where, p max p represents the upper limit of the search probability. min p represents the lower bound of the search probability. max and p min All are located between (0,1);

[0051] Generate a random number rand between (0,1) and determine whether the random number rand is less than the search probability p. If it is, perform reverse learning update on the optimal individual to obtain the updated optimal individual. Otherwise, perform Cauchy mutation update on the optimal individual to obtain the updated optimal individual.

[0052] The reverse learning update is as follows:

[0053] X best (t+1)=b'⊕(X best (t)-(ub+r⊕(lb-X best (t))))

[0054]

[0055] Where b' represents the AC coefficient. This represents point-to-point product, X best (t) represents the optimal individual to be updated, X best (t+1) represents the updated optimal individual, ub represents the upper boundary, lb represents the lower boundary, r represents a 1×d random number matrix following a standard uniform distribution of (0,1), and d represents the total number of network parameters in the individual;

[0056] The Cauchy mutation is updated as follows:

[0057]

[0058] Where cauchy(0,1) represents the standard Cauchy distribution.

[0059] In one possible implementation, the method for obtaining the trained regional electricity consumption prediction model is as follows:

[0060] A multi-layer feedforward network consisting of an input layer, a hidden layer, and an output layer is used as the regional electricity consumption prediction model.

[0061] The regional electricity consumption prediction model was trained using the gradient descent method, resulting in a fully trained regional electricity consumption prediction model.

[0062] In one possible implementation, the regional electricity consumption prediction model is trained using the gradient descent method to obtain the trained regional electricity consumption prediction model, including:

[0063] The actual output of the regional electricity consumption prediction model will be obtained by using seasonal data, weather data, average temperature data, date type data, and total electricity consumption corresponding to each time period as inputs to the regional electricity consumption prediction model.

[0064] Initialize the network parameters of the regional electricity consumption prediction model;

[0065] Using total electricity consumption as the expected output of the regional electricity consumption prediction model, and based on the expected output and the actual output, the error of the regional electricity consumption prediction model is obtained as follows:

[0066]

[0067] Where E represents the error, t pk o represents the expected output of the k-th neuron in the output layer when the i-th training data is input. pk This represents the actual output of the k-th neuron in the output layer when the i-th training data is input;

[0068] Determine whether the error E of the regional electricity consumption prediction model is less than the set error threshold. If so, use the current network parameters as the final network parameters of the regional electricity consumption prediction model; otherwise, update the network parameters.

[0069]

[0070]

[0071] Among them, b t Indicates the bias before the update, w t b represents the weight before the update. t+1 Indicates the updated bias, w t+1 Indicates the updated weight, η t This represents the learning rate during the t-th training iteration;

[0072] The error of the regional electricity consumption prediction model is retrieved again for the next training.

[0073] In one possible implementation, the learning rate η t for:

[0074] η t =η t-1 (1-β*ΔE)

[0075] Where, η t-1 Let β represent the learning rate during the (t-1)th training iteration, β represent a constant between (0,1), and ΔE = E t -E t-1 E t E represents the error during the t-th training iteration. t-1 This represents the error during the (t-1)th training iteration.

[0076] The present invention provides a smart power data acquisition method, which first collects power data, then processes the power data, and then encrypts the processing results and the power data before storing them in a server. This method enables staff to discover useful information in the power data while ensuring the security of the power data, thus achieving secure power data acquisition. Attached Figure Description

[0077] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention.

[0078] Figure 1 This is a flowchart of a smart power data acquisition method provided in an embodiment of the present invention.

[0079] The accompanying drawings illustrate specific embodiments of the invention, which will be described in more detail below. These drawings and descriptions are not intended to limit the scope of the invention in any way, but rather to illustrate the concept of the invention to those skilled in the art through reference to particular embodiments. Detailed Implementation

[0080] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numerals in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present invention. Rather, they are merely examples of apparatuses and methods consistent with some aspects of the invention as detailed in the appended claims.

[0081] The embodiments of the present invention will now be described in detail with reference to the accompanying drawings.

[0082] like Figure 1 As shown, a smart power data acquisition method includes:

[0083] S101. Collect electricity consumption data of each user within the electricity consumption area in a continuous time period through the first power data acquisition device. The electricity consumption data includes the electricity consumption and power consumption in each time period. Each user corresponds to one first power data acquisition device.

[0084] Optionally, the first power data acquisition device can be a smart meter or other Internet of Things-based power data acquisition device. After the first circuit data acquisition device acquires data, it transmits the acquired data to the first power data acquisition device.

[0085] S102. Collect electricity consumption data from all first power data acquisition devices within the electricity consumption area using the second power data acquisition device, and analyze the regional electricity consumption and power consumption at continuous time points in the electricity consumption data to obtain electricity consumption analysis results.

[0086] With a large number of users in the power grid, directly collecting and storing data for processing would place a significant burden on the grid's servers. Therefore, this embodiment employs a distributed computing approach. Data is aggregated and analyzed using second power data acquisition devices within each electricity consumption area. The analysis results, along with electricity consumption data, are then uploaded to a data storage server. This effectively reduces the data processing pressure on individual nodes while simultaneously meeting the data analysis requirements of staff.

[0087] The second power data acquisition device can communicate with the first power data acquisition device and has certain data processing capabilities, thereby enabling the analysis of power consumption data.

[0088] S103. After preprocessing the electricity consumption data in the second power data acquisition device, the preprocessed electricity consumption data is obtained. The preprocessed electricity consumption data is then correlated with the electricity consumption analysis results to obtain correlated data. The correlated data is then encrypted using the public key of the data storage server to obtain encrypted power data.

[0089] Encryption is performed using the public key of the data storage server. Only the data storage server can decrypt the data using its own private key. Even if others obtain the encrypted electricity data, they cannot effectively view it, thus effectively ensuring the security of electricity data.

[0090] S104. The encrypted power data is uploaded to the data storage server for storage, completing the collection of power data. This allows staff to use the private key of the data storage server to decrypt and view the encrypted power data, effectively ensuring the security of the power data.

[0091] This embodiment collects, analyzes, and stores electricity consumption data. The entire data acquisition process not only meets the security requirements of electricity data but also satisfies the needs for analyzing electricity data, and greatly reduces the data processing pressure on the data storage server.

[0092] In one possible implementation, the regional electricity consumption and power consumption at consecutive time points in the electricity consumption data are analyzed to obtain electricity consumption analysis results, including:

[0093] The environmental characteristics corresponding to the power consumption are obtained. These environmental characteristics include the average temperature characteristics, weather characteristics, and peak power consumption characteristics over a continuous time period. That is, each time period has corresponding power consumption and environmental characteristics. Different weather conditions are represented by different first digital strings. The peak power consumption characteristics include whether the time point is a peak power consumption period or not. Peak power consumption periods are represented by a second digital string, and non-peak power consumption periods are represented by a third digital string. The first, second, and third digital strings are all different.

[0094] Converting non-numerical features into numbers facilitates subsequent processing, and using different numbers to represent different features also ensures the discovery of potential relationships within the features.

[0095] An electricity consumption data feature matrix is ​​constructed using power consumption, temperature characteristics, weather characteristics, and peak electricity consumption characteristics at continuous time points. This electricity consumption data feature matrix is ​​then normalized to obtain a normalized electricity consumption data feature matrix.

[0096] Constructing an electricity consumption data feature matrix using power consumption, temperature characteristics, weather characteristics, and peak electricity consumption characteristics at continuous time points can include: treating power consumption, temperature characteristics, weather characteristics, and peak electricity consumption characteristics as rows of data, thus obtaining the electricity consumption data feature matrix. Normalizing the electricity consumption data feature matrix can effectively reduce the amount of data processing in the entire process, making the analysis process faster.

[0097] Obtain the output power of the transformer in the power consumption area, calculate the line loss power from the transformer to the user, and subtract the line loss power from the output power to obtain the expected power consumption on the user side.

[0098] Ideally, the output power of a transformer equals the line loss power from the transformer to the user plus the power generated by the user. Therefore, the expected power consumption obtained by subtracting the line loss power from the output power can be used as a reference. Compare it with the actual total power consumption. If the difference is large, it indicates that there may be disturbances caused by environmental or human factors, resulting in a large power difference.

[0099] Determine whether the difference between the expected power consumption and the user's total power consumption is greater than a set first threshold. If so, determine the rate of change; otherwise, directly determine that the power consumption anomaly analysis result is not abnormal.

[0100] Determine whether the number of days the difference between the expected power consumption and the user's total power consumption increases is greater than the second threshold. If so, obtain the power consumption anomaly analysis result based on the normalized power consumption data feature matrix; otherwise, directly determine that the power consumption anomaly analysis result is that there is no anomaly.

[0101] The impact of environmental factors on power consumption changes or disappears over time. Therefore, when the number of days the difference increases exceeds the second threshold, it can be considered that there is an irreversible environmental or human-related influence. For example, leakage or theft of electricity can lead to this situation.

[0102] Using the normalized electricity consumption data feature matrix as input data for a pre-trained anomaly detection model, the abnormal electricity consumption analysis results corresponding to the users in the electricity consumption data feature matrix are obtained. The abnormal electricity consumption analysis results include whether there is an anomaly or not.

[0103] A pre-trained anomaly detection model can be obtained by: acquiring training data, which includes a training power consumption data feature matrix and the corresponding anomaly power consumption analysis results; using the training power consumption data feature matrix as input to obtain the actual output, and using the anomaly power consumption analysis results as the expected data, thereby updating the parameters of the anomaly detection model based on the difference between the actual output and the expected output, thus obtaining the pre-trained anomaly detection model. For example, gradient descent can be used to update the parameters of the anomaly detection model.

[0104] By analyzing electricity consumption data for anomalies, staff can promptly identify unusual situations and prevent greater losses.

[0105] The total electricity consumption of the electricity consumption area is obtained based on the electricity consumption of each user in different time periods.

[0106] Acquire seasonal data, weather data, average temperature data, and date type data corresponding to each time period. The date type data includes: seasonal data (spring, summer, autumn, or winter), weather data (rainy, sunny, cloudy, or snowy), and date type data (weekdays or non-weekdays).

[0107] Optionally, to facilitate subsequent data processing, non-numeric data in seasonal data, weather data, average temperature data, and date-type data can be converted into numbers, and the corresponding numbers for different data types will be different.

[0108] Based on the seasonal data, weather data, average temperature data, date type data, and total electricity consumption for each time period, a regional electricity consumption prediction model is trained.

[0109] A neural network can be used as a regional electricity consumption prediction model. Input data can consist of seasonal data, weather data, average temperature data, and date-type data. Total electricity consumption can be used as the ground truth label to train the regional electricity consumption prediction model, thereby enabling it to predict electricity consumption in the short term. Predicting electricity consumption facilitates power dispatching by staff.

[0110] Collect seasonal data, weather data, average temperature data, and date-type data for a future time period, and use these data as input to a trained regional electricity consumption prediction model to obtain predicted electricity consumption.

[0111] Optionally, weather data and average temperature data for the future time period can be obtained from meteorological bureau data to predict electricity consumption.

[0112] The results of abnormal electricity consumption analysis and the predicted electricity consumption are used together as the electricity consumption analysis results.

[0113] It is worth noting that although both the anomaly detection model and the regional electricity consumption prediction model have the ability to identify data after training, they can only identify data of a fixed length. Therefore, it is necessary to ensure that the length of the subsequent input data is the same as the length of the data used during training in order to achieve accurate identification.

[0114] In one possible implementation, the electricity consumption data is preprocessed to obtain preprocessed electricity consumption data, including: handling missing values ​​and outliers in the electricity consumption data, and marking the missing values ​​and outliers to obtain preprocessed electricity consumption data.

[0115] By processing outliers and missing values, it becomes easier for staff to analyze electricity consumption data. Marking missing and outliers allows staff to quickly identify them.

[0116] In one possible implementation, the method for obtaining the pre-trained anomaly detection model includes:

[0117] A convolutional neural network was constructed and used as an anomaly detection model to identify the feature matrix of electricity consumption data.

[0118] The electricity consumption data feature matrix can be viewed as a simple image, therefore a convolutional neural network can be used as an anomaly detection model. It's worth noting that, besides convolutional neural networks, other neural networks can also be used for identifying electricity consumption data feature matrices.

[0119] The network parameters of the anomaly detection model are initialized using a chaotic mapping mechanism to obtain individual parameters. The network parameters may include weights and biases.

[0120] Repeat the process of obtaining individual parameters multiple times, and then combine the obtained individuals into a training population.

[0121] Optionally, the chaos mechanism can be:

[0122]

[0123]

[0124] in, This represents the (k-1)th chaotic parameter corresponding to the i-th parameter individual. The value is a random value between (down, up), where up represents the upper limit of the network parameters and down represents the lower limit of the network parameters. Let i represent the (k-1)th network parameter in the i-th parameter individual. The total number of parameter individuals can be I.

[0125] Obtain the fitness of each individual parameter, sort the fitness in descending order, and select the optimal individual with the highest fitness from the training population.

[0126] Optionally, fitness can be:

[0127]

[0128] Among them, t pk o represents the expected output of the k-th neuron in the output layer when the i-th training data is input. pk This represents the actual output of the k-th neuron in the output layer when the i-th training data is input.

[0129] Obtain the switching probability p and generate a random number rand between (0,1). Determine if the random number rand is less than the switching probability p. If it is, perform the first local update on the parameter individual based on the optimal individual with the highest fitness to obtain the updated training population. Otherwise, perform the second local update on the parameter individual based on the optimal individual with the highest fitness to obtain the updated training population.

[0130] For the optimal individual, a global search update method is used to update the optimal individual to obtain the updated optimal individual.

[0131] The updated optimal individual and the individual with the highest fitness in the updated training population are re-determined, and the re-determined individual is taken as the new optimal individual.

[0132] Determine whether the fitness value of the optimal individual is greater than a pre-set threshold or whether the current update round is greater than the maximum update round. If so, use the optimal individual as the final network parameter of the anomaly detection model to obtain the trained anomaly detection model. Otherwise, proceed to the next round of training and update the parameter individuals again.

[0133] In one possible implementation, the parameter individuals are first locally updated based on the optimal individual with the highest fitness, including:

[0134] X(t+1)=ω(t)*D'*e bl *cos(2πl)+X best (t)

[0135] ω(t)=ω i +(ω f -ω i )exp(-(αt / T max ) 2 )

[0136]

[0137] Among them, X bestX(t) represents the optimal individual, X(t) represents the individual parameter to be updated, X(t+1) represents the updated individual parameter, ω(t) represents the update weight factor, D' represents the coefficient vector, e represents the natural constant, b represents a constant, l represents a random number between (-1, 1), π represents pi, and ω i ω represents the initial weighting factor. f Let α represent the final weighting factor, and α represent the convergence factor. α = 2 - (2 / (1+e)) -t / Tmax )), where t represents the current update round number, T max This represents the maximum number of update rounds set, and Levy(λ) represents a random search path following a Levy distribution. This indicates point-to-point product.

[0138] Adaptive weights and a Lévy flight strategy are introduced to improve optimization capabilities, avoid premature convergence, and enhance local optimization ability and accuracy. During iteration, the step size of each individual is randomly perturbed, and individual updates are adaptively controlled, enabling the algorithm to escape local optima and further improve optimization performance.

[0139] In one possible implementation, a second local update is performed on the parameter individuals based on the optimal individual with the highest fitness, including:

[0140] A1. Obtain the first coefficient vector A, where any element in the first coefficient vector A is 2α*r1-α, and r1 represents a random number between [0,1].

[0141] A2. Determine whether the modulus |A| of the first coefficient vector is less than or equal to 1. If yes, proceed to step A3; otherwise, proceed to step A4.

[0142] A3. Update the parameters of the individuals based on the optimal individual with the highest fitness, completing the second local update, which is as follows:

[0143] X(t+1)=X best (t)-A*D

[0144] D = |C*X best (t)-X(t)|

[0145] Where D represents the absolute value of the distance between the optimal individual and the individual whose parameters need to be updated, C represents the second coefficient vector, and each element in the second coefficient vector C is 2r2, where r2 represents a random number between [0,1].

[0146] A4. Update the parameters of the individuals based on the optimal individual with the highest fitness, completing the second local update, which is as follows:

[0147] X(t+1)=X rand (t)-A*D

[0148] D = |C*X rand (t)-X(t)|

[0149] Among them, X rand (t) represents a random parameter individual other than the individual whose parameter is to be updated.

[0150] In one possible implementation, a global search update method is used to update the optimal individual to obtain the updated optimal individual, including:

[0151] The search probability p is determined as follows:

[0152]

[0153] Where, p max p represents the upper limit of the search probability. min p represents the lower bound of the search probability. max and p min All are located between (0,1).

[0154] Generate a random number rand between (0,1) and determine whether the random number rand is less than the search probability p. If it is, perform reverse learning update on the optimal individual to obtain the updated optimal individual. Otherwise, perform Cauchy mutation update on the optimal individual to obtain the updated optimal individual.

[0155] The reverse learning update is as follows:

[0156] X best (t+1)=b'⊕(X best (t)-(ub+r⊕(lb-X best (t))))

[0157]

[0158] Where b' represents the AC coefficient, ⊕ represents point-to-point product, and X best (t) represents the optimal individual to be updated, X best (t+1) represents the updated optimal individual, ub represents the upper boundary, lb represents the lower boundary, r represents a 1×d random number matrix following a standard uniform distribution of (0,1), and d represents the total number of network parameters in the individual;

[0159] The Cauchy mutation is updated as follows:

[0160]

[0161] Where cauchy(0,1) represents the standard Cauchy distribution.

[0162] In one possible implementation, the method for obtaining the trained regional electricity consumption prediction model is as follows:

[0163] A multi-layer feedforward network consisting of an input layer, a hidden layer, and an output layer is used as the regional electricity consumption prediction model.

[0164] The regional electricity consumption prediction model was trained using the gradient descent method, resulting in a fully trained regional electricity consumption prediction model.

[0165] Optionally, a back propagation (BP) neural network can be used as the regional electricity consumption prediction model, and other training methods can be used to train the regional electricity consumption prediction model.

[0166] In one possible implementation, the regional electricity consumption prediction model is trained using the gradient descent method to obtain the trained regional electricity consumption prediction model, including:

[0167] The actual output of the regional electricity consumption prediction model will be obtained by using seasonal data, weather data, average temperature data, date type data, and total electricity consumption corresponding to each time period as inputs to the regional electricity consumption prediction model.

[0168] Initialize the network parameters of the regional electricity consumption prediction model;

[0169] Using total electricity consumption as the expected output of the regional electricity consumption prediction model, and based on the expected output and the actual output, the error of the regional electricity consumption prediction model is obtained as follows:

[0170]

[0171] Where E represents the error, t pk o represents the expected output of the k-th neuron in the output layer when the i-th training data is input. pk This represents the actual output of the k-th neuron in the output layer when the i-th training data is input;

[0172] Determine whether the error E of the regional electricity consumption prediction model is less than the set error threshold. If so, use the current network parameters as the final network parameters of the regional electricity consumption prediction model; otherwise, update the network parameters.

[0173]

[0174]

[0175] Among them, b t Indicates the bias before the update, w t b represents the weight before the update. t+1 Indicates the updated bias, w t+1Indicates the updated weight, η t This represents the learning rate during the t-th training iteration;

[0176] The error of the regional electricity consumption prediction model is retrieved again for the next training.

[0177] In one possible implementation, the learning rate η t for:

[0178] η t =η t-1 (1-β*ΔE)

[0179] Where, η t-1 Let β represent the learning rate during the (t-1)th training iteration, β represent a constant between (0,1), and ΔE = E t -E t-1 E t E represents the error during the t-th training iteration. t-1 This represents the error during the (t-1)th training iteration.

[0180] The present invention provides a smart power data acquisition method, which first collects power data, then processes the power data, and then encrypts the processing results and the power data before storing them in a server. This method enables staff to discover useful information in the power data while ensuring the security of the power data, thus achieving secure power data acquisition.

[0181] Other embodiments of the invention will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This invention is intended to cover any variations, uses, or adaptations of the invention that follow the general principles of the invention and include common knowledge or customary techniques in the art not disclosed herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of the invention are indicated by the following claims.

[0182] It should be understood that the present invention is not limited to the precise structure described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of the invention is limited only by the appended claims.

Claims

1. A smart power data acquisition method, characterized in that, include: The first power data acquisition device collects the electricity consumption data of each user within the power consumption area over a continuous time period. The electricity consumption data includes the electricity consumption and power consumption in each time period. Each user corresponds to one first power data acquisition device. The second power data acquisition device collects power consumption data from all the first power data acquisition devices within the power consumption area, and analyzes the regional power consumption and power at continuous time points in the power consumption data to obtain power consumption analysis results. After preprocessing the electricity consumption data in the second power data acquisition device, preprocessed electricity consumption data is obtained. The preprocessed electricity consumption data is then correlated with the electricity consumption analysis results to obtain correlated data. The correlated data is then encrypted using the public key of the data storage server to obtain encrypted power data. The encrypted power data is uploaded to a data storage server for storage, completing the collection of power data, so that staff can use the private key of the data storage server to decrypt and view the encrypted power data; The electricity consumption and power consumption at continuous time points in the electricity consumption data are analyzed to obtain the electricity consumption analysis results, including: The environmental characteristics corresponding to the power consumption are obtained. These environmental characteristics include the average temperature characteristics, weather characteristics, and peak power consumption characteristics over a continuous time period. That is, each time period has corresponding power consumption and environmental characteristics. Different weather conditions are represented by different first digital strings. The peak power consumption characteristics include whether the time point is a peak power consumption period or not. Peak power consumption periods are represented by second digital strings, and non-peak power consumption periods are represented by third digital strings. The first, second, and third digital strings are all different. A power consumption data feature matrix is ​​constructed using power consumption, temperature characteristics, weather characteristics, and peak power consumption characteristics at continuous time points. The power consumption data feature matrix is ​​then normalized to obtain a normalized power consumption data feature matrix. Obtain the output power of the transformer in the power consumption area, calculate the line loss power from the transformer to the user, and subtract the line loss power from the output power to obtain the expected power consumption on the user side; Determine whether the difference between the expected power consumption and the user's total power consumption is greater than the set first threshold. If so, determine the rate of change; otherwise, directly determine that the power consumption anomaly analysis result is that there is no anomaly. Determine whether the number of days the difference between the expected power consumption and the user's total power consumption increases is greater than the second threshold. If so, obtain the power consumption anomaly analysis result based on the normalized power consumption data feature matrix; otherwise, directly determine that the power consumption anomaly analysis result is that there is no anomaly. Using the normalized electricity consumption data feature matrix as input data for a pre-trained anomaly detection model, the abnormal electricity consumption analysis results corresponding to the users in the electricity consumption data feature matrix are obtained. The abnormal electricity consumption analysis results include whether there is an anomaly or not. Based on each user's electricity consumption in different time periods, obtain the total electricity consumption of the electricity consumption area; Acquire seasonal data, weather data, average temperature data, and date type data corresponding to each time period. The date type data includes: seasonal data (spring, summer, autumn, or winter), weather data (rainy, sunny, cloudy, or snowy), and date type data (weekdays or non-weekdays). Based on the seasonal data, weather data, average temperature data, date type data, and total electricity consumption corresponding to each time period, a regional electricity consumption prediction model is trained. Collect seasonal data, weather data, average temperature data, and date type data for a future time period, and use the seasonal data, weather data, average temperature data, and date type data as input data for the trained regional electricity consumption prediction model to obtain the predicted electricity consumption. The results of abnormal electricity consumption analysis and the predicted electricity consumption are used together as the electricity consumption analysis results.

2. The intelligent power data acquisition method according to claim 1, characterized in that, After preprocessing the electricity consumption data, preprocessed electricity consumption data is obtained, including: handling missing and outlier values ​​in the electricity consumption data, and marking the missing and outlier values ​​to obtain preprocessed electricity consumption data.

3. The intelligent power data acquisition method according to claim 1, characterized in that, Methods for obtaining pre-trained anomaly detection models include: A convolutional neural network was constructed and used as an anomaly detection model to identify the feature matrix of electricity consumption data. The network parameters of the anomaly detection model are initialized using a chaotic mapping mechanism to obtain individual parameters. Repeat the process of obtaining individual parameters multiple times, and then combine the obtained individual parameters into a training population; Obtain the fitness of each individual parameter, sort the fitness in descending order, and select the optimal individual with the highest fitness from the training population; Get the switching probability p and generate a random number rand between (0,1). Determine if the random number rand is less than the switching probability p. If it is, perform the first local update on the parameter individual based on the optimal individual with the highest fitness to obtain the updated training population. Otherwise, perform the second local update on the parameter individual based on the optimal individual with the highest fitness to obtain the updated training population. For the optimal individual, a global search update method is used to update the optimal individual to obtain the updated optimal individual; The updated optimal individual and the individual with the highest fitness in the updated training population are re-determined, and the re-determined individual is taken as the new optimal individual. Determine whether the fitness value of the optimal individual is greater than a pre-set threshold or whether the current update round is greater than the maximum update round. If so, use the optimal individual as the final network parameter of the anomaly detection model to obtain the trained anomaly detection model. Otherwise, proceed to the next round of training and update the parameter individuals again.

4. The intelligent power data acquisition method according to claim 3, characterized in that, The parameters of the individual are first locally updated based on the optimal individual with the highest fitness, including: in, Represents the optimal individual. This indicates an individual whose parameters need to be updated. This represents the updated parameter for each individual. This indicates an update to the weighting factor. Represents the coefficient vector. Represents the natural constant. b Represents a constant. l Represents a random number between (-1, 1). Represents pi (π). Indicates the initial weighting factor. Indicates the final weighting factor. Indicates the convergence factor. , Indicates the current update round number. This indicates the maximum number of update rounds set. This represents a random search path that follows a Lévy distribution. This indicates point-to-point product.

5. The intelligent power data acquisition method according to claim 4, characterized in that, The parameters of the individual are updated locally based on the optimal individual with the highest fitness, including: A1. Obtain the first coefficient vector A The first coefficient vector A Any element in , Represents a random number between [0, 1]; A2. Determine the modulus of the first coefficient vector | A |Is it less than or equal to 1? If yes, proceed to step A3; otherwise, proceed to step A4. A3. Update the parameters of the individuals based on the optimal individual with the highest fitness, completing the second local update, which is as follows: in, This represents the absolute value of the distance between the optimal individual and the individual whose parameters need to be updated. Let represent the second coefficient vector, and the second coefficient vector Each element in is , Represents a random number between [0, 1]; A4. Update the parameters of the individuals based on the optimal individual with the highest fitness, completing the second local update, which is as follows: in, This represents random parameter individuals other than those whose parameters are to be updated.

6. The intelligent power data acquisition method according to claim 5, characterized in that, The optimal individual is updated using a global search update method, resulting in the updated optimal individual, including: Determine the search probability for: in, This represents the upper limit of the search probability. This represents the lower bound of the search probability. as well as All are located between (0,1); Generate a random number rand between (0,1) and determine if the random number rand is less than the search probability. If so, then the optimal individual is updated by reverse learning to obtain the updated optimal individual; otherwise, the optimal individual is updated by Cauchy mutation to obtain the updated optimal individual. The reverse learning update is as follows: in, Represents the exchange coefficient. This represents point-to-point product. This indicates the optimal individual to be updated. This represents the updated optimal individual. Indicates the upper boundary. Indicates the lower boundary. Indicates that it follows a standard uniform distribution of (0,1) 1× d A random number matrix, d This represents the total number of network parameters in an individual; The Cauchy mutation is updated as follows: in, This represents the standard Cauchy distribution.

7. The intelligent power data acquisition method according to claim 1, characterized in that, The method for obtaining the trained regional electricity consumption prediction model is as follows: A multi-layer feedforward network consisting of an input layer, a hidden layer, and an output layer is used as the regional electricity consumption prediction model. The regional electricity consumption prediction model was trained using the gradient descent method, resulting in a fully trained regional electricity consumption prediction model.

8. The intelligent power data acquisition method according to claim 1, characterized in that, The regional electricity consumption prediction model is trained using the gradient descent method, resulting in a fully trained regional electricity consumption prediction model, including: The actual output of the regional electricity consumption prediction model will be obtained by using the seasonal data, weather data, average temperature data, date type data, and total electricity consumption corresponding to each time period as inputs. Initialize the network parameters of the regional electricity consumption prediction model; Using total electricity consumption as the expected output of the regional electricity consumption prediction model, and based on the expected output and the actual output, the error of the regional electricity consumption prediction model is obtained as follows: in, Indicates error. Indicates the first i When the training data is input, the output layer contains the first training data. k The expected output of each neuron. Indicates the first i When the training data is input, the output layer contains the first training data. k The actual output of each neuron; Determine the error of the regional electricity consumption prediction model E If the error is less than the set error threshold, the current network parameters will be used as the final network parameters of the regional electricity consumption prediction model; otherwise, the network parameters will be updated. in, This indicates the bias before the update. This indicates the weights before the update. This indicates the updated bias. This indicates the updated weights. Indicates the first t Learning rate during each training session; The error of the regional electricity consumption prediction model is retrieved again for the next training.

9. The intelligent power data acquisition method according to claim 1, characterized in that, Learning rate for: in, Indicates the first t -1 training session learning rate Represents a constant between (0,1). , Indicates the first t Error during training Indicates the first t -1 training error.

Citation Information

Patent Citations

  • Power grid operating data processing method

    CN105069690A

  • Security transaction process optimization method and device based on block chain, and medium

    CN111444201A