A method, device, equipment and storage medium for risk assessment of electricity consumption data
By building an evaluation model containing autoencoder and fully connected neural network model, the power consumption data is scored, and the problems of low efficiency and misjudgment of risk level evaluation of electricity users in the existing technology are solved, and higher evaluation accuracy and efficiency are achieved.
Patent Information
- Application Number
- CN202211027287.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-08-25
- Publication Date
- 2025-05-23
- Estimated Expiration
- 2042-08-25
AI Technical Summary
The prior art is inefficient and prone to misjudgment when evaluating the risk level of electricity users, especially methods that rely on manpower and historical data, with large errors and inaccurate enough.
By reading the historical electricity consumption data of each user in the distribution network, an evaluation model including the first autoencoder, the second autoencoder and the fully connected neural network model is constructed, and the electricity consumption data to be tested is scored, scoring results are generated and the risk level is determined.
It improves the accuracy of the risk level assessment of electricity users, reduces the demand for human resources, improves the evaluation efficiency, and can accurately determine the risk level of the electricity data to be tested.
Smart Images

Figure CN115392715B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of risk assessment, and in particular to a method, device, equipment and storage medium for risk assessment of electricity consumption data. Background Art
[0002] Electricity resources are an important social resource used in various production activities and daily activities in my country's current social development. Objectively, it is related to my country's industrial production efficiency to a certain extent. However, in the course of their work, power companies currently face the situation where users of electricity-consuming companies violate regulations in their use of electricity.
[0003] However, in actual work, when power companies discover that users have violated regulations and abnormal electricity usage, they usually dispatch personnel to conduct on-site inspections of the power metering devices corresponding to all abnormal users to eliminate abnormal risks, or analyze and divide the user's risk abnormality level based on original historical data, manual experience and prior knowledge, and assess the electricity user's audit level.
[0004] The existing method of dispatching personnel to conduct on-site inspections is not only inefficient, but also has large errors due to the method of relying solely on historical data and manual experience to divide the risk level, which can easily lead to misjudgment of the risk level. Summary of the invention
[0005] The present invention provides a method, device, equipment and storage medium for risk assessment of electricity consumption data, so as to achieve risk assessment of electricity users.
[0006] According to one aspect of the present invention, a method for risk assessment of electricity consumption data is provided, the method comprising:
[0007] Read the historical electricity consumption data of each user in the distribution network, and build an evaluation model based on the historical electricity consumption data, wherein the evaluation model includes a first autoencoder, a second autoencoder, and a fully connected neural network model;
[0008] Obtain the power consumption data to be tested, and score the power consumption data to be tested using the evaluation model to generate a scoring result;
[0009] The risk level of the electricity consumption data to be tested is determined based on the scoring results.
[0010] Preferably, the electricity consumption data to be tested is obtained, and the electricity consumption data to be tested is scored by using an evaluation model to generate a scoring result, including: preprocessing the electricity consumption data to be tested to generate a data set; processing the data set by using a first autoencoder to obtain a data reconstruction error and a first eigenvalue of the data set, wherein the first autoencoder includes an encoding layer and a decoding layer; processing the first eigenvalue of the data set by using a second autoencoder to obtain a feature reconstruction error, a hidden eigenvalue of the first eigenvalue, and a second eigenvalue of the data set; processing the second eigenvalue by using a fully connected neural network model to generate a Gaussian score; and generating a scoring result based on the data reconstruction error, the feature reconstruction error, and the Gaussian score.
[0011] Preferably, the data set is processed by a first autoencoder to obtain a data reconstruction error and a first eigenvalue of the data set, including: extracting features of the data set by a coding layer to obtain the first eigenvalue of the data set; reconstructing the data set by a decoding layer to obtain a reconstructed data set; and obtaining a data reconstruction error based on the data set and the reconstructed data set.
[0012] Preferably, the first eigenvalue of the data set is processed by a second encoder to obtain a feature reconstruction error, a hidden eigenvalue of the first eigenvalue and a second eigenvalue of the data set, including: reconstructing the first eigenvalue by a second autoencoder to obtain a reconstructed eigenvalue of the data set; encoding the first eigenvalue by a second autoencoder to obtain a hidden eigenvalue of the first eigenvalue; obtaining a feature reconstruction error based on the reconstructed eigenvalue and the first eigenvalue of the data set; obtaining the Euclidean distance and cosine similarity between the reconstructed eigenvalue and the first eigenvalue of the data set, and obtaining the second eigenvalue of the data set based on the Euclidean distance, cosine similarity and hidden eigenvalue.
[0013] Preferably, the second eigenvalue is processed through a fully connected neural network model to generate a Gaussian score, including: calculating the second eigenvalue of the data set using the maximum expectation algorithm EM through the fully connected neural network model to obtain the attribution probability corresponding to the second eigenvalue of the data set; calculating the attribution probability and the second eigenvalue of the data set to obtain the score calculation association parameter of the fully connected neural network model; generating a Gaussian score based on the association parameter and the second eigenvalue of the data set.
[0014] Preferably, a scoring result is generated based on the data reconstruction error, feature reconstruction error and Gaussian score, including: taking the data reconstruction error, feature reconstruction error and Gaussian score as evaluation indicators, and obtaining the weight value corresponding to each evaluation indicator; and adding the products of each evaluation indicator and the weight value corresponding to each evaluation indicator in turn to obtain the scoring result.
[0015] Preferably, determining the risk level of the power usage data to be tested according to the scoring result includes: determining a score interval corresponding to the scoring result; and determining the risk level of the power usage data to be tested according to the score interval.
[0016] According to another aspect of the present invention, there is provided a device for risk assessment of electricity consumption data, the device comprising:
[0017] An evaluation model building module is used to read the historical electricity consumption data of each user in the distribution network and build an evaluation model based on the historical electricity consumption data, wherein the evaluation model includes a first autoencoder, a second autoencoder and a fully connected neural network model;
[0018] A scoring result generation module is used to obtain the power consumption data to be tested, and to score the power consumption data to be tested by using an evaluation model to generate a scoring result;
[0019] The risk level determination module is used to determine the risk level of the power consumption data to be tested based on the scoring results.
[0020] According to another aspect of the present invention, an electronic device is provided, the electronic device comprising:
[0021] at least one processor; and
[0022] a memory communicatively connected to the at least one processor; wherein,
[0023] 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 so that the at least one processor can execute a method for risk assessment of electricity consumption data described in any embodiment of the present invention.
[0024] According to another aspect of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement a power consumption data risk assessment method described in any embodiment of the present invention when executed.
[0025] The technical solution of the embodiment of the present invention builds an evaluation model through historical electricity consumption data, and scores the electricity consumption data to be tested through the pre-built evaluation model. Finally, the risk level is determined according to the scoring results. The risk level can be accurately determined through the scoring results, thereby improving the accuracy of the evaluation and eliminating the need for personnel to go to the site for inspection, saving human resources and improving the efficiency of risk assessment.
[0026] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0027] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0028] Figure 1 is a flow chart of a method for risk assessment of electricity consumption data provided according to Embodiment 1 of the present invention;
[0029] Figure 2 This is a schematic diagram of an evaluation model structure applicable to Embodiment 1 of the present invention;
[0030] Figure 3 is a flowchart of another method for risk assessment of electricity consumption data provided according to the first embodiment of the present invention;
[0031] Figure 4 is a flowchart of another method for risk assessment of electricity consumption data provided according to Embodiment 2 of the present invention;
[0032] Figure 5 is a schematic diagram of the structure of a power consumption data risk assessment device provided according to Embodiment 3 of the present invention;
[0033] Figure 6 It is a structural schematic diagram of an electronic device for implementing a method for risk assessment of electricity consumption data according to an embodiment of the present invention. DETAILED DESCRIPTION
[0034] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.
[0035] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0036] Embodiment 1
[0037] Figure 1 A flowchart of a method for risk assessment of electricity consumption data is provided for the first embodiment of the present invention. This embodiment is applicable to the situation of assessing the risk level of electricity users. The method can be performed by an electricity consumption data risk assessment device. The electricity consumption data risk assessment device can be implemented in the form of hardware and / or software. The electricity consumption data risk assessment device can be configured in a computer. Figure 1 As shown, the method includes:
[0038] S110, reading the historical electricity consumption data of each user in the distribution network, and building an evaluation model based on the historical electricity consumption data.
[0039] The distribution network refers to a power grid with a voltage level of 35KV or below, which is used to supply power to various distribution stations and various types of power loads in the city. Users refer to power users in the distribution network. Historical power consumption data refers to the historical power consumption data of power users in the distribution network, including but not limited to daily power consumption, operating capacity and daily load. The controller builds an evaluation model by reading the historical power consumption data of each user in the distribution network. Figure 2 This is a schematic diagram of the evaluation model structure. Figure 2 In the evaluation model, the first autoencoder, the second autoencoder and the fully connected neural network model are included.
[0040] Specifically, the first autoencoder can be a multi-layer recurrent neural network autoencoder, which includes an encoding layer and a decoding layer. The encoding layer is used to compress and extract eigenvalues, and the decoding layer is used to restore and reconstruct data. The second autoencoder can be a deep autoencoder, and the eigenvalues can be further compressed and extracted through the deep autoencoder. In this embodiment, only the first encoder is a recurrent neural network autoencoder and the second encoder is a deep autoencoder as an example for explanation, and the types of the first autoencoder and the second autoencoder are not limited.
[0041] S120, obtaining the power consumption data to be tested, and scoring the power consumption data to be tested using the evaluation model to generate a scoring result.
[0042] Specifically, the power consumption data to be tested refers to new data of unknown risk level. After the controller obtains the power consumption data to be tested, it can score the power consumption data to be tested through the constructed evaluation model to generate a scoring result, and the risk level can be further determined based on the scoring result.
[0043] Figure 3 A flowchart of a method for determining industrial control network data risk is provided for the first embodiment of the present invention, wherein step S120 mainly includes the following steps S121 to S125:
[0044] S121, pre-processing the power consumption data to be tested to generate a data set.
[0045] Specifically, the controller will preprocess the power consumption data to be tested. Preprocessing refers to data cleaning operations such as filling missing values and removing outliers and data transformation operations such as normalization. Finally, the data set is standardized as X = (X 1 ,X 2 ,…X N ), where N is the number of users, X i =(x 1 ,x 2 ,…x k ) T It is T×k multi-dimensional time series data for each user.
[0046] For example, when the number of users N is 4, then X=(X 1 ,X 2 ,X 3 ,X 4 ), where X 1 , X 2 , X 3 and X 4 represent four users respectively, and X 1 =(x 1 ,x 2 ,x 3 ) T , x 1 、x 2 and x 3 They represent daily electricity consumption, operating capacity and daily load respectively.
[0047] S122. Process the data set through a first autoencoder to obtain a data reconstruction error and a first eigenvalue of the data set.
[0048] Preferably, the data set is processed by a first autoencoder to obtain a data reconstruction error and a first eigenvalue of the data set, including: extracting features of the data set by a coding layer to obtain the first eigenvalue of the data set; reconstructing the data set by a decoding layer to obtain a reconstructed data set; and obtaining a data reconstruction error based on the data set and the reconstructed data set.
[0049] Specifically, the controller processes the data set through the first autoencoder, that is, extracts the features of the data set through the encoding layer of the multi-level recurrent neural network autoencoder to obtain the first eigenvalue of the data set, which refers to the hidden eigenvalue of the latent space of the data set, and then reconstructs the data set through the decoding layer to obtain a reconstructed data set. The reconstructed data set is the total output of the user in the next T period of time predicted by the model. When the user data is normal, the reconstructed data set is close to the data set, but abnormal data will cause the reconstructed data set to deviate to varying degrees. Therefore, the controller obtains the data reconstruction error based on the data set and the reconstructed data set. For example, when the input data set is X i , the first eigenvalue H can be obtained through the encoding layer of the multi-level recurrent neural network autoencoder, and the reconstructed data set X' can be obtained through the decoding layer i , and the data reconstruction error is calculated using the following formula (1):
[0050]
[0051] in, represents the data reconstruction error, X i represents the data set, X' i Represents the reconstructed dataset.
[0052] S123. Processing the first eigenvalue of the data set through a second autoencoder to obtain a feature reconstruction error, a hidden eigenvalue of the first eigenvalue, and a second eigenvalue of the data set.
[0053] Preferably, the first eigenvalue of the data set is processed by a second encoder to obtain a feature reconstruction error, a hidden eigenvalue of the first eigenvalue and a second eigenvalue of the data set, including: reconstructing the first eigenvalue by a second autoencoder to obtain a reconstructed eigenvalue of the data set; encoding the first eigenvalue by a second autoencoder to obtain a hidden eigenvalue of the first eigenvalue; obtaining a feature reconstruction error based on the reconstructed eigenvalue and the first eigenvalue of the data set; obtaining the Euclidean distance and cosine similarity between the reconstructed eigenvalue and the first eigenvalue of the data set, and obtaining the second eigenvalue of the data set based on the Euclidean distance, cosine similarity and hidden eigenvalue.
[0054] Specifically, the controller inputs the first eigenvalue of the data set output by the first encoder to the second encoder, that is, the first eigenvalue can be reconstructed by the deep autoencoder to obtain the reconstructed eigenvalue of the data set, and the first eigenvalue is encoded by the second autoencoder to generate the hidden eigenvalue of the latent space, and then the feature reconstruction error is obtained according to the reconstructed eigenvalue and the first eigenvalue of the data set, that is, the feature reconstruction error is calculated using the following formula (2):
[0055]
[0056] Among them, among them, represents the feature reconstruction error, H i represents the first eigenvalue, H' i Represents the reconstructed eigenvalue.
[0057] Furthermore, after obtaining the hidden eigenvalue and the reconstructed eigenvalue, the controller can also calculate the Euclidean distance and cosine similarity between the reconstructed eigenvalue and the first eigenvalue. Since the hidden eigenvalue, Euclidean distance and cosine similarity are in the same dimension, the controller can concatenate the hidden eigenvalue, Euclidean distance and cosine similarity to obtain the second eigenvalue. For example, the calculated Euclidean distance is A=(A1, A2, A3), the cosine similarity is B=(B1, B2, B3), and the hidden eigenvalue is C=(C1, C2, C3). The controller can concatenate the two matrices to obtain feature Z, that is, feature Z=(A, B, C).
[0058] S124. Process the second eigenvalue through a fully connected neural network model to generate a Gaussian score.
[0059] Preferably, the second eigenvalue is processed through a fully connected neural network model to generate a Gaussian score, including: calculating the second eigenvalue of the data set using the maximum expectation algorithm EM through the fully connected neural network model to obtain the attribution probability corresponding to the second eigenvalue of the data set; calculating the attribution probability and the second eigenvalue of the data set to obtain the score calculation association parameter of the fully connected neural network model; generating a Gaussian score based on the association parameter and the second eigenvalue of the data set.
[0060] Specifically, the controller inputs the second eigenvalue of the data set output by the second encoder into the fully connected neural network model. The fully connected neural network model can process the second eigenvalue and calculate the logical value using the following formula (3):
[0061] P=MLBP(Z,θ) (3)
[0062] Wherein, MLBP(·) represents a multi-layer neural network, θ represents a neural network parameter, Z represents the second eigenvalue, and P represents the logical value of the second eigenvalue.
[0063] Furthermore, the controller inputs the obtained logical value into the SoftMax layer of the fully connected neural network model and outputs γ using the following formula (4): n Probability of belonging:
[0064] γ n =Softmax(P) (4)
[0065] Where P represents the logical value of the second eigenvalue, γ n Represents the attribution probability. After obtaining the attribution probability, the controller can calculate the score calculation associated parameters of the fully connected neural network model through the attribution probability and the second eigenvalue of the data set, wherein the associated parameters include prior, mean and covariance matrix, etc. In this implementation, only the prior, mean and covariance matrix of the associated parameters are used as examples for explanation, and the type of the associated parameters is not limited. For example, the controller can use the following formula (5) to calculate the prior:
[0066]
[0067] Among them, φ n represents the prior of the test data set, N represents the total number of users, i represents the number of users, i = 1, 2, ... n, γ i,n represents the probability of belonging.
[0068] Furthermore, the controller may calculate the mean value according to the attribution probability and the second eigenvalue of the data set, and calculate the mean value using the following formula (6):
[0069]
[0070] Among them, μ n represents the mean of the test data set, N represents the total number of users, i represents the number of users, i = 1, 2, ... n, γ i,n represents the probability of belonging, Z i represents the second eigenvalue.
[0071] Furthermore, after calculating the mean, the controller can calculate the covariance matrix according to the mean, the second eigenvalue and the attribution probability, and use the following formula (7) to calculate the covariance matrix:
[0072]
[0073] Among them, Σ n represents the covariance matrix, T represents the time period of the test data set, γ i,n represents the probability of belonging, Z i represents the second eigenvalue, μ n represents the mean of the data set to be tested, N represents the total number of users, i represents the number of users, i=1,2,…n.
[0074] Furthermore, after the controller calculates the prior, mean, and covariance matrix, it can generate Gaussian scores from these associated parameters and the second eigenvalue of the data set, and calculate the Gaussian scores using the following formula (8):
[0075]
[0076] Among them, E(Z) represents the Gaussian score, T represents the time period of the test data set, μ n represents the mean of the data set to be tested, Z represents the second eigenvalue, N represents the total number of users, Σ n represents the covariance matrix, φ n Represents the prior of the test data set.
[0077] S125. Generate a scoring result according to the data reconstruction error, the feature reconstruction error and the Gaussian score.
[0078] Preferably, a scoring result is generated based on the data reconstruction error, feature reconstruction error and Gaussian score, including: taking the data reconstruction error, feature reconstruction error and Gaussian score as evaluation indicators, and obtaining the weight value corresponding to each evaluation indicator; and adding the products of each evaluation indicator and the weight value corresponding to each evaluation indicator in turn to obtain the scoring result.
[0079] Specifically, after calculating the data reconstruction error, feature reconstruction error and Gaussian score, the controller will use these values as evaluation indicators and obtain the weight value corresponding to each evaluation indicator. The weight value is input by the R&D personnel in the controller according to the importance of each indicator. The controller adds the products of each evaluation indicator and the weight value corresponding to each evaluation indicator in turn to obtain the scoring result. Furthermore, when constructing the evaluation model, the controller will also perform minimization training on the evaluation model. In this way, the controller can directly output the value of the scoring result when calculating the power consumption data to be tested, that is, the following formula (9) is used to calculate the scoring result:
[0080]
[0081] Where E(Z) represents the Gaussian score, N represents the total number of users, represents the data reconstruction error, represents the feature reconstruction error, i represents the number of users, i=1,2,…n, λ 1 Represents the weight value corresponding to the data reconstruction error, λ 2 represents the weight value corresponding to the feature reconstruction error, λ 3 represents the weight value corresponding to the Gaussian score. For example, the weight value λ corresponding to the data reconstruction error of the power consumption data M to be tested is 20 1 The weight value λ is 0.2 and the feature reconstruction error is 30. 2The weight value λ corresponding to 0.1 and Gaussian fraction 50 3 is 0.7, then the final score of the power consumption data M to be tested = 20*0.2+30*0.1+50*0.7=42.
[0082] S130. Determine the risk level of the power consumption data to be tested according to the scoring result.
[0083] Specifically, the controller can determine the risk level of the user data to be tested based on the scoring results. The risk levels are divided into no risk, low risk, medium risk and high risk. For example, when the final score of the electricity consumption data M to be tested is determined to be 42, it can be obtained that the risk level of the electricity consumption data to be tested is medium risk.
[0084] Furthermore, when the controller determines that the risk level of the power consumption data to be tested is medium risk or high risk, it will also generate a risk prompt and send the risk prompt to a display connected to the controller. For example, the prompt content is: the power consumption data M to be tested is medium risk.
[0085] The technical solution of the embodiment of the present invention builds an evaluation model through historical electricity consumption data, and scores the electricity consumption data to be tested through the pre-built evaluation model. Finally, the risk level is determined according to the scoring results. The risk level can be accurately determined through the scoring results, thereby improving the accuracy of the evaluation and eliminating the need for personnel to go to the site for inspection, saving human resources and improving the efficiency of risk assessment.
[0086] Embodiment 2
[0087] Figure 4 A flow chart of a method for risk assessment of electricity consumption data provided in the second embodiment of the present invention. This embodiment, on the basis of the above-mentioned first embodiment, adds specific instructions for determining the risk level of the electricity consumption data to be tested according to the scoring results, wherein the specific contents of steps S210 to S220 are substantially the same as steps S110 to S120 in the first embodiment, and therefore will not be repeated in this embodiment.
[0088] like Figure 4 As shown, the method includes:
[0089] S210: Read the historical electricity consumption data of each user in the distribution network, and build an evaluation model based on the historical electricity consumption data.
[0090] S220, obtaining the power consumption data to be tested, and scoring the power consumption data to be tested using the evaluation model to generate a scoring result.
[0091] S230: Determine the score range corresponding to the scoring result.
[0092] Specifically, after calculating the scoring result through the above formula (9), the controller will also determine the corresponding score range based on the scoring result. The score range is divided into four score ranges: 0-10 points, 10-30 points, 30-80 points, and greater than 80 points. For example, when the scoring result of the power consumption data M to be tested is 42 points, the controller can determine that the scoring range corresponding to the power consumption data M to be tested is 30-80 points.
[0093] S240. Determine the risk level of the power consumption data to be tested according to the score range.
[0094] Specifically, each score range has a corresponding risk level, which is divided into no risk, low risk, medium risk and high risk. A score of 0-10 points corresponds to no risk, a score of 10-30 points corresponds to low risk, a score of 30-80 points corresponds to medium risk, and a score greater than 80 points corresponds to high risk.
[0095] The technical solution of the embodiment of the present invention builds an evaluation model through historical electricity consumption data, and scores the electricity consumption data to be tested through the pre-built evaluation model. Finally, the risk level is determined according to the scoring result. The score interval can be accurately determined through the scoring result, and then the risk level corresponding to the score interval can be determined, thereby improving the accuracy of the evaluation and eliminating the need for personnel to go to the site for inspection, saving human resources and improving the efficiency of risk assessment.
[0096] Embodiment 3
[0097] Figure 5 This is a schematic diagram of the structure of a power consumption data risk assessment device provided in Embodiment 3 of the present invention. Figure 5 As shown, the device includes: an evaluation model construction module 310, which is used to read the historical electricity consumption data of each user in the distribution network, and to construct an evaluation model based on the historical electricity consumption data, wherein the evaluation model includes a first autoencoder, a second autoencoder and a fully connected neural network model; a scoring result generation module 320, which is used to obtain the electricity consumption data to be tested, and to score the electricity consumption data to be tested through the evaluation model to generate a scoring result; a risk level determination module 330, which is used to determine the risk level of the electricity consumption data to be tested based on the scoring result.
[0098] Preferably, the scoring result generation module 320 specifically includes: a data set generation unit, used to pre-process the power consumption data to be tested to generate a data set; a first autoencoder unit, used to process the data set through the first autoencoder to obtain a data reconstruction error and a first eigenvalue of the data set, wherein the first autoencoder includes an encoding layer and a decoding layer; a second autoencoder unit, used to process the first eigenvalue of the data set through the second autoencoder to obtain a feature reconstruction error, a hidden eigenvalue of the first eigenvalue, and a second eigenvalue of the data set; a fully connected neural network model unit, used to process the second eigenvalue through a fully connected neural network model to generate a Gaussian score; and a scoring result generation unit, used to generate a scoring result based on the data reconstruction error, the feature reconstruction error, and the Gaussian score.
[0099] Preferably, the first autoencoder unit is specifically used to: extract features from the data set through the encoding layer to obtain a first eigenvalue of the data set; reconstruct the data set through the decoding layer to obtain a reconstructed data set; and obtain a data reconstruction error based on the data set and the reconstructed data set.
[0100] Preferably, the second autoencoder unit is specifically used to: reconstruct the first eigenvalue by the second autoencoder to obtain a reconstructed eigenvalue of the data set; encode the first eigenvalue by the second autoencoder to obtain a hidden eigenvalue of the first eigenvalue; obtain a feature reconstruction error based on the reconstructed eigenvalue and the first eigenvalue of the data set; obtain the Euclidean distance and cosine similarity between the reconstructed eigenvalue and the first eigenvalue of the data set, and obtain the second eigenvalue of the data set based on the Euclidean distance, cosine similarity and hidden eigenvalue.
[0101] Preferably, the fully connected neural network model unit is specifically used to: calculate the second eigenvalue of the data set using the maximum expectation algorithm EM through the fully connected neural network model to obtain the attribution probability corresponding to the second eigenvalue of the data set; calculate the score calculation association parameters of the fully connected neural network model by calculating the attribution probability and the second eigenvalue of the data set; generate a Gaussian score based on the association parameters and the second eigenvalue of the data set.
[0102] Preferably, the scoring result generating unit is specifically used to: use data reconstruction error, feature reconstruction error and Gaussian score as evaluation indicators, and obtain the weight value corresponding to each evaluation indicator; add the products of each evaluation indicator and the weight value corresponding to each evaluation indicator in sequence to obtain the scoring result.
[0103] Preferably, the risk level determination module 330 is specifically used to: determine a score interval corresponding to the scoring result; and determine the risk level of the power consumption data to be tested according to the score interval.
[0104] The technical solution of the embodiment of the present invention builds an evaluation model through historical electricity consumption data, and scores the electricity consumption data to be tested through the pre-built evaluation model. Finally, the risk level is determined according to the scoring results. The risk level can be accurately determined through the scoring results, thereby improving the accuracy of the evaluation and eliminating the need for personnel to go to the site for inspection, saving human resources and improving the efficiency of risk assessment.
[0105] An electricity consumption data risk assessment device provided in an embodiment of the present invention can execute an electricity consumption data risk assessment method provided in any embodiment of the present invention, and has functional modules and beneficial effects corresponding to the execution method.
[0106] Embodiment 4
[0107] Figure 6 A schematic diagram of the structure of an electronic device 10 that can be used to implement an embodiment of the present invention is shown. 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 processing, cellular phones, smart phones, 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 examples and are not intended to limit the implementation of the present invention described and / or required herein.
[0108] like Figure 6 As shown, the electronic device 10 includes at least one processor 11, and a memory connected to the at least one processor 11, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., wherein the memory stores a computer program that can be executed by at least one processor, and the processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 to the random access memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 can also be stored. The processor 11, the ROM 12, and the RAM 13 are connected to each other through a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.
[0109] A number of components in the electronic device 10 are connected to the I / O interface 15, including: an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a disk, an optical disk, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.
[0110] The processor 11 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 11 executes the various methods and processes described above, such as a method for risk assessment of electricity consumption data.
[0111] In some embodiments, a method for assessing the risk of electricity consumption data may be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 10 via the ROM 12 and / or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of the method for assessing the risk of electricity consumption data described above may be performed. Alternatively, in other embodiments, the processor 11 may be configured to perform a method for assessing the risk of electricity consumption data in any other appropriate manner (e.g., by means of firmware). .
[0112] Various implementations 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 chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0113] Computer programs for implementing 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, so that when the computer program is executed by the processor, the functions / operations specified in the flow chart and / or block diagram are implemented. The computer program may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.
[0114] In the context of the present invention, a computer-readable storage medium may be a tangible medium that may contain or store a computer program for use by or in combination with an instruction execution system, device or equipment. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0115] To provide interaction with a user, the systems and techniques described herein may 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 a pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices may also be used to provide interaction with the user; for example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form (including acoustic input, voice input, or tactile input).
[0116] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.
[0117] A computing system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The client and server relationship is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services.
[0118] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution of the present invention can be achieved, and this document does not limit this.
[0119] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims
1. A method for risk assessment of electricity consumption data. It is characterized in that include: Reading historical electricity consumption data of each user in the distribution network, and building an evaluation model based on the historical electricity consumption data, wherein the evaluation model includes a first autoencoder, a second autoencoder, and a fully connected neural network model; Acquire the power consumption data to be tested, and score the power consumption data to be tested using the evaluation model to generate a scoring result; Determine the risk level of the power consumption data to be tested according to the scoring result; The step of obtaining the power consumption data to be tested and scoring the power consumption data to be tested by using the evaluation model to generate a scoring result includes: Preprocessing the power consumption data to be tested to generate a data set; Processing the data set by the first autoencoder to obtain a data reconstruction error and a first eigenvalue of the data set, wherein the first autoencoder includes an encoding layer and a decoding layer; Processing the first eigenvalue of the data set by the second autoencoder to obtain a feature reconstruction error, a hidden eigenvalue of the first eigenvalue, and a second eigenvalue of the data set; Processing the second eigenvalue by the fully connected neural network model to generate a Gaussian score; Generate the scoring result according to the data reconstruction error, the feature reconstruction error and the Gaussian score; The step of processing the data set by the first autoencoder to obtain a data reconstruction error and a first eigenvalue of the data set includes: Extracting features of the data set through the coding layer to obtain a first feature value of the data set; Reconstructing the data set through the decoding layer to obtain a reconstructed data set; Acquire the data reconstruction error according to the data set and the reconstructed data set; The step of processing the first eigenvalue of the data set by the second autoencoder to obtain a feature reconstruction error, a hidden eigenvalue of the first eigenvalue, and a second eigenvalue of the data set includes: Reconstructing the first eigenvalue by the second autoencoder to obtain a reconstructed eigenvalue of the data set; Encoding the first eigenvalue by the second autoencoder to obtain a hidden eigenvalue of the first eigenvalue; Obtaining the feature reconstruction error according to the reconstructed feature value and the first feature value of the data set; Obtaining the Euclidean distance and cosine similarity between the reconstructed eigenvalue and the first eigenvalue of the data set, and obtaining the second eigenvalue of the data set according to the Euclidean distance, the cosine similarity and the hidden eigenvalue; The step of processing the second eigenvalue by using the fully connected neural network model to generate a Gaussian score includes: The second eigenvalue of the data set is calculated by the fully connected neural network model using the maximum expectation algorithm EM to obtain the belonging probability corresponding to the second eigenvalue of the data set; Obtaining score calculation association parameters of the fully connected neural network model by calculating the attribution probability and the second eigenvalue of the data set; The Gaussian score is generated based on the association parameter and a second eigenvalue of the data set.
2. The method according to claim 1, It is characterized in that The generating the scoring result according to the data reconstruction error, the feature reconstruction error and the Gaussian score comprises: Using the data reconstruction error, the feature reconstruction error and the Gaussian score as evaluation indicators, and obtaining weight values corresponding to the evaluation indicators; The products of each evaluation indicator and the weight value corresponding to each evaluation indicator are added in sequence to obtain the scoring result.
3. The method according to claim 2, It is characterized in that Determining the risk level of the power consumption data to be tested according to the scoring result includes: Determine a score range corresponding to the scoring result; The risk level of the power usage data to be tested is determined according to the score range.
4. A device for assessing the risk of electricity consumption data, It is characterized in that include: An evaluation model building module, used to read the historical electricity consumption data of each user in the distribution network, and build an evaluation model based on the historical electricity consumption data, wherein the evaluation model includes a first autoencoder, a second autoencoder and a fully connected neural network model; A scoring result generating module, used for acquiring the power consumption data to be tested, and scoring the power consumption data to be tested by using the evaluation model to generate a scoring result; A risk level determination module, used to determine the risk level of the power consumption data to be tested according to the scoring result; Among them, the scoring result generation module specifically includes: a data set generation unit, which is used to pre-process the power consumption data to be tested to generate a data set; a first autoencoder unit, which is used to process the data set through the first autoencoder to obtain a data reconstruction error and a first eigenvalue of the data set, wherein the first autoencoder includes an encoding layer and a decoding layer; a second autoencoder unit, which is used to process the first eigenvalue of the data set through the second autoencoder to obtain a feature reconstruction error, a hidden eigenvalue of the first eigenvalue, and a second eigenvalue of the data set; a fully connected neural network model unit, which is used to process the second eigenvalue through the fully connected neural network model to generate a Gaussian score; a scoring result generation unit, which is used to generate the scoring result according to the data reconstruction error, the feature reconstruction error and the Gaussian score; The first autoencoder unit is specifically used to: extract features of the data set through the encoding layer to obtain a first feature value of the data set; reconstruct the data set through the decoding layer to obtain a reconstructed data set; and obtain the data reconstruction error according to the data set and the reconstructed data set; The second autoencoder unit is specifically used to: reconstruct the first eigenvalue by the second autoencoder to obtain a reconstructed eigenvalue of the data set; encode the first eigenvalue by the second autoencoder to obtain a hidden eigenvalue of the first eigenvalue; obtain the feature reconstruction error according to the reconstructed eigenvalue and the first eigenvalue of the data set; obtain the Euclidean distance and cosine similarity between the reconstructed eigenvalue and the first eigenvalue of the data set, and obtain the second eigenvalue of the data set according to the Euclidean distance, the cosine similarity and the hidden eigenvalue; Among them, the fully connected neural network model unit is specifically used to: calculate the second eigenvalue of the data set by the fully connected neural network model using the maximum expectation algorithm EM to obtain the attribution probability corresponding to the second eigenvalue of the data set; calculate by the attribution probability and the second eigenvalue of the data set to obtain the score calculation association parameter of the fully connected neural network model; generate the Gaussian score according to the association parameter and the second eigenvalue of the data set.
5. An electronic device, It is characterized in that The electronic device comprises: at least one processor; and a memory communicatively connected to the at least one processor; wherein, 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 so that the at least one processor can perform the method according to any one of claims 1 to 3.
6. A computer storage medium, It is characterized in that The computer storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the method according to any one of claims 1 to 3 when executed.
Citation Information
Patent Citations
Electric charge risk prevention and control model construction method based on logistic regression algorithm
CN111126776A
Power utilization risk judgment method based on deep learning
CN111639882A