Electricity price execution anomaly detection method and device, electronic equipment and storage medium

By acquiring and analyzing the time series of electricity consumption data, and using pre-trained models to identify electricity price execution abnormalities, the problem of low accuracy of electricity price execution monitoring in the existing technology is solved, efficient identification and monitoring of electricity price execution abnormalities is achieved, and power management is improved efficiency and accuracy.

CN119179974APending Publication Date: 2024-12-24BEIJING CHINA POWER INFORMATION TECH +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411057407.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-02
Publication Date
2024-12-24

AI Technical Summary

Technical Problem

The existing technology is difficult to effectively identify and monitor abnormal electricity price execution, resulting in business mistakes and favoritism and fraud in electricity price execution, and lack of high-precision monitoring and positioning technology, resulting in large management workload, low efficiency and high cost.

Method used

By obtaining the time series of user's electricity consumption data, selecting features and extracting target electricity consumption characteristics, and using pre-trained models for detection, identifying electricity price execution abnormalities, including using technical means such as long-term memory network models and lasso models, to improve detection Accuracy and range.

Benefits of technology

It has achieved comprehensive and effective identification of abnormal electricity price execution, prevented the risk of electricity price execution, expanded the scope of abnormal monitoring, improved the accuracy of abnormal electricity price detection, automatically locked abnormal users, and reduced management costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119179974A_ABST
    Figure CN119179974A_ABST
Patent Text Reader

Abstract

The invention provides an electricity price execution anomaly detection method and device, electronic equipment and a storage medium. The method comprises the following steps: acquiring a power consumption data time sequence of a user, wherein the power consumption data time sequence comprises power consumption information arranged based on a time sequence; performing feature selection on the power consumption data time sequence, and determining a target power consumption feature in the power consumption data time sequence; and based on the target power consumption characteristics, inputting the power consumption data time sequence into a pre-trained first model for detection, and based on a detection result, determining an electricity price execution anomaly detection result of the user. According to the electricity price execution anomaly detection method and device, the electronic equipment and the storage medium, the electricity price anomaly of the user can be comprehensively and effectively identified, the electricity price execution risk is prevented, the anomaly monitoring range is expanded, the electricity price anomaly accuracy is improved, and the abnormal user is automatically and accurately locked.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of computer technology, and in particular to a method, device, electronic device and storage medium for detecting abnormality in electricity price execution. Background Art

[0002] With economic development and social progress, people's demand for electricity is increasing, and the electricity market is also expanding. Every year, power companies suffer huge non-technical losses due to illegal electricity users stealing electricity. Abnormal electricity price execution includes some low-voltage commercial users not correctly implementing commercial electricity prices, but mistakenly implementing agricultural production electricity prices and rice field irrigation and threshing electricity prices, resulting in high-price low-connection behavior.

[0003] Existing marketing audit methods mainly rely on manual regular inspections, random sampling, user reports and other methods. The workload is large and the marketing audit clues are unclear due to the research and analysis of a large amount of audit data. Random inspections are adopted, and the experience of auditors is relied upon to determine whether the implementation of electricity prices is normal. However, in this case, potential abnormal users are often not discovered due to the small scope of the audit.

[0004] Therefore, in today's era of power big data, how to provide a method for detecting anomalies in electricity price execution to detect electricity theft is a major technical problem that needs to be solved urgently. Summary of the invention

[0005] In view of this, the purpose of the present disclosure is to provide a method, device, electronic device and storage medium for detecting abnormality in electricity price execution.

[0006] Based on the above objectives, the first aspect of the present disclosure provides a method for detecting abnormality in electricity price execution, comprising:

[0007] Acquire a user's electricity consumption data time series, wherein the electricity consumption data time series includes electricity consumption information arranged in chronological order;

[0008] Performing feature selection on the power consumption data time series to determine target power consumption features in the power consumption data time series;

[0009] Based on the target electricity consumption characteristics, the electricity consumption data time series is input into a pre-trained first model for detection, and the user's electricity price is determined based on the detection result to perform abnormal detection results.

[0010] In some embodiments, the electricity consumption data time series includes: daily electricity consumption information, daily peak electricity consumption information, daily valley electricity consumption information and daily average electricity consumption information, wherein the sum of the daily peak electricity consumption information, the daily valley electricity consumption information and the daily average electricity consumption information is equal to the daily electricity consumption information.

[0011] In some embodiments, the training process of the first model includes:

[0012] Acquire a time series of historical electricity consumption data of multiple users, wherein the time series of historical electricity consumption data includes a time series of abnormal electricity price execution data and a time series of normal electricity price execution data;

[0013] Performing feature selection on the historical power consumption data time series based on the second model to determine the target power consumption feature in the historical power consumption data time series;

[0014] Based on the target electricity consumption characteristics, the historical electricity consumption data time series is input into a first model to train the first model.

[0015] In some embodiments, after acquiring the time series of historical electricity consumption data of multiple users, the method further includes:

[0016] The historical electricity consumption data time series is oversampled to increase the number of the electricity price execution abnormal data time series in the historical electricity consumption data time series.

[0017] In some embodiments, the second model includes a lasso model; and the step of performing feature selection on the historical power consumption data time series based on the second model to determine the target power consumption feature in the historical power consumption data time series includes:

[0018] The historical electricity consumption data time series is input into the lasso model, and the lasso model is solved based on a preset objective function to obtain the target electricity consumption characteristics.

[0019] In some embodiments, inputting the historical electricity usage data time series into the first model based on the target electricity usage characteristics includes at least one of the following:

[0020] Increasing the weight of the target power consumption feature, and inputting the time series of the historical power consumption data after the weight adjustment into the first model;

[0021] Reducing the weights of other power consumption features except the target power consumption feature, and inputting the weight-adjusted historical power consumption data time series into the first model;

[0022] The other electricity usage features except the target electricity usage feature are removed, and the time series of the historical electricity usage data after the other electricity usage features are removed is input into the first model.

[0023] In some embodiments, the first model includes a long short-term memory network model; inputting the historical electricity consumption data time series into the first model to train the first model includes:

[0024] Based on the target electricity consumption characteristics, the historical electricity consumption data time series is input into the long short-term memory network model to train the long short-term memory network model.

[0025] A second aspect of the present disclosure provides a device for detecting abnormality in electricity price execution, comprising:

[0026] An acquisition module is configured to: acquire a user's power consumption data time series, wherein the power consumption data time series includes power consumption information arranged in chronological order;

[0027] A selection module is configured to: perform feature selection on the power consumption data time series to determine a target power consumption feature in the power consumption data time series;

[0028] The detection module is configured to: based on the target electricity consumption characteristics, input the electricity consumption data time series into a pre-trained first model for detection, and determine the user's electricity price based on the detection result to perform abnormal detection results.

[0029] A third aspect of the present disclosure provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the method for detecting abnormality in electricity price execution as described in the first aspect is implemented.

[0030] A fourth aspect of the present disclosure provides a non-transitory computer-readable storage medium, wherein the non-transitory computer-readable storage medium stores computer instructions, wherein the computer instructions are used to enable the computer to execute the method for detecting abnormalities in electricity price execution as described in the first aspect.

[0031] From the above, it can be seen that the electricity price execution anomaly detection method, device, electronic device and storage medium provided by the present invention obtain the user's electricity consumption data time series and extract and select features of the electricity consumption data time series, and then input the electricity consumption data time series into a pre-trained first model for detection and classification based on the selected target electricity consumption features, so as to determine whether the user's electricity consumption data time series belongs to electricity consumption data with abnormal electricity price execution, thereby determining the user's electricity price execution anomaly detection result, so as to comprehensively and effectively identify the user's electricity price anomaly, prevent electricity price execution risks, expand the scope of abnormal monitoring, improve the accuracy of electricity price anomalies, and automatically and accurately lock abnormal users. BRIEF DESCRIPTION OF THE DRAWINGS

[0032] In order to more clearly illustrate the technical solutions in the present disclosure or related technologies, the drawings required for use in the embodiments or related technical descriptions are briefly introduced below. Obviously, the drawings described below are only embodiments of the present disclosure. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0033] Figure 1 A flowchart of an exemplary method provided by an embodiment of the present disclosure is shown.

[0034] Figure 2 A schematic diagram of an exemplary time series of electricity consumption data provided by an embodiment of the present disclosure is shown.

[0035] Figure 3 A schematic diagram of an exemplary model structure provided by an embodiment of the present disclosure is shown.

[0036] Figure 4 A schematic diagram of an exemplary model structure provided by an embodiment of the present disclosure is shown.

[0037] Figure 5 A schematic diagram of an exemplary device provided by an embodiment of the present disclosure is shown.

[0038] Figure 6 A schematic diagram of the hardware structure of an exemplary computer device provided in an embodiment of the present disclosure is shown. DETAILED DESCRIPTION

[0039] In order to make the objectives, technical solutions and advantages of the present disclosure more clearly understood, the present disclosure is further described in detail below in combination with specific embodiments and with reference to the accompanying drawings.

[0040] It should be noted that, unless otherwise defined, the technical terms or scientific terms used in the embodiments of the present disclosure should be understood by people with ordinary skills in the field to which the present disclosure belongs. The "first", "second" and similar words used in the embodiments of the present disclosure do not indicate any order, quantity or importance, but are only used to distinguish different components. "Including" or "comprising" and similar words mean that the elements or objects appearing before the word cover the elements or objects listed after the word and their equivalents, without excluding other elements or objects. "Connect" or "connected" and similar words are not limited to physical or mechanical connections, but can include electrical connections, whether direct or indirect. "Up", "down", "left", "right" and the like are only used to indicate relative positional relationships. When the absolute position of the described object changes, the relative positional relationship may also change accordingly.

[0041] It is understandable that before using the technical solutions of each embodiment of the present disclosure, the type, scope of use, usage scenarios, etc. of the personal information involved will be informed to the user in an appropriate manner, and the user's authorization will be obtained.

[0042] For example, in response to receiving an active request from a user, a prompt message is sent to the user to clearly remind the user that the operation requested to be performed will require obtaining and using the user's personal information. Thus, the user can independently choose whether to provide personal information to software or hardware such as an electronic device, application, server, or storage medium that performs the operation of the technical solution of the present disclosure according to the prompt message.

[0043] As an optional but non-limiting implementation, in response to receiving the user's active request, the prompt information may be sent to the user in the form of a pop-up window, in which the prompt information may be presented in text form. In addition, the pop-up window may also carry a selection control for the user to choose "agree" or "disagree" to provide personal information to the electronic device.

[0044] It is understandable that the above notification and the process of obtaining user authorization are merely illustrative and do not constitute a limitation on the implementation of the present disclosure. Other methods that meet relevant laws and regulations may also be applied to the implementation of the present disclosure.

[0045] Power marketing management is an important task for power grid enterprises, which is directly related to the economic and social benefits of power grid enterprises. However, due to factors such as traditional management concepts and uneven business quality of marketing personnel, there are still certain problems in the marketing management of power grids in some regions. In particular, in the implementation of electricity prices, there are business mistakes of some marketing personnel, even partiality and fraud, and enterprises breaching contracts to use electricity, which damages the interests of enterprises.

[0046] At the same time, the flexibility of electricity prices is constantly increasing, and electricity price policy adjustments are becoming more frequent. Due to the complex rules for electricity price execution, the large number of customers and the diverse electricity usage, the existing technology mainly discovers abnormal data through experience or policies, lacks appropriate monitoring, positioning and other technical means, resulting in low accuracy in identifying abnormal electricity prices, resulting in a large workload, low efficiency and high cost for abnormal management, which does not meet the current requirements and situation of lean management of the company; at the same time, with the development of the simultaneous business of purchasing and selling electricity, the compression of automatic reading time has put forward higher requirements for abnormal management of electricity price execution.

[0047] In view of this, an embodiment of the present disclosure provides a method for detecting anomalies in electricity price execution, which can comprehensively and effectively identify abnormalities in user electricity prices and prevent electricity price execution risks.

[0048] like Figure 1 As shown, the electricity price execution anomaly detection method includes:

[0049] Step S101: obtaining a time series of power consumption data of a user, wherein the time series of power consumption data includes power consumption information arranged in chronological order.

[0050] The time series is a sequence formed by arranging values ​​in chronological order under a unified statistical index. In this embodiment, the time series of electricity consumption data includes electricity consumption information arranged in chronological order, that is, the change of the user's electricity consumption information over time.

[0051] Step S103: performing feature selection on the power consumption data time series to determine target power consumption features in the power consumption data time series.

[0052] Since there are multiple feature data in the electricity consumption data time series, in this embodiment, feature extraction and selection are performed on the electricity consumption data time series to obtain the important features for abnormal detection results of electricity prices among the various features of the electricity consumption data time series, namely, the target electricity consumption features, thereby achieving dimensionality reduction of the features in the electricity consumption data time series.

[0053] Step S105: Based on the target electricity consumption characteristics, the electricity consumption data time series is input into a pre-trained first model for detection, and the user's electricity price is determined based on the detection result to perform abnormal detection results.

[0054] In this embodiment, based on the target electricity consumption features that are important for the abnormal detection results of electricity price execution, the pre-trained first model is used to detect the electricity consumption data time series, so as to determine whether the user's electricity consumption data time series belongs to electricity consumption data with abnormal electricity price execution, thereby determining the user's electricity price execution abnormal detection results.

[0055] In this embodiment, by acquiring the user's electricity consumption data time series and extracting and selecting features of the electricity consumption data time series, and then inputting the electricity consumption data time series into a pre-trained first model for detection and classification based on the selected target electricity consumption features, it is determined whether the user's electricity consumption data time series belongs to electricity consumption data with abnormal electricity price execution, thereby determining the user's electricity price execution abnormality detection result, so as to comprehensively and effectively identify the user's electricity price anomaly, prevent electricity price execution risks, expand the scope of abnormal monitoring, improve the accuracy of electricity price anomalies, and automatically and accurately lock abnormal users.

[0056] In some embodiments, the electricity consumption data time series includes: daily electricity consumption information, daily peak electricity consumption information, daily valley electricity consumption information and daily average electricity consumption information, wherein the sum of the daily peak electricity consumption information, the daily valley electricity consumption information and the daily average electricity consumption information is equal to the daily electricity consumption information.

[0057] like Figure 2 As shown, the daily electricity consumption information, daily peak electricity consumption information, daily valley electricity consumption information and daily average electricity consumption information of a certain user are shown. Based on this information, it can be known how the user's electricity consumption information changes over time.

[0058] In some embodiments, the training process of the first model includes:

[0059] Step S201 : acquiring a time series of historical electricity consumption data of a plurality of users, wherein the time series of historical electricity consumption data includes a time series of abnormal electricity price execution data and a time series of normal electricity price execution data.

[0060] In this embodiment, the historical electricity consumption data time series of multiple users may be obtained first, so as to train the first model based on the historical electricity consumption data time series of multiple users. The historical electricity consumption data includes the abnormal electricity price execution data time series and the normal electricity price execution data time series.

[0061] In some embodiments, after acquiring the historical electricity consumption data time series of multiple users in step S201, the method further includes: oversampling the historical electricity consumption data time series to increase the number of the electricity price execution abnormal data time series in the historical electricity consumption data time series.

[0062] In some embodiments, since there may be fewer abnormal electricity price execution data time series in the historical electricity consumption data time series, it is easy to overfit when training the model based on the historical electricity consumption data time series. Therefore, in this embodiment, by oversampling the historical electricity consumption data time series, the number of abnormal electricity price execution data time series in the historical electricity consumption data time series can be increased, thereby avoiding overfitting in the detection process.

[0063] In some embodiments, a synthetic minority oversampling technique (SMOTE) method may be used to implement oversampling of the historical electricity consumption data time series, thereby avoiding overfitting of the random sampling method during the detection process.

[0064] The process of oversampling the historical electricity consumption data time series based on synthetic minority class oversampling includes:

[0065] In the first step, for each sample X in the minority class, i.e., the time series of abnormal electricity price execution data, the Euclidean distance is used to calculate its K nearest neighbors in the time series of abnormal electricity price execution data of the minority class; wherein the K value can be set according to user needs.

[0066] In the second step, a sample x is randomly selected from the K nearest neighbors.

[0067] The third step is to randomly generate a random number between (0, 1) and synthesize a new sample using the following formula.

[0068]

[0069] In this embodiment, oversampling of the historical electricity consumption data time series based on synthetic minority class oversampling can not only increase the number of minority class, i.e., electricity price execution abnormal data time series, but also improve the accuracy of subsequent detection and classification classifiers.

[0070] Step S203: performing feature selection on the time series of historical power consumption data based on the second model to determine target power consumption features in the time series of historical power consumption data.

[0071] In this embodiment, the second model is used to extract and select features of the historical electricity consumption data time series, so as to obtain important features in the historical electricity consumption data time series, and reduce the coefficients of unimportant features to reduce the dimension of the explanatory variable matrix, so that the first model can quickly process the electricity consumption data time series with high-dimensional data.

[0072] In some embodiments, the second model includes a Lasso model (LASSO). In step S203, the feature selection of the historical power consumption data time series based on the second model to determine the target power consumption feature in the historical power consumption data time series includes: inputting the historical power consumption data time series into the Lasso model, solving the Lasso model based on a preset objective function, and obtaining the target power consumption feature.

[0073] Among them, the core of the LASSO model is to use the sparsity of the L1 norm to solve the penalty optimization problem related to regression. This algorithm can reduce the coefficients of some unimportant features to zero, thereby reducing the dimension of the explanatory variable matrix, and has a lower structural risk in model selection, thereby quickly processing high-dimensional data.

[0074] In this embodiment, the objective function of the LASSO algorithm can be expressed as:

[0075]

[0076] Among them, λ Lasso Represents the non-negative regularization parameter of the LASSO algorithm, which is used to adjust the compression strength of the penalty term on the model. Lasso The value of , the number of compressed explanatory variables increases, and the β of unimportant variables j The coefficients can be compressed to zero, thus removing unimportant features. i is the actual value of whether the electricity price execution of the i-th sample user is abnormal, x ij is the observed value of the jth characteristic variable of the ith sample, where the sample refers to the time series of electricity consumption data, β j is the coefficient of the jth characteristic variable, and β0 is the intercept term. βmin represents the value of the coefficient vector β=(β0,β1,β2...) when the following formula reaches the minimum value. The objective function is the function that needs to be minimized or maximized in the optimization problem.

[0077] The LASSO algorithm solves the coefficient vector β by optimizing the objective function, selecting features that have an important impact on the target variable and ignoring those unimportant features.

[0078] Step S205: Based on the target electricity consumption characteristics, the historical electricity consumption data time series is input into a first model to train the first model.

[0079] In this embodiment, when the time series of historical electricity consumption data is input into the first model based on the target electricity consumption characteristics, it may include at least one of the following: increasing the weight of the target electricity consumption characteristics, and inputting the time series of historical electricity consumption data after the weight adjustment into the first model; reducing the weight of other electricity consumption characteristics except the target electricity consumption characteristics, and inputting the time series of historical electricity consumption data after the weight adjustment into the first model; removing other electricity consumption characteristics except the target electricity consumption characteristics, and inputting the time series of historical electricity consumption data after removing the other electricity consumption characteristics into the first model.

[0080] In this embodiment, after obtaining the important features in the time series of historical electricity consumption data, namely the target electricity consumption features, the weight of the target electricity consumption features can be increased, or the weights of other electricity consumption features except the target electricity consumption features, namely the unimportant features, can be reduced, or other electricity consumption features except the target electricity consumption features, namely the unimportant features, can be removed, thereby reducing the coefficients of some unimportant features or even reducing them to zero, thereby reducing the dimension of the explanatory variable matrix, having a lower structural risk in model selection, and thus quickly processing high-dimensional data.

[0081] In some embodiments, the first model includes a long short-term memory network model (Long Short-Term Memory Network, LSTM); the step S105 of inputting the historical electricity consumption data time series into the first model to train the first model includes: based on the target electricity consumption characteristics, inputting the historical electricity consumption data time series into the long short-term memory network model to train the long short-term memory network model.

[0082] Among them, LSTM neural network is a network that can process time series data well. Figure 3As shown in the figure, by introducing the attention mechanism into the LSTM network, the electricity consumption data time series is used as input data, and the user's electricity price anomaly detection result is used as the output of anomaly detection classification. The focus is on the input features that play a dominant role in the anomaly detection results, and less attention should be paid to features with weak correlation and dependence, so that more accurate anomaly detection classification can be made.

[0083] In this embodiment, Figure 4 As shown in the figure, the LSTM unit is mainly composed of four parts: input gate, forget gate, output gate and memory cell. These parts realize the transmission and control of information through a series of mathematical operations and activation functions.

[0084] The input gate determines the contribution of the current input information to the memory cell. The calculation formula is as follows:

[0085]

[0086] Among them, i t is the output of the input gate, σ is the sigmoid activation function, x t is the input at the current moment, h t-1 is the hidden state at the previous moment, and is the weight matrix, b i is the bias term.

[0087] The forget gate determines the contribution of the memory cell state at the previous moment to the current moment state. Its calculation formula is as follows:

[0088]

[0089] Among them, f t is the output of the forget gate, and is the weight matrix, b f is the bias term.

[0090] Memory cells are used to store long-term dependency information in a sequence. The update formula is as follows:

[0091]

[0092] Among them, c t is the current state of the memory cell, * indicates element-by-element multiplication, c t-1 is the memory cell state at the previous moment, tanh is the hyperbolic tangent activation function, and is the weight matrix, b c is the bias term.

[0093] The output gate controls how much information in the memory cell can be output to the output of the LSTM unit. Its calculation formula is as follows:

[0094]

[0095] Among them, t is the output of the output gate, and is the weight matrix, b o is the bias term.

[0096] Then, the output h of the LSTM unit t and the current memory cell state c t The relationship is:

[0097] h t =o t *tanh(c t )

[0098] In summary, by introducing structures such as input gate, forget gate, output gate and memory cells, and combining them with corresponding mathematical formulas, the LSTM algorithm can achieve efficient processing and analysis of sequence data.

[0099] In this embodiment, the user's electricity consumption time series data is converted into a three-dimensional tensor (number of samples, time step, number of features) format suitable for LSTM model input and input into the LSTM model as input data.

[0100] Among them, the number of samples refers to the number of sequences in the input data, and the electricity consumption data of each user can be regarded as a sample. The time step refers to the number of time points in each sequence. The time step may be one day, one hour, half an hour, etc., depending on the sampling frequency of the data and the requirements of the model. In this embodiment, when the collected data is daily electricity, each day can be selected as a time step. The number of features refers to the feature dimension at each time point. The number of features of the model in this embodiment is 4, corresponding to daily electricity consumption information, daily peak electricity consumption information, daily valley electricity consumption information, and daily average electricity consumption information. Assuming that there is a time series of electricity consumption data of n users for m days, the final input data shape should be (n, m, 4).

[0101] Set the number of LSTM layers, number of hidden units, and activation function. Set the model's hyperparameters, such as learning algorithm, loss function, evaluation metric, batch size, number of training rounds, etc. Use the prepared input data and corresponding anomaly identifiers as labels to train the model. During the training process, monitor the model's loss function and accuracy, so that you can adjust the hyperparameters or model structure in a timely manner.

[0102] After training is completed, the model can output the classification results of anomaly detection based on the new electricity consumption data time series data. Use the test set to evaluate the model and calculate the model's accuracy, recall, F1 value and other indicators to measure the model's performance. If the model performance is poor, you can return to readjust the model structure and hyperparameters for iterative optimization.

[0103] In this embodiment, the synthetic minority oversampling technique (SMOTE) is used for the user's electricity consumption data time series to solve the problem of unbalanced sample classification in the data and avoid overfitting in detection; based on LASSO, the purpose of extracting important feature information of time series data is achieved; the long short-term memory network (LSTM) based on the added attention mechanism is used as the anomaly detection model to complete the anomaly detection and classification of time series data.

[0104] It should be noted that the method of the embodiment of the present disclosure can be performed by a single device, such as a computer or a server. The method of the present embodiment can also be applied in a distributed scenario and completed by multiple devices cooperating with each other. In the case of such a distributed scenario, one of the multiple devices can only perform one or more steps in the method of the embodiment of the present disclosure, and the multiple devices will interact with each other to complete the described method.

[0105] It should be noted that the above describes some embodiments of the present disclosure. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the above embodiments and still achieve the desired results. In addition, the processes depicted in the accompanying drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0106] Based on the same inventive concept, corresponding to any of the above-mentioned embodiment methods, the present disclosure also provides an electricity price execution abnormality detection device.

[0107] refer to Figure 5 , the device comprises:

[0108] The acquisition module 11 is configured to: acquire a user's power consumption data time series, wherein the power consumption data time series includes power consumption information arranged in chronological order;

[0109] The selection module 13 is configured to: perform feature selection on the power consumption data time series to determine a target power consumption feature in the power consumption data time series;

[0110] The detection module 15 is configured to: based on the target electricity consumption characteristics, input the electricity consumption data time series into a pre-trained first model for detection, and determine the user's electricity price based on the detection result to perform abnormal detection results.

[0111] In some embodiments, the electricity consumption data time series includes: daily electricity consumption information, daily peak electricity consumption information, daily valley electricity consumption information and daily average electricity consumption information, wherein the sum of the daily peak electricity consumption information, the daily valley electricity consumption information and the daily average electricity consumption information is equal to the daily electricity consumption information.

[0112] In some embodiments, the training process of the first model includes:

[0113] Acquire a time series of historical electricity consumption data of multiple users, wherein the time series of historical electricity consumption data includes a time series of abnormal electricity price execution data and a time series of normal electricity price execution data;

[0114] Performing feature selection on the historical power consumption data time series based on the second model to determine the target power consumption feature in the historical power consumption data time series;

[0115] Based on the target electricity consumption characteristics, the historical electricity consumption data time series is input into a first model to train the first model.

[0116] In some embodiments, after acquiring the time series of historical electricity consumption data of multiple users, the method further includes:

[0117] The historical electricity consumption data time series is oversampled to increase the number of the electricity price execution abnormal data time series in the historical electricity consumption data time series.

[0118] In some embodiments, the second model includes a lasso model; and the step of performing feature selection on the historical power consumption data time series based on the second model to determine the target power consumption feature in the historical power consumption data time series includes:

[0119] The historical electricity consumption data time series is input into the lasso model, and the lasso model is solved based on a preset objective function to obtain the target electricity consumption characteristics.

[0120] In some embodiments, inputting the historical electricity usage data time series into the first model based on the target electricity usage characteristics includes at least one of the following:

[0121] Increasing the weight of the target power consumption feature, and inputting the time series of the historical power consumption data after the weight adjustment into the first model;

[0122] Reducing the weights of other power consumption features except the target power consumption feature, and inputting the weight-adjusted historical power consumption data time series into the first model;

[0123] The other electricity usage features except the target electricity usage feature are removed, and the time series of the historical electricity usage data after the other electricity usage features are removed is input into the first model.

[0124] In some embodiments, the first model includes a long short-term memory network model; inputting the historical electricity consumption data time series into the first model to train the first model includes:

[0125] Based on the target electricity consumption characteristics, the historical electricity consumption data time series is input into the long short-term memory network model to train the long short-term memory network model.

[0126] For the convenience of description, the above device is described by dividing it into various modules according to its functions. Of course, when implementing the present disclosure, the functions of each module can be implemented in the same or multiple software and / or hardware.

[0127] The device of the above embodiment is used to implement the corresponding electricity price execution abnormality detection method in any of the above embodiments, and has the beneficial effects of the corresponding method embodiment, which will not be repeated here.

[0128] Based on the same inventive concept, corresponding to any of the above-mentioned embodiments, the present disclosure also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the method for detecting abnormality in electricity price execution described in any of the above embodiments is implemented.

[0129] Figure 6 A more specific schematic diagram of the hardware structure of an electronic device provided in this embodiment is shown, and the device may include: a processor 1010, a memory 1020, an input / output interface 1030, a communication interface 1040, and a bus 1050. The processor 1010, the memory 1020, the input / output interface 1030, and the communication interface 1040 are connected to each other through the bus 1050 in the device.

[0130] The processor 1010 can be implemented by a general-purpose CPU (Central Processing Unit), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of this specification.

[0131] The memory 1020 may be implemented in the form of ROM (Read Only Memory), RAM (Random Access Memory), static storage device, dynamic storage device, etc. The memory 1020 may store an operating system and other application programs. When the technical solutions provided in the embodiments of this specification are implemented by software or firmware, the relevant program codes are stored in the memory 1020 and are called and executed by the processor 1010.

[0132] The input / output interface 1030 is used to connect the input / output module to realize information input and output. The input / output module can be configured in the device as a component (not shown in the figure), or it can be externally connected to the device to provide corresponding functions. The input device may include a keyboard, a mouse, a touch screen, a microphone, various sensors, etc., and the output device may include a display, a speaker, a vibrator, an indicator light, etc.

[0133] The communication interface 1040 is used to connect a communication module (not shown) to realize communication interaction between the device and other devices. The communication module can realize communication through a wired mode (such as USB, network cable, etc.) or a wireless mode (such as mobile network, WIFI, Bluetooth, etc.).

[0134] The bus 1050 includes a path that transmits information between the various components of the device (eg, the processor 1010, the memory 1020, the input / output interface 1030, and the communication interface 1040).

[0135] It should be noted that, although the above device only shows the processor 1010, the memory 1020, the input / output interface 1030, the communication interface 1040 and the bus 1050, in the specific implementation process, the device may also include other components necessary for normal operation. In addition, it can be understood by those skilled in the art that the above device may also only include the components necessary for implementing the embodiments of the present specification, and does not necessarily include all the components shown in the figure.

[0136] The electronic device of the above embodiment is used to implement the corresponding electricity price execution abnormality detection method in any of the above embodiments, and has the beneficial effects of the corresponding method embodiment, which will not be repeated here.

[0137] Based on the same inventive concept, corresponding to any of the above-mentioned embodiment methods, the present disclosure also provides a non-transitory computer-readable storage medium, wherein the non-transitory computer-readable storage medium stores computer instructions, and the computer instructions are used to enable the computer to execute the electricity price execution abnormality detection method as described in any of the above embodiments.

[0138] The computer-readable medium of this embodiment includes permanent and non-permanent, removable and non-removable media, and information storage can be implemented by any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, read-only compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device.

[0139] The computer instructions stored in the storage medium of the above embodiment are used to enable the computer to execute the electricity price execution abnormality detection method as described in any of the above embodiments, and have the beneficial effects of the corresponding method embodiments, which will not be repeated here.

[0140] Those skilled in the art should understand that the discussion of any of the above embodiments is merely illustrative and is not intended to imply that the scope of the present disclosure (including the claims) is limited to these examples. Based on the concept of the present disclosure, the technical features in the above embodiments or different embodiments may be combined, the steps may be implemented in any order, and there are many other variations of the different aspects of the embodiments of the present disclosure as described above, which are not provided in detail for the sake of simplicity.

[0141] In addition, to simplify the description and discussion, and in order not to make the embodiments of the present disclosure difficult to understand, the known power / ground connections to the integrated circuit (IC) chips and other components may or may not be shown in the provided figures. In addition, the device can be shown in the form of a block diagram to avoid making the embodiments of the present disclosure difficult to understand, and this also takes into account the fact that the details of the implementation of these block diagram devices are highly dependent on the platform on which the embodiments of the present disclosure will be implemented (that is, these details should be fully within the scope of understanding of those skilled in the art). Where specific details (e.g., circuits) are set forth to describe exemplary embodiments of the present disclosure, it is apparent to those skilled in the art that the embodiments of the present disclosure can be implemented without these specific details or with changes in these specific details. Therefore, these descriptions should be considered illustrative rather than restrictive.

[0142] Although the present disclosure has been described in conjunction with specific embodiments of the present disclosure, many replacements, modifications and variations of these embodiments will be apparent to those skilled in the art from the foregoing description. For example, other memory architectures (e.g., dynamic RAM (DRAM)) may use the embodiments discussed.

[0143] The embodiments of the present disclosure are intended to cover all such substitutions, modifications and variations that fall within the broad scope of the appended claims. Therefore, any omissions, modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the embodiments of the present disclosure should be included in the scope of protection of the present disclosure.

Claims

1. A method for detecting abnormality in electricity price execution, characterized in that: include: Acquire a user's electricity consumption data time series, wherein the electricity consumption data time series includes electricity consumption information arranged in chronological order; Performing feature selection on the power consumption data time series to determine target power consumption features in the power consumption data time series; Based on the target electricity consumption characteristics, the electricity consumption data time series is input into a pre-trained first model for detection, and the user's electricity price is determined based on the detection result to perform abnormal detection results.

2. The method according to claim 1, characterized in that The power consumption data time series includes: daily power consumption information, daily peak power consumption information, daily valley power consumption information and daily average power consumption information, wherein the sum of the daily peak power consumption information, the daily valley power consumption information and the daily average power consumption information is equal to the daily power consumption information.

3. The method according to claim 1, characterized in that The training process of the first model includes: Acquire a time series of historical electricity consumption data of multiple users, wherein the time series of historical electricity consumption data includes a time series of abnormal electricity price execution data and a time series of normal electricity price execution data; Performing feature selection on the historical power consumption data time series based on the second model to determine the target power consumption feature in the historical power consumption data time series; Based on the target electricity consumption characteristics, the historical electricity consumption data time series is input into a first model to train the first model.

4. The method according to claim 3, characterized in that After obtaining the time series of historical electricity consumption data of multiple users, the method further includes: The historical electricity consumption data time series is oversampled to increase the number of the electricity price execution abnormal data time series in the historical electricity consumption data time series.

5. The method according to claim 3, characterized in that: The second model includes a lasso model; and the step of performing feature selection on the time series of historical power consumption data based on the second model to determine a target power consumption feature in the time series of historical power consumption data includes: The historical electricity consumption data time series is input into the lasso model, and the lasso model is solved based on a preset objective function to obtain the target electricity consumption characteristics.

6. The method according to claim 3, characterized in that The step of inputting the historical power consumption data time series into a first model based on the target power consumption feature comprises at least one of the following: Increasing the weight of the target power consumption feature, and inputting the time series of the historical power consumption data after the weight adjustment into the first model; Reducing the weights of other power consumption features except the target power consumption feature, and inputting the weight-adjusted historical power consumption data time series into the first model; The other electricity usage features except the target electricity usage feature are removed, and the time series of the historical electricity usage data after the other electricity usage features are removed is input into the first model.

7. The method according to claim 3, characterized in that The first model includes a long short-term memory network model; the inputting the historical electricity consumption data time series into the first model and training the first model includes: Based on the target electricity consumption characteristics, the historical electricity consumption data time series is input into the long short-term memory network model to train the long short-term memory network model.

8. A device for detecting abnormality in electricity price execution, comprising: An acquisition module is configured to: acquire a user's power consumption data time series, wherein the power consumption data time series includes power consumption information arranged in chronological order; A selection module is configured to: perform feature selection on the power consumption data time series to determine a target power consumption feature in the power consumption data time series; The detection module is configured to: based on the target electricity consumption characteristics, input the electricity consumption data time series into a pre-trained first model for detection, and determine the user's electricity price based on the detection result to perform abnormal detection results.

9. An electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the method for detecting abnormality in electricity price execution as claimed in any one of claims 1 to 7 is implemented.

10. A non-transitory computer-readable storage medium storing computer instructions, wherein the computer instructions are used to cause the computer to execute the method for detecting abnormality in electricity price execution according to any one of claims 1 to 7.