Detection method and device of electric equipment and computer readable storage medium
By matrix encoding and image processing of the power timing data of household electrical equipment, the electricity consumption data images are generated, and the problem of low detection accuracy of similar waveform resistive electrical appliances in the prior art is solved, and higher detection accuracy is achieved.
Patent Information
- Application Number
- CN202510226900.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-27
- Publication Date
- 2025-06-13
AI Technical Summary
The prior art has little accuracy when detecting resistive appliances with similar waveforms in household electrical equipment.
By acquiring at least three power timing data of a household power equipment in a single power frequency cycle, performing matrix encoding, generating electricity data images, and using image characteristics to retain the ring-shaped periodic characteristics of the power timing data, thereby improving the accuracy of the detection results.
It improves the accuracy of detection results of resistive electrical appliances with similar waveforms in household electrical equipment, and can more accurately distinguish and identify these electrical equipment.
Smart Images

Figure CN120142795A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of smart grids, and particularly to a method, device, and computer-readable storage medium for detecting electrical equipment. Background Art
[0002] With the increasing number of various household electrical appliances, the total energy consumption is also continuously rising. In order to accurately and real-time detect the energy usage of each electrical equipment, and deeply understand the energy consumption characteristics of different electrical equipment during operation, the intelligent detection technology for household electrical equipment has emerged.
[0003] In the related art, during the intelligent detection of household electrical equipment, mainly the non-intrusive load monitoring technology (NILM) is used to analyze the power time series data of household electrical equipment, and according to the analysis results, the detection results of each electrical equipment in the household electrical equipment are determined.
[0004] However, the methods of the related art have inaccurate detection results for resistive electrical appliances with similar waveforms in household electrical equipment. Summary of the Invention
[0005] Based on this, it is necessary to provide a method, device, and computer-readable storage medium for detecting electrical equipment to improve the accuracy of the detection results of resistive electrical appliances with similar waveforms in household electrical equipment for the above technical problems.
[0006] In a first aspect, the present application provides a method for detecting electrical equipment, including:
[0007] Obtain at least three power time series data of household electrical equipment in a single power frequency cycle;
[0008] Matrix-encode the corresponding power time series data according to the data characteristics of at least three power time series data to generate an electrical data image of the household electrical equipment; the power time series data in the electrical data image are all continuously encoded and form a ring;
[0009] Based on the electrical data image, determine the detection results of each electrical equipment of the household electrical equipment in a single power frequency cycle.
[0010] In one embodiment, matrix-encoding the corresponding power time series data according to the data characteristics of at least three power time series data to generate an electrical data image of the household electrical equipment includes:
[0011] Based on the data characteristics of at least three power time series data, determine the encoding methods corresponding to at least three power time series data;
[0012] Matrix-encode the corresponding power time-series data according to the encoding method to generate an electricity consumption data image of household electrical appliances.
[0013] In one embodiment, the data feature includes the data volume;
[0014] Based on the data features of at least three power time-series data, determine the encoding methods corresponding to at least three power time-series data, including:
[0015] Select an encoding matrix that matches the data volume of the power time-series data as the encoding matrix corresponding to at least three power time-series data;
[0016] Based on the encoding matrix, determine the encoding methods corresponding to at least three power time-series data.
[0017] In one embodiment, based on the encoding matrix, determine the encoding methods corresponding to at least three power time-series data, including:
[0018] Rotate the encoding method of the encoding matrix according to a preset rotation angle, and use the rotated encoding method as the encoding method corresponding to at least three power time-series data.
[0019] In one embodiment, based on the encoding matrix, determine the encoding methods corresponding to at least three power time-series data, including:
[0020] Perform a mirror image process on the encoding method of the encoding matrix, and use the mirror-image processed encoding method as the encoding method corresponding to at least three power time-series data.
[0021] In one embodiment, matrix-encode the corresponding power time-series data according to the encoding method to generate an electricity consumption data image of household electrical appliances, including:
[0022] Obtain the encoding start position and encoding direction of each power time-series data under the encoding method;
[0023] According to each encoding start position and each encoding direction, encode each power time-series data to generate an electricity consumption data image.
[0024] In one embodiment, according to each encoding start position and each encoding direction, encode each power time-series data to generate an electricity consumption data image, including:
[0025] According to each encoding start position and each encoding direction, perform matrix encoding on each power time-series data to generate an encoding result of each power time-series data;
[0026] Select the encoding results of any three power time-series data from each encoding result as the target encoding results, and use the image composed of the target encoding results as the electricity consumption data image.
[0027] In one embodiment, according to each coding start position and each coding direction, matrix coding is performed on each power time series data to generate a coding result for each power time series data, including:
[0028] For any power time series data, the first data in the power time series data is set at the coding start position, and the power time series data is coded according to the coding direction to obtain the coding result of the power time series data.
[0029] In one embodiment, based on the power consumption data image, the detection result of each household electrical appliance of the household electrical appliances under a single power frequency cycle is determined, including:
[0030] The power consumption data image is input into a preset detection model, and the detection model is used to analyze the power consumption data image to determine whether each household electrical appliance of the household electrical appliances is operating normally under a single power frequency cycle;
[0031] The judgment result is used as the detection result of each electrical appliance under a single power frequency cycle.
[0032] In a second aspect, the present application further provides a detection device for electrical appliances, including:
[0033] An acquisition module, configured to acquire at least three types of power time series data of household electrical appliances under a single power frequency cycle;
[0034] A generation module, configured to perform matrix coding on the corresponding power time series data according to the data characteristics of at least three types of power time series data to generate a power consumption data image of the household electrical appliances; the power time series data in the power consumption data image are all continuously coded and form a ring;
[0035] A determination module, configured to determine the detection result of each household electrical appliance of the household electrical appliances under a single power frequency cycle based on the power consumption data image.
[0036] In a third aspect, the present application further provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the content of any one of the embodiments of the detection method for electrical appliances in the first aspect is implemented.
[0037] The above detection method, device and computer-readable storage medium for electrical equipment obtain at least three kinds of power time series data of household electrical equipment in a single power frequency cycle; matrix-encode the corresponding power time series data according to the data characteristics of the at least three kinds of power time series data to generate an electrical consumption data image of the household electrical equipment; the power time series data in the electrical consumption data image are all continuously encoded and form a ring; based on the electrical consumption data image, determine the detection result of each electrical equipment of the household electrical equipment in a single power frequency cycle. Through the data characteristics of at least three kinds of power time series data of household electrical equipment in a single power frequency cycle, this method can specifically matrix-encode the power time series data, and the encoding is continuous during the encoding process, and the encoded power time series data form a ring. In this way, the generated electrical consumption data image of the household electrical equipment can fully retain the ring periodic characteristics of the power time series data with the characteristics of an image. Based on this electrical consumption data image, the detection results of resistive electrical appliances with similar waveforms in the household electrical equipment can be distinguished, and the accuracy of the detection results of resistive electrical appliances with similar waveforms can be improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the following will briefly introduce the drawings required to be used in the description of the embodiments of the present application or related technologies. Obviously, the following drawings are only some embodiments of the present application. For those of ordinary skill in the art, without creative efforts, other related drawings can also be obtained based on these drawings.
[0039] Figure 1 It is an application environment diagram of the detection method for electrical equipment in an embodiment;
[0040] Figure 2 It is a flowchart of the detection method for electrical equipment in an embodiment;
[0041] Figure 3 It is a flowchart of the detection method for electrical equipment in an embodiment;
[0042] Figure 4 It is a flowchart of the detection method for electrical equipment in an embodiment;
[0043] Figure 5 It is a flowchart of the detection method for electrical equipment in an embodiment;
[0044] Figure 6 It is the encoding method of 16 points in an embodiment;
[0045] Figure 7 It is the encoding method of 64 points in an embodiment;
[0046] Figure 8The encoding method for 256 points in an embodiment;
[0047] Figure 9 The encoding method for 1024 points in an embodiment;
[0048] Figure 10 The flowchart of the detection method for electrical equipment in an embodiment;
[0049] Figure 11 The flowchart of the detection method for electrical equipment in an embodiment;
[0050] Figure 12 The flowchart of the detection method for electrical equipment in an embodiment;
[0051] Figure 13 The flowchart of the training process of the detection model for electrical equipment in an embodiment;
[0052] Figure 14 The schematic diagram of the detection process for 256 - point data in an embodiment;
[0053] Figure 15 The structural block diagram of the detection device for electrical equipment in an embodiment. Specific implementation manners
[0054] In order to make the purpose, technical solutions and advantages of this application clearer, the following further details this application in combination with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain this application and are not used to limit this application.
[0055] Before introducing the technical solutions of this application in detail, the background technology of this application is briefly introduced first.
[0056] In order to detect the energy usage of household electrical equipment, optimize the household energy consumption structure, and thus achieve household energy conservation, the intelligent monitoring technology for household electrical equipment has emerged as the times require. Research shows that whether users are informed of the detailed electricity consumption information of household electrical equipment can cause a difference of 5% - 15% in electricity bills. Therefore, being able to timely obtain the real - time status of each electrical equipment in household electrical equipment has become the key and bottleneck problem in the construction of smart grids at home and abroad.
[0057] Since NILM has advantages such as simple deployment, low investment cost, and strong information security, during the detection process, only the total energy consumption needs to be detected and then the energy consumption can be decomposed to the single - load level, which is especially suitable for the intelligent detection of household electrical equipment. In addition, the model of NILM can also be used to detect abnormal load behaviors and provide protection in a timely manner after appropriate training.
[0058] Therefore, the prior art mainly uses NILM to analyze the power time series data of household electrical appliances, and determines the detection results of each electrical appliance in the household electrical appliances according to the analysis results. However, since small-power electrical appliances and multi-state electrical appliances account for a large proportion of household electrical appliances, there are many problems such as similar local waveforms, insignificant fluctuation characteristics, and difficulty in distinguishing these electrical appliances, and it is very difficult to perform load detection and decomposition on these electrical appliances. Therefore, the low recognition accuracy of small-power and multi-state electrical appliances in the home has become an urgent problem to be solved.
[0059] Although the existing methods have played a certain role in household load detection, the classification effect for resistive electrical appliances and multi-state electrical appliances with similar waveforms is still very low, and the class imbalance problem existing in NILM is ignored during the detection process.
[0060] In NILM, in order to improve the classification accuracy, the power data is mainly converted into an image representation to extract signal features. The most common method is to combine different signal forms such as current-voltage trajectories, active power, and reactive power. All these data form combination methods have a common disadvantage, that is, all the information in the time domain and frequency domain of the current data cannot be fully utilized during the classification process. In addition, due to the processing characteristics of the image neural network, some models that arrange one-dimensional data into an m*n-dimensional matrix in a row-first and then-column manner to form sequential encoded current-time images, voltage-time images, and power-time images for feature extraction make the data become fragmented in the matrix. After compression transformation processing such as convolution, the data will seriously lose data features, resulting in a great reduction in the effect of model training, and the feature extraction and classification effect is still not ideal. There are also some models that use Gramian Angular Field (GAF) and Markov Transition Field (MTF) to retain the time series features of the data, but the computational complexity of such algorithm models is large and they cannot be used in embedded devices.
[0061] In view of the above problems, the present application provides a detection method, device, and computer-readable storage medium for electrical appliances, which can improve the accuracy of the detection results of resistive electrical appliances with similar waveforms in household electrical appliances. Of course, the technical solutions provided in the embodiments of the present application are not limited to only solving the above problems, and there are other technical effects, which can be specifically seen in the following embodiments. Next, the technical solutions of the present application will be introduced in detail.
[0062] The detection method for electrical appliances provided in the embodiments of the present application can be applied to, for example Figure 1In the application environment shown. For example, the computer device can be a server, a personal computer, a laptop computer, a smart phone, a tablet computer, a smart mobile phone, etc. The computer device can include a processor, a memory, and a network interface connected through a system bus or wirelessly. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device can include a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store data during the detection process of the electrical equipment. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, it implements a detection method for electrical equipment. Among them, the computer device can be implemented by an independent computer device or a computer device cluster composed of multiple computer devices. It should be noted that the memory of the computer device is not limited to the above-mentioned memory, and can also include high-speed random access memory, volatile solid-state memory, etc. In addition, the composition architecture of the computer device is not limited to the above situation, and some components can also be added or omitted.
[0063] In an exemplary embodiment, as Figure 2 shown, a detection method for electrical equipment is provided. Taking the computer device in Figure 1 as an example, the method includes the following steps 201 to step 203. Among them:
[0064] S201, obtain at least three kinds of power time series data of household electrical equipment in a single power frequency cycle.
[0065] Among them, household electrical equipment refers to common household appliances. For example, common household appliances can be refrigerators, air conditioners, washing machines, rice cookers, and microwave ovens, etc. A single power frequency cycle refers to the time required for alternating current to complete a complete periodic change under the power frequency (the standard frequency of the alternating current power supply in the power system). Power time series data refers to a series of data related to the power system recorded in chronological order, and these data reflect the operating status, characteristics, and change conditions of household electrical equipment at different times.
[0066] In an embodiment of the present application, when it is necessary to detect multiple electrical devices in household electrical equipment, the user generates a detection instruction for the electrical device by triggering a detection button. After receiving the detection instruction of the household electrical equipment, the computer device collects current data, voltage data, power data, etc. of the household electrical equipment in a single power frequency cycle, and takes each type of collected power data as a kind of power time series data, obtaining at least three kinds of power time series data of the household electrical equipment in a single power frequency cycle. Optionally, the household electrical equipment can also report the time series data during the operation to the computer device at a preset time interval, and the computer device can select at least three kinds of power time series data in a single power frequency cycle from the reported data. The embodiment of the present application does not limit the method for obtaining at least three kinds of power time series data of the household electrical equipment in a single power frequency cycle.
[0067] It should be noted that all of the at least three kinds of power time series data here are collected on the main line of the household electrical equipment. Suppose the household electrical equipment includes a refrigerator, an air conditioner, a washing machine, a rice cooker, a microwave oven, etc. Each kind of power time series data is the total data of all electrical devices.
[0068] S202, perform matrix encoding on the corresponding power time series data according to the data characteristics of the at least three kinds of power time series data to generate an electrical data image of the household electrical equipment; the power time series data in the electrical data image are all continuously encoded and form a ring.
[0069] Among them, the data characteristics of the at least three kinds of power time series data can be the periodicity of the data, the correlation of the data, the data volume, etc. During high-speed sampling, the power frequency cycle data is usually collected using 12 - 400 points. Then, the data volume of the power time series data can be the data volume with a ring feature. For example, the data volume of the power time series data can be 16 points, 64 points, 256 points, 1024 points, etc. It should be noted that in order to ensure the integrity of the image, the data volume of each kind of power time series data needs to be kept consistent. For example, the data volume of each kind of power time series data is 64.
[0070] In an embodiment of the present application, after obtaining the data characteristics of the at least three kinds of power time series data, the computer device can select an encoding matrix that matches the at least three kinds of power time series data based on the data characteristics of the at least three kinds of power time series data. Then, perform continuous encoding on each kind of power time series data on the encoding matrix. After the encoding is completed, the data on the encoding matrix forms a ring. Then, combine the encoded matrices of the data to obtain an electrical data image of the household electrical equipment.
[0071] Optionally, the computer device can also input at least three power time series data into a preset coding model, and use the preset coding model to extract the data features of the at least three power time series data. Then, based on the data features, continuous coding is performed on each power time series data to obtain the power consumption data image of the household electrical appliances.
[0072] S203. Based on the power consumption data image, determine the detection result of each electrical appliance of the household electrical appliances in a single power frequency cycle.
[0073] In the embodiment of the present application, since the power consumption data image is the total power time series data of multiple electrical appliances of the household electrical appliances, the power consumption data image includes the total operation information of multiple electrical appliances. Based on this, after obtaining the power consumption data image, the computer device inputs the power consumption data image into the NILM model, and analyzes the power consumption data image through the NILM model to determine the detection result of each electrical appliance of the household electrical appliances in a single power frequency cycle.
[0074] It should be noted that for any electrical appliance, the detection result of the electrical appliance in a single power frequency cycle includes two types. One is that the electrical appliance is in a working state, and the other is that the electrical appliance is not in a working state.
[0075] In the above electrical appliance detection method, at least three power time series data of the household electrical appliances in a single power frequency cycle are obtained; matrix coding is performed on the corresponding power time series data according to the data features of the at least three power time series data to generate the power consumption data image of the household electrical appliances; the power time series data in the power consumption data image are all continuously coded and form a ring; based on the power consumption data image, determine the detection result of each electrical appliance of the household electrical appliances in a single power frequency cycle. Through the data features of at least three power time series data of the household electrical appliances in a single power frequency cycle, this method can specifically perform matrix coding on the power time series data, and the coding is continuous during the coding process, and the coded power time series data form a ring. In this way, the generated power consumption data image of the household electrical appliances can fully retain the circular periodic characteristics of the power time series data with the characteristics of an image. Based on this power consumption data image, the detection results of resistive electrical appliances with similar waveforms in the household electrical appliances can be distinguished, and the accuracy of the detection results of resistive electrical appliances with similar waveforms can be improved.
[0076] The process of matrix coding is the key point of the electrical appliance detection method. Next, a specific process of performing matrix coding on the corresponding power time series data according to the data features of at least three power time series data to generate the power consumption data image of the household electrical appliances will be introduced through an embodiment, as Figure 3 shown, the specific process includes:
[0077] S301. Determine encoding methods corresponding to at least three power time-series data based on data characteristics of the at least three power time-series data.
[0078] Herein, the encoding method refers to encoding routes, encoding start and end positions, etc. in the data encoding process.
[0079] In an embodiment of this application, the computer device can obtain the data volume of the power time-series data from the data characteristics of the at least three power time-series data. And based on the data volume, determine an encoding matrix matching the at least three power time-series data. For example, the encoding matrix includes four types: 16 points, 64 points, 256 points, and 1024 points. When the data volume of the power time-series data is 64 points, 64 points (8*8 matrix) can be used as the encoding matrix matching the at least three power time-series data.
[0080] Under each encoding matrix, there are multiple different encoding methods. For example, taking 16 points (4*4 matrix) as an example, [[1,2,5,6],[16,3,4,7],[15,12,11,8],[14,13,10,9]] can be an encoding scheme; [[16,1,4,5],[15,2,3,6],[14,11,10,7],[13,12,9,8]] can also be an encoding scheme, and [[1,16,13,12],[2,15,14,11],[3,6,7,10],[4,5,8,9]] can also be an encoding scheme.
[0081] Then, after the computer device determines the encoding matrix matching the at least three power time-series data, it can select any one of the multiple different encoding methods under this encoding matrix as the encoding method corresponding to the at least three power time-series data.
[0082] S302. Perform matrix encoding on the corresponding power time-series data according to the encoding method to generate an electricity consumption data image of household electrical appliances.
[0083] In an embodiment of this application, after determining the encoding method, for any one of the power time-series data, the computer device can, according to this encoding method, fill the power time-series data into the encoding matrix to complete the matrix encoding process. After all the at least three power time-series data are encoded, three encoding results can be screened out from multiple encoding results, and the image composed of the three encoding results is used as the electricity consumption data image of household electrical appliances. This electricity consumption data image is a three-dimensional image in RGB image format. Assuming that an electricity consumption data image is composed of two encoding results among multiple encoding results, then this electricity consumption data image is a two-dimensional image.
[0084] In the above detection method of the electrical equipment, based on the data characteristics of at least three power time series data, the encoding methods corresponding to at least three power time series data are determined; according to the encoding methods, the corresponding power time series data are matrix-encoded to generate the power consumption data image of the household electrical equipment. Through the data characteristics of at least three power time series data, this method can specifically screen out the encoding methods that match the data characteristics, that is, the encoding methods corresponding to at least three power time series data. Thus, based on this encoding method, the power time series data can be accurately matrix-encoded, and the power consumption data image that fully retains the circular periodic characteristics of the power time series data can be accurately obtained.
[0085] Assume that the data characteristics include the data volume. Then, in one embodiment, as Figure 4 shown, the specific method for determining the encoding methods corresponding to at least three power time series data based on the data characteristics of at least three power time series data includes:
[0086] S401, select the encoding matrix that matches the data volume of the power time series data as the encoding matrix corresponding to at least three power time series data.
[0087] In the embodiments of the present application, the computer device can match the data volume of the power time series data with the sizes of multiple encoding matrices, and according to the matching result, search for the encoding matrix that matches the data volume of the power time series data from the multiple encoding matrices. And take the encoding matrix that matches the data volume of the power time series data as the encoding matrix corresponding to at least three power time series data.
[0088] S402, based on the encoding matrix, determine the encoding methods corresponding to at least three power time series data.
[0089] Among them, each encoding matrix has a default encoding method. Next, the encoding methods of each encoding matrix will be introduced in turn. Figure 5 The encoding method representing 16 points. As can be seen from the figure, the default encoding method for 16 points is the H type. For 16 points (4*4 matrix), [[1,2,5,6],[16,3,4,7],[15,12,11,8],[14,13,10,9]] can be used as a default encoding method. Figure 6 The encoding method representing 64 points. The default encoding method for 64 points is more complex than that for 16 points. Figure 7 The encoding method representing 256 points, Figure 8 The encoding method representing 1024 points. Since the encoding methods for 64 points, 256 points, and 1024 points are relatively complex, they will not be elaborated here. Combining Figures 5 - 8As can be seen, for the encoding methods of 16 points, 64 points, 256 points, or 1024 points, the dots in the figure represent data points, and the straight line between two dots represents the encoding order. It can be seen that the encoding process is continuous encoding, and after encoding is completed, the power time series data forms a ring.
[0090] In an embodiment of the present application, the computer device can obtain the default encoding method corresponding to the encoding matrix and use this default encoding method as the encoding method for at least three power time series data. Optionally, the default encoding method corresponding to the encoding matrix can also be processed and then the processed default encoding method can be used as the encoding method for at least three power time series data. For example, the processing method can be mirror processing, rotation processing, etc.
[0091] In one embodiment, the specific method for determining the encoding method corresponding to at least three power time series data based on the encoding matrix includes:
[0092] Rotate the encoding method of the encoding matrix according to a preset rotation angle, and use the rotated encoding method as the encoding method for at least three power time series data.
[0093] Among them, the preset rotation angle can be 90°, 180°, 270°.
[0094] In an embodiment of the present application, the computer device can select a target rotation angle from multiple selection angles and rotate the encoding method of the encoding matrix according to the target rotation angle to obtain the encoding method for at least three power time series data.
[0095] In another embodiment, the specific method for determining the encoding method corresponding to at least three power time series data based on the encoding matrix includes:
[0096] Perform mirror processing on the encoding method of the encoding matrix, and use the mirror-processed encoding method as the encoding method for at least three power time series data.
[0097] In an embodiment of the present application, the mirror processing can be left-right mirroring or up-down mirroring. Therefore, the computer device can perform left-right and / or up-down mirror processing on the encoding method of the encoding matrix and use the mirror-processed encoding method as the encoding method for at least three power time series data.
[0098] In the above detection method of the electrical equipment, an encoding matrix matching the data volume of the power time series data is selected as the encoding matrix corresponding to at least three power time series data; the encoding method of the encoding matrix is rotated according to a preset rotation angle, and the rotated encoding method is used as the encoding method corresponding to at least three power time series data. Alternatively, the encoding method of the encoding matrix is mirror-processed, and the mirror-processed encoding method is used as the encoding method corresponding to at least three power time series data. This method can accurately find an encoding matrix matching the power time series data based on the data volume of the power time series data, and process the encoding method in the encoding matrix by rotation and / or mirroring, so as to flexibly determine the encoding method corresponding to the power time series data.
[0099] Next, a specific process of generating an electrical consumption data image of a household electrical equipment by performing matrix encoding on corresponding power time series data according to an encoding method will be introduced through an embodiment, as Figure 9 shown, and the specific content includes:
[0100] S501, obtain the encoding start position and encoding direction of each power time series data under the encoding method.
[0101] In the embodiment of the present application, the encoding start position under each encoding method can be any position in the encoding matrix, and the encoding direction can be the clockwise direction or the counterclockwise direction. Then, for any power time series data, the computer device can select any point in the encoding matrix as the encoding start position of the power time series data. And then select any one of the clockwise direction and the counterclockwise direction as the encoding direction of the power time series data.
[0102] S502, encode each power time series data according to each encoding start position and each encoding direction to generate an electrical consumption data image.
[0103] In the embodiment of the present application, for any power time series data, the computer device can fill the first sampling data in the power time series data into the encoding start position of the encoding matrix, and then encode the other data in the power time series data in sequence according to the encoding direction. After all the power time series data are encoded, three of the encoding results are combined to obtain an electrical consumption data image.
[0104] In the above detection method of the electrical equipment, the encoding start position and encoding direction of each power time series data are obtained under the encoding method; according to each encoding start position and each encoding direction, each power time series data is encoded to generate an electricity consumption data image. In this method, under one encoding method, by determining the encoding start position and encoding direction of each power time series data, each power time series data can be encoded more accurately, and a more accurate electricity consumption data image can be obtained.
[0105] On the basis of the above embodiments, in one embodiment, the detailed content of encoding each power time series data according to each encoding start position and each encoding direction to generate an electricity consumption data image is introduced, as Figure 10 shown, this content includes:
[0106] S601, according to each encoding start position and each encoding direction, perform matrix encoding on each power time series data to generate an encoding result of each power time series data.
[0107] In one embodiment, the above-mentioned performing matrix encoding on each power time series data according to each encoding start position and each encoding direction to generate an encoding result of each power time series data includes:
[0108] For any one power time series data, set the first data in the power time series data at the encoding start position, and encode the power time series data according to the encoding direction to obtain the encoding result of the power time series data.
[0109] In the embodiment of the present application, after obtaining the encoding start position and encoding direction corresponding to each power time series data, for any one power time series data, the computer device can encode the first data in the power time series data at the encoding start position corresponding to the power time series data. Then, according to the encoding direction of the power time series data, encode the other data in turn to obtain the encoding result of the power time series data.
[0110] S602, select the encoding results of any three power time series data from the encoding results as the target encoding results, and use the image composed of the target encoding results as the electricity consumption data image.
[0111] In the embodiment of the present application, assuming that the electricity consumption data image is a three-dimensional image in RGB image format, then, the computer device can select the encoding results of any three power time series data from the encoding results corresponding to at least three power time series data, and combine the encoding results of these three power time series data to obtain the electricity consumption data image.
[0112] In the above detection method for the electrical equipment, according to each coding start position and each coding direction, matrix coding is performed on each power time series data to generate the coding result of each power time series data; any three coding results of the power time series data are selected from the respective coding results as the target coding results, and the image composed of the target coding results is used as the electricity consumption data image. This method can accurately complete the matrix coding of each power time series data by using each coding start position and each coding direction. Then, through the screening method, three coding results are selected from multiple coding results as the target coding results, which can ensure that the selected coding results are the matrix codings with the best effects. In this way, the quality of the obtained electricity consumption data image will also be higher.
[0113] The above embodiments are all introductions to the matrix coding process. Then, after obtaining the electricity consumption data image through matrix coding, a specific process for determining the detection result of each electrical equipment of the household electrical equipment in a single power frequency cycle based on the electricity consumption data image is introduced through an embodiment, as Figure 11 shown. The specific content includes:
[0114] S701, input the electricity consumption data image into a preset detection model, and use the detection model to analyze the electricity consumption data image to determine whether each electrical equipment of the household electrical equipment is operating normally in a single power frequency cycle.
[0115] In the embodiment of the present application, since the electricity consumption data image is obtained through a special coding method, this coding method can effectively prevent the circular data features from being damaged in the convolution transformation. Based on this, the computer device can input the electricity consumption data image into the detection model. In this coding method, when using a 2*2 convolution kernel for convolution with a stride of 2, it is always the adjacent 4 points that are convolved, which can effectively maintain the data continuity and circular characteristics between each pixel point of the matrix before and after convolution. Then, the detection model analyzes the electricity consumption data image and can accurately determine whether each electrical equipment of the household electrical equipment is operating normally in a single power frequency cycle.
[0116] S702, use the judgment result as the detection result of each electrical equipment in a single power frequency cycle.
[0117] In the embodiment of the present application, for each electrical equipment of the household electrical equipment, the judgment result includes that the electrical equipment is operating normally in a single power frequency cycle, or the electrical equipment is not operating normally in a single power frequency cycle. No matter which result it is, the computer device can use the judgment result of the electrical equipment as the detection result in a single power frequency cycle.
[0118] It should be noted that in the training process of neural network training and inference, an open dataset is used for training, enabling the model to learn more detection details. In this way, the detection model can be used to more accurately judge the usage situation of electrical equipment.
[0119] In the above detection method for electrical equipment, the electrical data image is input into a preset detection model, and the detection model is used to analyze the electrical data image to determine whether each electrical equipment in the household electrical equipment is operating normally in a single power frequency cycle; the judgment result is used as the detection result of each electrical equipment in a single power frequency cycle. This method analyzes the electrical data image in which the power time series data is continuously encoded and forms a ring by means of a preset detection model, and can accurately judge the usage situation of electrical equipment, thereby improving the detection accuracy of household electrical equipment.
[0120] In a specific embodiment of the present application, as Figure 12 shown, the above detection method for electrical equipment includes the following steps:
[0121] S801, obtain at least three kinds of power time series data of household electrical equipment in a single power frequency cycle;
[0122] S802, select a coding matrix that matches the data volume of the power time series data as the coding matrix corresponding to at least three kinds of power time series data;
[0123] S803, based on the coding matrix, determine the coding method corresponding to at least three kinds of power time series data;
[0124] S804, obtain the coding start position and coding direction of each power time series data under the coding method;
[0125] S805, for any one of the power time series data, set the first data in the power time series data at the coding start position, and encode the power time series data according to the coding direction to obtain the coding result of the power time series data;
[0126] S806, screen out the coding results of any three power time series data from each coding result as the target coding result, and form an image with the target coding result as the electrical data image;
[0127] S807, input the electrical data image into a preset detection model, and use the detection model to analyze the electrical data image to determine whether each electrical equipment in the household electrical equipment is operating normally in a single power frequency cycle;
[0128] S808, use the judgment result as the detection result of each electrical equipment in a single power frequency cycle.
[0129] Figure 13 A flowchart showing the training process of a detection model. The method includes: S901, collecting sample power time-series data; S902, preprocessing the sample power time-series data. The preprocessing operation process during the training phase includes operations such as data cleaning, data integration, data transformation, and data augmentation; S903, encoding the preprocessed sample power time-series data to obtain sample power consumption data images; S904, using the sample power consumption data images to train the detection model to obtain a trained detection model.
[0130] It should be noted that for the detection process, preprocessing operations can also be performed on the power time-series data before matrix encoding. The preprocessing operation process includes digital filtering, physical quantity calculation, abnormal data screening, etc.
[0131] Figure 14 A schematic diagram showing the detection process of 256-point data. The current, power, and reactive current in the figure are used as power time-series data, and after preprocessing the power time-series data, detection is performed. Moreover, the data volumes of the current, power, and reactive current are all 256. During the detection process, the three power time-series data of current, power, and reactive current are matrix-encoded by means of matrix encoding, and the encoded data are combined to obtain a 16*16*3 matrix, which is the power consumption data image, and this power consumption data image is input into a neural network model (i.e., in the detection model) to obtain the detection results of each electrical device.
[0132] It should be understood that although the steps in the flowcharts involved in the above embodiments are shown in sequence according to the arrows, these steps do not necessarily need to be executed in the order indicated by the arrows. Unless there is a clear description in this article, the execution of these steps has no strict order limit, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above embodiments may include multiple steps or multiple stages. These steps or stages do not necessarily need to be executed at the same time, but can be executed at different times. The execution order of these steps or stages does not necessarily need to be sequential, but can be executed alternately or in turn with at least a part of other steps or steps or stages in other steps.
[0133] Based on the same inventive concept, an embodiment of the present application also provides a detection device for electrical devices for implementing the detection method for electrical devices involved above. The solution provided by this device to solve the problem is similar to the solution described in the above method. Therefore, the specific limitations in one or more embodiments of the detection device for electrical devices provided below can refer to the limitations on the detection method for electrical devices in the above text, and will not be repeated here.
[0134] In an exemplary embodiment, asFigure 15 As shown, a detection device for an electrical device is provided, including: an acquisition module 11, a generation module 12, and a determination module 13, where:
[0135] The acquisition module 11 is configured to acquire at least three kinds of power time series data of a household electrical device in a single power frequency cycle;
[0136] The generation module 12 is configured to perform matrix encoding on the corresponding power time series data according to the data characteristics of at least three kinds of power time series data, and generate an electrical consumption data image of the household electrical device; all the power time series data in the electrical consumption data image are continuously encoded and form a ring;
[0137] The determination module 13 is configured to determine the detection result of each electrical device of the household electrical device in a single power frequency cycle based on the electrical consumption data image.
[0138] In an exemplary embodiment, the above-mentioned generation module includes a first determination unit and a generation unit, where:
[0139] The first determination unit is configured to determine the encoding method corresponding to at least three kinds of power time series data based on the data characteristics of at least three kinds of power time series data;
[0140] The generation unit is configured to perform matrix encoding on the corresponding power time series data according to the encoding method, and generate an electrical consumption data image of the household electrical device.
[0141] In an exemplary embodiment, the above-mentioned first determination unit is further configured to select an encoding matrix matching the data volume of the power time series data as the encoding matrix corresponding to at least three kinds of power time series data; based on the encoding matrix, determine the encoding method corresponding to at least three kinds of power time series data.
[0142] In an exemplary embodiment, the above-mentioned first determination unit is further configured to rotate the encoding method of the encoding matrix by a preset rotation angle, and use the rotated encoding method as the encoding method corresponding to at least three kinds of power time series data.
[0143] In an exemplary embodiment, the above-mentioned first determination unit is further configured to perform mirror processing on the encoding method of the encoding matrix, and use the mirror-processed encoding method as the encoding method corresponding to at least three kinds of power time series data.
[0144] In an exemplary embodiment, the above-mentioned generation unit is further configured to obtain the encoding start position and encoding direction of each power time series data under the encoding method; according to each encoding start position and each encoding direction, encode each power time series data to generate an electrical consumption data image.
[0145] In an exemplary embodiment, the above-mentioned generating unit is further configured to perform matrix encoding on each power time-series data according to each encoding start position and each encoding direction to generate an encoding result for each power time-series data; screen out the encoding results of any three power time-series data from the encoding results as target encoding results, and use the image composed of the target encoding results as the power consumption data image.
[0146] In an exemplary embodiment, the above-mentioned generating unit is further configured to, for any power time-series data, set the first data in the power time-series data at the encoding start position, and perform encoding on the power time-series data according to the encoding direction to obtain the encoding result of the power time-series data.
[0147] In an exemplary embodiment, the above-mentioned determining module includes a judgment unit and a second determining unit, where:
[0148] The judgment unit is configured to input the power consumption data image into a preset detection model, analyze the power consumption data image by using the detection model, and judge whether each household electrical appliance is operating normally in a single power frequency cycle.
[0149] The second determining unit is configured to use the judgment result as the detection result of each household electrical appliance in a single power frequency cycle.
[0150] Each module in the above-mentioned detection device for household electrical appliances can be implemented in whole or in part by software, hardware, and their combination. The above-mentioned modules can be embedded in the processor of the computer device in hardware form or be independent of it, or can be stored in the memory of the computer device in software form, so that the processor can call and execute the operations corresponding to the above-mentioned modules.
[0151] In an embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the content of any one of the above-mentioned embodiments of the detection method for household electrical appliances is implemented.
[0152] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use, and processing of relevant data need to comply with relevant regulations.
[0153] Those of ordinary skill in the art can understand that all or part of the processes in the methods of the above embodiments can be completed by instructing relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above methods. Among them, any reference to a memory, database, or other medium used in the embodiments provided in the present application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM), etc. The databases involved in the embodiments provided in the present application can include at least one of relational databases and non-relational databases. Non-relational databases can include distributed databases based on blockchain, etc., without limitation. The processors involved in the embodiments provided in the present application can be general-purpose processors, central processors, graphics processors, digital signal processors, programmable logic devices, data processing logics based on quantum computing, artificial intelligence (AI) processors, etc., without limitation.
[0154] The technical features of the above embodiments can be combined arbitrarily. For the sake of brevity of description, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, it should be considered to be within the scope recorded in the present application.
[0155] The above embodiments only illustrate several implementation manners of the present application. The description thereof is relatively specific and detailed, but it should not be construed as a limitation to the patent scope of the present application. It should be noted that for those of ordinary skill in the art, without departing from the concept of the present application, several modifications and improvements can still be made, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the appended claims.
Claims
1. A method for detecting an electrical device, characterized in that: The method comprises: Obtain at least three types of power time series data of household electrical equipment under a single power frequency cycle; Matrix encoding is performed on the corresponding power time series data according to the data features of the at least three types of power time series data to generate a power consumption data image of the household electrical equipment; the power time series data in the power consumption data image are all continuously encoded and form a ring; Based on the power consumption data image, a detection result of each of the household electrical appliances under a single power frequency cycle is determined.
2. The method according to claim 1, characterized in that The step of performing matrix encoding on the corresponding power time series data according to the data features of the at least three types of power time series data to generate the power consumption data image of the household electrical equipment includes: Determining encoding methods corresponding to the at least three types of power time series data based on data characteristics of the at least three types of power time series data; The corresponding power time series data is matrix-encoded according to the encoding method to generate a power consumption data image of the household electrical equipment.
3. The method according to claim 2, characterized in that The data characteristics include data volume; The determining, based on the data features of the at least three types of power time series data, the encoding methods corresponding to the at least three types of power time series data includes: Selecting a coding matrix that matches the data volume of the power time series data as the coding matrix corresponding to the at least three types of power time series data; Based on the coding matrix, coding modes corresponding to the at least three types of power time series data are determined.
4. The method according to claim 3, characterized in that The determining, based on the coding matrix, coding modes corresponding to the at least three types of power time series data includes: The encoding method of the encoding matrix is rotated according to a preset rotation angle, and the rotated encoding method is used as the encoding method corresponding to the at least three types of power time series data.
5. The method according to claim 3, characterized in that: The determining, based on the coding matrix, coding modes corresponding to the at least three types of power time series data includes: The encoding mode of the encoding matrix is mirrored, and the encoding mode after the mirroring process is used as the encoding mode corresponding to the at least three types of power time series data.
6. The method according to any one of claims 2 to 5, characterized in that: The step of performing matrix encoding on the corresponding power time series data according to the encoding method to generate the power consumption data image of the household electrical equipment includes: Obtaining the encoding starting position and encoding direction of each power time series data under the encoding method; According to each of the encoding start positions and each of the encoding directions, each of the power time series data is encoded to generate the power consumption data image.
7. The method according to claim 6, characterized in that The step of encoding each power time series data according to each encoding start position and each encoding direction to generate the power consumption data image includes: According to each of the encoding start positions and each of the encoding directions, matrix encoding is performed on each of the power time series data to generate an encoding result for each of the power time series data; Any three encoding results of the power time series data are selected from the encoding results as target encoding results, and an image composed of the target encoding results is used as the power consumption data image.
8. The method according to claim 7, characterized in that The matrix encoding is performed on each power time series data according to each encoding starting position and each encoding direction to generate an encoding result of each power time series data, including: For any power time series data, the first data in the power time series data is set at the encoding start position, and the power time series data is encoded according to the encoding direction to obtain the encoding result of the power time series data.
9. The method according to any one of claims 1 to 5, characterized in that: The step of determining the detection result of each of the household electrical appliances under a single power frequency cycle based on the power consumption data image includes: Inputting the power consumption data image into a preset detection model, analyzing the power consumption data image using the detection model, and determining whether each of the household electrical appliances operates normally under a single power frequency cycle; The judgment result is used as the detection result of each electrical device under a single power frequency cycle.
10. A detection device for electrical equipment, characterized in that: The device comprises: An acquisition module, used to acquire at least three types of power time series data of household electrical equipment under a single power frequency cycle; A generating module, configured to perform matrix coding on the corresponding power time series data according to the data characteristics of the at least three types of power time series data, and generate a power consumption data image of the household electrical equipment; the power time series data in the power consumption data image are all continuously coded and form a ring; A determination module is used to determine the detection result of each household electrical device under a single power frequency cycle based on the power consumption data image.
11. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 9 are implemented.