A processing method for an intelligent switch to identify and warn of abnormal loads
By allocating an abnormal load counter to each connected power line and using an abnormal load identification model, the intelligent switch solves the problem that the existing technology cannot identify and early warning of abnormal loads in the living room, realizing the timely identification and early warning of abnormal loads caused by charging battery batteries, avoiding fires and other accidents.
Patent Information
- Application Number
- CN202411002218.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-25
- Publication Date
- 2025-06-17
- Estimated Expiration
- 2044-07-25
AI Technical Summary
The prior art cannot effectively identify and warn of abnormal loads caused by charging battery batteries in your home, resulting in fires and other accidents.
After starting, the intelligent switch allocates an abnormal load counter to each connected power line, regularly sample real-time current data, and uses a pre-installed abnormal load recognition model for identification and early warning.
Through the identification and early warning mechanism of intelligent switches, abnormal loads caused by charging of electric vehicle batteries can be identified and warned in a timely manner to avoid the occurrence of fires and other accidents.
Smart Images

Figure CN118968728B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of data processing, and in particular to a processing method for an intelligent switch to identify and warn of abnormal loads. Background Art
[0002] An intelligent switch is a new type of switch / circuit breaker that relies on software means to achieve multi-task concurrent processing functions. The intelligent switch can monitor the real-time current of one or more power lines connected thereto, and can also regularly identify / warn of abnormal current events for each connected line based on a pre-installed current monitoring software.
[0003] In recent years, many fire incidents caused by charging electric vehicle batteries indoors have attracted wide attention from the whole society. If the abnormal load conditions indoors (such as the abnormal load caused by charging electric vehicle batteries indoors) can be timely identified / warned on the grid side, such incidents can be timely avoided. However, there is currently no technical solution on the market that can timely identify / warn of the above abnormal load conditions (the abnormal load caused by charging electric vehicle batteries indoors), and this is also the technical problem to be solved by the present invention. Summary of the Invention
[0004] The purpose of the present invention is to provide a processing method for an intelligent switch to identify and warn of abnormal loads in view of the defects of the prior art. After the intelligent switch of the present invention is started, an abnormal load counter corresponding to each connected first power line is assigned and recorded as the corresponding first line counter, and all counters are initialized to 0; and data sampling is regularly performed on the real-time current on each connected first power line at a preset first time frequency to obtain corresponding first sampling data and added to the corresponding first line sampling sequence; and an abnormal load identification model pre-installed is regularly used at a preset second time frequency to identify abnormal load lines based on all first line sampling sequences to obtain a corresponding first identification list; and the count values of all first line counters are set according to the first identification list; and the first line counters with count values exceeding a preset first threshold are recorded as corresponding first risk counters; and when the total number of first risk counters is not 0, warning information is prepared based on all first risk counters to obtain a corresponding first warning report and sent to a remote first remote server. Through the present invention, specific abnormal load conditions (the abnormal load caused by charging electric vehicle batteries indoors) can be timely identified / warned.
[0005] To achieve the above object, an embodiment of the present invention provides a processing method for an intelligent switch to identify and warn of abnormal loads, the method comprising:
[0006] After the first intelligent switch is started, an abnormal load counter corresponding to each connected first power line is assigned and recorded as the corresponding first line counter; and all the first line counters are initialized to 0;
[0007] And data sampling is regularly performed on the real-time current on each connected first power line at a preset first time frequency to obtain corresponding first sampling data and add it to the corresponding first line sampling sequence;
[0008] And abnormal load line identification is regularly performed according to all the first line sampling sequences at a preset second time frequency to obtain a corresponding first identification list; and the count values of all the first line counters are set according to the first identification list; and the first line counters with count values exceeding a preset first threshold are recorded as corresponding first risk counters; and when the total number of the first risk counters is not 0, corresponding first warning reports are prepared according to all the first risk counters and sent to a remote first remote server.
[0009] Preferably, the first intelligent switch is connected to multiple first power lines, and on the other side of each first power line, a corresponding first household electricity meter or a next-level first intelligent switch is connected; each first household electricity meter corresponds to a household user;
[0010] The first intelligent switch is connected to the first remote server through a wireless communication method or a wired communication method; the wired communication interface includes an HPLC communication interface and a serial communication interface; the wireless communication interface includes a WI FI communication interface, a Bluetooth communication interface, an NFC communication interface, an RF communication interface, and a 4G / 5G / LTE communication interface;
[0011] The first remote server is a next-level first intelligent switch or a remote module, device, terminal, equipment, server, system or platform;
[0012] The first line sampling sequence is formed by sorting multiple first sampling data in chronological order; each first sampling data includes a first sampling time and a first sampling current;
[0013] The first identification list includes multiple first line identification records; the first line identification records correspond one-to-one with the first power lines; the first line identification records include a first line identification field, a first identification time field, and a first identification result field; the first line identification field is the unique line identification of the corresponding first power line; the first identification result field includes abnormal and normal.
[0014] Preferably, an abnormal load identification model is pre-installed in the first intelligent switch;
[0015] The abnormal load recognition model is used to perform abnormal load prediction processing on the current sequence X of the model and output the corresponding prediction vector Y; the model input end of the abnormal load recognition model is used to receive the current sequence X, and the model output end is used to output the prediction vector Y;
[0016] The current sequence X is composed of J current data x j Sorted in chronological order, 1 ≤ index j ≤ J, and J is the preset input length of the model sequence;
[0017] The prediction vector Y consists of two load prediction probabilities, namely the abnormal load prediction probability y1 and the normal load prediction probability y2;
[0018] The abnormal load recognition model includes a wavelet transformation module, a first LSTM model, a second LSTM model, a third LSTM model, a first MLP network, a second MLP network, a third MLP network, and a weighted summation module;
[0019] 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 LSTM model, the second output end is connected to the input end of the second LSTM model, and the third output end is connected to the input end of the third LSTM model;
[0020] The wavelet transformation module is used to extract one low-frequency current feature and two high-frequency current features from the current sequence X based on a preset first wavelet basis to obtain the corresponding first low-frequency feature sequence, first high-frequency feature sequence, and second high-frequency feature sequence; and perform noise reduction and smoothing processing on the first and second high-frequency feature sequences respectively; and after the noise reduction and smoothing processing are completed, perform normalization processing on the first low-frequency feature sequence to obtain the corresponding normalized feature sequence D A Perform normalization processing on the first high-frequency feature sequence to obtain the corresponding normalized feature sequence D B Perform normalization processing on the second high-frequency feature sequence to obtain the corresponding normalized feature sequence D C ; and send the normalized feature sequences D A 、D B 、D C To the corresponding first, second, and third LSTM models; where the first wavelet basis includes at least the coif4 wavelet basis and the db4 wavelet basis;
[0021] The output end of the first LSTM model is connected to the input end of the first MLP network;
[0022] The first LSTM model is used to process the normalized feature sequence DA Extract the temporal features to obtain the corresponding temporal feature vector H A ; and send the temporal feature vector H A to the first MLP network;
[0023] The output end of the second LSTM model is connected to the input end of the second MLP network;
[0024] The second LSTM model is used to extract the temporal features of the normalized feature sequence D B to obtain the corresponding temporal feature vector H B ; and send the temporal feature vector H B to the second MLP network;
[0025] The output end of the third LSTM model is connected to the input end of the third MLP network;
[0026] The third LSTM model is used to extract the temporal features of the normalized feature sequence D C to obtain the corresponding temporal feature vector H C ; and send the temporal feature vector H C to the third MLP network;
[0027] The output end of the first MLP network is connected to the first input end of the weighted summation module;
[0028] The first MLP network is used to perform binary classification prediction according to the temporal feature vector H A to obtain the corresponding binary classification prediction vector P A ; and send the binary classification prediction vector P A to the weighted summation module; the binary classification prediction vector P A consists of two load prediction probabilities, namely the first abnormal load probability p a,1 and the first normal load probability p a,2 ;
[0029] The output end of the second MLP network is connected to the second input end of the weighted summation module;
[0030] The second MLP network is used to perform binary classification prediction according to the temporal feature vector H B to obtain the corresponding binary classification prediction vector P B ; and send the binary classification prediction vector P B to the weighted summation module; the binary classification prediction vector P B consists of two load prediction probabilities, namely the second abnormal load probability p b,1 and the second normal load probability pb,2 ;
[0031] The output end of the third MLP network is connected to the third input end of the weighted summation module;
[0032] The third MLP network is used to perform binary classification prediction according to the timing feature vector H C to obtain a corresponding binary classification prediction vector P C ; and send the binary classification prediction vector P C to the weighted summation module; the binary classification prediction vector P C consists of two load prediction probabilities, namely the third abnormal load probability p c,1 and the third normal load probability p c,2 ;
[0033] The weighted summation module is used to perform weighted summation on the binary classification prediction vectors P A , P B , P C to obtain the corresponding abnormal load prediction probability y1 and the normal load prediction probability y2, which form the corresponding prediction vector Y and output; y1 = w a ×p a,1 +w b ×p b,1 +w c ×p c,1 , y2 = w a ×p a,2 +w b ×p b,2 +w c ×p c,2 ; w a , w b , w c are preset first, second, and third weighting coefficients.
[0034] Preferably, the method further includes:
[0035] Before installing the abnormal load identification model in the first intelligent switch, the abnormal load identification model is trained based on a preset first data set;
[0036] The first data set includes multiple first data records; the first data record includes a first training current sequence and a first label vector; the first label vector consists of two label load prediction probabilities, namely an abnormal load label probability and a normal load label probability; the values of the abnormal and normal load label probabilities are 1 or 0, and the values of the abnormal and normal load label probabilities are mutually exclusive;
[0037] The first training current sequence with an abnormal load label probability of 1 in the first dataset is the current time series sequence collected during indoor charging of the battery of an electric vehicle; the first training current sequence with an abnormal load label probability of 0 in the first dataset is the current time series sequence not collected during indoor charging of the battery of an electric vehicle.
[0038] Further, the model training of the abnormal load recognition model based on the preset first dataset specifically includes:
[0039] Step 51, randomly split the first dataset into a corresponding first training set and a first evaluation set based on a preset first training-evaluation ratio;
[0040] 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;
[0041] Step 52, extract the first first data record in the first training set as the corresponding current training record;
[0042] Step 53, input the first training current sequence of the current training record into the abnormal load recognition model for abnormal load prediction processing to obtain a corresponding first training prediction vector;
[0043] Step 54, bring the first training prediction vector and the first label vector of the current training record into a preset first model loss function for calculation to obtain a corresponding first loss value;
[0044] Among them, the first model loss function includes the L1 loss function, the L2 loss function, and the binary cross-entropy loss function;
[0045] 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, 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, based on a preset first model parameter optimizer, optimize the model parameters of the abnormal load recognition model in the direction of minimizing the first model loss function for one round, and return to Step 53 at the end of this round of optimization;
[0046] Among them, the first model parameter optimizer includes the SGD optimizer and the ADAM optimizer;
[0047] Step 56: Traverse all the first data records in the first evaluation set; during the traversal, use the currently traversed first data record as the corresponding current evaluation record; input the first training current sequence of the current evaluation record into the abnormal load recognition model for abnormal load prediction processing to obtain the corresponding second training prediction vector; and form a corresponding first prediction label pair from the second training prediction vector and the first label vector of the current evaluation record.
[0048] Step 57: Calculate the precision rate and recall rate of binary classification based on all the obtained first prediction label pairs to obtain the corresponding first precision rate and first recall rate; and calculate the corresponding first F1 score based on the rate and the first recall rate.
[0049] 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, 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 abnormal load recognition model, and confirm the end of the model training of the abnormal load recognition model.
[0050] Preferably, the step of regularly identifying abnormal load lines according to all the first line sampling sequences at a preset second time frequency to obtain the corresponding first identification list specifically includes:
[0051] The first intelligent switch traverses all the first line sampling sequences regularly according to the second time frequency; and during this round of traversal, takes the currently traversed first line sampling sequence as the corresponding current sampling sequence; and extracts the subsequence within the most recent first duration in the current sampling sequence as the corresponding current subsequence according to a preset first duration; and inputs the current subsequence into the abnormal load recognition model for abnormal load prediction processing to obtain the corresponding current prediction vector; and takes the unique line identifier of the first power line corresponding to the current sampling sequence as the corresponding first line identifier field; and takes the current switch time as the corresponding first recognition time field; and sets the corresponding first recognition result field to abnormal when the abnormal load prediction probability in the current prediction vector is not lower than the normal load prediction probability, and sets the corresponding first recognition result field to normal when the abnormal load prediction probability in the current prediction vector is lower than the normal load prediction probability; and forms a corresponding first line recognition record from the obtained first line identifier field, first recognition time field, and first recognition result field; and at the end of this round of traversal, forms the corresponding first recognition list from all the obtained first line recognition records.
[0052] Preferably, setting the count values of all the first line counters according to the first recognition list specifically includes:
[0053] The first intelligent switch records the first line recognition records with the first recognition result field being abnormal in the first recognition list as the corresponding first abnormal records; and when the total number of the first abnormal records is not 0, traverses all the first abnormal records; and during the traversal, takes the currently traversed first abnormal record as the corresponding current record; and takes the first line counter corresponding to the current record as the corresponding current counter; and increments the count value of the current counter by 1.
[0054] And records the first line recognition records with the first recognition result field being normal in the first recognition list as the corresponding first normal records; and when the total number of the first normal records is not 0, traverses all the first normal records; and during the traversal, takes the currently traversed first normal record as the corresponding current record; and takes the first line counter corresponding to the current record as the corresponding current counter; and clears the count value of the current counter.
[0055] Preferably, when the total number of the first risk counters is not 0, preparing a warning information corresponding to the first warning report according to all the first risk counters and sending it to the remote first remote server, specifically includes:
[0056] When the total number of the first risk counters is not zero, the first intelligent switch traverses all the first risk counters; and during the traversal, the currently traversed first risk counter is used as the corresponding current counter; and the unique line identifier of the first power line corresponding to the current counter is used as the corresponding first warning line identifier; and the current switch time is used as the corresponding first line warning time; and the preset indoor battery charging warning prompt information for electric vehicles is used as the corresponding first warning information; and a corresponding first warning record is formed by the first warning line identifier, the first line warning time, and the first warning information; and at the end of the traversal, all the obtained first warning records form the corresponding first warning report and are sent to the first remote server.
[0057] An embodiment of the present invention provides a method for an intelligent switch to identify and warn against abnormal loads. As can be seen from the above content, after the intelligent switch in the embodiment of the present invention is started, an abnormal load counter corresponding to each connected first power line is allocated and recorded as the corresponding first line counter, and all counters are initialized to 0; and the real-time current on each connected first power line is sampled regularly at a preset first time frequency to obtain the corresponding first sampling data and added to the corresponding first line sampling sequence; and an abnormal load identification model pre-installed is used regularly at a preset second time frequency to identify abnormal load lines according to all the first line sampling sequences to obtain the corresponding first identification list; and the count values of all the first line counters are set according to the first identification list; and the first line counters with count values exceeding a preset first threshold are recorded as the corresponding first risk counters; and when the total number of the first risk counters is not zero, warning information is prepared according to all the first risk counters to obtain the corresponding first warning report and sent to the remote first remote server. Through the embodiment of the present invention, specific abnormal load situations (abnormal loads caused by bringing electric vehicle batteries into the indoor for charging) can be identified / warned in a timely manner. Description of the Drawings
[0058] Figure 1 Schematic diagram of a method for an intelligent switch to identify and warn against abnormal loads provided by an embodiment of the present invention;
[0059] Figure 2 Schematic diagram of the connection relationship among the first intelligent switch, the first household electricity meter, and the first remote server provided by an embodiment of the present invention;
[0060] Figure 3 Schematic diagram of the modules of the abnormal load identification model provided by an embodiment of the present invention. Detailed Embodiments
[0061] In order to make the objectives, technical solutions and advantages of the present invention more clear, 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.
[0062] A processing method for an intelligent switch to identify and warn of abnormal loads provided by an embodiment of the present invention is as follows Figure 1 As shown in the schematic diagram of the processing method for an intelligent switch to identify and warn of abnormal loads provided by an embodiment of the present invention, it mainly includes the following steps:
[0063] Step 1, after the first intelligent switch is started, allocate a corresponding abnormal load counter for each connected first power line, denoted as the corresponding first line counter; and initialize all the first line counters to 0.
[0064] Here, the first intelligent switch in the embodiment of the present invention is a new type of switch / circuit breaker that relies on software means to implement multi-task concurrent processing functions. The embedded operating system of the first intelligent switch is an embedded real-time operating system that supports time-sharing task scheduling, such as RTOS, FreeRTOS, etc.
[0065] As Figure 2 As shown in the schematic connection diagram of the first intelligent switch, the first household electricity meter and the first remote server provided by the embodiment of the present invention, the first intelligent switch in the embodiment of the present invention is connected to multiple first power lines, and the other side of each first power line is also connected to a corresponding first household electricity meter or a lower-level first intelligent switch; each first household electricity meter corresponds to a household user; in addition, the first intelligent switch is connected to the first remote server through a wireless communication method or a wired communication method; the first remote server is an upper-level first intelligent switch or a remote module, device, terminal, equipment, server, system or platform; the wired communication interface includes an HPLC communication interface and a serial communication interface; the wireless communication interface includes a WI F I communication interface, a Bluetooth communication interface, an NFC communication interface, an RF communication interface and a 4G / 5G / LTE communication interface.
[0066] It should also be noted that an abnormal load identification model is pre-installed in the first intelligent switch in the embodiment of the present invention. The abnormal load identification model is used to perform abnormal load prediction processing according to the current sequence X of the model and output the corresponding prediction vector Y; among them, the model input end of the abnormal load identification model is used to receive the current sequence X, and the model output end is used to output the prediction vector Y; the current sequence X is composed of J current data x jSorted in chronological order, 1 ≤ index j ≤ J, where J is the preset input length of the model sequence; the prediction vector Y consists of two load prediction probabilities, namely the abnormal load prediction probability y1 and the normal load prediction probability y2.
[0067] As Figure 3 As shown in the module schematic diagram of the abnormal load identification model provided by the embodiment of the present invention, the abnormal load identification model of the embodiment of the present invention includes a wavelet transformation module, a first LSTM model, a second LSTM model, a third LSTM model, a first MLP network, a second MLP network, a third MLP network, and a weighted summation module; among them:
[0068] 1) Wavelet transformation module:
[0069] As Figure 3 As shown, 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 LSTM model, the second output end is connected to the input end of the second LSTM model, and the third output end is connected to the input end of the third LSTM model;
[0070] The wavelet transformation module is used to extract a low-frequency current feature and two high-frequency current features from the current sequence X based on a preset first wavelet basis to obtain corresponding first low-frequency feature sequence, first high-frequency feature sequence, and second high-frequency feature sequence; and perform noise reduction and smoothing processing on the first and second high-frequency feature sequences respectively; and after the noise reduction and smoothing processing are completed, perform normalization processing on the first low-frequency feature sequence to obtain the corresponding normalized feature sequence D A and perform normalization processing on the first high-frequency feature sequence to obtain the corresponding normalized feature sequence D B and perform normalization processing on the second high-frequency feature sequence to obtain the corresponding normalized feature sequence D C ; and send the normalized feature sequences D A 、D B 、D C to the corresponding first, second, and third LSTM models; where the first wavelet basis includes at least coif4 wavelet basis and db4 wavelet basis;
[0071] 2) First LSTM model + first MLP network:
[0072] The output end of the first LSTM model is connected to the input end of the first MLP network; the output end of the first MLP network is connected to the first input end of the weighted summation module;
[0073] The first LSTM model is used to extract the temporal features of the normalized feature sequence D A to obtain the corresponding temporal feature vector H A ; and the temporal feature vector HA Send to the first MLP network;
[0074] The first MLP network is used to perform binary classification prediction based on the time series feature vector H A to obtain the corresponding binary classification prediction vector P A ; and send the binary classification prediction vector P A to the weighted summation module; where the binary classification prediction vector P A consists of two load prediction probabilities, namely the first abnormal load probability p a,1 and the first normal load probability p a,2 ;
[0075] 3) The second LSTM model + the second MLP network:
[0076] The output end of the second LSTM model is connected to the input end of the second MLP network; the output end of the second MLP network is connected to the second input end of the weighted summation module;
[0077] The second LSTM model is used to extract the time series features of the normalized feature sequence D B to obtain the corresponding time series feature vector H B ; and send the time series feature vector H B to the second MLP network;
[0078] The second MLP network is used to perform binary classification prediction based on the time series feature vector H B to obtain the corresponding binary classification prediction vector P B ; and send the binary classification prediction vector P B to the weighted summation module; the binary classification prediction vector P B consists of two load prediction probabilities, namely the second abnormal load probability p b,1 and the second normal load probability p b,2 ;
[0079] 4) The third LSTM model + the third MLP network:
[0080] The output end of the third LSTM model is connected to the input end of the third MLP network; the output end of the third MLP network is connected to the third input end of the weighted summation module;
[0081] The third LSTM model is used to extract the time series features of the normalized feature sequence D C to obtain the corresponding time series feature vector H C ; and send the time series feature vector H C to the third MLP network;
[0082] The third MLP network is used to perform binary classification prediction based on the time series feature vector H CPerform binary classification prediction to obtain the corresponding binary classification prediction vector P C ; and send the binary classification prediction vector P C to the weighted summation module; the binary classification prediction vector P C consists of two load prediction probabilities, namely the third abnormal load probability p c,1 and the third normal load probability p c,2 ;
[0083] 5) Weighted summation module:
[0084] The weighted summation module is used to perform weighted summation on the binary classification prediction vectors P A , P B , P C to obtain the corresponding abnormal load prediction probability y1 and normal load prediction probability y2, form the corresponding prediction vector Y and output;
[0085] Among them,
[0086] y1 = w a × p a,1 + w b × p b,1 + w c × p c,1 ,
[0087] y2 = w a × p a,2 + w b × p b,2 + w c × p c,2 ;
[0088] w a 、w b 、w c are the preset first, second, and third weighting coefficients.
[0089] It should also be noted that before installing the abnormal load identification model in the first intelligent switch, it is necessary for the upper-level management party of the first intelligent switch to perform model training on the abnormal load identification model based on the preset first data set, and after the model training is completed, install the abnormal load identification model on the first intelligent switch; this upper-level management party can be an upper-level server, system, or platform, and the upper-level management party can install the model on the first intelligent switch through manual installation or remote download and installation.
[0090] It should also be noted that the specific implementation steps for the above-mentioned upper-level management party to perform model training on the abnormal load identification model based on the preset first data set are as shown in the following steps A1 - A8:
[0091] Step A1: Randomly split the first data set into a corresponding first training set and a first evaluation set based on a preset first training-evaluation ratio;
[0092] Among them, the first training-evaluation ratio is a preset ratio, such as 8:2;
[0093] The first data set includes multiple first data records; the first data record includes a first training current sequence and a first label vector; the first label vector consists of two label load prediction probabilities, namely an abnormal load label probability and a normal load label probability; the values of the abnormal and normal load label probabilities are 1 or 0, and the values of the abnormal and normal load label probabilities are mutually exclusive; the first training current sequence with an abnormal load label probability of 1 in the first data set is the current time series sequence collected during the indoor charging of the battery of the battery-powered vehicle, and the first training current sequence with an abnormal load label probability of 0 in the first data set is the current time series sequence not collected during the indoor charging of the battery of the battery-powered vehicle;
[0094] 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;
[0095] Step A2: Extract the first first data record in the first training set as the corresponding current training record;
[0096] Step A3: Input the first training current sequence of the current training record into the abnormal load recognition model for abnormal load prediction processing to obtain a corresponding first training prediction vector;
[0097] Step A4: Substitute the first training prediction vector and the first label vector of the current training record into a preset first model loss function for calculation to obtain a corresponding first loss value;
[0098] Among them, the first model loss function includes an L1 loss function, an L2 loss function, and a binary cross-entropy loss function;
[0099] Step A5: 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 A6. If not, extract the next first data record in the first training set as the new current training record and return to Step A3; if the first loss value does not meet the first loss value range, optimize the model parameters of the abnormal load recognition model once in the direction of minimizing the first model loss function based on a preset first model parameter optimizer, and return to Step A3 at the end of this round of optimization;
[0100] Among them, the first loss value range is a pre-set loss value range; the first model parameter optimizer includes the SGD optimizer and the ADAM optimizer;
[0101] Step A6: 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 current sequence of the current evaluation record into the abnormal load recognition model for abnormal load prediction processing to obtain the corresponding second training prediction vector; and form a corresponding first prediction label pair from the second training prediction vector and the first label vector of the current evaluation record.
[0102] Step A7: Calculate the precision and recall of binary classification based on all the obtained first prediction label pairs to obtain the corresponding first precision and first recall; and calculate the corresponding first F1 score based on the rate and the first recall.
[0103] Step A8: Identify whether the first precision, the first recall, and the first F1 score all meet the corresponding first preset precision range, the first preset recall range, and the 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, then return to Step A1 to continue training; if the first precision meets the corresponding first preset precision range, the first recall meets the corresponding first preset recall 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 abnormal load recognition model, and confirm the end of the model training of the abnormal load recognition model.
[0104] Here, the first preset precision range is a pre-set precision range, the first preset recall range is a pre-set recall range, and the first preset F1 score range is a pre-set F1 score range.
[0105] Step 2: The first intelligent switch regularly samples the real-time current on each of the connected first power lines at a preset first time frequency to obtain the corresponding first sampling data and adds it to the corresponding first line sampling sequence.
[0106] Among them, the first time frequency is a pre-set time frequency parameter; the first line sampling sequence is formed by sorting multiple first sampling data in chronological order; each first sampling data includes the first sampling time and the first sampling current.
[0107] Step 3: The first intelligent switch regularly identifies abnormal load lines according to all the first-line sampling sequences at a preset second time frequency to obtain a corresponding first identification list; sets the count values of all the first-line counters according to the first identification list; marks the first-line counters with count values exceeding the preset first threshold as corresponding first risk counters; and when the total number of the first risk counters is not zero, prepares a warning message according to all the first risk counters to obtain a corresponding first warning report and sends it to the remote first remote server.
[0108] Specifically, it includes: Step 31: The first intelligent switch regularly identifies abnormal load lines according to all the first-line sampling sequences at a preset second time frequency to obtain a corresponding first identification list.
[0109] Among them, the second time frequency is a preset time frequency parameter; the first identification list includes multiple first-line identification records; the first-line identification records correspond one by one to the first power lines; the first-line identification records include a first-line identification field, a first identification time field, and a first identification result field; the first-line identification field is the unique line identification of the corresponding first power line; the first identification result field includes abnormal and normal.
[0110] Specifically, it includes: The first intelligent switch regularly traverses all the first-line sampling sequences at the second time frequency; during this round of traversal, takes the currently traversed first-line sampling sequence as the corresponding current sampling sequence; extracts the subsequence within the most recent first duration in the current sampling sequence as the corresponding current subsequence according to the preset first duration; inputs the current subsequence into the abnormal load identification model for abnormal load prediction processing to obtain a corresponding current prediction vector; takes the unique line identification of the first power line corresponding to the current sampling sequence as the corresponding first-line identification field; takes the current switch time as the corresponding first identification time field; when the abnormal load prediction probability of the current prediction vector is not lower than the normal load prediction probability, sets the corresponding first identification result field as abnormal, and when the abnormal load prediction probability of the current prediction vector is lower than the normal load prediction probability, sets the corresponding first identification result field as normal; forms a corresponding first-line identification record from the obtained first-line identification field, first identification time field, and first identification result field; and at the end of this round of traversal, forms the corresponding first identification list from all the obtained first-line identification records.
[0111] Step 32: The first intelligent switch sets the count values of all the first-line counters according to the first identification list.
[0112] Specifically, it includes: Step 321, the first intelligent switch records the first line recognition record with the first recognition result field being abnormal in the first recognition list as the corresponding first abnormal record; and when the total number of records in the first abnormal record is not 0, traverse all the first abnormal records; and during the traversal process, regard the currently traversed first abnormal record as the corresponding current record; and regard the first line counter corresponding to the current record as the corresponding current counter; and increment the count value of the current counter by 1.
[0113] Step 322, the first intelligent switch records the first line recognition record with the first recognition result field being normal in the first recognition list as the corresponding first normal record; and when the total number of records in the first normal record is not 0, traverse all the first normal records; and during the traversal process, regard the currently traversed first normal record as the corresponding current record; and regard the first line counter corresponding to the current record as the corresponding current counter; and clear the count value of the current counter.
[0114] Step 33, the first intelligent switch records the first line counters with count values exceeding the preset first threshold as the corresponding first risk counters.
[0115] Here, the first threshold is a preset positive integer value.
[0116] Step 34, when the total number of the first risk counters is not 0, the first intelligent switch prepares a warning information based on all the first risk counters to obtain the corresponding first warning report and sends it to the remote first remote server.
[0117] Specifically, it includes: when the total number of the first risk counters is not 0, the first intelligent switch traverses all the first risk counters; and during the traversal, regard the currently traversed first risk counter as the corresponding current counter; and regard the unique line identifier of the first power line corresponding to the current counter as the corresponding first warning line identifier; and regard the current switch time as the corresponding first line warning time; and regard the preset indoor battery charging warning prompt information as the corresponding first warning information; and form a corresponding first warning record from the first warning line identifier, the first line warning time and the first warning information; and at the end of the traversal, form the corresponding first warning report from all the obtained first warning records and send it to the first remote server.
[0118] An embodiment of the present invention provides a method for an intelligent switch to identify and warn of abnormal loads. As can be seen from the above content, after the intelligent switch in the embodiment of the present invention is started, an abnormal load counter corresponding to each connected first power line is assigned, denoted as the corresponding first line counter, and all counters are initialized to 0; and the real-time current on each connected first power line is sampled regularly at a preset first time frequency to obtain corresponding first sampling data and added to the corresponding first line sampling sequence; and an abnormal load identification model pre-installed is used regularly at a preset second time frequency to identify abnormal load lines according to all first line sampling sequences to obtain a corresponding first identification list; and the count values of all first line counters are set according to the first identification list; and the first line counters with count values exceeding a preset first threshold are denoted as corresponding first risk counters; and when the total number of first risk counters is not 0, warning information is prepared according to all first risk counters to obtain a corresponding first warning report and sent to a remote first remote server. Through the embodiment of the present invention, specific abnormal load situations (abnormal loads caused by bringing a battery of an electric vehicle into a living room for charging) can be identified / warned in a timely manner.
[0119] Those skilled in the art should also be able to 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 composition 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.
[0120] The steps of the method or algorithm 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), 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 well-known in the technical field.
[0121] The specific embodiments described above further elaborate on the purpose, technical solution, and beneficial effects of the present invention. It should be understood that the above is only the specific embodiment of the present invention and is not used to limit the protection scope of the present invention. Any modification, equivalent replacement, improvement, 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 method for intelligent switch to identify and warn abnormal load, characterized in that: The method comprises: After the first intelligent switch is started, a corresponding abnormal load counter is allocated to each connected first power line as the corresponding first line counter; and all the first line counters are initialized to 0; And regularly sampling the real-time current on each first power line connected according to a preset first time frequency to obtain corresponding first sampling data and add it to the corresponding first line sampling sequence; And regularly identify abnormal load lines according to all the first line sampling sequences at a preset second time frequency to obtain a corresponding first identification list; and set count values for all the first line counters according to the first identification list; and record the first line counters whose count values exceed the preset first threshold as corresponding first risk counters; and when the total number of the first risk counters is not 0, prepare warning information according to all the first risk counters to obtain a corresponding first warning report and send it to a remote first remote service end; Among them, an abnormal load identification model is pre-installed in the first intelligent switch; the abnormal load identification model is used to perform abnormal load prediction processing according to the current sequence X of the model and output the corresponding prediction vector Y; the model input end of the abnormal load identification model is used to receive the current sequence X, and the model output end is used to output the prediction vector Y; the current sequence X is composed of J current data x j The prediction vector Y is arranged in chronological order, 1≤indexj≤J, where J is the preset model sequence input length; the prediction vector Y is composed of two load prediction probabilities, namely, abnormal load prediction probability y1 and normal load prediction probability y2; The abnormal load identification model includes a wavelet transformation module, a first LSTM model, a second LSTM model, a third LSTM model, a first MLP network, a second MLP network, a third MLP network and a weighted summation module; The input end of the wavelet conversion module is connected to the input end of the model; the first output end of the wavelet conversion module is connected to the input end of the first LSTM model, the second output end is connected to the input end of the second LSTM model, and the third output end is connected to the input end of the third LSTM model; The wavelet conversion module is used to extract a low-frequency current feature and two high-frequency current features from the current sequence X based on a preset first wavelet basis to obtain a corresponding first low-frequency feature sequence, a first high-frequency feature sequence, and a second high-frequency feature sequence; and to perform noise reduction and smoothing processing on the first high-frequency feature sequence and the second high-frequency feature sequence respectively; and after the noise reduction and smoothing processing is completed, the first low-frequency feature sequence is normalized to obtain a corresponding normalized feature sequence D A , normalize the first high-frequency feature sequence to obtain a corresponding normalized feature sequence D B , normalize the second high-frequency feature sequence to obtain a corresponding normalized feature sequence D C ; and the normalized feature sequence D A , the normalized feature sequence D B , the normalized feature sequence D C Send to the corresponding first LSTM model, the second LSTM model, and the third LSTM model; wherein the first wavelet basis includes at least a coif4 wavelet basis and a db4 wavelet basis; The output end of the first LSTM model is connected to the input end of the first MLP network; the first LSTM model is used to normalize the feature sequence D A The time series features are extracted to obtain the corresponding time series feature vector H A ; and the time series feature vector H A Sending to the first MLP network; The output end of the second LSTM model is connected to the input end of the second MLP network; the second LSTM model is used to normalize the feature sequence D B The time series features are extracted to obtain the corresponding time series feature vector H B ; and the time series feature vector H B Sending to the second MLP network; The output end of the third LSTM model is connected to the input end of the third MLP network; the third LSTM model is used to normalize the feature sequence D C The time series features are extracted to obtain the corresponding time series feature vector H C ; and the time series feature vector H C Sending to the third MLP network; The output end of the first MLP network is connected to the first input end of the weighted summation module; the first MLP network is used to calculate the time series feature vector H according to the time series feature vector H A Perform binary classification prediction to obtain the corresponding binary classification prediction vector P A ; And the binary classification prediction vector P A Send to the weighted sum module; the binary classification prediction vector P A It consists of two load forecast probabilities, namely the first abnormal load probability p a,1 and the first normal load probability p a,2 ; The output end of the second MLP network is connected to the second input end of the weighted summation module; the second MLP network is used to calculate the time series feature vector H according to the time series feature vector H B Perform binary classification prediction to obtain the corresponding binary classification prediction vector P B ; And the binary classification prediction vector P B Send to the weighted sum module; the binary classification prediction vector P B It consists of two load forecast probabilities, namely the second abnormal load probability p b,1 and the second normal load probability p b,2 ; The output end of the third MLP network is connected to the third input end of the weighted summation module; the third MLP network is used to calculate the time series feature vector H according to the time series feature vector H C Perform binary classification prediction to obtain the corresponding binary classification prediction vector P C ; And the binary classification prediction vector P C Send to the weighted sum module; the binary classification prediction vector P C It consists of two load forecast probabilities, namely the third abnormal load probability p c,1 and the third normal load probability p c,2 ; The weighted summation module is used to calculate the binary prediction vector P A , the binary classification prediction vector P B , the binary classification prediction vector P C Perform weighted summation to obtain the corresponding abnormal load prediction probability y1 and the normal load prediction probability y2 to form the corresponding prediction vector Y and output it; y1 = w a ×p a,1 +w b ×p b,1 +w c ×p c,1 , y2=w a ×p a,2 +w b ×p b,2 +w c ×p c,2 ;w a 、w b 、w c The first weighting coefficient, the second weighting coefficient and the third weighting coefficient are preset.
2. The method for identifying and warning abnormal loads by an intelligent switch according to claim 1 is characterized in that: The first intelligent switch is connected to a plurality of the first power lines, and the other side of each of the first power lines is also connected to a corresponding first household electricity meter or a first intelligent switch of a next level; each of the first household electricity meters corresponds to a household user; The first intelligent switch is connected to the first remote service end through wireless communication or wired communication; the wired communication interface includes an HPLC communication interface and a serial communication interface; the wireless communication interface includes a WIFI communication interface, a Bluetooth communication interface, an NFC communication interface, an RF communication interface and a 4G / 5G / LTE communication interface; The first remote server is the first intelligent switch of an upper level or a remote module, device, terminal, equipment, server, system or platform; The first line sampling sequence is formed by a plurality of first sampling data arranged in chronological order; each of the first sampling data includes a first sampling time and a first sampling current; The first identification list includes a plurality of first line identification records; the first line identification records correspond one to one with the first power lines; the first line identification records include a first line identification field, a first identification time field and a first identification result field; The first line identification field is a unique line identification of the corresponding first power line; the first identification result field includes abnormal and normal.
3. The method for identifying and warning abnormal loads by an intelligent switch according to claim 1 is characterized in that: The method further comprises: Before installing the abnormal load identification model in the first intelligent switch, performing model training on the abnormal load identification model based on a preset first data set; The first data set includes a plurality of first data records; the first data record includes a first training current sequence and a first label vector; the first label vector consists of two label load prediction probabilities, namely, an abnormal load label probability and a normal load label probability; the values of the abnormal load label probability and the normal load label probability are 1 or 0, and the values of the abnormal load label probability and the normal load label probability are mutually exclusive; The first training current sequence in the first data set in which the probability of the abnormal load label is 1 is a current time series sequence collected when the electric vehicle battery is charged indoors; the first training current sequence in the first data set in which the probability of the abnormal load label is 0 is a current time series sequence collected when the electric vehicle battery is not charged indoors.
4. The method for identifying and warning abnormal loads by an intelligent switch according to claim 3 is characterized in that: The performing model training on the abnormal load recognition model based on the preset first data set specifically includes: Step 51, randomly splitting the first data set into corresponding first training sets and first evaluation sets based on a preset first training evaluation ratio; Wherein, the first training evaluation ratio is a preset ratio; the first training set and the first evaluation set both 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, extracting the first first data record of the first training set as the corresponding current training record; Step 53, inputting the first training current sequence of the current training record into the abnormal load recognition model to perform abnormal load prediction processing to obtain a corresponding first training prediction vector; Step 54, bringing the first training prediction vector and the first label vector of the current training record into a preset first model loss function to calculate and obtain a corresponding first loss value; Wherein, the first model loss function includes L1 loss function, L2 loss function and binary cross entropy loss function; Step 55, identifying whether the first loss value satisfies a preset first loss value range; if the first loss value satisfies the first loss value range, identifying whether the current training record is the last first data record of the first training set, if so, turning to step 56, if not, extracting the next first data record of the first training set as the new current training record and returning to step 53; if the first loss value does not satisfy the first loss value range, optimizing the model parameters of the abnormal load identification model in a direction of minimizing the first model loss function based on a preset first model parameter optimizer, and returning to step 53 at the end of this round of optimization; Wherein, the first model parameter optimizer includes an SGD optimizer and an ADAM optimizer; Step 56, traverse all the first data records of the first evaluation set; and during the traversal, use the first data record currently traversed as the corresponding current evaluation record; and input the first training current sequence of the current evaluation record into the abnormal load recognition model to perform abnormal load prediction processing to obtain a corresponding second training prediction vector; and form a corresponding first prediction label pair by the second training prediction vector and the first label vector of the current evaluation record; Step 57, calculating the corresponding first precision and first recall rate according to the precision and recall rate of binary classification of all the first predicted label pairs obtained; and calculating the F1 score according to the first precision and the first recall rate to obtain the corresponding first F1 score; Step 58, identifying whether the first precision, the first recall and the first F1 score all satisfy the corresponding first preset precision range, the first preset recall range and the first preset F1 score range; if the first precision does not satisfy the corresponding first preset precision range or the first recall does not satisfy the corresponding first preset recall range or the first F1 score does not satisfy the corresponding first preset F1 score range, returning to step 51 to continue training; if the first precision satisfies the corresponding first preset precision range and the first recall satisfies the corresponding first preset recall range and the first F1 score satisfies the corresponding first preset F1 score range, stopping model training, solidifying the model parameters of the abnormal load identification model, and confirming that the model training of the abnormal load identification model is completed.
5. The method for identifying and warning abnormal loads by an intelligent switch according to claim 2 is characterized in that: The step of regularly identifying abnormal load lines according to all the first line sampling sequences at a preset second time frequency to obtain a corresponding first identification list specifically includes: The first intelligent switch periodically traverses all the first line sampling sequences according to the second time frequency; and in the process of this round of traversal, the first line sampling sequence currently traversed is used as the corresponding current sampling sequence; and the subsequence within the latest first time length in the current sampling sequence is extracted according to the preset first time length as the corresponding current subsequence; and the current subsequence is input into the abnormal load recognition model for abnormal load prediction processing to obtain the corresponding current prediction vector; and the unique line identifier of the first power line corresponding to the current sampling sequence is used as the corresponding first line identifier field; and the current switching time is used as the corresponding first identification time field; and when the abnormal load prediction probability of the current prediction vector is not lower than the normal load prediction probability, the corresponding first identification result field is set to abnormal, and when the abnormal load prediction probability of the current prediction vector is lower than the normal load prediction probability, the corresponding first identification result field is set to normal; and the obtained first line identifier field, the first identification time field and the first identification result field form a corresponding first line identification record; and at the end of this round of traversal, all the obtained first line identification records form the corresponding first identification list.
6. The method for identifying and warning abnormal loads by an intelligent switch according to claim 2 is characterized in that: The step of setting count values of all the first line counters according to the first identification list specifically includes: The first intelligent switch records the first line identification record in the first identification list where the first identification result field is abnormal as the corresponding first abnormal record; and when the total number of the first abnormal records is not 0, traverses all the first abnormal records; and during the traversal process, takes the first abnormal record currently traversed as the corresponding current record; and takes the first line counter corresponding to the current record as the corresponding current counter; and adds 1 to the count value of the current counter; And the first line identification record whose first identification result field in the first identification list is normal is recorded as the corresponding first normal record; and when the total number of the first normal records is not 0, all the first normal records are traversed; and during the traversal process, the first normal record currently traversed is taken as the corresponding current record; and the first line counter corresponding to the current record is taken as the corresponding current counter; and the count value of the current counter is cleared.
7. The method for identifying and warning abnormal loads by an intelligent switch according to claim 1 is characterized in that: The preparing warning information according to all the first risk counters to obtain a corresponding first warning report when the total number of the first risk counters is not 0 and sending it to the remote first remote server specifically includes: When the total number of the first risk counters is not 0, the first intelligent switch traverses all the first risk counters; and when traversing, takes the first risk counter currently traversed as the corresponding current counter; and takes the unique line identifier of the first power line corresponding to the current counter as the corresponding first warning line identifier; and takes the current switching time as the corresponding first line warning time; and takes the preset indoor electric vehicle battery charging warning prompt information as the corresponding first warning information; and the first warning line identifier, the first line warning time and the first warning information form a corresponding first warning record; and at the end of the traversal, all the first warning records obtained form the corresponding first warning report and send it to the first remote service end.
Citation Information
Patent Citations
Cloud electric meter system based on Internet of Things intelligent circuit breaker and control method
CN111711272A
Intelligent electric meter with memorable display device and charging pile
CN211014486U