A processing method and device for an intelligent load recognition model
By constructing an intelligent load recognition model based on Bi-LSTM and MLP networks, combined with wavelet conversion and weighted summing module, the problem of poor generalization ability of linear prediction models in the prediction of nonlinear power consumption characteristic data is solved, and higher prediction accuracy is achieved.
Patent Information
- Application Number
- CN202410998469.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-24
- Publication Date
- 2025-07-04
- Estimated Expiration
- 2044-07-24
AI Technical Summary
The existing intelligent load recognition model is based on linear prediction model and the effect is not ideal when predicting nonlinear power consumption characteristic data, resulting in poor generalization ability of the model.
The Bi-LSTM model and MLP network are used to build an intelligent load recognition model, and the model data set is constructed through big data acquisition and model training is carried out. The time series of current, power and temperature are received for load classification prediction, and the wavelet conversion and weighted summing modules are used to improve prediction accuracy.
The model generalization capability of the intelligent load recognition model has been improved and the prediction accuracy of nonlinear power consumption characteristic data has been improved.
Smart Images

Figure CN118916803B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of data processing, and particularly to a method and device for processing an intelligent load recognition model. Background Art
[0002] An intelligent load recognition model is an artificial intelligence model. Such models can predict the type of power load being used within a power consumption unit based on the power consumption characteristics of the power consumption unit (such as current characteristics, power characteristics). The power load types mentioned here typically include, for example, fixed-frequency air conditioners, variable-frequency air conditioners, electric water heaters, electric heaters, electric kettles, small kitchen water heaters, microwave ovens, induction cookers, rice cookers, electric ovens, dishwashers, washing machines, refrigerators, vacuum cleaners, hair dryers, power banks, electric vehicle battery packs, and battery-powered scooters. Most of the commonly used intelligent load recognition models on the market are currently implemented based on a type of linear prediction model. The commonly used linear prediction models mentioned here include the Support Vector Machine (SVM) model.
[0003] However, we have found in practical applications that the prediction effect of the linear prediction model is not ideal when predicting based on non-linear power consumption characteristic data (such as current, power). In the real scenario, the power consumption characteristic data of each power consumption unit is often affected by multiple non-linear factors, such as time, temperature, and the simultaneous use of one or more types of power loads. The interaction between these factors is difficult to accurately describe with a simple linear relationship. That is to say, the generalization ability of the intelligent load recognition model implemented based on the linear prediction model is poor in the actual application scenario.
[0004] In addition, we know that deep learning models, such as Multilayer Perceptron (MLP) networks, Bidirectional Long Short-Term Memory (Bi-LSTM) networks, etc., have powerful non-linear mapping capabilities and can automatically learn complex non-linear relationships from the original data. Then, if an intelligent load recognition model can be constructed based on a deep learning model, the generalization ability of the model can naturally be further improved. And how to use one or more deep learning models to implement the intelligent load recognition model is exactly the technical problem to be solved by the present invention. Summary of the Invention
[0005] The object of the present invention is to provide a processing method, device, electronic device and computer-readable storage medium for an intelligent load recognition model in view of the defects of the prior art. The present invention uses two types of deep learning models, namely the Bi-LSTM model and the MLP network, to construct an intelligent load recognition model; constructs a model data set through big data collection; trains the intelligent load recognition model based on the model data set; and after the model training is completed, receives a time series sequence with current, power and temperature sampling data as the model input sequence, and the intelligent load recognition model performs load classification prediction based on the model input sequence. The model generalization ability of the intelligent load recognition model can be improved through the present invention.
[0006] To achieve the above object, a first aspect of an embodiment of the present invention provides a processing method for an intelligent load recognition model, the method comprising:
[0007] Construct an intelligent load recognition model;
[0008] Construct a model data set;
[0009] Train the intelligent load recognition model based on the model data set;
[0010] After the model training is completed, receive a time series sequence with current, power and temperature sampling data and denote it as the corresponding first input sequence; the first input sequence is composed of J first sequence data sorted in chronological order, and J is the preset model sequence input length; the first sequence data includes the first sampling time, the first sampling current, the first sampling power and the first sampling temperature;
[0011] Input the first sampling sequence into the intelligent load recognition model for load classification prediction processing to obtain the corresponding first prediction vector sequence; the first prediction vector sequence includes J first prediction vectors, and the first prediction vectors correspond one-to-one with the first sequence data; each first prediction vector includes K first load type flags, and K is the preset total number of load types; the value of each first load type flag is 0 or 1; each first load type flag corresponds to a load type; the load types at least include fixed-frequency air conditioner, variable-frequency air conditioner, electric water heater, electric heater, electric kettle, small kitchen water heater, microwave oven, induction cooker, rice cooker, electric oven, dishwasher, washing machine, refrigerator, vacuum cleaner, hair dryer, power bank, electric vehicle battery pack and battery for battery car.
[0012] Preferably, the intelligent load recognition model is used to perform load classification prediction processing according to the input sequence X of the model and output the corresponding prediction vector sequence Y; the model input end of the intelligent load recognition model is used to receive the input sequence X, and the model output end is used to output the prediction vector sequence Y;
[0013] The input sequence X is composed of multiple sequence data x j sorted in chronological order, where 1 ≤ index j ≤ J; the sequence data x j includes time T j , current I j , power P j and temperature W j ;
[0014] The predicted vector sequence Y is composed of multiple predicted vectors y i sorted in chronological order, and the predicted vector y i corresponds one-to-one with the sequence data x j ; each predicted vector y i includes multiple load type flags z j,k , where 1 ≤ index k ≤ K; each load type flag z j,k has a value of 0 or 1; each load type flag z j,k corresponds to a load type;
[0015] The intelligent load identification model includes a wavelet transformation module, a first classification prediction model, a second classification prediction model, a third classification prediction model, a weighted summation module, and a classification output module;
[0016] The input end of the wavelet transformation module is connected to the input end of the model; the first output end of the wavelet transformation module is connected to the input end of the first classification prediction model, the second output end is connected to the input end of the second classification prediction model, and the third output end is connected to the input end of the third classification prediction model;
[0017] The wavelet transformation module is used to extract all the currents I j in the input sequence X and sort them in chronological order to form a corresponding current time series signal; and extract all the powers P j in the input sequence X and sort them in chronological order to form a corresponding power time series signal; and based on a preset first wavelet basis, extract one low-frequency current feature and two high-frequency current features from the current time series signal to obtain corresponding first low-frequency current feature sequence {I a,j}, first high-frequency current feature sequence {I b,j} and second high-frequency current feature sequence {I c,j}, where I a,j , I b,j , I c,j are the corresponding first low-frequency current feature, first high-frequency current feature and second high-frequency current feature respectively; and based on a preset second wavelet basis, extract one low-frequency power feature and two high-frequency power features from the power time series signal to obtain a corresponding first low-frequency power feature sequence {Pa,j}, the first power high-frequency feature sequence {P b,j}, and the second power high-frequency feature sequence {P c,j}; P a,j , P b,j , and P c,j are the corresponding first power low-frequency feature, first power high-frequency feature, and second power high-frequency feature respectively; and high-frequency feature sequence noise reduction and smoothing processing are respectively performed on each current / power high-frequency feature sequence; and after the high-frequency feature sequence noise reduction and smoothing processing are completed, sequence normalization processing is respectively performed on the first current / power low-frequency feature sequence and the first and second current / power high-frequency feature sequences; and after the sequence normalization processing is completed, for all the times T j and all the temperatures W j in the input sequence X, corresponding time and temperature normalization processing are also performed; and after the time and temperature normalization processing are completed, a corresponding normalized feature d a,j is composed of the normalized time, temperature, first current low-frequency feature, and first power low-frequency feature corresponding to each index j, and all the obtained normalized features d a,j are sorted in chronological order to form a corresponding normalized feature sequence D A ; and a corresponding normalized feature d b,j is composed of the normalized time, temperature, first current high-frequency feature, and first power high-frequency feature corresponding to each index j, and all the obtained normalized features d b,j are sorted in chronological order to form a corresponding normalized feature sequence D B ; and a corresponding normalized feature d c,j is composed of the normalized time, temperature, second current high-frequency feature, and second power high-frequency feature corresponding to each index j, and all the obtained normalized features d c,j are sorted in chronological order to form a corresponding normalized feature sequence D C ; and the normalized feature sequences D A , D B , and D C are output to the corresponding first, second, and third classification prediction models; wherein, the first wavelet basis includes at least the coif4 wavelet basis; the second wavelet basis includes at least the db4 wavelet basis;
[0018] The output end of the first classification prediction model is connected to the first input end of the weighted summation module; the first classification prediction model includes a first Bi-LSTM model and a first MLP network;
[0019] The first classification prediction model is used to normalize the feature sequence D AInput the first Bi-LSTM model, and let the first Bi-LSTM model extract the temporal features of the normalized feature sequence D A to obtain the corresponding temporal feature vector H A ; and input each temporal feature h A of the temporal feature vector H a,j into the first MLP network respectively, and let the first MLP network perform load classification prediction according to the temporal feature h a,j input this time and output the corresponding classification vector s a,j ; and form a corresponding classification vector sequence S a,j by sorting all the obtained classification vectors s A in chronological order; and output the classification vector sequence S A to the weighted summation module; wherein, the temporal feature vector H A includes multiple temporal features h a,j , and the temporal feature h a,j corresponds to the normalized feature d a,j one by one; the classification vector sequence S A includes multiple classification vectors s a,j , and the classification vector s a,j corresponds to the normalized feature d a,j one by one; each classification vector s a,j is composed of the classification prediction probabilities p a,j,k of the total number K of load types; each classification prediction probability p a,j,k corresponds to one load type;
[0020] The output end of the second classification prediction model is connected to the second input end of the weighted summation module; the second classification prediction model includes a second Bi-LSTM model and a second MLP network;
[0021] The second classification prediction model is used to input the normalized feature sequence D B into the second Bi-LSTM model, and let the second Bi-LSTM model extract the temporal features of the normalized feature sequence D B to obtain the corresponding temporal feature vector H B ; and input each temporal feature h B of the temporal feature vector H b,j into the second MLP network respectively, and let the second MLP network perform load classification prediction according to the temporal feature h b,j input this time and output the corresponding classification vector s b,j ; and all the obtained classification vectors s b,jSort them in chronological order to form a corresponding classification vector sequence S B ; and output the classification vector sequence S B to the weighted summation module; wherein, the time series feature vector H B includes a plurality of the time series features h b,j , and the time series feature h b,j corresponds one-to-one with the normalized feature d b,j ; the classification vector sequence S B includes a plurality of classification vectors s b,j , and the classification vector s b,j corresponds one-to-one with the normalized feature d b,j ; each classification vector s b,j is composed of the classification prediction probabilities p b,j,k of the total number K of load types; each classification prediction probability p b,j,k corresponds to one of the load types;
[0022] The output end of the third classification prediction model is connected to the third input end of the weighted summation module; the third classification prediction model includes a third Bi-LSTM model and a third MLP network;
[0023] The third classification prediction model is used to input the normalized feature sequence D C into the third Bi-LSTM model, and the third Bi-LSTM model extracts the time series features of the normalized feature sequence D C to obtain the corresponding time series feature vector H C ; and input each time series feature h C of the time series feature vector H c,j into the third MLP network respectively, and the third MLP network performs load classification prediction according to the time series feature h c,j input this time and outputs the corresponding classification vector s c,j ; and form a corresponding classification vector sequence S c,j by sorting all the obtained classification vectors s C in chronological order; and output the classification vector sequence S C to the weighted summation module; wherein, the time series feature vector H C includes a plurality of the time series features h c,j , and the time series feature h c,j corresponds one-to-one with the normalized feature d c,j ; the classification vector sequence S C includes a plurality of classification vectors s c,j , and the classification vector s c,j corresponds to the normalized feature dc,j One-to-one correspondence; each of the classification vectors s c,j Consists of the classification prediction probabilities p of the total number K of load types c,j,k Each of the classification prediction probabilities p c,j,k Corresponds to one of the load types;
[0024] The output end of the weighted summation module is connected to the input end of the classification output module;
[0025] The weighted summation module is used to perform weighted summation on the classification vector sequence S A 、S B 、S C To obtain the corresponding weighted classification vector sequence S; and output the weighted classification vector sequence S to the classification output module; the weighted classification vector sequence S is composed of multiple weighted classification vectors s j Sorted in chronological order, the weighted classification vector s j Corresponds to the sequence data x j One-to-one correspondence; each of the weighted classification vectors s j Consists of the weighted classification prediction probabilities p of the total number K of load types j,k p j,k = w a × p a,j,k + w b × p b,j,k + w c × p c,j,k w a 、w b 、w c Are preset first, second, and third weighting coefficients; each of the weighted classification prediction probabilities p j,k Corresponds to one of the load types;
[0026] The output end of the classification output module is connected to the model output end;
[0027] The classification output module is used to use each of the weighted classification vectors s of the weighted classification vector sequence S j As the corresponding current weighted classification vector; and perform a round of traversal on the K weighted classification prediction probabilities p in the current weighted classification vector j,k During this round of traversal, the currently traversed weighted classification prediction probability p j,k As the corresponding current prediction probability; and use the load type flag z corresponding to the current prediction probability j,k As the corresponding current load type flag; and use the probability threshold p corresponding to the current prediction probability in the preset probability threshold set hold,kas the corresponding current probability threshold; identify whether the current predicted probability exceeds the current probability threshold, if it exceeds, set the corresponding current load type flag to 1, if it does not exceed, set the corresponding current load type flag to 0; and at the end of this round of traversal, use the K load type flags z corresponding to the current weighted classification vector j,k to form a corresponding prediction vector y i ; and use all the weighted classification vectors s j to form all the corresponding prediction vectors y i to form and output the corresponding prediction vector sequence Y; where the probability threshold set is composed of the probability thresholds p of the total number of load types K hold,k which are composed, and each probability threshold p hold,k corresponds to one load type.
[0028] Preferably, the model data set includes a plurality of first data records;
[0029] The first data record includes a first training sequence and a first label vector sequence;
[0030] The first training sequence is formed by sorting a plurality of first training sampling data in chronological order; the first training sampling data includes a first training sampling time, a first training sampling current, a first training sampling power, and a first training sampling temperature;
[0031] The first label vector sequence includes a plurality of first label prediction vectors, and the first label prediction vectors correspond one-to-one with the first training sampling data; each first label prediction vector includes K first label load type flags; the value of each first label load type flag is 0 or 1; each first label load type flag corresponds to one load type.
[0032] Preferably, the construction of the model data set specifically includes:
[0033] Step 41, use one or more power consumption scenarios with partial loads or all loads of fixed-frequency air conditioners, variable-frequency air conditioners, electric water heaters, electric heaters, electric kettles, small kitchen appliances, microwave ovens, induction cookers, rice cookers, electric ovens, dishwashers, washing machines, refrigerators, vacuum cleaners, hair dryers, power banks, electric vehicle battery packs, and battery-powered vehicles as corresponding sampling scenarios;
[0034] Step 42: Continuously collect data on the real-time power supply current, real-time power consumption, real-time temperature, and real-time time of each of the sampling scenarios at a preset first sampling duration to obtain corresponding first acquisition data sequences; and during the continuous data collection of each of the sampling scenarios, mark the usage status of each load type within the current scenario at each acquisition time point to obtain corresponding first marking data sequences;
[0035] Among them, the total sampling duration of the first acquisition data sequence matches the first sampling duration; the first acquisition data sequence is composed of multiple first acquisition data sorted in chronological order; the first acquisition data includes the first acquisition time, the first acquisition current, the first acquisition power, and the first acquisition temperature;
[0036] The first marking data sequence is composed of multiple first marking data sorted in chronological order, and the first marking data corresponds one-to-one with the first acquisition data; the first marking data includes K first load type marks; each of the first load type marks corresponds to one of the load types; the value of each of the first load type marks is 0 or 1, and a first load type mark of 0 indicates that the corresponding load type is not in use at the corresponding first acquisition time, and a first load type mark of 1 indicates that the corresponding load type is in use at the corresponding first acquisition time;
[0037] Step 43: Take the input length of the model sequence as the corresponding first sequence length, and perform sliding sequence extraction on each of the first acquisition data sequences with a preset first sliding step and the first sequence length, and use each extracted sliding sequence as a corresponding second acquisition data sequence; and extract the subsequences corresponding to each of the second acquisition data sequences from the first marking data sequence as the corresponding second marking data sequences; and form a corresponding first sequence pair from each of the second acquisition data sequences and the corresponding second marking data sequences;
[0038] Step 44: Take each of the first sequence pairs as the corresponding current sequence pair; take the second acquisition data sequence and the second labeled data sequence of the current sequence pair as the corresponding current acquisition data sequence and current labeled data sequence; take the first acquisition time, the first acquisition current, the first acquisition power, and the first acquisition temperature of each of the first acquisition data in the current acquisition data sequence as a set of corresponding first training sampling times, first training sampling currents, first training sampling powers, and first training sampling temperatures to form a corresponding first training sampling data; take the K first load type labels of each of the first labeled data in the current labeled data sequence as K corresponding first label load type flags to form a corresponding first label prediction vector; sort all the first training sampling data corresponding to the current sequence pair in chronological order to form a corresponding first training sequence; sort all the first label prediction vectors corresponding to the current sequence pair in chronological order to form a corresponding first label vector sequence; and form a corresponding first data record from the first training sequence and the first label vector sequence corresponding to the current sequence pair.
[0039] Step 45: Form the corresponding model data set from all the first data records obtained.
[0040] Preferably, the model training of the intelligent load recognition model based on the model data set specifically includes:
[0041] Step 51: Randomly split the model data set into a corresponding first training set and first evaluation set based on a preset first training evaluation ratio.
[0042] Among them, the first training evaluation ratio is a preset ratio; both the first training set and the first evaluation set include multiple first data records; the ratio of the total number of records in the first training set to the total number of records in the first evaluation set satisfies the first training evaluation ratio.
[0043] Step 52: Extract the first first data record in the first training set as the corresponding current training record.
[0044] Step 53: Input the first training sequence of the current training record into the intelligent load recognition model for load classification prediction processing to obtain a corresponding first training prediction vector sequence.
[0045] Step 54: Substitute the first training prediction vector sequence and the first label vector sequence of the current training record into a preset first model loss function for calculation to obtain a corresponding first loss value.
[0046] Among them, the first model loss function is implemented based on the multi-class cross-entropy loss function;
[0047] Step 55: Identify whether the first loss value meets a preset first loss value range; if the first loss value meets the first loss value range, then identify whether the current training record is the last first data record in the first training set. If so, go to Step 56; if not, extract the next first data record in the first training set as the new current training record and return to Step 53; if the first loss value does not meet the first loss value range, then based on a preset first model parameter optimizer, perform one round of optimization on the model parameters of the first, second, and third classification prediction models in the intelligent load recognition model in the direction of minimizing the first model loss function, and return to Step 53 at the end of this round of optimization;
[0048] Among them, the first model parameter optimizer includes an SGD optimizer and an ADAM optimizer;
[0049] Step 56: Traverse all the first data records in the first evaluation set; and during the traversal, use the currently traversed first data record as the corresponding current evaluation record; input the first training sequence of the current evaluation record into the intelligent load recognition model for load classification prediction processing to obtain a corresponding second training prediction vector sequence; and form a corresponding first prediction label pair from the second training prediction vector sequence and the first label vector sequence of the current evaluation record;
[0050] Step 57: Calculate the precision and recall rate of multi-classification based on all the obtained first prediction label pairs to obtain the corresponding first precision rate and first recall rate; and calculate the F1 score based on the precision rate and the first recall rate to obtain the corresponding first F1 score;
[0051] Step 58: Identify whether the first precision rate, the first recall rate, and the first F1 score all meet the corresponding first preset precision rate range, first preset recall rate range, and first preset F1 score range; if the first precision rate does not meet the corresponding first preset precision rate range or the first recall rate does not meet the corresponding first preset recall rate range or the first F1 score does not meet the corresponding first preset F1 score range, then return to Step 51 to continue training; if the first precision rate meets the corresponding first preset precision rate range and the first recall rate meets the corresponding first preset recall rate range and the first F1 score meets the corresponding first preset F1 score range, then stop the model training, solidify the model parameters of the intelligent load recognition model, and confirm the end of the model training of the intelligent load recognition model.
[0052] In the second aspect of the embodiments of the present invention, there is provided an apparatus for implementing the processing method of the intelligent load recognition model described in the first aspect above. The apparatus includes: a model construction module, a data set construction module, a model training module, a data receiving module, and a model application module;
[0053] The model construction module is used to construct an intelligent load recognition model;
[0054] The data set construction module is used to construct a model data set;
[0055] The model training module is used to perform model training on the intelligent load recognition model based on the model data set;
[0056] The data receiving module is used to receive a time series sequence with current, power, and temperature sampling data after the model training is completed, denoted as a corresponding first input sequence; the first input sequence is composed of J first sequence data sorted in chronological order, where J is a preset model sequence input length; the first sequence data includes a first sampling time, a first sampling current, a first sampling power, and a first sampling temperature;
[0057] The model application module is used to input the first sampling sequence into the intelligent load recognition model for load classification prediction processing to obtain a corresponding first prediction vector sequence; the first prediction vector sequence includes J first prediction vectors, and the first prediction vectors correspond one-to-one with the first sequence data; each first prediction vector includes K first load type flags, where K is the total number of preset load types; the value of each first load type flag is 0 or 1; each first load type flag corresponds to a load type; the load types at least include fixed-frequency air conditioners, variable-frequency air conditioners, electric water heaters, electric heaters, electric kettles, small kitchen water heaters, microwave ovens, induction cookers, rice cookers, electric ovens, dishwashers, washing machines, refrigerators, vacuum cleaners, hair dryers, power banks, electric vehicle battery packs, and battery car batteries.
[0058] In the third aspect of the embodiments of the present invention, there is provided an electronic device, including: a memory, a processor, and a transceiver;
[0059] The processor is used to be coupled with the memory, read and execute instructions in the memory to implement the method steps described in the first aspect above;
[0060] The transceiver is coupled with the processor, and the processor controls the transceiver to perform message sending and receiving.
[0061] A fourth aspect of an embodiment of the present invention provides a computer-readable storage medium storing computer instructions, which, when executed by a computer, cause the computer to execute the instructions of the method described in the first aspect above.
[0062] An embodiment of the present invention provides a processing method, apparatus, electronic device, and computer-readable storage medium for an intelligent load recognition model. As can be seen from the above, an embodiment of the present invention uses two types of deep learning models, namely, a Bi-LSTM model and an MLP network, to construct an intelligent load recognition model; constructs a model data set through big data collection; trains the intelligent load recognition model based on the model data set; and after the model training is completed, receives a time series with current, power, and temperature sampling data as a model input sequence, and the intelligent load recognition model performs load classification prediction based on the model input sequence. The model generalization ability of the intelligent load recognition model is improved through the embodiment of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0063] Figure 1 It is a schematic diagram of a processing method for an intelligent load recognition model provided in Embodiment 1 of the present invention;
[0064] Figure 2 It is a module diagram of an intelligent load recognition model provided in Embodiment 1 of the present invention;
[0065] Figure 3 It is a schematic diagram of a first / second / third classification prediction model provided in Embodiment 1 of the present invention;
[0066] Figure 4 It is a module structure diagram of a processing device for an intelligent load recognition model provided in Embodiment 2 of the present invention;
[0067] Figure 5 It is a schematic diagram of the structure of an electronic device provided in Embodiment 3 of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0068] In order to make the objectives, technical solutions, and advantages of the present invention clearer, the present invention will be further described in detail below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all of the embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention.
[0069] An embodiment of the present invention provides a processing method for an intelligent load recognition model. As Figure 1 shown in the schematic diagram of a processing method for an intelligent load recognition model provided in Embodiment 1 of the present invention, the method mainly includes the following steps:
[0070] Step 1, construct an intelligent load recognition model.
[0071] Here, the intelligent load recognition model of the embodiment of the present invention is used to perform load classification prediction processing on the input sequence X of the model and output the corresponding prediction vector sequence Y; the model input end of the intelligent load recognition model is used to receive the input sequence X, and the model output end is used to output the prediction vector sequence Y; among them, the input sequence X is composed of multiple sequence data x j Sorted in chronological order, 1 ≤ index j ≤ J, and J is the preset model sequence input length; each sequence data x j Includes time T j , current I j , power P j and temperature W j ; the prediction vector sequence Y is composed of multiple prediction vectors y i Sorted in chronological order, the prediction vector y i Corresponds one by one with the sequence data x j ; each prediction vector y i Includes multiple load type flags z j,k , 1 ≤ index k ≤ K, and K is the total number of preset load types; each load type flag z j,k The value of is 0 or 1; each load type flag z j,k Corresponds to a load type; the load types include at least fixed-frequency air conditioners, variable-frequency air conditioners, electric water heaters, electric heaters, electric kettles, small kitchen water heaters, microwave ovens, induction cookers, rice cookers, electric ovens, dishwashers, washing machines, refrigerators, vacuum cleaners, hair dryers, power banks, electric vehicle battery packs, and battery car batteries.
[0072] Such as Figure 2 As shown in the module schematic diagram of the intelligent load recognition model provided in Embodiment 1 of the present invention, the intelligent load recognition model of the embodiment of the present invention includes a wavelet transformation module, a first classification prediction model, a second classification prediction model, a third classification prediction model, a weighted summation module, and a classification output module; among them:
[0073] 1) Wavelet transformation module:
[0074] Such as Figure 2 Shown, the input end of the wavelet transformation module is connected to the model input end; the first output end of the wavelet transformation module is connected to the input end of the first classification prediction model, the second output end is connected to the input end of the second classification prediction model, and the third output end is connected to the input end of the third classification prediction model;
[0075] The wavelet transformation module of the embodiment of the present invention is used for:
[0076] Step s1-1, all the currents I in the input sequence X jExtract and sort them in chronological order to form corresponding current time series signals;
[0077] Step s1-2, and all powers P in the input sequence X j Extract and sort them in chronological order to form corresponding power time series signals;
[0078] Step s1-3, and based on a preset first wavelet basis, extract one low-frequency current feature and two high-frequency current features from the current time series signal to obtain corresponding first current low-frequency feature sequences {I a,j}, first current high-frequency feature sequences {I b,j}, and second current high-frequency feature sequences {I c,j}; among them, the first wavelet basis includes at least the coif4 wavelet basis; the first current low-frequency feature sequences {I a,j} are composed of multiple first current low-frequency features I a,j}, the first current high-frequency feature sequences {I b,j} are composed of multiple first current high-frequency features I b,j}, and the second current high-frequency feature sequences {I c,j} are composed of multiple second current high-frequency features I c,j};
[0079] Step s1-4, and based on a preset second wavelet basis, extract one low-frequency power feature and two high-frequency power features from the power time series signal to obtain corresponding first power low-frequency feature sequences {P a,j}, first power high-frequency feature sequences {P b,j}, and second power high-frequency feature sequences {P c,j}; among them, the second wavelet basis includes at least the db4 wavelet basis; the first power low-frequency feature sequences {P a,j} are composed of multiple first power low-frequency features P a,j}, the first power high-frequency feature sequences {P b,j} are composed of multiple first power high-frequency features P b,j}, and the second power high-frequency feature sequences {P c,j} are composed of multiple second power high-frequency features P c,j};
[0080] Step s1-5, and perform high-frequency feature sequence noise reduction and smoothing processing on each current / power high-frequency feature sequence respectively;
[0081] Step s1-6, and after the high-frequency feature sequence noise reduction and smoothing processing are completed, perform sequence normalization processing on the first current / power low-frequency feature sequences and the first and second current / power high-frequency feature sequences respectively;
[0082] Step s1-7, and after the sequence normalization process ends, for all time instants T in the input sequence X j and all temperatures W j perform corresponding time and temperature normalization processes as well;
[0083] Step s1-8, and after the time and temperature normalization processes end, form a corresponding normalized feature d from the normalized time, temperature, first current low-frequency feature, and first power low-frequency feature corresponding to each index j a,j , and from all the obtained normalized features d a,j sort them in chronological order to form a corresponding normalized feature sequence D A ;
[0084] Step s1-9, and form a corresponding normalized feature d from the normalized time, temperature, first current high-frequency feature, and first power high-frequency feature corresponding to each index j b,j , and from all the obtained normalized features d b,j sort them in chronological order to form a corresponding normalized feature sequence D B ;
[0085] Step s1-10, and form a corresponding normalized feature d from the normalized time, temperature, second current high-frequency feature, and second power high-frequency feature corresponding to each index j c,j , and from all the obtained normalized features d c,j sort them in chronological order to form a corresponding normalized feature sequence D C ;
[0086] Step s1-11, and output the normalized feature sequences D A , D B , D C to the corresponding first, second, and third classification prediction models;
[0087] 2) First classification prediction model:
[0088] As Figure 2 shown, the output end of the first classification prediction model is connected to the first input end of the weighted summation module; the first classification prediction model includes a first Bi-LSTM model and a first MLP network;
[0089] The first classification prediction model is used for:
[0090] Step s2-1, input the normalized feature sequence D A into the first Bi-LSTM model, and let the first Bi-LSTM model extract the temporal features of the normalized feature sequence D A to obtain a corresponding temporal feature vector H A; Among them, the time series feature vector H A includes multiple time series features h a,j , the time series feature h a,j corresponds one-to-one with the normalized feature d a,j ;
[0091] Step s2-2, and input each time series feature h A of the time series feature vector H a,j into the first MLP network respectively, and the first MLP network performs load classification prediction according to the time series feature h a,j input this time and outputs the corresponding classification vector s a,j ; And all the obtained classification vectors s a,j are sorted in chronological order to form a corresponding classification vector sequence S A ; Among them, the classification vector sequence S A includes multiple classification vectors s a,j , the classification vector s a,j corresponds one-to-one with the normalized feature d a,j ; Each classification vector s a,j is composed of the classification prediction probabilities p a,j,k of the total number K of load types; Each classification prediction probability p a,j,k corresponds to a load type;
[0092] Here, the processing flow of the first classification prediction model described in the above steps s2-1 to s2-2 can be referred to Figure 3 the schematic diagram of the first / second / third classification prediction model provided in Embodiment 1 of the present invention for understanding;
[0093] Step s2-3, and output the classification vector sequence S A to the weighted summation module;
[0094] 3) The second classification prediction model:
[0095] As Figure 2 shown, the output end of the second classification prediction model is connected to the second input end of the weighted summation module; The second classification prediction model includes a second Bi-LSTM model and a second MLP network;
[0096] The second classification prediction model is used for:
[0097] Step s3-1, input the normalized feature sequence D B into the second Bi-LSTM model, and the second Bi-LSTM model extracts the time series features of the normalized feature sequence D B to obtain the corresponding time series feature vector H B ; Among them, the time series feature vector H B includes multiple time series features hb,j and the timing feature h b,j corresponds one-to-one with the normalized feature d b,j one by one;
[0098] Step s3-2, and the timing feature vector H B of each timing feature h b,j is respectively input into the second MLP network, and the second MLP network makes a load classification prediction according to the timing feature h b,j input this time and outputs the corresponding classification vector s b,j ; and all the obtained classification vectors s b,j are sorted in chronological order to form a corresponding classification vector sequence S B ; where the classification vector sequence S B includes multiple classification vectors s b,j , the classification vector s b,j corresponds one-to-one with the normalized feature d b,j one by one; each classification vector s b,j is composed of the classification prediction probabilities p b,j,k of the total number K of load types; each classification prediction probability p b,j,k corresponds to a load type;
[0099] Here, the processing flow of the second classification prediction model described in the above steps s3-1 to s3-2 can be referred to Figure 3 for understanding according to the schematic diagram of the first / second / third classification prediction model provided in Embodiment 1 of the present invention;
[0100] Step s3-3, and output the classification vector sequence S B to the weighted summation module;
[0101] 4) The third classification prediction model:
[0102] As Figure 2 shown, the output end of the third classification prediction model is connected to the third input end of the weighted summation module; the third classification prediction model includes a third Bi-LSTM model and a third MLP network;
[0103] The third classification prediction model is used for:
[0104] Step s4-1, input the normalized feature sequence D C into the third Bi-LSTM model, and the third Bi-LSTM model extracts the timing features of the normalized feature sequence D C to obtain the corresponding timing feature vector H C ; where the timing feature vector H C includes multiple timing features h c,j , and the timing feature h c,j corresponds to the normalized feature dc,j One to one correspondence;
[0105] Step s4-2, and transform the time series feature vector H C The various time series characteristics h c,j The third MLP network is used to input the time series features h of the input. c,j Perform load classification prediction and output the corresponding classification vector s c,j ; and all the classification vectors s are obtained c,j Sort by time to form a corresponding classification vector sequence S C ; Among them, the classification vector sequence S C Including multiple classification vectors s c,j , classification vector s c,j With the normalized feature d c,j One-to-one correspondence; each classification vector s c,j The classification prediction probability p of the total number of load types K c,j,k Composition; each classification prediction probability p c,j,k Corresponds to a load type;
[0106] Here, the processing flow of the third classification prediction model described in the above steps s4-1 to s4-2 can be referred to Figure 3 The first / second / third classification prediction model schematic diagram provided in the first embodiment of the present invention is understood;
[0107] Step s4-3, and classify the vector sequence S C Output to the weighted summation module;
[0108] 5) Weighted summation module:
[0109] like Figure 2 As shown, the output end of the weighted sum module is connected to the input end of the classification output module;
[0110] The weighted sum module is used to:
[0111] Step s5-1, classify the vector sequence S A , S B , S C Perform weighted summation to obtain the corresponding weighted classification vector sequence S; wherein the weighted classification vector sequence S consists of multiple weighted classification vectors s j Sorted in chronological order, weighted classification vector s j With sequence data x j One-to-one correspondence; each weighted classification vector s j The weighted classification prediction probability p of the total number of load types K j,k Composition, p j,k =w a ×pa,j,k +w b ×p b,j,k +w c ×p c,j,k ,w a 、w b 、w c are preset first, second, and third weighting coefficients; each weighted classification prediction probability p j,k corresponds to a load type;
[0112] Step s5-2, and output the weighted classification vector sequence S to the classification output module;
[0113] 6) Classification output module:
[0114] As Figure 2 shown, the output end of the classification output module is connected to the model output end;
[0115] The classification output module is used to: regard each weighted classification vector s in the weighted classification vector sequence S j as the corresponding current weighted classification vector; and perform a round of traversal on the K weighted classification prediction probabilities p in the current weighted classification vector j,k ; and during this round of traversal, regard the currently traversed weighted classification prediction probability p j,k as the corresponding current prediction probability; and regard the load type flag z corresponding to the current prediction probability j,k as the corresponding current load type flag; and regard the probability threshold p in the preset probability threshold set corresponding to the current prediction probability hold,k as the corresponding current probability threshold; and identify whether the current prediction probability exceeds the current probability threshold. If it exceeds, set the corresponding current load type flag to 1. If it does not exceed, set the corresponding current load type flag to 0; and at the end of this round of traversal, form a corresponding prediction vector y from the K load type flags z corresponding to the current weighted classification vector j,k ; and form and output the corresponding prediction vector sequence Y from all the prediction vectors y corresponding to all the weighted classification vectors s i ; where the probability threshold set consists of the probability thresholds p of the total number of load types K j Each probability threshold p i corresponds to a load type. hold,k consists, and each probability threshold p hold,k corresponds to a load type.
[0116] Step 2, construct the model data set;
[0117] Among them, the model data set includes multiple first data records; the first data record includes a first training sequence and a first label vector sequence; the first training sequence is formed by sorting multiple first training sampling data in chronological order; the first training sampling data includes a first training sampling time, a first training sampling current, a first training sampling power, and a first training sampling temperature; the first label vector sequence includes multiple first label prediction vectors, and the first label prediction vectors correspond one-to-one with the first training sampling data; each first label prediction vector includes K first label load type flags; the value of each first label load type flag is 0 or 1; each first label load type flag corresponds to a load type;
[0118] Specifically, it includes: Step 21, regarding one or more power consumption scenarios with partial or all loads among fixed-frequency air conditioners, variable-frequency air conditioners, electric water heaters, electric heaters, electric kettles, small kitchen water heaters, microwave ovens, induction cookers, rice cookers, electric ovens, dishwashers, washing machines, refrigerators, vacuum cleaners, hair dryers, power banks, electric vehicle battery packs, and battery-powered vehicles as corresponding sampling scenarios;
[0119] Step 22, continuously collecting data on the real-time power supply current, real-time power consumption, real-time temperature, and real-time over time for each sampling scenario according to a preset first sampling duration to obtain a corresponding first collection data sequence; and marking the usage status of each load type in the current scenario at each collection time point during the continuous data collection of each sampling scenario to obtain a corresponding first marking data sequence;
[0120] Among them, the first sampling duration is a preset time length, defaulting to months or years; the total sampling duration of the first collection data sequence matches the first sampling duration; the first collection data sequence is formed by sorting multiple first collection data in chronological order; the first collection data includes a first collection time, a first collection current, a first collection power, and a first collection temperature;
[0121] The first marking data sequence is formed by sorting multiple first marking data in chronological order, and the first marking data corresponds one-to-one with the first collection data; the first marking data includes K first load type marks; each first load type mark corresponds to a load type; the value of each first load type mark is 0 or 1, and a first load type mark of 0 indicates that the corresponding load type is not in use at the corresponding first collection time, and a first load type mark of 1 indicates that the corresponding load type is in use at the corresponding first collection time;
[0122] Step 23: Take the input length of the model sequence as the corresponding first sequence length, and perform sliding sequence extraction on each first acquisition data sequence with a preset first sliding step and the first sequence length, and take each extracted sliding sequence as a corresponding second acquisition data sequence; and extract the subsequences corresponding to each second acquisition data sequence from the first labeled data sequence as the corresponding second labeled data sequence; and form a corresponding first sequence pair from each second acquisition data sequence and the corresponding second labeled data sequence.
[0123] Here, the first sliding step is a preset sequence step parameter.
[0124] For example, the first acquisition data sequence {data1, data2, data3, data4, data5} includes 5 first acquisition data, that is, the corresponding acquisition data sequence length is 5; assume the first sliding step is 2 and the first sequence length is 3; then based on the first sliding step = 2 and the first sequence length = 3, the 2 second acquisition data sequences obtained by performing sliding sequence extraction on the first acquisition data sequence are {data1, data2, data3} and {data3, data4, data5} respectively.
[0125] Step 24: Take each first sequence pair as the corresponding current sequence pair; and take the second acquisition data sequence and the second labeled data sequence of the current sequence pair as the corresponding current acquisition data sequence and the current labeled data sequence; and take the first acquisition time, the first acquisition current, the first acquisition power, and the first acquisition temperature of each first acquisition data in the current acquisition data sequence as a group of corresponding first training sampling time, first training sampling current, first training sampling power, and first training sampling temperature to form a corresponding first training sampling data; and take the K first load type labels of each first labeled data in the current labeled data sequence as K corresponding first label load type flags to form a corresponding first label prediction vector; and form a corresponding first training sequence by sorting all the first training sampling data corresponding to the current sequence pair in chronological order; and form a corresponding first label vector sequence by sorting all the first label prediction vectors corresponding to the current sequence pair in chronological order; and form a corresponding first data record from the first training sequence and the first label vector sequence corresponding to the current sequence pair.
[0126] Step 25: Form a corresponding model data set from all the obtained first data records.
[0127] Step 3: Perform model training on the intelligent load recognition model based on the model data set.
[0128] Specifically, it includes: Step 31, randomly splitting the model dataset into a corresponding first training set and a first evaluation set based on a preset first training-evaluation ratio;
[0129] Among them, the first training-evaluation ratio is a preset ratio, such as 8:2; both the first training set and the first evaluation set include multiple first data records; the ratio of the total number of records in the first training set to the total number of records in the first evaluation set satisfies the first training-evaluation ratio;
[0130] Step 32, extracting the first first data record in the first training set as the corresponding current training record;
[0131] Step 33, inputting the first training sequence of the current training record into the intelligent load recognition model for load classification prediction processing to obtain a corresponding first training prediction vector sequence;
[0132] Step 34, substituting the first training prediction vector sequence and the first label vector sequence of the current training record into a preset first model loss function for calculation to obtain a corresponding first loss value;
[0133] Among them, the first model loss function is implemented based on the multi-class cross-entropy loss function;
[0134] Step 35, identifying whether the first loss value satisfies a preset first loss value range; if the first loss value satisfies the first loss value range, then identify whether the current training record is the last first data record in the first training set, if so, go to Step 36, if not, extract the next first data record in the first training set as the new current training record and return to Step 33; if the first loss value does not satisfy the first loss value range, then based on a preset first model parameter optimizer, perform one round of optimization on the model parameters of the first, second, and third classification prediction models in the intelligent load recognition model in the direction of minimizing the first model loss function, and return to Step 33 at the end of this round of optimization;
[0135] Among them, the first loss value range is a pre-set loss value range; the first model parameter optimizer includes an SGD optimizer and an ADAM optimizer;
[0136] Step 36, traverse all the first data records in the first evaluation set; and during the traversal, take the currently traversed first data record as the corresponding current evaluation record; input the first training sequence of the current evaluation record into the intelligent load recognition model for load classification prediction processing to obtain a corresponding second training prediction vector sequence; and form a corresponding first prediction label pair from the second training prediction vector sequence and the first label vector sequence of the current evaluation record;
[0137] Step 37: Calculate the corresponding first precision rate and first recall rate according to the precision rate and recall rate of multi-classification for all the obtained first prediction label pairs; and calculate the corresponding first F1 score according to the rate and the first recall rate.
[0138] Step 38: Identify whether the first precision rate, the first recall rate, and the first F1 score all meet the corresponding first preset precision rate range, first preset recall rate range, and first preset F1 score range; if the first precision rate does not meet the corresponding first preset precision rate range, or the first recall rate does not meet the corresponding first preset recall rate range, or the first F1 score does not meet the corresponding first preset F1 score range, then return to Step 31 to continue training; if the first precision rate meets the corresponding first preset precision rate range, the first recall rate meets the corresponding first preset recall rate range, and the first F1 score meets the corresponding first preset F1 score range, then stop the model training, solidify the model parameters of the intelligent load identification model, and confirm the end of the model training of the intelligent load identification model.
[0139] Here, the first preset precision rate range is a preset precision rate range, the first preset recall rate range is a preset recall rate range, and the first preset F1 score range is a preset F1 score range.
[0140] Step 4: After the model training is completed, receive a time series with current, power, and temperature sampling data and record it as the corresponding first input sequence.
[0141] Here, the first input sequence is composed of J first sequence data sorted in chronological order; the first sequence data includes the first sampling time, the first sampling current, the first sampling power, and the first sampling temperature.
[0142] Step 5: Input the first sampling sequence into the intelligent load identification model for load classification prediction processing to obtain the corresponding first prediction vector sequence.
[0143] Here, the obtained first prediction vector sequence includes J first prediction vectors, and the first prediction vectors correspond one-to-one with the first sequence data; each first prediction vector includes K first load type flags; the value of each first load type flag is 0 or 1; each first load type flag corresponds to a load type.
[0144] It should be noted that the embodiment of the present invention can also assemble a corresponding load prediction report based on the first input sequence and the first prediction vector sequence. Specifically, each first sequence data of the first input sequence and the corresponding first prediction vector are combined to form a corresponding prediction record for the first sampling time point; and all the obtained prediction records for the first sampling time point are combined to form a corresponding prediction report for the first time period. Based on this first time period prediction report, the used / unused status of all power loads at each sampling time point within this time period can be intuitively displayed.
[0145] Figure 4 FIG. 4 is a module structure diagram of a processing device for an intelligent load recognition model provided in the second embodiment of the present invention. This device is a terminal device or a server for implementing the foregoing method embodiment, or can also be a device that enables the foregoing terminal device or server to implement the foregoing method embodiment. For example, this device can be a device or a chip system of the foregoing terminal device or server. As Figure 4 shown, the device includes: a model construction module 201, a data set construction module 202, a model training module 203, a data receiving module 204, and a model application module 205.
[0146] The model construction module 201 is used to construct an intelligent load recognition model.
[0147] The data set construction module 202 is used to construct a model data set.
[0148] The model training module 203 is used to perform model training on the intelligent load recognition model based on the model data set.
[0149] The data receiving module 204 is used to receive, after the model training is completed, a time series sequence with current, power, and temperature sampling data, denoted as the corresponding first input sequence; the first input sequence is composed of J first sequence data sorted in chronological order, and J is the preset input length of the model sequence; the first sequence data includes the first sampling time, the first sampling current, the first sampling power, and the first sampling temperature.
[0150] The model application module 205 is used to input the first sampling sequence into the intelligent load recognition model for load classification prediction processing to obtain the corresponding first prediction vector sequence; the first prediction vector sequence includes J first prediction vectors, and the first prediction vectors correspond one-to-one with the first sequence data; each first prediction vector includes K first load type flags, and K is the preset total number of load types; the value of each first load type flag is 0 or 1; each first load type flag corresponds to a load type; the load types at least include fixed-frequency air conditioners, variable-frequency air conditioners, electric water heaters, electric heaters, electric kettles, small kitchen water heaters, microwave ovens, induction cookers, rice cookers, electric ovens, dishwashers, washing machines, refrigerators, vacuum cleaners, hair dryers, power banks, electric vehicle battery packs, and battery car batteries.
[0151] The processing device of an intelligent load identification model provided by an embodiment of the present invention can execute the method steps in the above method embodiment, and its implementation principle and technical effect are similar, which will not be elaborated here.
[0152] It should be noted that it should be understood that the division of each module of the above device is only a logical function division. In actual implementation, it can be fully or partially integrated into a physical entity, or physically separated. And these modules can all be implemented in the form of software called by processing elements; they can also all be implemented in the form of hardware; or some modules can be implemented in the form of software called by processing elements, and some modules can be implemented in the form of hardware. For example, the model construction module can be a separately established processing element, or can be integrated in a certain chip of the above device. In addition, it can also be stored in the memory of the above device in the form of program code, and called and executed by a certain processing element of the above device to perform the functions of the above determined module. The implementation of other modules is similar. In addition, these modules can be fully or partially integrated together or can be independently implemented. The processing element described here can be an integrated circuit with signal processing capabilities. In the implementation process, each step of the above method or each of the above modules can be completed by the integrated logic circuit in the processor element or the instruction in the form of software.
[0153] For example, the above modules can be one or more integrated circuits configured to implement the above method, such as: one or more Application Specific Integrated Circuits (ASICs), or, one or more Digital Signal Processors (DSPs), or, one or more Field Programmable Gate Arrays (FPGAs), etc. Again, when a certain module above is implemented in the form of a processing element scheduling program code, the processing element can be a general-purpose processor, such as a Central Processing Unit (CPU) or other processors that can call program code. Again, these modules can be integrated together and implemented in the form of a System-on-a-chip (SOC).
[0154] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the processes or functions described in the foregoing method embodiments are generated in whole or in part. The foregoing computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The foregoing computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another. For example, the foregoing computer instructions may be transmitted from one website, computer, server, or data center to another website, computer, server, or data center by wire (such as coaxial cable, optical fiber, Digital Subscriber Line (DSL)) or wireless (such as infrared, wireless, Bluetooth, microwave, etc.). The foregoing computer-readable storage medium may be any available medium that can be accessed by a computer or a data storage device such as a server or data center that includes one or more integrated available media. The available medium may be a magnetic medium (such as a floppy disk, hard disk, magnetic tape), an optical medium (such as a DVD), or a semiconductor medium (such as a solid state disk (SSD)), etc.
[0155] Figure 5 FIG. 4 is a schematic structural diagram of an electronic device provided in Embodiment 3 of the present invention. The electronic device may be a terminal device or a server for implementing the method of the foregoing embodiments, or may be a terminal device or a server for implementing the method of the foregoing embodiments connected to the foregoing terminal device or server. As Figure 5 shown, the electronic device may include: a processor 301 (such as a CPU), a memory 302, and a transceiver 303; the transceiver 303 is coupled to the processor 301, and the processor 301 controls the transceiver operations of the transceiver 303. Various instructions may be stored in the memory 302 to complete various processing functions and implement the processing steps described in the foregoing method embodiments. Preferably, the electronic device related to the embodiments of the present invention further includes: a power supply 304, a system bus 305, and a communication port 306. The system bus 305 is used to implement communication connections between components. The foregoing communication port 306 is used for the electronic device to connect and communicate with other peripherals.
[0156] In Figure 5The system bus 305 mentioned above can be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. This system bus can be divided into an address bus, a data bus, a control bus, etc. For the sake of representation, only a thick line is used in the figure, but it does not mean that there is only one bus or one type of bus. The communication interface is used to implement communication between the database access device and other devices (such as clients, read-write libraries, and read-only libraries). The memory may include Random Access Memory (RAM), and may also include non-volatile memory, such as at least one disk memory.
[0157] The above-mentioned processor can be a general-purpose processor, including a Central Processing Unit (CPU), a Network Processor (NP), a Graphics Processing Unit (GPU), etc.; it can also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.
[0158] It should be noted that the embodiments of the present invention also provide a computer-readable storage medium, in which instructions are stored. When it runs on a computer, it causes the computer to execute the methods and processing procedures provided in the above embodiments.
[0159] The embodiments of the present invention also provide a chip for running instructions. This chip is used to execute the processing steps described in the foregoing method embodiments.
[0160] The embodiments of the present invention provide a processing method, device, electronic device, and computer-readable storage medium for an intelligent load recognition model. From the above content, it can be seen that the embodiments of the present invention use two types of deep learning models, namely the Bi-LSTM model and the MLP network, to construct an intelligent load recognition model; construct a model data set through big data collection; train the intelligent load recognition model based on the model data set; and after the model training is completed, receive a time series sequence with current, power, and temperature sampling data as the model input sequence, and the intelligent load recognition model performs load classification prediction based on this model input sequence. The model generalization ability of the intelligent load recognition model is improved through the embodiments of the present invention.
[0161] Those skilled in the art should further realize that the units and algorithm steps of each example described in combination with the embodiments disclosed herein can be implemented by electronic hardware, computer software, or a combination of the two. To clearly illustrate the interchangeability of hardware and software, the components and steps of each example have been generally described according to functions in the above description. Whether these functions are executed in a hardware or software manner depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods for each specific application to implement the described functions, but such implementation should not be considered to exceed the scope of the present invention.
[0162] The steps of the methods or algorithms described in combination with the embodiments disclosed herein can be implemented by hardware, software modules executed by a processor, or a combination of the two. The software modules can be placed in a random access memory (RAM), internal memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, removable disk, CD-ROM, or any other form of storage medium known in the art.
[0163] The specific embodiments described above have further elaborated on the purpose, technical solution, and beneficial effects of the present invention. It should be understood that the above are only specific embodiments of the present invention and are not used to limit the protection scope of the present invention. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A processing method for an intelligent load identification model, characterized in that, The method includes: Constructing an intelligent load identification model; Constructing a model data set; Training the intelligent load identification model based on the model data set; After the model training is completed, receiving a time series with current, power, and temperature sampling data, denoted as the corresponding first input sequence; the first input sequence is composed of J first sequence data sorted in chronological order, where J is the preset input length of the model sequence; the first sequence data includes the first sampling time, the first sampling current, the first sampling power, and the first sampling temperature; Inputting the first input sequence into the intelligent load identification model for load classification prediction processing to obtain the corresponding first prediction vector sequence; the first prediction vector sequence includes J first prediction vectors, and the first prediction vectors correspond one-to-one with the first sequence data; each first prediction vector includes K first load type flags, where K is the total number of preset load types; the value of each first load type flag is 0 or 1; each first load type flag corresponds to a load type; Wherein, the intelligent load identification model includes a wavelet transformation module, a first classification prediction model, a second classification prediction model, a third classification prediction model, a weighted summation module, and a classification output module; The wavelet transform module is used to output the normalized feature sequences D A , D B , D C to the corresponding first, second, and third classification prediction models; The first classification prediction model is used to input the normalized feature sequence D A into the first Bi-LSTM model, and the first Bi-LSTM model extracts the temporal features of the normalized feature sequence D A to obtain the corresponding temporal feature vector H A ; and each temporal feature h A of the temporal feature vector H a,j is respectively input into the first MLP network, and the first MLP network performs load classification prediction according to the temporal feature h a,j input each time and outputs the corresponding classification vector s a,j ; and all the obtained classification vectors s a,j are sorted in chronological order to form a corresponding classification vector sequence S A ; The second classification prediction model is used to process the normalized feature sequence D B by inputting it into the second Bi-LSTM model, which extracts the temporal features of the normalized feature sequence D B to obtain the corresponding temporal feature vector H B ; and each temporal feature h B of the temporal feature vector H b,j is respectively input into the second MLP network, and the second MLP network performs load classification prediction according to the temporal feature h b,j input this time and outputs the corresponding classification vector s b,j ; and all the obtained classification vectors s b,j are sorted in chronological order to form a corresponding classification vector sequence S B ; The third classification prediction model is used to process the normalized feature sequence D C as the input of the third Bi-LSTM model, and the third Bi-LSTM model extracts the temporal features of the normalized feature sequence D C to obtain the corresponding temporal feature vector H C ; and each temporal feature h C of the temporal feature vector H c,j is respectively input into the third MLP network, and the third MLP network performs load classification prediction according to the temporal feature h c,j input this time and outputs the corresponding classification vector s c,j ; and all the obtained classification vectors s c,j are sorted in chronological order to form a corresponding classification vector sequence S C ; The weighted summation module is used to perform weighted summation on the classification vector sequences S A , S B , S C to obtain the corresponding weighted classification vector sequence S.
2. The processing method of the intelligent load identification model according to claim 1, characterized in that The intelligent load recognition model is used to perform load classification prediction processing based on the input sequence X of the model and output the corresponding prediction vector sequence Y; the model input end of the intelligent load recognition model is used to receive the input sequence X, and the model output end is used to output the prediction vector sequence Y; the input sequence X is composed of multiple sequence data x j sorted in chronological order, where 1 ≤ index j ≤ J; the sequence data x j includes time T j , current I j , power P j and temperature W j ; the prediction vector sequence Y is composed of multiple prediction vectors y i sorted in chronological order, and the prediction vector y i corresponds to the sequence data x j one by one; each prediction vector y i includes multiple load type flags z j,k , where 1 ≤ index k ≤ K; the value of each load type flag z j,k is 0 or 1; each load type flag z j,k corresponds to one of the load types; The input end of the wavelet transformation module is connected to the model input end; the first output end of the wavelet transformation module is connected to the input end of the first classification prediction model, the second output end is connected to the input end of the second classification prediction model, and the third output end is connected to the input end of the third classification prediction model; the output end of the first classification prediction model is connected to the first input end of the weighted summation module; the first classification prediction model includes the first Bi-LSTM model and the first MLP network; the output end of the second classification prediction model is connected to the second input end of the weighted summation module; the second classification prediction model includes the second Bi-LSTM model and the second MLP network; the output end of the third classification prediction model is connected to the third input end of the weighted summation module; the third classification prediction model includes the third Bi-LSTM model and the third MLP network; the output end of the weighted summation module is connected to the input end of the classification output module; the output end of the classification output module is connected to the model output end; The wavelet transformation module is also used to transform all the currents I j Extract and sort them in chronological order to form a corresponding current timing signal; and convert all the power P in the input sequence X into j The extracted data are sorted in chronological order to form a corresponding power time series signal; and based on a preset first wavelet basis, a low-frequency current feature and two high-frequency current features are extracted from the current time series signal to obtain a corresponding first current low-frequency feature sequence {I a,j }、The first current high frequency characteristic sequence {I b,j } and the second current high frequency characteristic sequence {I c,j }, I a,j ,I b,j ,I c,j are respectively the corresponding first current low-frequency characteristic, the first current high-frequency characteristic, and the second current high-frequency characteristic; And perform extraction of one low-frequency power feature and two high-frequency power features on the power time series signal based on a preset second wavelet basis to obtain corresponding first power low-frequency feature sequences {P a,j}, first power high-frequency feature sequences {P b,j}, and second power high-frequency feature sequences {P c,j}, where P a,j , P b,j , and P c,j are the corresponding first power low-frequency feature, first power high-frequency feature, and second power high-frequency feature respectively; and perform high-frequency feature sequence noise reduction and smoothing processing on each current / power high-frequency feature sequence respectively; and after the high-frequency feature sequence noise reduction and smoothing processing are completed, perform sequence normalization processing on the first current / power low-frequency feature sequence and the first and second current / power high-frequency feature sequences respectively; and after the sequence normalization processing is completed, perform corresponding time and temperature normalization processing on all the times T j and all the temperatures W j in the input sequence X; After the time and temperature normalization processing is completed, a corresponding normalized feature d is composed of the normalized time, temperature, first low-frequency current feature, and first low-frequency power feature corresponding to each index j a,j , and all the obtained normalized features d a,j are sorted in chronological order to form a corresponding normalized feature sequence D A ; and a corresponding normalized feature d is composed of the normalized time, temperature, first high-frequency current feature, and first high-frequency power feature corresponding to each index j b,j , and all the obtained normalized features d b,j are sorted in chronological order to form a corresponding normalized feature sequence D B ; and a corresponding normalized feature d is composed of the normalized time, temperature, second high-frequency current feature, and second high-frequency power feature corresponding to each index j c,j , and all the obtained normalized features d c,j are sorted in chronological order to form a corresponding normalized feature sequence D C ; wherein, the first wavelet basis includes at least the coif4 wavelet basis; the second wavelet basis includes at least the db4 wavelet basis; The first classification prediction model is further configured to output the classification vector sequence S A to the weighted summation module; wherein, the temporal feature vector H A includes a plurality of the temporal features h a,j , and the temporal feature h a,j corresponds to the normalized feature d a,j one by one; the classification vector sequence S A includes a plurality of classification vectors s a,j , and the classification vector s a,j corresponds to the normalized feature d a,j one by one; each classification vector s a,j is composed of the first classification prediction probabilities p a,j,k of the total number K of load types; each first classification prediction probability p a,j,k corresponds to one of the load types; The second classification prediction model is further configured to output the classification vector sequence S B to the weighted summation module; wherein, the time series feature vector H B includes a plurality of the time series features h b,j , and the time series feature h b,j corresponds to the normalized feature d b,j one by one; the classification vector sequence S B includes a plurality of classification vectors s b,j , and the classification vector s b,j corresponds to the normalized feature d b,j one by one; each classification vector s b,j is composed of the second classification prediction probabilities p b,j,k of the total number K of load types; each second classification prediction probability p b,j,k corresponds to one of the load types; The third classification prediction model is further configured to output the classification vector sequence S C to the weighted summation module; wherein, the time series feature vector H C includes a plurality of the time series features h c,j , and the time series feature h c,j corresponds to the normalized feature d c,j in a one-to-one manner; the classification vector sequence S C includes a plurality of classification vectors s c,j , and the classification vector s c,j corresponds to the normalized feature d c,j in a one-to-one manner; each classification vector s c,j is composed of the third classification prediction probabilities p c,j,k of the total number K of load types; each third classification prediction probability p c,j,k corresponds to one of the load types; The weighted summation module is further configured to output the weighted classification vector sequence S to the classification output module; the weighted classification vector sequence S is composed of a plurality of weighted classification vectors s j sorted in chronological order, and the weighted classification vector s j corresponds to the sequence data x j one by one; each weighted classification vector s j is composed of the weighted classification prediction probabilities p of the total number K of load types j,k where p j,k = w a × p a,j,k + w b × p b,j,k + w c × p c,j,k where w a 、w b 、w c are preset first, second, and third weighting coefficients; each weighted classification prediction probability p j,k corresponds to one of the load types; The classification output module is used to convert each weighted classification vector s of the weighted classification vector sequence S into j as the corresponding current weighted classification vector; and for the K weighted classification prediction probabilities p in the current weighted classification vector j,k Perform a round of traversal; and in this round of traversal, the weighted classification prediction probability p of the current traversal is j,k As the corresponding current prediction probability; and the load type mark z corresponding to the current prediction probability j,k as the corresponding current load type mark; and the probability threshold value p corresponding to the current predicted probability in the preset probability threshold set hold,k as the corresponding current probability threshold; and identify whether the current predicted probability exceeds the current probability threshold, if it exceeds, the corresponding current load type flag is set to 1, if it does not exceed, the corresponding current load type flag is set to 0; and at the end of this round of traversal, the K load type flags z corresponding to the current weighted classification vector are j,k Form a corresponding prediction vector y i ; and composed of all the weighted classification vectors s j Corresponding to all the predicted vectors y i The corresponding prediction vector sequence Y is output; wherein the probability threshold set is composed of the probability threshold p of the total number K of load types hold,k Composition, each of the probability thresholds p hold,k Corresponding to one of the load types.
3. The processing method of the intelligent load identification model according to claim 2, characterized in that The model data set includes multiple first data records; The first data record includes a first training sequence and a first label vector sequence; The first training sequence is composed of multiple first training sampling data sorted in chronological order; the first training sampling data includes the first training sampling time, the first training sampling current, the first training sampling power, and the first training sampling temperature; The first label vector sequence includes a plurality of first label prediction vectors, and the first label prediction vectors correspond one-to-one to the first training sampling data; each of the first label prediction vectors includes K first label load type flags; the value of each of the first label load type flags is 0 or 1; each of the first label load type flags corresponds to one of the load types.
4. The processing method of the intelligent load identification model according to claim 3, wherein The construction of the model data set specifically includes: Step 41: Regard one or more power consumption scenarios in which the power load contains some or all of the loads such as fixed-frequency air conditioners, variable-frequency air conditioners, electric water heaters, electric heaters, electric kettles, small kitchen water heaters, microwave ovens, induction cookers, rice cookers, electric ovens, dishwashers, washing machines, refrigerators, vacuum cleaners, hair dryers, power banks, electric vehicle battery packs, and battery car batteries as corresponding sampling scenarios; Step 42: Continuously collect the real-time power supply current, real-time power consumption, real-time temperature, and real-time over time of each of the sampling scenarios according to a preset first sampling duration to obtain a corresponding first collection data sequence; and mark the usage status of each load type in the current scenario at each collection time point during the continuous data collection process of each of the sampling scenarios to obtain a corresponding first marking data sequence; Among them, the total sampling duration of the first collection data sequence matches the first sampling duration; the first collection data sequence is composed of a plurality of first collection data sorted in chronological order; the first collection data includes a first collection time, a first collection current, a first collection power, and a first collection temperature; The first marking data sequence is composed of a plurality of first marking data sorted in chronological order, and the first marking data corresponds one-to-one to the first collection data; the first marking data includes K first load type marks; each of the first load type marks corresponds to one of the load types; the value of each of the first load type marks is 0 or 1, and the first load type mark being 0 indicates that the corresponding load type is not in use at the corresponding first collection time, and the first load type mark being 1 indicates that the corresponding load type is in use at the corresponding first collection time; Step 43: Take the input length of the model sequence as the corresponding first sequence length, and perform sliding sequence extraction on each of the first collection data sequences with a preset first sliding step and the first sequence length, and regard each extracted sliding sequence as a corresponding second collection data sequence; and extract the subsequences corresponding to each of the second collection data sequences from the first marking data sequence as the corresponding second marking data sequence; and form a corresponding first sequence pair from each of the second collection data sequences and the corresponding second marking data sequence; Step 44: Take each of the first sequence pairs as the corresponding current sequence pair; take the second acquisition data sequence and the second labeled data sequence of the current sequence pair as the corresponding current acquisition data sequence and current labeled data sequence; take the first acquisition time, the first acquisition current, the first acquisition power, and the first acquisition temperature of each of the first acquisition data in the current acquisition data sequence as a set of corresponding first training sampling time, first training sampling current, first training sampling power, and first training sampling temperature to form a corresponding first training sampling data; take the K first load type labels of each of the first labeled data in the current labeled data sequence as K corresponding first label load type flags to form a corresponding first label prediction vector; sort all the first training sampling data corresponding to the current sequence pair in chronological order to form a corresponding first training sequence; sort all the first label prediction vectors corresponding to the current sequence pair in chronological order to form a corresponding first label vector sequence; and form a corresponding first data record from the first training sequence and the first label vector sequence corresponding to the current sequence pair. Step 45: Form the corresponding model data set from all the first data records obtained.
5. The processing method of the intelligent load identification model according to claim 3, characterized in that The model training of the intelligent load recognition model based on the model data set specifically includes: Step 51: Randomly split the model data set into a corresponding first training set and first evaluation set based on a preset first training evaluation ratio. Among them, the first training evaluation ratio is a preset ratio; both the first training set and the first evaluation set include a plurality of the first data records; the ratio of the total number of records in the first training set to the total number of records in the first evaluation set satisfies the first training evaluation ratio. Step 52: Extract the first data record of the first training set as the corresponding current training record. Step 53: Input the first training sequence of the current training record into the intelligent load recognition model for load classification prediction processing to obtain a corresponding first training prediction vector sequence. Step 54: Substitute the first training prediction vector sequence and the first label vector sequence of the current training record into a preset first model loss function for calculation to obtain a corresponding first loss value. Among them, the first model loss function is implemented based on the multi-class cross-entropy loss function. Step 55: Identify whether the first loss value meets the preset first loss value range; if the first loss value meets the first loss value range, identify whether the current training record is the last first data record of the first training set. If so, go to Step 56; if not, extract the next first data record of the first training set as the new current training record and return to Step 53; if the first loss value does not meet the first loss value range, based on the preset first model parameter optimizer, perform one round of optimization on the model parameters of the first, second, and third classification prediction models in the intelligent load recognition model in the direction of minimizing the first model loss function, and return to Step 53 at the end of this round of optimization; Among them, the first model parameter optimizer includes SGD optimizer and ADAM optimizer; Step 56: Traverse all the first data records of the first evaluation set; and during the traversal, use the currently traversed first data record as the corresponding current evaluation record; input the first training sequence of the current evaluation record into the intelligent load recognition model to perform load classification prediction processing to obtain the corresponding second training prediction vector sequence; and form a corresponding first prediction label pair from the second training prediction vector sequence and the first label vector sequence of the current evaluation record; Step 57: Calculate the precision and recall of multi-classification based on all the obtained first prediction label pairs to obtain the corresponding first precision and first recall; and calculate the F1 score based on the precision and the first recall to obtain the corresponding first F1 score; Step 58: Identify whether the first precision, the first recall, and the first F1 score all meet the corresponding first preset precision range, first preset recall range, and first preset F1 score range; if the first precision does not meet the corresponding first preset precision range or the first recall does not meet the corresponding first preset recall range or the first F1 score does not meet the corresponding first preset F1 score range, return to Step 51 to continue training; if the first precision meets the corresponding first preset precision range and the first recall meets the corresponding first preset recall range and the first F1 score meets the corresponding first preset F1 score range, stop the model training, solidify the model parameters of the intelligent load recognition model, and confirm the end of the model training of the intelligent load recognition model.
6. An apparatus for performing the processing method of the intelligent load identification model according to any one of claims 1-5, characterized in that, The device includes: a model construction module, a data set construction module, a model training module, a data receiving module, and a model application module; The model construction module is used to construct an intelligent load recognition model; The data set construction module is used to construct a model data set; The model training module is used to perform model training on the intelligent load recognition model based on the model data set; The data receiving module is used to receive a time series sequence with current, power, and temperature sampling data after the model training is completed, denoted as the corresponding first input sequence; the first input sequence is composed of J first sequence data sorted in chronological order, where J is the preset input length of the model sequence; the first sequence data includes the first sampling time, the first sampling current, the first sampling power, and the first sampling temperature. The model application module is used to input the first input sequence into the intelligent load recognition model for load classification prediction processing to obtain the corresponding first prediction vector sequence; the first prediction vector sequence includes J first prediction vectors, and the first prediction vectors correspond one-to-one with the first sequence data; each first prediction vector includes K first load type flags, where K is the total number of preset load types; the value of each first load type flag is 0 or 1; each first load type flag corresponds to a load type.
7. An electronic device, characterized in that, Including: A memory, a processor, and a transceiver; The processor is used to be coupled with the memory, read and execute the instructions in the memory to implement the method according to any one of claims 1-5; The transceiver is coupled with the processor, and the processor controls the transceiver to perform message sending and receiving.
8. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions, and when the computer instructions are executed by a computer, the computer is caused to execute the method according to any one of claims 1-5.