A load event detection method based on power time series image features
By preprocessing and imaging the load power time series data, and combining time series change point detection with YOLO target detection, the problems of insufficient accuracy and poor noise resistance of existing load event detection methods are solved, and high-precision load event detection is achieved.
Patent Information
- Application Number
- CN202511030234.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-25
- Publication Date
- 2025-09-16
- Estimated Expiration
- 2045-07-25
AI Technical Summary
Existing load event detection methods have problems such as insufficient accuracy, weak noise resistance, and poor adaptability to complex scenarios with multiple devices.
By preprocessing the load power time series data, a two-dimensional power curve image is generated. The time series change point detection algorithm is used to locate the change point area, and the YOLO target detection algorithm is combined for classification and positioning. Finally, secondary correction is performed through local trend analysis and event feature template matching.
It improves the accuracy and noise resistance of event detection, improves adaptability in complex multi-device scenarios, and reduces misclassification and missed detections.
Smart Images

Figure CN120526240B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of electric load monitoring, and in particular to a load event detection method based on power time series image features. Background Art
[0002] With the rapid development of smart grids and energy management systems, the application of non-intrusive load monitoring (NILM) technology in areas such as home energy consumption optimization, device status monitoring, and energy efficiency assessment is gaining increasing attention. NILM technology infers the operating status of various electrical devices by monitoring power parameters (such as voltage, current, or power) on the bus, eliminating the need to install expensive hardware sensors, thereby achieving low-cost, high-efficiency energy management. This technology not only helps users understand their home energy consumption but also assists in optimizing grid scheduling and promoting the development of smart energy management. Among the many research directions of NILM technology, load event detection is considered a key link. Load events refer to the switching actions or operating state transitions of electrical devices. These events are often accompanied by power fluctuations, providing important clues for device identification.
[0003] Existing load event detection methods have problems such as insufficient accuracy, weak noise resistance, and poor adaptability to complex scenarios with multiple devices. In view of this, a load event detection method based on power time series image features is provided. Summary of the Invention
[0004] The purpose of the present invention is to provide a load event detection method based on power time series image features to solve the problems of insufficient accuracy, weak noise resistance and poor adaptability to complex scenarios with multiple devices in the existing load event detection methods proposed in the above background technology.
[0005] To achieve the above object, the present invention provides a load event detection method based on power time series image features, comprising the following steps:
[0006] S1. Obtain load power time series data in real time through sensors and perform preprocessing operations on the collected load power time series data;
[0007] S2. Segment the load power time series data using a window segmentation method based on the preprocessed data, and plot the segmented data into a two-dimensional power curve image;
[0008] S3, locating the change point area using a time series change point detection algorithm based on the generated two-dimensional power curve image;
[0009] S4. Classify and locate the load event based on the obtained change point area using the YOLO target detection algorithm;
[0010] S5. Based on the target detection results, the starting point and end point of the event identified during the target detection process are secondary corrected based on the local trend analysis algorithm.
[0011] As a further improvement of the present technical solution, in S1, load power time series data is acquired in real time by sensors, and a preprocessing operation is performed on the collected load power time series data, wherein the specific steps of the preprocessing operation are:
[0012] S1.1. Identify and remove outliers using statistical methods and fill missing values using interpolation.
[0013] S1.2. Based on S1.1, the load power time series data is filtered by sliding average and transformed by wavelet to smooth the data and remove high-frequency noise, respectively;
[0014] S1.3. Based on the filtered load power time series data, normalization is performed using the Z-Score to convert data of different scales into the same range.
[0015] As a further improvement of the present technical solution, in S2, the specific steps of segmenting the load power time series data by a window segmentation method based on the preprocessed data and drawing the segmented data into a two-dimensional power curve image are as follows:
[0016] S2.1. Split the original time series into fixed time windows;
[0017] S2.2. Map each window to a horizontal axis with time , the vertical axis is the power value 2D image.
[0018] As a further improvement of the present technical solution, in S3, the specific steps of locating the change point area by using the time series change point detection algorithm based on the generated two-dimensional power curve image are as follows:
[0019] S3.1. Initialize the reference mean , reference standard deviation and the starting value of the CUSUM statistic , where the starting value of the CUSUM statistic is ;
[0020] S3.2. Setting thresholds based on confidence levels ;
[0021] S3.3. Based on the observed values , use the CUSUM algorithm to update the CUSUM statistic and the following CUSUM statistic ;
[0022] S3.4, the result obtained in S3.3 and With threshold Compare, mark or The time point is the change point area, and when the statistic falls below the threshold, the CUSUM statistic is reset to continue monitoring.
[0023] As a further improvement of the present technical solution, in S4, the specific steps of classifying and locating the load event using the YOLO target detection algorithm based on the obtained change point region are as follows:
[0024] S4.1. Train the YOLO model based on the power curve image of the change point region as training data.
[0025] S4.2. The power curve image of the new change point area is used as input and sent to the trained YOLO model to classify and locate the load event.
[0026] As a further improvement of this technical solution, in S4.1, the specific steps of constructing the YOLO model are:
[0027] S4.1.1. Build the YOLO model based on Darknet-19 as the backbone network, define the convolutional layers, and define the pooling layers and fully connected layers based on max pooling.
[0028] S4.1.2. Predict multiple bounding boxes for each grid cell and calculate their positions and sizes;
[0029] S4.1.3. Calculate the predicted category probability for each grid cell based on the softmax function;
[0030] S4.1.4. Define the YOLO loss function based on the positioning center point loss function, positioning width and height loss function, target confidence loss function, non-target confidence loss function and classification loss function. The mathematical expression of the loss function of the YOLO model is:
[0031] ;
[0032] in, ;
[0033] ;
[0034] ;
[0035] ;
[0036] ;
[0037] Where, represents the total loss function; Represents the positioning center point loss function; Represents the positioning width and height loss function; Indicates that there is a target confidence loss function; represents the target-free confidence loss function; represents the classification loss function; represents the coordinate weight coefficient; represents the background confidence weight; Indicates the grid size; Represents the cell index; Represents the bounding box index; Represents the center of the prediction box coordinate; Represents the center of the prediction box coordinate; Indicates the center of the real box coordinate; Indicates the center of the ground truth box coordinate; Indicates the prediction box width; Indicates the height of the prediction box; Indicates the real box width; Indicates the real frame height; Represents the confidence of the prediction box; Indicates the true confidence; represents the predicted category probability; represents the true category probability; Represents the set of boxes containing the target; Represents the set of boxes that do not contain the target; Represents the set of all possible categories.
[0038] As a further improvement of the present technical solution, in S5, based on the result of target detection, the specific steps of performing secondary correction on the start and end points of events identified during the target detection process based on the local trend analysis algorithm are as follows:
[0039] S5.1. Perform secondary correction on the start and end points of the target detection model output events based on the local trend analysis algorithm.
[0040] S5.2. Based on the detection results after secondary correction, an event feature template matching algorithm is introduced to compare the similarity between the template and the detection results.
[0041] As a further improvement of the present technical solution, in S5.1, the specific steps of performing secondary correction on the start and end points of the target detection model output events based on the local trend analysis algorithm are as follows:
[0042] S5.1.1. Use a moving window technique to calculate the local trend at each point;
[0043] S5.1.2. Based on the slope change threshold, the first point that deviates from the initial trend is set as the new starting point, and the last point that deviates from the final trend is set as the new end point.
[0044] As a further improvement of the present technical solution, in S5.2, based on the detection result after secondary correction, the specific steps of introducing the event feature template matching algorithm to compare the similarity between the template and the detection result are as follows:
[0045] S5.2.1. Establish a standard signature template for each type of load event;
[0046] S5.2.2. The similarity score between the detection event and the template is calculated based on the dynamic time warping method. The mathematical expression for calculating the similarity score between the detection event and the template is:
[0047] ;
[0048] in, ;
[0049] Where, Represents the similarity score, which is the detection event With template The similarity measure between them, the smaller the value, the more similar they are; represents the dynamic time warping distance, which is used to measure the cumulative distance between two time series under the optimal alignment path; represents a time series of detection events; Indicates the template time series; Indicates that the detection event is The value at each time point; Presentation Template In the The value at each time point; represents the time-aligned path, Representing a sequence of events The time point index, Represents a template sequence The time point index, represents the path length; represents the set of all legal alignment paths;
[0050] S5.2.3. Based on the similarity scores obtained in S5.2.2, arrange them in ascending order and select the template with the smallest distance as the final classification result.
[0051] Compared with the prior art, the present invention has the following beneficial effects:
[0052] 1. This load event detection method based on power time series image features converts abstract time series data into visual information with identifiable spatial features, retains event morphological details, solves the problem that traditional threshold methods are sensitive to noise and cannot capture event morphological features, and provides structured input for subsequent target detection.
[0053] 2. In this load event detection method based on power time series image features, the local slope is fitted through a sliding window, and the start and end points of the event are corrected by the slope change, eliminating the positioning deviation of the YOLO bounding box, especially improving the start and end point accuracy of slowly changing events, solving the problem that the target detection model is insensitive to the boundaries of gradually changing events, and improving the accuracy of event segmentation.
[0054] 3. In this load event detection method based on power time series image features, the DTW algorithm is used to calculate the optimal alignment path distance between the detection event and the template, eliminating the influence of time axis expansion and deformation, being compatible with different durations of similar events, solving the problem that traditional Euclidean distance is sensitive to time phase, improving the robustness of similarity evaluation, and reducing misclassification.
[0055] 4. This load event detection method based on power time series image features uses dynamically updated upper / lower CUSUM statistics, combined with threshold-marked change point areas, to adaptively detect small power offsets and reduce missed detections. The statistic reset mechanism avoids false alarm accumulation, replacing the fixed threshold method, accurately locating suspected event areas in noisy environments, significantly reducing the YOLO processing range and improving efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0056] Figure 1 The figure is a flow chart of the overall method of the present invention. DETAILED DESCRIPTION
[0057] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of the present invention.
[0058] Example: See Figure 1 As shown, this embodiment provides a load event detection method based on power time series image features, including the following steps:
[0059] S1. Obtain load power time series data in real time through sensors, and perform preprocessing operations on the collected load power time series data.
[0060] In this embodiment S1, the load power time series data includes a timestamp and a power value.
[0061] The load power time series data is acquired in real time through the sensor, and the collected load power time series data is preprocessed. The specific steps of the preprocessing operation are as follows:
[0062] S1.1. Identify and remove outliers using statistical methods and fill missing values using interpolation.
[0063] S1.2. Based on S1.1, the load power time series data is filtered by sliding average and transformed by wavelet to smooth the data and remove high-frequency noise, respectively;
[0064] S1.3. Based on the filtered load power time series data, normalization is performed using the Z-Score to convert data of different scales into the same range.
[0065] S2. Based on the preprocessed data, the load power time series data is segmented by a window segmentation method, and the segmented data (each time series) is plotted into a two-dimensional power curve image.
[0066] In this embodiment S2, the specific steps of segmenting the load power time series data by a window segmentation method based on the pre-processed data and plotting the segmented data into a two-dimensional power curve image are as follows:
[0067] S2.1. Split the original time series into fixed time windows to match the time scale of typical load events. The fixed time window length is N seconds to ensure that each window contains complete load event characteristics. The selection of window length needs to comprehensively consider the event duration and data resolution to balance feature integrity and computational efficiency.
[0068] S2.2. Map each window to a horizontal axis with time , the vertical axis is the power value Two-dimensional image of (i.e., two-dimensional power curve image);
[0069] At the same time, by introducing color coding (such as dynamically adjusting the curve color according to the power change rate) or curve morphology (such as thickness or texture), the ability of the two-dimensional power curve image to express load characteristics is enhanced, thereby providing rich information input for subsequent target detection.
[0070] S3. Based on the generated two-dimensional power curve image, the change point area is located using the time series change point detection algorithm (cumulative sum change detection algorithm).
[0071] In this embodiment S3, the specific steps of locating the change point area using the time series change point detection algorithm (cumulative sum change detection algorithm) based on the generated two-dimensional power curve image are as follows:
[0072] S3.1. Initialize the reference mean , reference standard deviation and the starting value of the CUSUM statistic , where the starting value of the CUSUM statistic is ;
[0073] S3.2. Setting thresholds based on confidence levels ;
[0074] S3.3. Based on the observed values , use the CUSUM algorithm to update the CUSUM statistic and the following CUSUM statistic , then update the upper CUSUM statistic and the following CUSUM statistic The mathematical expression is:
[0075] ;
[0076] ;
[0077] Where, Indicates the upper CUSUM statistic, which is the time The value of is used to detect positive offset; Indicates at a point in time Observed process data; represents the reference mean; Indicates the deviation tolerance threshold, usually set to the process offset size Half of , used to control sensitivity to small offsets; Indicates the CUSUM statistic at the last moment The value of Indicates the CUSUM statistic, which is the time The value of is used to detect negative offset; Indicates that the next CUSUM statistic is at the previous moment The value of
[0078] in, ;
[0079] Where, Indicates the mean value under normal process conditions, that is, the reference mean value; It represents the mean value after the process shifts; it represents the standard deviation of the process under normal conditions, that is, the reference standard deviation;
[0080] S3.4, the result obtained in S3.3 and With threshold Compare, mark or The time point is the change point area, and when the statistic falls below the threshold, the CUSUM statistic is reset to continue monitoring.
[0081] S4. Based on the obtained change point area, the load event is classified and located using the YOLO target detection algorithm.
[0082] In this embodiment S4, the specific steps of classifying and locating the load event using the YOLO target detection algorithm based on the obtained change point area are as follows:
[0083] S4.1. Train the YOLO model based on the power curve image of the change point region as training data.
[0084] S4.2. The power curve image of the new change point area is used as input and sent to the trained YOLO model to classify and locate the load event.
[0085] In this embodiment S4.1, the specific steps of constructing the YOLO model are:
[0086] S4.1.1. Build a YOLO model based on Darknet-19 as the backbone network, define convolutional layers, and define pooling layers and fully connected layers based on max pooling. Convolutional layers are used to extract features, pooling layers are used for downsampling, and fully connected layers are used for final prediction.
[0087] Furthermore, the convolutional layer uses a convolutional neural network (CNN) to extract features from the input power curve image, capturing the differences in the event's time domain and power values. This process generates a feature map that reflects key characteristics of the load event, such as the mutation point, duration, and power change amplitude.
[0088] S4.1.2. Predict multiple bounding boxes for each grid cell and calculate their positions and sizes;
[0089] S4.1.3. Calculate the predicted category probability for each grid cell based on the softmax function;
[0090] S4.1.4. Based on the positioning center point loss function, positioning width and height loss function, target confidence loss function, non-target confidence loss function and classification loss function, the loss function of the YOLO model is defined. The mathematical expression of the loss function of the YOLO model is:
[0091] ;
[0092] in, ;
[0093] ;
[0094] ;
[0095] ;
[0096] ;
[0097] Where, Represents the total loss function, which measures the error between the model's predicted value and the true value; Represents the positioning center point loss function; Represents the positioning width and height loss function; Indicates that there is a target confidence loss function; represents the target-free confidence loss function; represents the classification loss function; Represents the coordinate weight coefficient, which controls the proportion of positioning loss. Its value range is ; Represents the background confidence weight, and its value range is ; Indicates the grid division size, the image is divided into cells; Represents the cell index; Represents the bounding box index; Represents the center of the prediction box Coordinates are the normalized position coordinates; Represents the center of the prediction box Coordinates are the normalized position coordinates; Indicates the center of the ground truth box Coordinates are the corresponding real-world annotation values; Indicates the center of the real box Coordinates are the corresponding real-world labeled values; Indicates the width of the prediction box, which is the ratio relative to the entire image; Indicates the height of the prediction box, which is the ratio relative to the entire image; Indicates the true box width, which is the corresponding true annotation value; Indicates the real box height, which is the corresponding real annotation value; Represents the confidence of the predicted box, which is the probability that the box contains the target; Indicates the true confidence, which is 1 if there is a target, otherwise 0; Represents the predicted category probability, which is the Box predictions belong to the category probability; represents the true category probability; Represents the set of boxes containing the target, and only calculates the loss for the real targets; Represents a set of boxes that do not contain the target, and only calculates the confidence loss for the background area; Represents the set of all possible categories.
[0098] S5. Based on the target detection results (i.e., the classification results obtained by the YOLO model), the start and end points of the events identified during the target detection process are secondary corrected using a local trend analysis algorithm (region screening is completed to remove noise points that do not meet the characteristics of load events. For example, by setting a power change threshold or event duration range, interference from random fluctuations or abnormal data is eliminated, ensuring the credibility of the change point area), improving the accuracy of event detection.
[0099] In this embodiment, based on the target detection results, the specific steps of performing secondary correction on the start and end points of events identified during the target detection process based on the local trend analysis algorithm are as follows:
[0100] S5.1. Perform secondary correction on the start and end points of the target detection model output events based on the local trend analysis algorithm.
[0101] S5.2. Based on the detection results after secondary correction, the similarity between the template and the detection results is compared through the event feature template matching algorithm.
[0102] In this embodiment S5.1, the specific steps of performing secondary correction on the start and end points of the target detection model output events based on the local trend analysis algorithm are as follows:
[0103] S5.1.1. Use a moving window technique to calculate the local trend at each point;
[0104] S5.1.2. Based on the slope change threshold, the first point that deviates from the initial trend is set as the new starting point, and the last point that deviates from the final trend is set as the new end point.
[0105] Based on the slope change threshold, the first point that deviates from the initial trend is set as the new starting point, and the last point that deviates from the final trend is set as the new end point. The specific steps are:
[0106] For each point, take a A linear least squares fit is performed within the window to obtain the local slope;
[0107] Calculate the difference between two adjacent local slopes to get the slope change ;
[0108] Define a slope change threshold ;
[0109] Scan from left to right and find the first slope change that satisfies Greater than the slope change threshold The point is the new starting point, then the new starting point is ;
[0110] Scan from right to left and find the last slope change that satisfies Greater than the slope change threshold The point is the new end point, then the new end point is .
[0111] In S5.2 of this embodiment, based on the secondary corrected detection results, in a scenario where multiple device loads overlap, an event feature template matching algorithm is introduced to avoid confusion between event features of different devices. The specific steps for comparing the similarity between the template and the detection results using the event feature template matching algorithm are as follows:
[0112] S5.2.1. Establish a standard signature template for each type of load event;
[0113] S5.2.2. The similarity score between the detection event and the template is calculated based on the dynamic time warping method. The mathematical expression for calculating the similarity score between the detection event and the template is:
[0114] ;
[0115] in, ;
[0116] Where, Represents the similarity score, which is the detection event With template The similarity measure between them, the smaller the value, the more similar they are; represents the dynamic time warping distance, which is used to measure the cumulative distance between two time series under the optimal alignment path; represents a time series of detection events; Indicates the template time series; Indicates that the detection event is The value at each time point; Presentation Template In the The value at each time point; represents the time-aligned path, Representing a sequence of events The time point index, Represents a template sequence The time point index, represents the path length; represents the set of all legal alignment paths;
[0117] To ensure the path If the two time series are properly aligned, the path The boundary constraints are:
[0118] ;
[0119] ;
[0120] Where, represents the first time point of the detection event sequence; Indicates the last time point of the detection event sequence; Indicates the last time point of the template sequence; Indicates the length of the detection event sequence; Indicates the length of the template sequence;
[0121] path The monotonicity constraints are:
[0122] ;
[0123] ;
[0124] Where, Represents the first of the detection event sequence time points; Represents the first of the detection event sequence time points; The template sequence time points; The template sequence time points;
[0125] path The continuity constraints are:
[0126] ;
[0127] ;
[0128] S5.2.3. Based on the similarity scores obtained in S5.2.2, sort them in ascending order and select the template with the smallest distance as the final classification result. By comparing the similarity between the template and the detection result, event classification is decoupled from the characteristics between devices, thereby ensuring the rationality of the detection result.
[0129] The optimized detection results are output as an event list, including detailed information such as event type, start and end time, and power change characteristics. These results can be further used in application scenarios such as load identification, power analysis, or abnormality warning.
[0130] Furthermore, in order to verify the effectiveness of the method of the present invention, an experimental test was carried out using an actual load data set.
[0131] The dataset uses a public REDD dataset and a self-built multi-device load dataset, including household electricity consumption scenarios and industrial equipment scenarios. The dataset contains power time series of multiple electrical devices, covering various load events such as switching and regulation.
[0132] The load event detection method based on traditional change point detection and the detection method based on frequency domain analysis are selected for comparison;
[0133] The detection results are evaluated using precision, recall and F1 value;
[0134] It is implemented in Python environment and combined with TensorFlow or PyTorch framework to train deep learning models;
[0135] Experimental results show that the detection method of the present invention performs significantly better than the comparison method in the load event detection task:
[0136] On the REDD dataset, the accuracy reached 95.6%, the recall rate reached 93.2%, and the F1 value was 94.4%;
[0137] The accuracy rate on the self-built multi-device dataset is 92.8%, the recall rate is 90.5%, and the F1 value is 91.6%;
[0138] The robustness to noise interference is significantly improved, especially in low signal-to-noise ratio scenarios, showing higher detection accuracy.
[0139] The above shows and describes the basic principles, main features, and advantages of the present invention. Those skilled in the art should understand that the present invention is not limited to the above embodiments. The above embodiments and descriptions are merely preferred examples of the present invention and are not intended to limit the present invention. Various changes and improvements may be made to the present invention without departing from the spirit and scope of the present invention. Such changes and improvements fall within the scope of the present invention. The scope of protection claimed in the present invention is defined by the appended claims and their equivalents.
Claims
1. A load event detection method based on power time series image features, characterized by: The following steps are involved: S1. Acquire load power time series data in real time and perform preprocessing operations on the collected load power time series data; S2. Segment the load power time series data using a window segmentation method based on the preprocessed data, and plot the segmented data into a two-dimensional power curve image; S3, locating the change point area using a time series change point detection algorithm based on the generated two-dimensional power curve image; S4. Classify and locate the load event based on the obtained change point area using the YOLO target detection algorithm; S5. Based on the target detection results, a secondary correction is performed on the start and end points of the events identified during the target detection process using a local trend analysis algorithm; In S3, the specific steps of locating the change point area using the time series change point detection algorithm based on the generated two-dimensional power curve image are as follows: S3.
1. Initialize the reference mean , reference standard deviation and the starting value of the CUSUM statistic , where the starting value of the CUSUM statistic is ; S3.
2. Setting thresholds based on confidence levels ; S3.
3. Based on the observed values , use the CUSUM algorithm to update the CUSUM statistic and the following CUSUM statistic ; S3.4, the result obtained in S3.3 and With threshold Compare, mark or The time point is the change point area, and when the statistic falls below the threshold, the CUSUM statistic is reset to continue monitoring.
2. The load event detection method based on power time series image features according to claim 1 is characterized in that: In S1, load power time series data is acquired in real time, and preprocessing operations are performed on the collected load power time series data, wherein the specific steps of the preprocessing operation are: S1.
1. Identify and remove outliers and fill in missing values; S1.2, based on the load power time series data in S1.1, smooth the data by sliding average filtering and remove high-frequency noise by wavelet transform; S1.
3. Normalization is performed on the filtered load power time series data to convert data of different scales into the same range.
3. The load event detection method based on power time series image features according to claim 1, characterized in that: In S2, the specific steps of segmenting the load power time series data by a window segmentation method based on the pre-processed data and plotting the segmented data into a two-dimensional power curve image are as follows: S2.
1. Split the original time series into fixed time windows; S2.
2. Map each window to a horizontal axis with time , the vertical axis is the power value 2D image.
4. The load event detection method based on power time series image features according to claim 1, characterized in that: In S4, the specific steps of classifying and locating the load event using the YOLO target detection algorithm based on the obtained change point area are as follows: S4.
1. Train the YOLO model based on the power curve image of the change point region as training data. S4.
2. The power curve image of the new change point area is used as input and sent to the trained YOLO model for classifying and locating load events.
5. The load event detection method based on power time series image features according to claim 4 is characterized in that: In S4.1, the specific steps of building the YOLO model are: S4.1.
1. Build the YOLO model based on Darknet-19 as the backbone network, define the convolutional layers, and define the pooling layers and fully connected layers based on max pooling. S4.1.
2. Predict multiple bounding boxes for each grid cell and calculate their positions and sizes; S4.1.
3. Calculate the predicted category probability for each grid cell based on the softmax function; S4.1.
4. Based on the positioning center point loss function, positioning width and height loss function, target confidence loss function, non-target confidence loss function and classification loss function, the loss function of the YOLO model is defined. The mathematical expression of the loss function of the YOLO model is: ; in, ; ; ; ; ; Where, represents the total loss function; Represents the positioning center point loss function; Represents the positioning width and height loss function; Indicates that there is a target confidence loss function; represents the target-free confidence loss function; represents the classification loss function; represents the coordinate weight coefficient; represents the background confidence weight; Indicates the grid size; Represents the cell index; Represents the bounding box index; Represents the center of the prediction box coordinate; Represents the center of the prediction box coordinate; Indicates the center of the ground truth box coordinate; Indicates the center of the ground truth box coordinate; Indicates the prediction box width; Indicates the height of the prediction box; Indicates the real box width; Indicates the real frame height; Represents the confidence of the prediction box; Indicates the true confidence; represents the predicted category probability; represents the true category probability; Represents the set of boxes containing the target; Represents the set of boxes that do not contain the target; Represents the set of all possible categories.
6. The load event detection method based on power time series image features according to claim 1, characterized in that: In S5, based on the result of target detection, the specific steps of performing secondary correction on the start and end points of events identified during target detection based on the local trend analysis algorithm are as follows: S5.
1. Perform secondary correction on the start and end points of the target detection model output events based on the local trend analysis algorithm. S5.
2. Based on the detection results after secondary correction, an event feature template matching algorithm is introduced to compare the similarity between the template and the detection results.
7. The load event detection method based on power time series image features according to claim 6, characterized in that: In S5.1, the specific steps of performing secondary correction on the start and end points of the target detection model output events based on the local trend analysis algorithm are as follows: S5.1.
1. Use a moving window technique to calculate the local trend at each point; S5.1.
2. Based on the slope change threshold, the first point that deviates from the initial trend is set as the new starting point, and the last point that deviates from the final trend is set as the new end point.
8. The load event detection method based on power time series image features according to claim 7 is characterized in that: In S5.2, based on the detection result after secondary correction, the specific steps of introducing the event feature template matching algorithm to compare the similarity between the template and the detection result are: S5.2.
1. Establish a standard signature template for each type of load event; S5.2.
2. The similarity score between the detection event and the template is calculated based on the dynamic time warping method. The mathematical expression for calculating the similarity score between the detection event and the template is: ; in, ; Where, Represents the similarity score, which is the time series of detection events With the Template time series The similarity measure between them, the smaller the value, the more similar they are; represents the dynamic time warping distance, which is used to measure the cumulative distance between two time series under the optimal alignment path; Indicates that the detection event is The value at each time point; Indicates the Template time series In the The value at each time point; represents the time-aligned path, Represents a time series of detection events The time point index, Indicates the Template time series The time point index, represents the path length; represents the set of all legal alignment paths; S5.2.
3. Based on the similarity scores obtained in S5.2.2, arrange them in ascending order and select the template with the smallest distance as the final classification result.
Citation Information
Patent Citations
Low-frequency non-intrusive load monitoring method and system based on adaptive event detection
CN118656722A
Cold-wave weather occurrence period identification method based on Prophet algorithm
CN119719890A