Event detection method, device, equipment and storage medium for non-intrusive load monitoring system
By using the sliding window and incremental window methods in a non-intrusive load monitoring system, combined with filter technology, the state changes of electrical equipment can be accurately detected, the problem of accuracy in detecting small-power electrical appliance events is solved, and reliable monitoring of small-power electrical appliances is achieved.
Patent Information
- Application Number
- CN202510941443.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-09
- Publication Date
- 2025-09-16
- Estimated Expiration
- 2045-07-09
AI Technical Summary
In existing non-intrusive load monitoring systems, it is difficult to accurately detect event changes of small-power electrical appliances and they are easily affected by transient pulse interference, resulting in inaccurate detection results.
The sliding window and incremental window methods are used, combined with the mean filter and median filter. By calculating the rise and fall metrics of the sliding window and the event accumulation information, the operating status changes of the electrical equipment are judged, reducing the possibility of missed detection of pulse interference and low-power events.
The accuracy of low-power electrical appliance event detection is improved, misjudgment caused by pulse interference is reduced, and the reliability of event detection and real-time monitoring capabilities are enhanced.
Smart Images

Figure CN120448928B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of load monitoring technology, and in particular to an event detection method, device, equipment and storage medium for a non-intrusive load monitoring system. Background Art
[0002] Smart electricity consumption is a key component of the Smart Grid (SM). Load monitoring (LM), as a crucial component of advanced measurement systems, is a cornerstone of the Smart Grid. Traditional load monitoring uses an intrusive approach, installing sensors on each user's electrical device to record usage. This approach is difficult to implement and has high implementation costs. Non-intrusive load monitoring (NILM) breaks down a user's total load into individual devices, thereby capturing information such as device energy consumption and user usage patterns. Compared to intrusive load monitoring, NILM offers lower cost and greater practicality.
[0003] The typical framework of an NILM system typically includes five major steps: data measurement, data processing, event detection, feature extraction, and load identification. Event detection in load monitoring technology refers to the process of identifying changes in the status of electrical equipment by analyzing power load data. Event detection is a core component of load monitoring technology and is primarily used to detect the usage of electrical equipment, such as its on / off status and power changes. Event detection provides information on changes in the operating status of electrical equipment and is typically implemented using two methods: rule-based judgment and change point detection. The difficulty in event detection lies in the small changes in the sampled signal when low-power electrical appliances are put into operation, and the presence of transient pulse interference. Summary of the Invention
[0004] The present application aims to at least solve the technical problems existing in the prior art and provide an event detection method, device, equipment and storage medium for a non-intrusive load monitoring system.
[0005] In a first aspect, the present invention provides an event detection method for a non-intrusive load monitoring system, comprising:
[0006] Acquiring user electricity consumption data, where the user electricity consumption data includes a measurement data sequence;
[0007] Construct a sliding window and control the sliding window to slide from the first data of the measurement data sequence to the last data of the measurement data sequence. The length of the measurement data sequence is recorded as , the length of the sliding window is recorded as , , the total number of sliding positions is recorded as ,but ;
[0008] Calculate the rise and fall metrics of the sliding window at each sliding position respectively, where the rise and fall metrics are physical quantities that can represent the changing trend of the measurement data;
[0009] Determine event accumulation information based on the rise and fall metrics of the sliding window at each sliding position; the event accumulation information includes the cumulative value of the measurement data change and the cumulative value of the duration;
[0010] The change in the operating status of the electrical equipment is determined based on the cumulative value of the measurement data change and the cumulative value of the duration, and the event detection result is obtained.
[0011] In a second aspect, the present invention provides an event detection device for a non-intrusive load monitoring system, the device comprising:
[0012] An acquisition module is used to acquire user electricity consumption data, where the user electricity consumption data includes a measurement data sequence;
[0013] The sliding window control module is used to construct a sliding window and control the sliding window to slide from the first data of the measurement data sequence to the last data of the measurement data sequence. The length of the measurement data sequence is recorded as , the length of the sliding window is recorded as , , the total number of sliding positions is recorded as ,but ;
[0014] The first processing module is used to calculate the rise and fall metrics of the sliding window at each sliding position, where the rise and fall metrics are physical quantities that can represent the change trend of the measurement data;
[0015] The second processing module is used to determine event accumulation information based on the rise and fall metrics of the sliding window at each sliding position; the event accumulation information includes the cumulative value of the measurement data change and the cumulative value of the duration;
[0016] The output module is used to determine the change in the operating status of the electrical equipment based on the cumulative value of the measurement data change and the cumulative value of the duration, and obtain the event detection result.
[0017] In a third aspect, the present invention provides an electronic device, comprising:
[0018] at least one processor; and,
[0019] a memory communicatively connected to the at least one processor; wherein,
[0020] The memory stores a computer program executable by the at least one processor. The computer program is executed by the at least one processor to enable the at least one processor to perform the above-mentioned event detection method for the non-intrusive load monitoring system.
[0021] In a fourth aspect, the present invention further provides a computer-readable storage medium, wherein the computer-readable storage medium stores at least one computer program, and the at least one computer program is executed by a processor in an electronic device to implement the above-mentioned event detection method for a non-intrusive load monitoring system.
[0022] In summary, this application has the following beneficial technical effects:
[0023] The change in the user's active power is judged based on the rise and fall metrics of the sliding window at each sliding position, thereby judging whether an event has occurred in the sliding window (the event includes the connection or shutdown of the electrical device); for consecutive sliding windows with the same change trend (the measurement data in the sliding window has the same upward trend or downward trend), the event accumulation information of the consecutive sliding windows with the same change trend is calculated, the rise and fall metrics of the consecutive sliding windows with the same change trend are accumulated, and based on the event accumulation information, it is judged whether an event has occurred in the measurement data corresponding to the consecutive sliding windows with the same change trend. This can reduce the possibility of missing small power events due to the small value of the rise and fall metrics of a single sliding window, so as to facilitate the user's detection of events such as the connection or shutdown of small power appliances and improve the accuracy of event detection results;
[0024] On the basis of the sliding window, the additional incremental window is introduced to reduce the possibility of event misjudgment caused by pulse interference, and the mean error factor is introduced to avoid misjudgment of rising and falling trends;
[0025] During the data processing, compared with the traditional median filter, an additional mean filter is added to reduce pulse interference while retaining the trend changes of the original data. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] Figure 1 A schematic flow chart of an event detection method for a non-intrusive load monitoring system provided by one embodiment of the present invention;
[0027] Figure 2 The event detection algorithm flow chart of the event detection method for the non-intrusive load monitoring system corresponding to the original measurement data processed;
[0028] Figure 3 Schematic diagram comparing the waveforms of measurement data obtained by the traditional data processing method and the data processing method of the present application;
[0029] Figure 4 A schematic diagram of marking event detection results in measurement data for the non-invasive monitoring system of the present application;
[0030] Figure 5 Schematic diagram of event detection results predicted based on event accumulation information;
[0031] Figure 6 A schematic structural diagram of an electronic device for implementing the event detection method for a non-intrusive load monitoring system provided by an embodiment of the present invention.
[0032] Reference numerals: 10, processor; 11, memory; 12, communication bus; 13, communication interface.
[0033] The purpose, features and advantages of the present invention will be further described with reference to the accompanying drawings and in conjunction with the embodiments. DETAILED DESCRIPTION
[0034] The following describes embodiments of the present invention in detail. Examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are intended only to explain the present invention and are not to be construed as limiting the present invention.
[0035] In the description of the present invention, it should be understood that the terms "longitudinal", "transverse", "up", "down", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inside", "outside", etc., indicating the orientation or position relationship, are based on the orientation or position relationship shown in the accompanying drawings, and are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as limiting the present invention.
[0036] In the description of the present invention, unless otherwise specified and limited, it should be noted that the terms "installed", "connected" and "connected" should be understood in a broad sense. For example, it can be a mechanical connection or an electrical connection, or it can be the internal communication between two components. It can be a direct connection or an indirect connection through an intermediate medium. For ordinary technicians in this field, the specific meanings of the above terms can be understood according to the specific circumstances.
[0037] Reference Figure 1 FIG. 1 is a flow chart of an event detection method for a non-intrusive load monitoring system according to an embodiment of the present invention. In this embodiment, the event detection method for a non-intrusive load monitoring system includes:
[0038] S1. Obtain user electricity consumption data.
[0039] The user electricity usage data includes a measurement data sequence. In the preferred implementation of this embodiment, the steps of obtaining the user electricity usage data are described by taking the method of obtaining one set of measurement data sequences as an example. Specifically, the steps of obtaining the user electricity usage data include:
[0040] S11. Obtain original measurement data.
[0041] The original measurement data can be the user's current data over a certain period of time, or the user's active power over a certain period of time; at the smart meter measurement level, active power is the core basis for users to pay electricity bills. Therefore, in the preferred implementation of this embodiment, the original measurement data is the user's home active power; active power refers to the power consumption of electrical equipment connected to the user's circuit.
[0042] S12. Process the original measurement data to obtain a measurement data sequence.
[0043] Before performing event detection on the original measurement data, the original measurement data is first processed. The method of data processing for the original measurement data in this application is to pass the original measurement data through the mean filter and the median filter in sequence; specifically, the length of the original measurement data is set to , the original measurement data is recorded as ,in is the index of the original measurement data. The length of the original measurement data specifically refers to the number of data in the original measurement data.
[0044] It should be noted that in actual use scenarios, it is necessary to monitor the changes in the user's active power (or other physical quantities such as current) in real time. The processing of measurement data and event detection is a continuous process. In this embodiment, the length of the original measurement data is defined as , is only for the convenience of introducing the event detection method of the present application; therefore, the event detection method of the non-intrusive load monitoring system of the present application is also applicable to the real-time processing of user electricity consumption data, so as to realize real-time monitoring of user electricity consumption.
[0045] When processing the original measurement data, the original measurement data is first passed through a mean filter. The length of the single side of the mean filter is , The value is a positive integer greater than zero, and the mean filter input data is , the mean filter output data is , the calculation expression of the mean filter during data processing is:
[0046]
[0047] in, Represents the window index of the mean filter, The value of ,Will The value of .
[0048] After that, the output data of the mean filter is Input median filter, the length of one side of the median filter is , The value is a positive integer greater than zero, and the median filter output data is , the calculation expression of the mean filter during data processing is:
[0049]
[0050] Among them, The value of ,Will The value of , Indicates the median operation; the final output This is the measurement data sequence.
[0051] Figure 3 Schematic diagram comparing the waveforms of the measurement data obtained by the traditional data processing method and the data processing method of the present application. In this embodiment, the single-side length of the mean filter is 1, the single-side length of the median filter is 1, Figure 3 The measurement data from positions 2000 to 9000 are extracted from the measurement data sequence and displayed.
[0052] Figure 3 The blue curve in the figure represents the waveform corresponding to the original measurement data. Figure 3 The red curve in the figure shows the waveform of the measurement data processed by the traditional median filter. Figure 3 The pink curve in the figure represents the waveform corresponding to the measured data sequence processed by the mean filter and the median filter in this application. In the event detection of the non-intrusive load monitoring system, the traditional data processing process only performs median filtering on the original measured data; Figure 3 Compared with the traditional data processing method (filtering method), this application additionally adds a mean filter, which reduces pulse interference while retaining the step change trend of the original data, thereby improving the accuracy of event detection results.
[0053] S2. Build a sliding window and control the sliding window to slide from the first data of the measurement data sequence as the starting point to the last data of the measurement data sequence.
[0054] The length of the sliding window is recorded as , The length of the sliding window specifically refers to the number of data in the sliding window; the actual value Much smaller than ( ), then there are sliding positions, and the total number of sliding positions is recorded as , ; The sliding window includes a left sub-window and a right sub-window connected in sequence. Specifically, the left sub-window of the sliding window The data on the right side of the sliding window is called the left subwindow. The data is called the right subwindow, that is, the length of the left subwindow is , the length of the right subwindow is , and there are .
[0055] Since the data length after data processing is , then the sliding window starts from the first point of the data and slides to the end of the data. Sliding positions, the total number of sliding window sliding positions corresponding to the measurement data sequence is recorded as .
[0056] S3. Calculate the rise and fall metrics of the sliding window at each sliding position respectively.
[0057] The rise and fall metric is a physical quantity that can represent the changing trend of the measured data. It can be used to determine the change of the current in the circuit or the change of the power consumption of the electrical equipment.
[0058] Specifically, the steps of respectively calculating the rise and fall metrics of the sliding window at each sliding position include:
[0059] S31, respectively calculate the mean of the left sub-window at all sliding positions, and respectively calculate the mean of the right sub-window at all sliding positions .
[0060] Slide position The corresponding left sub-window mean is recorded as , slide the position The corresponding right sub-window mean is recorded as ; Indicates the sliding position index;
[0061] Left subwindow mean The calculation expression is:
[0062] ;
[0063] in, Indicates the window index of the left subwindow, represents the measurement data in the left subwindow;
[0064] Right subwindow mean The calculation expression is: ;
[0065] in, Indicates the window index of the right subwindow, Represents the measurement data in the right subwindow.
[0066] S32, according to the left sub-window mean and the right subwindow mean Calculate the sliding window position The rise and fall measurement of .
[0067] Specifically, if , indicating that the measured data (current value or active power) in this sliding window shows an upward trend; if , indicating that the measured data (current value or active power) in this sliding window shows a downward trend.
[0068] In order to reduce the and The possibility of misjudging the upward and downward trends of the measured data due to being too close is introduced. ,when and The absolute value of the difference is less than the first mean error factor When , it is considered that the sliding window does not show an obvious upward or downward trend, and the upward or downward metric is set to 0; In addition, since non-event impulse noise is easily generated when switching electrical equipment or switching sockets (for example Figure 4 The position where the data index value of the measured data is 7000 is the position where the non-event impulse noise occurs). In order to reduce the and The large difference leads to the possibility of judging the pulse error as an event, so the second mean error factor is introduced. ,when and The absolute value of the difference is greater than the second mean error factor When the signal is detected, it is considered that there may be pulse noise interference or sudden access of high-power electrical equipment.
[0069] In order to distinguish between impulse noise interference (non-event impulse noise) and the situation where high-power electrical equipment is connected (event occurs), this technical solution introduces an incremental window. Specifically, the incremental window after the sliding window is defined. The data is called an incremental window. The incremental window may not be activated during the calculation of the rise and fall metrics. It is activated when the preset conditions are met. The calculation process of the rise and fall metrics and the activation conditions of the incremental window are described in detail below.
[0070] Slide position The rise and fall measure is recorded as , according to the left sub-window mean and the right subwindow mean Calculate the sliding window position The specific steps of the rise and fall measurement include:
[0071] S321, calculation ,in, Indicates modulo, Represents the left subwindow mean and the right subwindow mean The absolute value of the difference;
[0072] S322, comparison and the preset first mean error factor :
[0073] like , then it is determined that the sliding window does not show an obvious upward or downward trend, and the sliding position Rise and fall metrics ;
[0074] like , then compare and the preset second mean error factor , the second mean error factor :
[0075] like , then the sliding position Rise and fall metrics ;
[0076] like , then activate the incremental window and calculate the mean of the incremental window ; According to the mean of the incremental window Determine whether the noise occurring in the sliding window is a non-event impulse noise (impulse noise interference) or an event (connection of a high-power electrical device).
[0077] In this embodiment, the incremental window is set on the side of the sliding window close to the end of the measurement data sequence, and the left subwindow, right subwindow and incremental window are connected in sequence. The length of the incremental window is The length of the incremental window is the number of measurement data in the incremental window; the mean value of the incremental window is The calculation expression is: ;
[0078] in, Indicates the window index of the incremental window, Indicates the measurement data in the increment window.
[0079] It should also be noted that since the usage scenario of the event detection method of the non-invasive monitoring system is real-time monitoring of user electricity consumption data, data measurement is a continuous process; when the sliding window slides to the end of the current measurement data sequence, it is necessary to wait for new measurement data until the data processing quantity requirements are met.
[0080] S323. Judgment Whether it meets:
[0081] If satisfied, it means that the incremental window maintains the event state change, let ;
[0082] If it is not satisfied, it means that there is non-event impulse noise in the right sub-window. The values are all 0 and are indexed from the sliding position Start calculating the rise and fall metrics of the sliding window.
[0083] In the above definition of the rise and fall metric, when the value of the rise and fall metric is 0, it means that the sliding window does not show an obvious rise and fall trend; when the rise and fall metric is a positive value, it means that the sliding window shows an upward trend, and when the rise and fall metric is a negative value, it means that the sliding window shows a downward trend.
[0084] In this embodiment, only the left sub-window mean and the right subwindow mean The absolute value of the difference is greater than the second mean error factor When the event occurs, the incremental window is activated to judge whether the noise in the sliding window is a non-event impulse noise or a high-power electrical device is connected. This can ensure the accuracy of the event detection result without affecting the complexity of the event detection algorithm, and the event detection effect is better.
[0085] The event detection results of the measurement data sequence using the event detection method of this application are as follows: Figure 4 As shown, Figure 4 The red curve in the figure represents the measurement data sequence. The blue triangle icon indicates the occurrence of a rising event (also called an event occurrence). The occurrence of a rising event means that a useful electrical device is connected to the circuit. When a rising event occurs, the measured value in the circuit (the measured value can be a physical quantity such as useful work power or current) increases. The pink inverted triangle icon indicates the occurrence of a falling event (also called the end of an event). The occurrence of a falling event means that a useful electrical device is turned off in the circuit. When a falling event occurs, the measured value in the circuit (the measured value can be a physical quantity such as useful work power or current) decreases.
[0086] S4. Determine event accumulation information based on the rise and fall metrics of the sliding window at each sliding position; the event accumulation information includes a cumulative value of a measurement data change and a cumulative value of a duration.
[0087] use Indicates the cumulative value of the measured data change, and the duration cumulative value is measured by the counter Quantification. Specifically, the specific steps for determining event accumulation information based on the rise and fall metrics of the sliding window at each sliding position are:
[0088] According to the sliding window in the sliding position Rise and fall metrics Calculate the cumulative value of the measured data change and update the counter :
[0089] For sliding position :
[0090] like , it is believed that this sliding window does not show an obvious upward or downward trend, so let and ;
[0091] like , then let and ;
[0092] For any sliding position :
[0093] like , it is believed that this sliding window does not show an obvious upward or downward trend, so let and ;
[0094] like and , it is believed that the sliding window does not show an obvious upward or downward trend in the previous sliding position, and If it shows an upward or downward trend, and ;
[0095] like and and , then the sliding window is considered to be between the previous sliding position and the current sliding position Both show an upward or downward trend and the changing trends are the same, then let and ;
[0096] like and and , then the sliding window is considered to be between the previous sliding position and the current sliding position Both show an upward or downward trend but the changing trends are different, then let and ;
[0097] in, Indicates the calculation symbol. When the rise and fall metric is positive (the value of the measurement data in the sliding window shows an upward trend), The value of is 1, when the rise and fall metric is negative (the value of the measurement data in the sliding window shows a downward trend), The value of is -1.
[0098] S5. Determine event accumulation information according to the rise and fall metrics of the sliding window at each sliding position.
[0099] Event accumulation information includes the cumulative value of measurement data change and the cumulative value of duration. Figure 5 Schematic diagram of event detection results predicted based on event accumulation information, where: Figure 5 The red curve in the figure is the measurement data sequence, the blue dotted line is the rising cumulative sum threshold, the pink dotted line is the falling cumulative sum threshold, the blue triangle icon indicates the occurrence of a rising event (also called an event occurrence), and the pink inverted triangle icon indicates the occurrence of a falling event (also called an event end).
[0100] Specifically, the step of determining event accumulation information according to the rise and fall metrics of the sliding window at each sliding position includes:
[0101] S51, determine whether the cumulative value of the measurement data change exceeds the preset cumulative sum threshold, the preset cumulative sum threshold includes the rising cumulative sum threshold and falling cumulative sum threshold ,in is a positive value, is a negative value; defines the threshold indicator , the threshold indicator calculation formula is:
[0102] ;
[0103] S52, according to the threshold indicator The value of determines whether the event occurs or ends:
[0104] If the threshold indicator and , , then the sliding position An event occurs, which means that a useful electrical device is connected;
[0105] If the threshold indicator and , , then the sliding position An event has ended, which means that some electrical equipment has been shut down.
[0106] S53, according to the sliding position The duration accumulation value is used to determine the event start time or event end time, so as to determine the change of the operating state of the electrical equipment and obtain the event detection result.
[0107] Since the detection of an event occurrence or the end of an event requires accumulation, the detection time needs to be subtracted from the accumulation counter , you can get the real time when the event occurs or ends.
[0108] In the measurement data sequence, the nodes where the electric equipment is switched on are recorded as event occurrence sets. , the nodes where the electrical equipment is turned off are recorded as the event ending set , the construction process of event occurrence set and event end set is:
[0109] First, find all the detection event occurrence sets :
[0110] ;
[0111] That is In the range, all and of A collection of detection events that occur in a concentrated manner It corresponds to the end moment of the transient process of detecting the occurrence of the event.
[0112] Find all detection event end sets :
[0113] ;
[0114] That is In the range, all and of The collection of detection events ends the collection It corresponds to the end moment of the transient process of detecting the end of the event.
[0115] Get the detection event set and detection event end set Afterwards, since the detection of an event requires accumulation, the detection time needs to be subtracted from the accumulation counter , get the event occurrence set and event end set , that is: for the detection event set Any element in , event occurrence set The corresponding elements in are:
[0116] ;
[0117] For the detection event end set Any element in , event end set The corresponding elements in are:
[0118] .
[0119] like Figure 4 、 Figure 5 As shown, the event detection method proposed by the present invention can accurately detect the start and end moments of time and can resist pulse interference of measurement data.
[0120] Based on the same inventive concept, an embodiment of the present invention provides an event detection device for a non-intrusive load monitoring system.
[0121] The event detection device for a non-intrusive load monitoring system described in the present invention can be installed in an electronic device. According to the functions to be implemented, the event detection device for a non-intrusive load monitoring system includes an acquisition module, a sliding window control module, a first processing module, a second processing module, and an output module, wherein: the acquisition module can acquire user electricity usage data, and the user electricity usage data includes a measurement data sequence; the sliding window control module can construct a sliding window, control the sliding window to slide from the first data in the measurement data sequence as the starting point to the last data in the measurement data sequence, and record the length of the measurement data sequence as , the length of the sliding window is recorded as , , the total number of sliding positions is recorded as ,but ; The first processing module can respectively calculate the rise and fall measurements of the sliding window at each sliding position, and the rise and fall measurements are physical quantities that can represent the changing trend of the measurement data; the second processing module can determine the event accumulation information based on the rise and fall measurements of the sliding window at each sliding position; the event accumulation information includes the cumulative value of the measurement data change and the cumulative value of the duration; the output module can determine the change in the operating status of the electrical equipment based on the cumulative value of the measurement data change and the cumulative value of the duration, and obtain the event detection result.
[0122] The module described in the present invention may also be referred to as a unit, which refers to a series of computer program segments that can be executed by a processor of an electronic device and can complete fixed functions, and is stored in a memory of the electronic device.
[0123] The various variations and specific examples of the event detection method for a non-invasive load monitoring system provided in the above-mentioned embodiment are also applicable to the event detection device for a non-invasive load monitoring system in this embodiment. Through the above-mentioned detailed description of the event detection method for a non-invasive load monitoring system, those skilled in the art can clearly understand the implementation method of the event detection device for a non-invasive load monitoring system in this embodiment. For the sake of brevity of the specification, it will not be described in detail here.
[0124] This application also discloses an electronic device, such as Figure 6 FIG2 is a schematic diagram of the structure of an electronic device for implementing a method for detecting an event in a non-intrusive load monitoring system according to an embodiment of the present invention. The electronic device may include at least one processor 10, a memory 11 communicatively coupled to the at least one processor, a communication bus 12, and a communication interface 13. The electronic device may also include a computer program stored in the memory 11 and executable on the processor 10, such as a method program for detecting an event in a non-intrusive load monitoring system.
[0125] In some embodiments, the processor 10 may be comprised of an integrated circuit, such as a single packaged integrated circuit or a plurality of packaged integrated circuits with the same or different functions, including a combination of one or more central processing units (CPUs), microprocessors, digital processing chips, graphics processors, and various control chips. The processor 10 is the control core (control unit) of the electronic device, connecting various components of the electronic device using various interfaces and circuits. It executes or runs programs or modules stored in the memory 11 (e.g., executing a method for event detection in a non-intrusive load monitoring system) and accesses data stored in the memory 11 to perform various functions of the electronic device and process data.
[0126] The memory 11 includes at least one type of readable storage medium, including flash memory, a removable hard disk, a multimedia card, a card-type memory (e.g., SD or DX memory), a magnetic memory, a magnetic disk, an optical disk, and the like. In some embodiments, the memory 11 may be an internal storage unit of the electronic device, such as a removable hard disk of the electronic device. In other embodiments, the memory 11 may also be an external storage device of the electronic device, such as a plug-in removable hard disk, a Smart Media Card (SMC), a Secure Digital (SD) card, a flash memory card, and the like. Furthermore, the memory 11 may include both an internal storage unit and an external storage device of the electronic device. The memory 11 can be used not only to store application software installed in the electronic device and various types of data, such as the code of a method program for event detection in a non-intrusive load monitoring system, but also to temporarily store data that has been output or is about to be output.
[0127] The communication bus 12 may be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus. This bus may be divided into an address bus, a data bus, a control bus, etc. The bus is configured to enable communication between the memory 11 and at least one processor 10, etc.
[0128] The communication interface 13 is used for communication between the above-mentioned electronic device and other devices, and includes a network interface and a user interface. Optionally, the network interface may include a wired interface and / or a wireless interface (such as a WI-FI interface, a Bluetooth interface, etc.), which is generally used to establish a communication connection between the electronic device and other electronic devices. The user interface may be a display (Display), an input unit (such as a keyboard (Keyboard)), and optionally, the user interface may also be a standard wired interface or a wireless interface. Optionally, in some embodiments, the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, and an OLED (Organic Light-Emitting Diode) touch device, etc. Among them, the display may also be appropriately referred to as a display screen or a display unit, which is used to display information processed in the electronic device and to display a visual user interface.
[0129] Figure 6 Only the electronic device with components is shown, and it can be understood by those skilled in the art that Figure 6The structure shown does not limit the electronic device, and may include fewer or more components than shown in the figure, or combine certain components, or arrange the components differently.
[0130] For example, although not shown, the electronic device may further include a power source (e.g., a battery) to power various components. Preferably, the power source may be logically connected to at least one processor 10 via a power management device, thereby enabling functions such as charge management, discharge management, and power consumption management via the power management device. The power source may further include any of one or more DC or AC power sources, a recharging device, a power failure detection circuit, a power converter or inverter, a power status indicator, and the like. The electronic device may also include various sensors, Bluetooth modules, Wi-Fi modules, and the like, which are not further detailed here.
[0131] It should be understood that the embodiment is for illustration only and the scope of the patent application is not limited to this structure.
[0132] Furthermore, if the module / unit integrated into the electronic device is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. The computer-readable storage medium can be volatile or non-volatile.
[0133] Embodiments of the present application provide a computer-readable storage medium, including, for example, any entity or device capable of carrying the computer program code, a recording medium, a USB flash drive, a mobile hard drive, a magnetic disk, an optical disk, a computer memory, or a read-only memory (ROM). The computer-readable storage medium stores a computer program capable of being loaded by a processor and executing the event detection method for a non-intrusive load monitoring system according to the above embodiment.
[0134] Throughout this specification, reference to terms such as "one embodiment," "some embodiments," "example," "specific example," "one implementation," "a preferred implementation," or "some examples" means that the specific features, structures, materials, or characteristics described in conjunction with that embodiment or example are included in at least one embodiment or example of the present invention. In this specification, schematic representations of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples.
[0135] While embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions, and variations may be made to the embodiments without departing from the principles and spirit of the invention, and that the scope of the invention is defined by the claims and their equivalents.
Claims
1. An event detection method for a non-intrusive load monitoring system, characterized in that: The method comprises: Acquiring user electricity consumption data, where the user electricity consumption data includes a measurement data sequence; Construct a sliding window and control the sliding window to slide from the first data of the measurement data sequence to the last data of the measurement data sequence. The length of the measurement data sequence is recorded as , the length of the sliding window is recorded as , , the total number of sliding positions is recorded as ,but ; Calculate the rise and fall metrics of the sliding window at each sliding position respectively; Determine event accumulation information based on the rise and fall metrics of the sliding window at each sliding position; the event accumulation information includes the cumulative value of the measurement data change and the cumulative value of the duration; Determine the change in the operating status of the electrical equipment based on the cumulative value of the measurement data change and the cumulative value of the duration, and obtain the event detection result; The sliding window includes a left subwindow and a right subwindow connected sequentially on the left and right. The calculation of the rise and fall metrics of the sliding window at each sliding position includes: Calculate the mean of the left subwindow at all sliding positions , and calculate the mean of the right subwindow at all sliding positions ,in Indicates the sliding position index; According to the left sub-window mean and the right subwindow mean Calculate the sliding window position The rise and fall measurement of Slide position The rise and fall measure is recorded as , according to the left sub-window mean and the right subwindow mean Calculate the sliding window position Rise and fall metrics, including: calculate ,in, Indicates modulo, Represents the left subwindow mean and the right subwindow mean The absolute value of the difference; Comparison and the preset first mean error factor : like , then it is determined that the sliding window does not show an obvious upward or downward trend, and the sliding position Rise and fall metrics ; like , then compare and the preset second mean error factor , the second mean error factor : like , then the sliding position Rise and fall metrics ; like , then the incremental window is activated. The incremental window is set on the side of the sliding window close to the end of the measurement data sequence, and the left subwindow, right subwindow and incremental window are connected in sequence. The mean of the incremental window is calculated. ; judge Whether it meets: If satisfied, it means that the incremental window maintains the event state change, let ; If it is not satisfied, it means that there is non-event impulse noise in the right sub-window. The values are all 0 and are indexed from the sliding position Start calculating the rise and fall metrics of the sliding window.
2. The event detection method for a non-intrusive load monitoring system according to claim 1, wherein: The length of the left subwindow is , the length of the right subwindow is , , the length of the incremental window is ; Left subwindow mean The calculation expression is: , Indicates the window index of the left subwindow, represents the measurement data in the left subwindow; Right subwindow mean The calculation expression is: , Indicates the window index of the right subwindow, represents the measurement data in the right subwindow; Incremental Window Mean The calculation expression is: , Indicates the window index of the incremental window, Indicates the measurement data in the increment window.
3. The event detection method for a non-intrusive load monitoring system according to claim 1 or 2, characterized in that: use Indicates the cumulative value of the measured data change, and the duration cumulative value is measured by the counter Quantification, wherein determining event accumulation information based on the rise and fall metrics of the sliding window at each sliding position includes: According to the sliding window in the sliding position Rise and fall metrics Calculate the cumulative value of the measured data change and update the counter : For sliding position : like , then let and ; like , then let and ; For any sliding position : like , then let and ; like and , then let and ; like and and , then let and ; like and and , then let and ; in, Indicates the calculation symbol. When the rise and fall metric is positive, The value of is 1, when the rise and fall metric is negative, The value of is -1.
4. The event detection method for a non-intrusive load monitoring system according to claim 3, wherein: The step of determining the change in the operating state of the electrical equipment based on the cumulative value of the measurement data change and the cumulative value of the duration to obtain the event detection result includes: Determine whether the cumulative value of the measured data change exceeds the preset cumulative sum threshold, which includes the rising cumulative sum threshold and falling cumulative sum threshold ,in is a positive value, is a negative value; defines the threshold indicator , the threshold indicator calculation formula is: ; According to the threshold indicator The value of determines whether the event occurs or ends: If the threshold indicator and , , then the sliding position An event occurs, which means that a useful electrical device is connected; If the threshold indicator and , , then the sliding position An event ends, which means that the electrical equipment is shut down; According to the sliding position The duration accumulation value is used to determine the event start time or event end time, so as to determine the change of the operating state of the electrical equipment and obtain the event detection result.
5. The event detection method for a non-intrusive load monitoring system according to claim 1 or 2, characterized in that: The obtaining of user electricity consumption data includes: Obtaining raw measurement data; The original measurement data is sequentially passed through the mean filter and the median filter to obtain a measurement data sequence.
6. An event detection device for a non-intrusive load monitoring system, used to implement the event detection method for a non-intrusive load monitoring system according to any one of claims 1 to 5, characterized in that: include: An acquisition module is used to acquire user electricity consumption data, where the user electricity consumption data includes a measurement data sequence; The sliding window control module is used to construct a sliding window and control the sliding window to slide from the first data of the measurement data sequence to the last data of the measurement data sequence. The length of the measurement data sequence is recorded as , the length of the sliding window is recorded as , , the total number of sliding positions is recorded as ,but ; A first processing module is used to calculate the rise and fall metrics of the sliding window at each sliding position; A second processing module is used to determine event accumulation information based on the rise and fall metrics of the sliding window at each sliding position; The event accumulation information includes the cumulative value of the measurement data change and the cumulative value of the duration; The output module is used to determine the change in the operating status of the electrical equipment based on the cumulative value of the measurement data change and the cumulative value of the duration, and obtain the event detection result.
7. An electronic device, characterized in that: The electronic device comprises: at least one processor (10); and, a memory (11) communicatively coupled to the at least one processor (10); The memory (11) stores a computer program executable by the at least one processor (10), and the computer program is executed by the at least one processor (10) so as to enable the at least one processor (10) to execute the event detection method for a non-intrusive load monitoring system as described in any one of claims 1 to 5.
8. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program; when the computer program is executed by a processor, the event detection method for a non-intrusive load monitoring system according to any one of claims 1 to 5 is implemented.
Citation Information
Patent Citations
Non-intrusive transient event detection method based on variable-length sliding window
CN120121913A