Electric energy meter data diagnosis method and system based on dynamic resource scheduling
Through dynamic resource scheduling and model architecture optimization, the problems of high computational complexity and low efficiency of low-computing-power processors in smart meters are solved, and real-time electricity meter data diagnosis is achieved.
Patent Information
- Application Number
- CN202510877492.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-27
- Publication Date
- 2025-09-30
AI Technical Summary
The low-computing-power processors in smart meters cannot effectively deploy hybrid deep neural networks, resulting in high computational complexity and low efficiency, making it difficult to meet real-time diagnosis requirements.
A method based on dynamic resource scheduling is adopted, through fixed-point operations and model architecture optimization, including dynamic pruning of convolutional layers and simplified residual GRU units, combined with fixed-point quantization and optimized neural network models, to dynamically adjust computing power allocation and realize electricity meter data diagnosis.
It reduces computational complexity, reduces inference delay, meets the real-time diagnosis needs of smart meters, and improves computational efficiency.
Smart Images

Figure CN120723459A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of electric energy meter diagnosis, and in particular to an electric energy meter data diagnosis method and system based on dynamic resource scheduling. Background Art
[0002] In the widespread deployment of smart grids, smart meters, as key end nodes, often face the challenge of limited computing power in their processors. Existing smart meters typically use low-power processors like the ARM Cortex-M series, which typically offer computing power under 50 DMIPS and extremely limited memory resources (e.g., less than 64KB). Deploying hybrid deep neural networks for electricity usage analysis and anomaly diagnosis under these hardware conditions presents the following technical challenges:
[0003] First, traditional hybrid deep neural network models have large parameter counts and high computational complexity. For example, a common LSTM-CNN hybrid network typically has millions of parameters, and the memory capacity of low-power processors cannot meet the basic requirements for loading and running the model.
[0004] Secondly, floating-point operations account for a very high proportion of deep neural networks, and most low-computing-power processors lack hardware floating-point units. Relying on software to implement floating-point operations will lead to low computing efficiency and significantly increased inference delay (for example, delays exceeding 500ms), making it difficult to meet the real-time diagnosis requirements of smart meters. Summary of the Invention
[0005] The purpose of the present invention is to overcome the deficiencies in the prior art and provide an electric energy meter data diagnosis method and system based on dynamic resource scheduling, which has low computational complexity and high efficiency and can solve the problem of hybrid deep neural network deployment on low computing power hardware platforms.
[0006] To achieve the above object, the present invention is implemented by adopting the following technical solutions:
[0007] In one aspect, the present invention provides a method for diagnosing electric energy meter data based on dynamic resource scheduling, comprising:
[0008] Get the electricity meter data stream;
[0009] performing fixed-point operations on the electric energy meter data stream according to preset computing resources to obtain an optimized electric energy meter data stream;
[0010] Inputting the optimized electric energy meter data stream into a pre-built data diagnosis model and outputting the electric energy meter data diagnosis result;
[0011] The construction of the data diagnosis model includes:
[0012] A dynamic pruning convolution layer and a simplified residual GRU unit are added in parallel before the adaptive feature fusion layer; the dynamic pruning convolution layer is obtained by pruning the depth-separable convolution layer by historically optimizing the entropy value of the electricity meter data stream, and the simplified residual GRU unit is obtained by merging the update gate and reset gate of the GRU unit.
[0013] Optionally, performing fixed-point operations on the electric energy meter data stream according to preset computing resources to obtain an optimized electric energy meter data stream includes:
[0014] ;
[0015] ;
[0016] in, Represents the electric energy meter data after fixed-point quantization; represents the truncation function; Indicates that a number is rounded to a given number of digits; Represents the data stream of the electric energy meter; represents the scaling factor; Indicates optimization of the electricity meter data flow; Indicates the preset computing resources; represents the quantization factor; Indicates the preset maximum value.
[0017] Optionally, obtaining the dynamically cropped convolutional layer includes:
[0018] ;
[0019] ;
[0020] in, represents the entropy value of the k-th historical optimized electric energy meter data stream; Indicates the number of historical optimized electric energy meter data streams in each historical optimized electric energy meter data stream; represents the distribution probability of the i-th historical optimized electric energy meter data in the historical optimized electric energy meter data stream; Indicates the threshold; Indicates the number of historical optimized energy meter data streams; represents the compression factor;
[0021] When there is the entropy value of the k-th historical optimized electricity meter data stream Less than the threshold When , the preset convolution kernel in the depthwise separable convolution layer is turned off to obtain the dynamically cropped convolution layer; otherwise, the depthwise separable convolution layer is directly used as the dynamically cropped convolution layer.
[0022] Optionally, obtaining the simplified residual GRU unit includes:
[0023] ;
[0024] in, Represent the simplified residual GRU units at time t and time t+1 respectively; represents the update gate at time t; represents the weight matrix; represents the reset gate at time t; represents the input gate at time t; Represents the exclusive or exclusive operator.
[0025] Optionally, the processing steps of the data diagnosis model include:
[0026] In the dynamic cropping convolution layer, convolution processing is performed on the optimized electric energy meter data stream to obtain spatial features;
[0027] In the simplified residual GRU unit, the dependency of the time series in the optimized electric energy meter data stream is captured to obtain a time series feature;
[0028] In the adaptive feature fusion layer, the spatial features and temporal features are fused to obtain the electric energy meter data diagnosis result.
[0029] Optionally, before diagnosing the electric energy meter data, the following steps are also included:
[0030] The energy meter data stream is placed into the microtask queue in order of urgency. The diagnostic priority of the energy meter data stream in the microtask queue is divided according to the CPU load rate. The calculation formula of the CPU load rate is:
[0031] ;
[0032] in, Represents the CPU load rate at time t and time t+1 respectively; represents the smoothing factor; Indicates the current business cycle count; Indicates the total business cycle count;
[0033] CPU load rate at time t+1 When the load rate is less than the preset load rate, the order of the electric energy meter data streams in the microtask queue is used as the diagnosis priority of the electric energy meter data streams; otherwise, the electric energy meter data streams are randomly selected for diagnosis.
[0034] Optionally, it also includes adjusting the computing power allocation of the data diagnosis model based on power consumption:
[0035] When the power consumption is stable, the computing power of the data diagnosis model is adjusted using an eight-bit data mode;
[0036] When the power current harmonic distortion rate is greater than a first preset current rate, an eight-bit data mode and a verification algorithm are used to adjust the computing power of the data diagnosis model;
[0037] When the power current mutation rate is greater than the second preset current rate, the data diagnosis model uses an eight-bit data mode, a dynamic range expansion technology and a verification algorithm to adjust the computing power of the data diagnosis model.
[0038] The second invention provides an electric energy meter data diagnosis system based on dynamic resource scheduling, comprising:
[0039] Data acquisition module, used to: obtain the data stream of the electric energy meter;
[0040] A data optimization module is used to: perform fixed-point operations on the electric energy meter data stream according to preset computing resources to obtain an optimized electric energy meter data stream;
[0041] A data diagnosis module is used to: input the optimized electric energy meter data stream into a pre-built data diagnosis model and output the electric energy meter data diagnosis result;
[0042] The construction of the data diagnosis model includes:
[0043] A dynamic pruning convolution layer and a simplified residual GRU unit are added in parallel before the adaptive feature fusion layer; the dynamic pruning convolution layer is obtained by pruning the depth-separable convolution layer by historically optimizing the entropy value of the electricity meter data stream, and the simplified residual GRU unit is obtained by merging the update gate and reset gate of the GRU unit.
[0044] In a third aspect, the present invention provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the method described in the first aspect.
[0045] In a fourth aspect, the present invention provides a computer device comprising a processor and a storage medium;
[0046] The storage medium is used to store instructions;
[0047] The processor is configured to operate according to the instructions to execute the method according to the first aspect.
[0048] Compared with the prior art, the present invention has the following beneficial effects:
[0049] This invention solves the problems of large number of parameters, high computational complexity and low computational efficiency of traditional hybrid deep neural network models through innovative model network architecture design and fixed-point operation strategy. The memory capacity of low-computing power processors can meet the basic requirements of model loading and operation, reduce inference delay, and solve the problem of deploying hybrid deep neural networks on low-computing power hardware platforms to meet the requirements of smart meters for real-time diagnosis. BRIEF DESCRIPTION OF THE DRAWINGS
[0050] Figure 1 FIG2 is a flow chart of an embodiment of an electric energy meter data diagnosis method based on dynamic resource scheduling according to the present invention;
[0051] Figure 2 Shown is a schematic diagram of the business operation process in an embodiment of the present invention. DETAILED DESCRIPTION
[0052] The technical solution of the present invention is described in detail below through the accompanying drawings and specific embodiments. It should be understood that the embodiments of the present invention and the specific features in the embodiments are detailed descriptions of the technical solution of the present invention, rather than limitations on the technical solution of the present invention. In the absence of conflict, the embodiments of the present invention and the technical features in the embodiments can be combined with each other.
[0053] The term "and / or" simply describes a relationship between related objects, indicating that three possible relationships exist. For example, "A and / or B" can mean: A exists alone, A and B exist simultaneously, or B exists alone. Additionally, the character " / " generally indicates an "or" relationship between the related objects.
[0054] Example 1
[0055] This embodiment introduces a method for diagnosing electric energy meter data based on dynamic resource scheduling. Figure 2 As shown in the figure, the diagnostic system is inserted into the original business process and uses idle computing power to execute functional business without affecting the core business, such as metering tasks; at the same time, through dynamic formulas, such as load rate and entropy value threshold adjustment formulas, resource adjustment is achieved and the next waiting cycle is dynamically adjusted to fully ensure that the operation of the core business is not affected, ensuring efficient real-time diagnosis of the electricity consumption behavior of smart meters.
[0056] like Figure 1 As shown, the following steps are included:
[0057] Step 1: Get the electricity meter data stream, specifically:
[0058] The energy meter data stream is placed into the microtask queue in order of urgency. The diagnostic priority of the energy meter data stream in the microtask queue is divided according to the CPU load rate. The CPU load rate is calculated as follows:
[0059] ;
[0060] in, Represents the CPU load rate at time t and time t+1 respectively; represents the smoothing factor; Indicates the current business cycle count; Indicates the total business cycle count;
[0061] CPU load rate at time t+1 When the load rate is less than the preset load rate, the order of the electric energy meter data streams in the microtask queue is used as the diagnostic priority of the electric energy meter data streams; otherwise, the electric energy meter data streams are randomly selected for diagnosis; in this embodiment, the preset load rate is 20%.
[0062] Step 2: Based on the preset computing resources, perform fixed-point operations on the electricity meter data stream to obtain the optimized electricity meter data stream, specifically:
[0063] To address the instruction set characteristics of low-computing-power processors (such as the ARM Cortex-M series), the following optimizations are performed to ensure logical integration with the model network architecture. First, the electricity meter data stream is fixed-point quantized, converting the electricity meter data stream from 32-bit floating-point numbers to 8-bit fixed-point numbers, namely:
[0064] ;
[0065] in, Represents the electric energy meter data after fixed-point quantization; represents the truncation function; Indicates that a number is rounded to a given number of digits; Represents the data stream of the electric energy meter; represents the scaling factor. In this embodiment, , for the Thumb-2 instruction set, optimize the matrix multiplication library, such as using SIMD instructions, to improve computing efficiency by more than 60%.
[0066] Optimize the electric energy meter data after fixed-point quantization, namely:
[0067] ;
[0068] in, Indicates optimization of the electricity meter data flow; Indicates the preset computing resources, for example, {0:0, 1:0.125, ..., 6:1.0}; represents the quantization factor; Indicates the preset maximum value; the calculation period per cycle is reduced from 240 cycles to 35 cycles.
[0069] Step 3: Input the optimized electricity meter data stream into the pre-built data diagnosis model and output the electricity meter data diagnosis results, specifically:
[0070] Build a lightweight hybrid deep neural network suitable for low-computing hardware, namely the data diagnosis model, which includes:
[0071] A dynamic pruning convolution layer and a simplified residual GRU unit are added in parallel before the adaptive feature fusion layer; the dynamic pruning convolution layer is obtained by pruning the depthwise separable convolution layer by optimizing the entropy value of the historical electricity meter data stream, and the simplified residual GRU unit is obtained by merging the update gate and reset gate of the GRU unit;
[0072] The acquisition of dynamically cropped convolutional layers includes:
[0073] ;
[0074] ;
[0075] in, represents the entropy value of the k-th historical optimized electric energy meter data stream; Indicates the number of historical optimized electric energy meter data streams in each historical optimized electric energy meter data stream; represents the distribution probability of the i-th historical optimized electric energy meter data in the historical optimized electric energy meter data stream; Indicates the threshold; Indicates the number of historical optimized energy meter data streams; represents the compression factor;
[0076] When there is the entropy value of the k-th historical optimized electricity meter data stream Less than the threshold When , the preset convolution kernels in the depthwise separable convolution layer are turned off to obtain a dynamically pruned convolution layer; otherwise, the depthwise separable convolution layer is directly used as the dynamically pruned convolution layer; in this embodiment, 50% of the convolution kernels in the depthwise separable convolution layer are turned off, which reduces the computational complexity by an average of 42% compared with traditional pruning;
[0077] Simplifying the acquisition of residual GRU units includes:
[0078] ;
[0079] in, Represent the simplified residual GRU units at time t and time t+1 respectively; represents the update gate at time t; represents the weight matrix; represents the reset gate at time t; represents the input gate at time t; represents the exclusive OR operator; in this embodiment, the residual GRU unit is simplified, reducing 60% of the parameters compared with the traditional GRU unit.
[0080] Before the model performs data diagnosis, adjust the computing power allocation of the data diagnosis model according to the power consumption:
[0081] When the power consumption is stable, the computing power of the data diagnosis model is adjusted using an eight-bit data mode;
[0082] When the power current harmonic distortion rate is greater than a first preset current rate, an eight-bit data mode and a verification algorithm are used to adjust the computing power of the data diagnosis model;
[0083] When the power current mutation rate is greater than a second preset current rate, the data diagnostic model uses an eight-bit data mode, a dynamic range expansion technology, and a verification algorithm to adjust the computing power of the data diagnostic model;
[0084] The eight-bit data mode, dynamic range expansion technology, and verification algorithm of this embodiment are detailed in the prior art. The first preset current rate is set to 5%, and the second preset current rate is set to 30%.
[0085] This embodiment can dynamically adjust the computing accuracy of the neural network under different computing power allocation modes. For example, when power consumption is stable, lower quantization accuracy or a simplified calculation process is adopted to reduce the amount of calculation; when the power current mutation rate is greater than 30%, the calculation accuracy is improved to ensure the accuracy of the diagnostic results.
[0086] The processing steps of the data diagnosis model include:
[0087] In the dynamic cropping convolution layer, convolution processing is performed on the optimized electric energy meter data stream to obtain spatial features;
[0088] In the simplified residual GRU unit, the dependency of the time series in the optimized electric energy meter data stream is captured to obtain time series features;
[0089] In the adaptive feature fusion layer, the spatial features and temporal features are fused to obtain the diagnostic results of the electricity meter data. An adaptive feature fusion mechanism is designed to dynamically adjust the fusion weights of the spatial features extracted by CNN and the temporal features extracted by GRU according to different input data types and diagnostic task requirements, thereby improving feature utilization efficiency.
[0090] In this embodiment, the electricity meter data stream is used as input data of the data diagnosis model after 8-bit fixed-point operation; the electricity meter data diagnosis result is obtained after passing through the data diagnosis model, and the diagnosis result is used as the computing power resource of the next cycle to dynamically activate the next operation cycle.
[0091] Example 2
[0092] Based on Example 1, this embodiment introduces an electric energy meter data diagnosis system based on dynamic resource scheduling, including:
[0093] Data acquisition module, used to: obtain the data stream of the electric energy meter;
[0094] A data optimization module is used to: perform fixed-point operations on the electric energy meter data stream according to preset computing resources to obtain an optimized electric energy meter data stream;
[0095] A data diagnosis module is used to: input the optimized electric energy meter data stream into a pre-built data diagnosis model and output the electric energy meter data diagnosis result;
[0096] The construction of the data diagnosis model includes:
[0097] A dynamic pruning convolution layer and a simplified residual GRU unit are added in parallel before the adaptive feature fusion layer; the dynamic pruning convolution layer is obtained by pruning the depth-separable convolution layer by historically optimizing the entropy value of the electricity meter data stream, and the simplified residual GRU unit is obtained by merging the update gate and reset gate of the GRU unit.
[0098] The specific functional implementation of each of the above modules can be found in the relevant content of the method in Example 1 and will not be elaborated on here.
[0099] Example 3
[0100] This embodiment introduces a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the steps of the method described in Example 1 are implemented.
[0101] Example 4
[0102] This embodiment introduces a computer device, including a processor and a storage medium;
[0103] The storage medium is used to store instructions;
[0104] The processor is configured to operate according to the instructions to execute the method according to embodiment 1.
[0105] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware. Furthermore, the present application may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0106] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 a process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0107] These computer program instructions may also be stored in a computer readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 a process or multiple processes and / or boxes Figure 1 The function specified in one or more boxes.
[0108] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operational steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing the instructions executed on the computer or other programmable device for implementing the process. Figure 1 a process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.
[0109] The embodiments of the present invention are described above in conjunction with the accompanying drawings, but the present invention is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of the present invention, ordinary technicians in this field can also make many forms without departing from the scope of protection of the purpose of the present invention and the claims, which are all protected by the present invention.
Claims
1. A method for diagnosing electric energy meter data based on dynamic resource scheduling, characterized in that: include: Get the electricity meter data stream; performing fixed-point operations on the electric energy meter data stream according to preset computing resources to obtain an optimized electric energy meter data stream; Inputting the optimized electric energy meter data stream into a pre-built data diagnosis model and outputting the electric energy meter data diagnosis result; The construction of the data diagnosis model includes: A dynamic pruning convolution layer and a simplified residual GRU unit are added in parallel before the adaptive feature fusion layer; the dynamic pruning convolution layer is obtained by pruning the depth-separable convolution layer by historically optimizing the entropy value of the electricity meter data stream, and the simplified residual GRU unit is obtained by merging the update gate and reset gate of the GRU unit.
2. The method for diagnosing electric energy meter data based on dynamic resource scheduling according to claim 1, characterized in that: According to the preset computing resources, fixed-point operations are performed on the electric energy meter data stream to obtain an optimized electric energy meter data stream, including: ; ; in, Represents the electric energy meter data after fixed-point quantization; represents the truncation function; Indicates that a number is rounded to a given number of digits; Represents the data stream of the electric energy meter; represents the scaling factor; Indicates optimization of the electricity meter data flow; Indicates the preset computing resources; represents the quantization factor; Indicates the preset maximum value.
3. The method for diagnosing electric energy meter data based on dynamic resource scheduling according to claim 1, characterized in that: The acquisition of the dynamically cropped convolutional layer includes: ; ; in, represents the entropy value of the k-th historical optimized electric energy meter data stream; Indicates the number of historical optimized electric energy meter data streams in each historical optimized electric energy meter data stream; represents the distribution probability of the i-th historical optimized electric energy meter data in the historical optimized electric energy meter data stream; Indicates the threshold; Indicates the number of historical optimized energy meter data streams; represents the compression factor; When there is the entropy value of the k-th historical optimized electricity meter data stream Less than the threshold When , the preset convolution kernel in the depthwise separable convolution layer is turned off to obtain the dynamically cropped convolution layer; otherwise, the depthwise separable convolution layer is directly used as the dynamically cropped convolution layer.
4. The method for diagnosing electric energy meter data based on dynamic resource scheduling according to claim 1, characterized in that: The acquisition of the simplified residual GRU unit includes: ; in, Represent the simplified residual GRU units at time t and time t+1 respectively; represents the update gate at time t; represents the weight matrix; represents the reset gate at time t; represents the input gate at time t; Represents the exclusive or exclusive operator.
5. The method for diagnosing electric energy meter data based on dynamic resource scheduling according to claim 1, characterized in that: The processing steps of the data diagnosis model include: In the dynamic cropping convolution layer, convolution processing is performed on the optimized electric energy meter data stream to obtain spatial features; In the simplified residual GRU unit, the dependency of the time series in the optimized electric energy meter data stream is captured to obtain time series features; In the adaptive feature fusion layer, the spatial features and temporal features are fused to obtain the electric energy meter data diagnosis result.
6. The method for diagnosing electric energy meter data based on dynamic resource scheduling according to claim 1, characterized in that: Before diagnosing the electric energy meter data, the following steps are also included: The energy meter data stream is placed into the microtask queue in order of urgency. The diagnostic priority of the energy meter data stream in the microtask queue is divided according to the CPU load rate. The calculation formula of the CPU load rate is: ; in, Represents the CPU load rate at time t and time t+1 respectively; represents the smoothing factor; Indicates the current business cycle count; Indicates the total business cycle count; CPU load rate at time t+1 When the load rate is less than the preset load rate, the order of the electric energy meter data streams in the microtask queue is used as the diagnosis priority of the electric energy meter data streams; otherwise, the electric energy meter data streams are randomly selected for diagnosis.
7. The method for diagnosing electric energy meter data based on dynamic resource scheduling according to claim 6, characterized in that: It also includes adjusting the computing power allocation of the data diagnosis model based on power consumption: When the power consumption is stable, the computing power of the data diagnosis model is adjusted using an eight-bit data mode; When the power current harmonic distortion rate is greater than a first preset current rate, an eight-bit data mode and a verification algorithm are used to adjust the computing power of the data diagnosis model; When the power current mutation rate is greater than the second preset current rate, the data diagnosis model uses an eight-bit data mode, a dynamic range expansion technology and a verification algorithm to adjust the computing power of the data diagnosis model.
8. An electric energy meter data diagnosis system based on dynamic resource scheduling, characterized in that: include: Data acquisition module, used to: obtain the data stream of the electric energy meter; A data optimization module is used to: perform fixed-point operations on the electric energy meter data stream according to preset computing resources to obtain an optimized electric energy meter data stream; A data diagnosis module is used to: input the optimized electric energy meter data stream into a pre-built data diagnosis model and output the electric energy meter data diagnosis result; The construction of the data diagnosis model includes: A dynamic pruning convolution layer and a simplified residual GRU unit are added in parallel before the adaptive feature fusion layer; the dynamic pruning convolution layer is obtained by pruning the depth-separable convolution layer by historically optimizing the entropy value of the electricity meter data stream, and the simplified residual GRU unit is obtained by merging the update gate and reset gate of the GRU unit.
9. 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 7 are implemented.
10. A computer device, characterized in that: including processor and storage medium; The storage medium is used to store instructions; The processor is configured to operate according to the instructions to execute the method according to any one of claims 1 to 7.
