High-power electrical load identification method, device, equipment and medium
By determining the switching timing and stability verification of high-power equipment, and combining XGBoost and Isolation Forest algorithms, we have achieved efficient and accurate identification of high-power non-residential electricity loads in urban villages, solving the problems of insufficient manpower and resources and inaccuracy in existing technologies.
Patent Information
- Application Number
- CN202510907815.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-02
- Publication Date
- 2025-10-17
AI Technical Summary
Identifying high-power electrical loads from non-residential users in urban villages is difficult, and existing methods are costly in terms of manpower and resources and lack accuracy.
By extracting active power from user electricity consumption data, the switching times of high-power equipment are determined. The load start and end times are obtained using stationarity tests. Feature filtering and load identification are performed by combining XGBoost and Isolation Forest algorithms. A semi-supervised algorithm is used to improve accuracy without labels.
It improves the accuracy and efficiency of identifying high-power electrical loads, reduces the amount of calculation, and adapts to the characteristics of uncontrollable types and quantities of non-residential high-power electrical loads.
Smart Images

Figure CN120804975A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of electric load identification, and in particular to a high-power electric load identification method, device, equipment and medium. BACKGROUND
[0002] In recent years, there are a large number of floating populations in urban villages, and there are a large number of private connections in electric users. There are a certain number of small industrial workshops in urban villages, and residential electricity and commercial electricity coexist. The user electricity situation is complex. In order to pursue economic benefits, in the power supply line with low price, unauthorized use of high-price electric equipment or private change of electric category, resulting in high-price low-connection violation of electricity. The non-resident high-power electric load identification method can accurately identify the non-resident high-power electric load of the small industrial workshop and identify the abnormal use of electricity.
[0003] At present, the non-resident high-power electric load of the urban village is identified by traditional staff raid, but the user electricity situation of the urban village is complex, and it needs to spend a lot of manpower and material resources to clarify the user electricity of the urban village. Therefore, it is of great significance to study a non-intrusive electric load identification method based on user electricity data. SUMMARY
[0004] The present application provides a high-power electric load identification method, device, equipment and medium, which can improve the accuracy of high-power electric load identification.
[0005] In a first aspect, the present application provides a high-power electric load identification method, comprising:
[0006] Extract the active power in the pre-collected user electricity data, and determine the high-power equipment switching time according to the active power; wherein the high-power equipment is equipment with power greater than or equal to 1000W;
[0007] Taking the high-power equipment switching time as the center, the starting time and the ending time of the high-power load electricity are determined by the stationarity test, and the high-power load data is extracted according to the starting time and the ending time, and a test set is obtained;
[0008] Obtain the pre-collected electric load training set, and extract the steady-state features and transient-state features of the electric load training set;
[0009] The steady-state features and the transient-state features are screened by the pre-trained XGBoost algorithm, and an electric feature subset is obtained;
[0010] According to the electric feature subset, the preset isolated forest algorithm is trained, and the test set is input into the trained isolated forest algorithm, so that the isolated forest algorithm outputs a load identification result according to the test set.
[0011] The embodiment of the application separates high-power electricity data by determining the switching time of high-power equipment to obtain a test set for subsequent load identification; preliminary features are extracted from a pre-collected electricity load training set; then, feature screening is further performed through an XGBoost algorithm, so as to select features with high discrimination and low redundancy, thereby providing reliable data support for subsequent training of an isolation forest algorithm, to ensure the accuracy of load identification of the isolation forest algorithm; load identification is performed through the isolation forest algorithm, and the high-power electricity load of the village in the city has the characteristics of uncontrollable types and quantities, compared with a conventional machine learning algorithm, data need to be labeled, while the isolation forest algorithm used in the embodiment of the application is a semi-supervised algorithm, and accurate load identification results can be output without labeling data. Compared with the prior art, the application can improve the accuracy of high-power electricity load identification.
[0012] Further, the switching time of the high-power equipment is determined according to the active power, specifically:
[0013] A first forward window and a current window are set, and the active power is input into the first forward window and the current window to obtain a power detection threshold; wherein the first forward window and the current window are both sliding windows;
[0014] The power mean values of the first forward window and the current window are calculated respectively, and the absolute value of the difference between the two power mean values is obtained to obtain a power mean difference;
[0015] The power mean difference is compared with the power detection threshold, and when the power mean difference is greater than the power detection threshold, the first time of the current window is taken as the switching time of the high-power equipment.
[0016] The embodiment of the application narrows the search range for subsequent separation of high-power electricity data by setting a sliding window and carefully searching for the switching time of the high-power equipment, to ensure the accuracy of the test set data separated subsequently.
[0017] Further, the active power is input into the first forward window and the current window to obtain a power detection threshold, specifically:
[0018] The power mean values in the first forward window and the current window are calculated respectively to obtain a forward power mean value sequence and a current power mean value sequence;
[0019] The sequence difference between the forward power mean value sequence and the current power mean value sequence is calculated to obtain a power change sequence;
[0020] Calculate the mean and standard deviation of the power change sequence, and determine a power detection threshold according to the mean and standard deviation.
[0021] The embodiment of the application improves the applicability and flexibility of power detection by adaptively determining the power detection threshold according to the current data condition.
[0022] Further, the start time and the end time of the high-power load power consumption are determined by stationarity test with the high-power equipment switching time as the center, specifically:
[0023] A second forward window and a backward window are set, and the data in the second forward window and the backward window are tested for stationarity by stationarity test with the high-power equipment switching time as the center;
[0024] If the data in the second forward window is not stationary, the second forward window is slid forward by a preset window length, and the data in the second forward window is continuously tested for stationarity until the test result is stationary, and the first time of the second forward window is taken as the start time of the high-power load power consumption;
[0025] If the data in the backward window is not stationary, the backward window is slid backward by the window length, and the data in the backward window is continuously tested for stationarity until the test result is stationary, and the last time of the backward window is taken as the end time of the high-power load power consumption.
[0026] The embodiment of the application determines the time interval of the high-power load power consumption by stationarity test, and provides an extraction range for subsequent extraction of high-power load data.
[0027] Further, the pre-acquired power load training set is a resident power load sample set.
[0028] The embodiment of the application trains the isolated forest algorithm by selecting the resident power load sample set as the training sample. The types and quantities of non-resident high-power power load in the urban village are uncontrollable, so the commonly used resident power load sample set is selected as the training sample to form a closed decision surface to distinguish the non-resident high-power power load.
[0029] Further, the steady-state features and the transient-state features are filtered by the pre-trained XGBoost algorithm to obtain a power consumption feature subset, specifically:
[0030] The decision tree of the XGBoost algorithm is constructed by the preset sample set;
[0031] According to the decision tree and the greedy split algorithm, the steady-state features and the transient-state features are traversed to obtain a candidate power consumption feature subset.
[0032] The gain of each feature in the candidate power usage feature subset is calculated by a preset gain algorithm, and the candidate power usage feature subset is screened according to the gain to obtain the power usage feature subset.
[0033] The embodiment of the present invention further screens the extracted electricity consumption data features through the pre-trained XGBoost algorithm to extract features with high recognition rate and low redundancy, providing data support for the subsequent training of the isolation forest algorithm to ensure the accuracy of load identification of the trained isolation forest algorithm.
[0034] Furthermore, the isolation forest algorithm outputs a load identification result based on the test set, specifically:
[0035] By using the isolation forest classifier group trained according to the electricity feature subset, the probability that the sample data in the test set belongs to non-residential electricity load for each isolation forest classifier is calculated in sequence;
[0036] If the probability of each isolation forest classifier is greater than a preset probability threshold, the corresponding sample data is determined to be non-residential electricity load.
[0037] The embodiment of the present invention further determines whether the high-power electricity consumption data is non-residential electricity consumption by selecting an isolation forest algorithm trained on residential electricity consumption data. The use of a semi-supervised algorithm is consistent with the uncontrollable type and quantity of non-residential high-power electricity consumption data. Compared with conventional machine learning algorithms, the accuracy of identifying non-residential high-power load electricity consumption is improved while reducing the amount of calculation.
[0038] In a second aspect, an embodiment of the present invention provides a high-power electrical load identification device, comprising a switching time determination module, a test set acquisition module, a feature acquisition module, a feature subset acquisition module, and a load identification module, wherein:
[0039] The switching time determination module is used to extract the active power from the pre-collected user power consumption data and determine the switching time of the high-power device based on the active power; wherein the high-power device is a device with a power greater than or equal to 1000W;
[0040] The test set acquisition module is used to determine the start and end times of high-power load power consumption through a stationarity test, with the high-power device switching time as the center, and extract high-power load data based on the start and end times to obtain a test set;
[0041] The feature acquisition module is used to acquire a pre-collected power load training set and extract steady-state features and transient features of the power load training set;
[0042] The feature subset obtaining module is configured to filter the steady-state features and the transient-state features by using a pre-trained XGBoost algorithm to obtain a power consumption feature subset.
[0043] The load identification module is configured to train a preset isolated forest algorithm according to the power consumption feature subset, and input the test set into the trained isolated forest algorithm, so that the isolated forest algorithm outputs a load identification result according to the test set.
[0044] The power consumption load identification method provided by the embodiment of the present application comprises the following steps: acquiring a power consumption load training set; determining a steady-state feature and a transient-state feature of the power consumption load training set; obtaining a feature subset by filtering the steady-state feature and the transient-state feature through a pre-trained XGBoost algorithm; training a preset isolated forest algorithm according to the feature subset; and inputting a test set into the trained isolated forest algorithm to output a load identification result.
[0045] In a third aspect, the embodiment of the present application provides a terminal device, which comprises a processor, a memory, a communication interface and a communication bus, wherein the processor, the memory and the communication interface complete communication with each other through the communication bus.
[0046] The memory is configured to store at least one executable instruction, and the executable instruction causes the processor to perform the operations of the power consumption load identification method according to any one of the above.
[0047] In a fourth aspect, the embodiment of the present application provides a computer readable storage medium, which comprises a stored computer program, wherein the computer program controls a device / apparatus where the computer readable storage medium is located to perform the power consumption load identification method according to any one of the above when the computer program runs.
[0048] The above description is only a summary of the technical solutions of the embodiments of the present application, in order to more clearly understand the technical means of the embodiments of the present application, the embodiments of the present application can be implemented according to the content of the description, and in order to make the above and other purposes, characteristics and advantages of the embodiments of the present application more obvious and easy to understand, the specific embodiments of the present application are described below. BRIEF DESCRIPTION OF DRAWINGS
[0049] Figure 1 A large-power electrical load identification method provided by the embodiment of the present application;
[0050] Figure 2 A load identification test set extraction process schematic diagram provided by the embodiment of the present application;
[0051] Figure 3 A large-power electrical load identification process diagram provided by the embodiment of the present application;
[0052] Figure 4 A large-power electrical load identification method provided by the embodiment of the present application;
[0053] Figure 5 A large-power electrical load identification device structure diagram provided by the embodiment of the present application. DETAILED DESCRIPTION
[0054] The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor fall within the scope of protection of the present application.
[0055] Embodiment one:
[0056] As shown in the drawings, a large-power electrical load identification method provided by the embodiment of the present application includes the following steps: Figure 1 S11, extracting active power in pre-collected user power consumption data, and determining large-power equipment switching time according to the active power; wherein the large-power equipment is equipment with power greater than or equal to 1000W;
[0057] S12, taking the large-power equipment switching time as the center, determining the starting time and the ending time of large-power load power consumption through smoothness test, and extracting large-power load data according to the starting time and the ending time to obtain a test set;
[0058] S13, obtaining a pre-collected power consumption load training set, and extracting steady-state features and transient-state features of the power consumption load training set;
[0059] S14, screening the steady-state features and the transient-state features through a pre-trained XGBoost algorithm to obtain a power consumption feature subset;
[0060]
[0061] S15, according to the subset of power consumption features, training a preset isolated forest algorithm, and inputting the test set into the trained isolated forest algorithm, so that the isolated forest algorithm outputs a load identification result according to the test set.
[0062] Optionally, the embodiment of the present application can be applied to a power consumption load collection device, which comprises a high-sampling-frequency data collection module, a data preprocessing module and a communication module. The data collection module is configured to collect physical quantities such as voltage and current of a user bus in a load event period; the data preprocessing module is configured to record the voltage signal and the current signal in the load event period, and extract steady-state and transient-state features from the voltage and current signals collected by the data collection module using a feature extraction algorithm. The communication module is configured to upload the features and the recorded wave data processed by the data preprocessing module to a data master station.
[0063] In a specific embodiment, the pre-collected user power consumption data is power consumption data extracted from a user's house bus in a village-in-city by a high-sampling-rate data collection device with a time stamp, the pulse fluctuation of active power is filtered by a median filter, and the ripple fluctuation of active power is filtered by an S-G filter, which is a fitting filter based on a polynomial least square method.
[0064] In the embodiment, the active power is input into the first forward window and the current window to obtain a power detection threshold, and the first forward window and the current window are both sliding windows. The power mean values of the first forward window and the current window are calculated respectively, and the absolute value of the difference between the two power mean values is obtained to obtain a power mean difference. The power mean difference is compared with the power detection threshold, and when the power mean difference is greater than the power detection threshold, the first time of the current window is taken as the large-power device switching time.
[0065] In the embodiment, the active power is input into the first forward window and the current window to obtain a power detection threshold, and the first forward window and the current window are both sliding windows. The power mean values of the first forward window and the current window are calculated respectively, and the absolute value of the difference between the two power mean values is obtained to obtain a power mean difference. The power mean difference is compared with the power detection threshold, and when the power mean difference is greater than the power detection threshold, the first time of the current window is taken as the large-power device switching time.
[0066] In a specific embodiment, a forward window (t pre ) and a current window (t k), in the forward window [t k -ω,t k ] and the current window [t k ,t k +ω], with t sw The power mean in the sliding window is calculated to form a forward power mean sequence and a current power mean sequence. The difference between the two power mean sequences is calculated to obtain a power change sequence. The mean and standard deviation of the power change sequence are then calculated. The power change threshold is adaptively adjusted to adapt to power changes. When the power changes, the threshold also changes adaptively, thereby improving the accuracy of change point detection.
[0067] In this embodiment, the start and end times of high-power load power consumption are determined by a stability test with the high-power device being switched on and off as the center. Specifically, a second forward window and a backward window are set, and the data in the second forward window and the backward window are respectively checked for stability with the high-power device being switched on and off as the center through a stability test. If the data in the second forward window is not stable, the second forward window is slid forward by a preset window length, and the data in the second forward window is continuously checked for stability until the test result is stable, and the first moment of the second forward window is taken as the start time of high-power load power consumption. If the data in the backward window is not stable, the backward window is slid backward by the window length, and the data in the backward window is continuously checked for stability until the test result is stable, and the last moment of the backward window is taken as the end time of high-power load power consumption.
[0068] In a specific embodiment, the process of determining the start and end time of the high-power load is as follows: taking the switching time as the center, searching forward and backward for the start and end time of the high-power load through a stability test. The method of searching forward for the start time of the high-power load is to take the switching time t i As the center, set two lengths t m Sliding window, that is, [t i -2t m ,t i -t m ] and [t i -t m ,t i ] data window, check whether the data of these two data windows are stable. If they are stable, use t i -2t m As the starting time of the event, if it is not stable, then move the sliding window forward, that is, [t i -4t m ,t i -3t m ] and [ti -3t m ,t i -2t m ], and continue checking for stability until it stabilizes, with the leftmost stable time being the event start time. The method for finding the end time of the high-power load is similar. The stability criteria are: the data variance of the forward and backward windows is less than or equal to 5% of the data mean of the forward and backward windows, and the difference between the means of the forward and backward windows is less than a preset threshold.
[0069] Furthermore, the current signal, voltage signal and power signal of the high-power load are separated based on the start and end times of the high-power load.
[0070] In order to better illustrate the working principle and steps of the test set acquisition of the present invention, see Figure 2 An example is given, which is a schematic diagram of a test set extraction process for load identification according to an embodiment of the present invention.
[0071] In this embodiment, the pre-collected electricity load training set is a residential electricity load sample set.
[0072] In this embodiment, the pre-trained XGBoost algorithm is used to screen the steady-state features and the transient features to obtain a power consumption feature subset, specifically: a decision tree of the XGBoost algorithm is constructed through a preset sample set; according to the decision tree and the greedy splitting algorithm, the steady-state features and the transient features are traversed to obtain a candidate power consumption feature subset; the gain of each feature in the candidate power consumption feature subset is calculated through a preset gain algorithm, and according to the gain, the candidate power consumption feature subset is screened to obtain a power consumption feature subset.
[0073] Optionally, the steady-state characteristics include power characteristics, current waveform characteristics, instantaneous value characteristics, harmonic characteristics, VI trajectory characteristics, etc., and the transient characteristics include transient pulse current amplitude, transient transition time, etc.
[0074] It should be noted that the XGBoost algorithm selects a subset of features with high discriminability and low redundancy as the basis for high-power load identification. XGBoost's application in feature selection is primarily achieved through its built-in feature importance assessment mechanism. This algorithm automatically measures the contribution of different features to the model, helping users select the features that have the greatest impact on the target variable. The key idea of the XGBoost algorithm is to iteratively fit the residuals of a base learner to produce a more efficient and computationally faster model.
[0075] In a specific embodiment, the CART decision tree is used as the base learner of XGBoost, and its loss function is:
[0076]
[0077] Where: l is a differentiable convex loss function, corresponding to the difference between the predicted value and the target value; Ω is a penalty term that limits the complexity of the model. Is the objective function. For a dataset with n samples and m features D={(x i ,y i )}
[0078] (|D|=n,x i ∈R m ,y i ∈R), the objective function is:
[0079]
[0080] Where F = {f(x) = w q(x)}(q:R m →T) and w∈R T , F is the space of CART decision tree, q is the structure of the tree, these tree structures map each sample to the corresponding leaf node, and T is the number of corresponding leaf nodes.
[0081] Furthermore, for each sample i, the first-order derivative of the loss function with respect to the current prediction value (gradient g i ) and the second-order derivative (h i ),
[0082]
[0083] Among them, the definition L is the above loss function, is the objective function above, and t is the tth iteration.
[0084] Furthermore, through greedy splitting, we traverse all features and their possible split points and select the split point that makes the loss function drop the most. The calculation method of the gain after splitting is as follows:
[0085]
[0086] Among them, G L , G R The sum of the gradients of the left and right child nodes, respectively, H L 、H R is the sum of the Hessians of the left and right child nodes, and γ represents the complexity penalty term of the split.
[0087] It should be noted that the splitting is stopped when the gain is less than the threshold, the tree reaches the maximum depth, or the number of leaf node samples is too small. After T rounds of iterations, the average gain of the feature as a splitting point in all trees is calculated, and the greater the calculated information gain, the more critical the feature is to the performance improvement of the model.
[0088] In the embodiment, the isolation forest algorithm outputs the load identification result according to the test set, specifically: the probability that the sample data in the test set belongs to the non-residential power load for each isolation forest classifier is calculated in turn through the group of isolation forest classifiers trained according to the power consumption feature subset; if the probability for each isolation forest classifier is greater than a preset probability threshold, it is determined that the corresponding sample data is a non-residential power load.
[0089] It should be noted that the isolation forest algorithm is an unsupervised anomaly detection algorithm. The types and quantities of non-residential high-power power loads in urban villages are uncontrollable, so the commonly used residential power load sample set is selected as the training sample to form a closed decision surface to distinguish the non-residential high-power power load.
[0090] In a specific embodiment, for the residential power load, the isolation forest algorithm is used as the classifier model to train the classifier, generate M isolated trees that constitute the isolation forest f i , and the group of isolation forest classifiers F of all types of residential power loads.
[0091] Further, the collected high-power power load is used as a test sample x, and the trained classifier is used to calculate the probability that the group of isolation forest classifiers F = {f1, f2,..., f l} of known residential power loads belongs to the non-residential power load {f1(x), f2(x),..., f l (x)}, and the probability that the load test sample x belongs to the non-residential power load for f i is
[0092]
[0093] Where: E[h(x)] is the average path length of each load sample in all isolated trees, and c(n) is the normalization factor for the average path length of unsuccessful search.
[0094]
[0095] Where H(n) = ln(n) + 0.58 is the harmonic number.
[0096] If the probability that all f(x) considers the load test sample x as a non-residential load is higher than the threshold value δ, then x belongs to the non-residential load, otherwise it belongs to the residential load.
[0097] In order to better illustrate the working principle and step flow of the power feature subset acquisition of the present application, see Figure 3 An example of a non-resident large power load identification flowchart is provided.
[0098] In order to better illustrate the working principle and step flow of the present embodiment, see Figure 4 An example of a large power load identification method flowchart is provided.
[0099] The embodiment of the present application separates the large power consumption data by determining the switching time of the large power equipment to obtain the test set for subsequent load identification; extracts the preliminary features of the pre-acquired load training set; then further selects the features by XGBoost algorithm, thereby selecting the features with high discrimination and low redundancy, providing reliable data support for subsequent training of the isolation forest algorithm, to ensure the accuracy of the load identification of the isolation forest algorithm; the load identification is performed by the isolation forest algorithm, and the non-resident large power load in the urban village has the characteristics of uncontrollable types and quantities, compared with the conventional machine learning algorithm, the data needs to be labeled, and the isolation forest algorithm used in the embodiment of the present application is a semi-supervised algorithm, which can output accurate load identification results without labeling the data. Compared with the prior art, the present application can improve the accuracy of large power load identification.
[0100] Embodiment two:
[0101] As shown in Figure 5 The present embodiment provides a large power load identification device, which comprises a switching time determination module 001, a test set acquisition module 002, a feature acquisition module 003, a feature subset acquisition module 004 and a load identification module 005, wherein
[0102] The switching time determination module 001 is used to extract the active power in the pre-acquired user power consumption data, and determine the switching time of the large power equipment according to the active power; wherein the large power equipment is an equipment with a power greater than or equal to 1000W;
[0103] The test set acquisition module 002 is used to determine the starting time and ending time of the large power load power consumption by stationary test with the switching time of the large power equipment as the center, and extract the large power load data according to the starting time and ending time to obtain the test set;
[0104] The feature acquisition module 003 is used to acquire the pre-acquired load training set and extract the steady-state features and transient-state features of the load training set;
[0105] The feature subset obtaining module 004 is configured to filter the steady-state features and the transient-state features by a pre-trained XGBoost algorithm to obtain a power consumption feature subset.
[0106] The load identification module 005 is configured to train a preset isolated forest algorithm according to the power consumption feature subset, and input the test set into the trained isolated forest algorithm, so that the isolated forest algorithm outputs a load identification result according to the test set.
[0107] In this embodiment, the switching time determination module 001 determines the switching time of the high-power equipment according to the active power, specifically: the switching time determination module 001 sets a first forward window and a current window, and inputs the active power into the first forward window and the current window to obtain a power detection threshold; wherein the first forward window and the current window are both sliding windows; the power mean values of the first forward window and the current window are calculated respectively, and the absolute value of the difference between the two power mean values is obtained as a power mean difference; the power mean difference is compared with the power detection threshold, and when the power mean difference is greater than the power detection threshold, the first time of the current window is taken as the switching time of the high-power equipment.
[0108] In this embodiment, the test set obtaining module 002 takes the switching time of the high-power equipment as the center, and determines the starting time and the ending time of the power consumption of the high-power load by stationarity test, specifically: the test set obtaining module 002 sets a second forward window and a backward window, takes the switching time of the high-power equipment as the center, and tests whether the data in the second forward window and the backward window are stationary by stationarity test; if the data in the second forward window are not stationary, the second forward window is slid forward by a preset window length, and the stationarity of the data in the second forward window is continuously tested until the test result is stationary, and the first time of the second forward window is taken as the starting time of the power consumption of the high-power load; if the data in the backward window are not stationary, the backward window is slid backward by the window length, and the stationarity of the data in the backward window is continuously tested until the test result is stationary, and the last time of the backward window is taken as the ending time of the power consumption of the high-power load.
[0109] In this embodiment, the feature subset obtaining module 004 filters the steady-state features and the transient-state features through a pre-trained XGBoost algorithm to obtain a power consumption feature subset, specifically: the feature subset obtaining module 004 constructs a decision tree of the XGBoost algorithm through a preset sample set; according to the decision tree and a greedy split algorithm, the feature subset obtaining module 004 traverses the steady-state features and the transient-state features to obtain a candidate power consumption feature subset; and through a preset gain algorithm, the feature subset obtaining module 004 calculates the gain of each feature in the candidate power consumption feature subset, and according to the gain, the feature subset obtaining module 004 filters the candidate power consumption feature subset to obtain the power consumption feature subset.
[0110] In this embodiment, the load identification module 005 outputs a load identification result according to the test set through an isolation forest algorithm, specifically: the load identification module 005 sequentially calculates the probability of sample data in the test set belonging to a non-residential power consumption load for each isolation forest classifier through an isolation forest classifier group trained according to the power consumption feature subset; and if the probability for each isolation forest classifier is greater than a preset probability threshold, the load identification module 005 determines that the corresponding sample data is a non-residential power consumption load.
[0111] The more detailed working principle and step flow of this embodiment can be but not limited to referring to the related records of Embodiment One.
[0112] The power equipment switching time determination module 001 in the embodiment determines the power equipment switching time, which narrows the search range for subsequent power consumption data extraction of large power equipment, thereby reducing the calculation amount; the test set obtaining module 002 determines the start time and end time of the power consumption of large power load based on stationarity test, further determines the extraction range of large power data, and accurately extracts the power consumption data of large power, thereby providing data support for subsequent judgment of whether it is non-residential large power load power consumption; the feature obtaining module 003 extracts the steady-state features and transient-state features of the power consumption load training set for preliminary feature extraction; the feature subset obtaining module 004 further extracts the extracted steady-state features and transient-state features for feature extraction to obtain features with high identification degree and low redundancy, thereby providing reliable data support for subsequent training of the isolation forest algorithm; and the load identification module 005 identifies the load based on the isolation forest algorithm, which has the characteristics of perfect fit with the characteristics of non-residential large power consumption data, and has smaller calculation amount and more accurate load identification result compared with conventional machine learning algorithms.
[0113] Embodiment Three
[0114] The embodiment provides a terminal device, which comprises a processor, a memory, a communication interface and a communication bus, and the processor, the memory and the communication interface complete communication with each other through the communication bus.
[0115] The memory is configured to store at least one executable instruction, and the executable instruction is configured to enable the processor to perform the operation of the high-power electrical load identification method according to any one of the above embodiments.
[0116] Embodiment four:
[0117] The embodiment of the present application provides a computer readable storage medium, the computer readable storage medium comprises a stored computer program, wherein the computer program controls a device / apparatus where the computer readable storage medium is located to perform the high-power electrical load identification method according to any one of the above embodiments when the computer program is running.
[0118] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by a computer program instructing related hardware, and the program can be stored in a computer readable storage medium. When the program is executed, the program can include the processes of the above-mentioned embodiments. The storage medium can be a magnetic disc, an optical disc, a read-only memory (ROM) or a random access memory (RAM) and the like.
[0119] The above-mentioned specific embodiments further illustrate the purpose, technical scheme and beneficial effects of the present application. It should be understood that the above-mentioned embodiments are only specific embodiments of the present application and are not used to limit the protection scope of the present application. It is particularly pointed out that any modification, equivalent replacement, improvement and the like made by those skilled in the art within the spirit and principle of the present application should be included in the protection scope of the present application.
Claims
1. A method for identifying high-power electrical loads, characterized in that: include: Extracting active power from pre-collected user power consumption data and determining the switching time of high-power equipment based on the active power; wherein the high-power equipment is equipment with a power greater than or equal to 1000W; Taking the switching time of the high-power equipment as the center, determining the start time and end time of the high-power load power consumption through a stationarity test, and extracting high-power load data based on the start time and end time to obtain a test set; Acquire a pre-collected power load training set, and extract steady-state features and transient features of the power load training set; The steady-state features and the transient features are screened by a pre-trained XGBoost algorithm to obtain a subset of power consumption features; A preset isolation forest algorithm is trained according to the electricity feature subset, and the test set is input into the trained isolation forest algorithm, so that the isolation forest algorithm outputs a load identification result according to the test set.
2. A high-power electrical load identification method according to claim 1, characterized in that: The step of determining the switching time of the high-power equipment according to the active power is as follows: Setting a first forward window and a current window, and inputting the active power into the first forward window and the current window to obtain a power detection threshold; wherein the first forward window and the current window are both sliding windows; Calculating the power mean of the first forward window and the current window respectively, and taking the absolute value of the difference between the two power means to obtain a power mean difference; The power mean difference is compared with the power detection threshold. When the power mean difference is greater than the power detection threshold, the first moment of the current window is taken as the high-power device switching moment.
3. A high-power electrical load identification method according to claim 2, characterized in that: The active power is input into the first forward window and the current window to obtain a power detection threshold, specifically: Calculating the power means in the first forward window and the current window respectively to obtain a forward power mean sequence and a current power mean sequence; Calculating a sequence difference between the forward power mean sequence and the current power mean sequence to obtain a power change sequence; The mean and standard deviation of the power variation sequence are calculated, and a power detection threshold is determined according to the mean and standard deviation.
4. A high-power electrical load identification method according to claim 1, characterized in that: The starting and ending times of high-power load power consumption are determined by stability testing with the high-power equipment switching time as the center, specifically: Setting a second forward window and a backward window, taking the switching moment of the high-power device as the center, and performing a stationarity test to respectively check whether the data in the second forward window and the backward window are stationary; If the data in the second forward window is not stable, the second forward window is slid forward by a preset window length, and the data in the second forward window is continuously checked for stability. If the test result shows that the data in the second forward window is stable, the first moment of the second forward window is taken as the starting moment of the high-power load power consumption. If the data in the backward window is not stable, the backward window is slid backward by the window length, and the data in the backward window is continuously checked to see if it is stable. When the test result shows that the data in the backward window is stable, the last moment of the backward window is taken as the end moment of the high-power load power consumption.
5. A high-power electrical load identification method according to claim 1, characterized in that: The pre-collected electricity load training set is a residential electricity load sample set.
6. A high-power electrical load identification method according to claim 1, characterized in that: The pre-trained XGBoost algorithm is used to screen the steady-state features and the transient features to obtain a subset of power consumption features, specifically: Constructing a decision tree of the XGBoost algorithm through a preset sample set; According to the decision tree and the greedy splitting algorithm, traverse the steady-state features and the transient features to obtain a candidate power consumption feature subset; The gain of each feature in the candidate power usage feature subset is calculated by a preset gain algorithm, and the candidate power usage feature subset is screened according to the gain to obtain the power usage feature subset.
7. A high-power electrical load identification method according to claim 1, characterized in that: The isolation forest algorithm outputs a load identification result based on the test set, specifically: By using the isolation forest classifier group trained according to the electricity feature subset, the probability that the sample data in the test set belongs to non-residential electricity load for each isolation forest classifier is calculated in sequence; If the probability of each isolation forest classifier is greater than a preset probability threshold, the corresponding sample data is determined to be non-residential electricity load.
8. A high-power electrical load identification device, characterized in that: It includes a switching time determination module, a test set acquisition module, a feature acquisition module, a feature subset acquisition module and a load identification module, wherein: The switching time determination module is used to extract the active power from the pre-collected user power consumption data and determine the switching time of the high-power device based on the active power; wherein the high-power device is a device with a power greater than or equal to 1000W; The test set acquisition module is used to determine the start and end times of high-power load power consumption through a stationarity test, with the high-power device switching time as the center, and extract high-power load data based on the start and end times to obtain a test set; The feature acquisition module is used to acquire a pre-collected power load training set and extract steady-state features and transient features of the power load training set; The feature subset acquisition module is used to screen the steady-state features and the transient features through a pre-trained XGBoost algorithm to obtain a power consumption feature subset; The load identification module is used to train a preset isolation forest algorithm based on the power consumption feature subset, and input the test set into the trained isolation forest algorithm so that the isolation forest algorithm outputs a load identification result based on the test set.
9. A terminal device, characterized in that: include: A processor, a memory, a communication interface, and a communication bus, wherein the processor, the memory, and the communication interface communicate with each other via the communication bus; The memory is used to store at least one executable instruction, and the executable instruction enables the processor to perform the operation of the high-power electric load identification method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that The computer-readable storage medium includes a stored computer program, wherein when the computer program is executed, the device / apparatus where the computer-readable storage medium is located is controlled to execute the high-power electric load identification method according to any one of claims 1 to 7.
Citation Information
Cited By
Energy storage system and investment income prediction method
CN121073529A