A method and system for measuring electric energy based on historical data analysis
By combining the power readings with the temperature background to form image information, and using fitting curves and error identification models to identify mutation error points, the problem of meter measurement errors in alpine and cold areas is solved, automation and accuracy are achieved, and operating costs and manpower investment are reduced. .
Patent Information
- Application Number
- CN202311495362.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-11-10
- Publication Date
- 2024-09-06
- Estimated Expiration
- 2043-11-10
AI Technical Summary
In alpine areas, the performance of electric energy meters decreases or malfunctions due to low temperature environments. Existing retrofit devices add insulation equipment, but there are problems such as extra power consumption, high operating costs, equipment effects affected by ambient temperature, and possible shortening of the life of electric energy meters. And the existing technology cannot realize automated and accurate electric energy measurement.
Using a method based on historical data analysis, the power readings are combined with the temperature background to form associated image information. The mutation error points are identified through fitting curves and error identification models, and the curvature lines are used to correct the errors to achieve automated electric energy measurement in alpine areas.
It achieves the accuracy and automation of electric energy measurement data in alpine areas, reduces manpower investment, and avoids the problems of shortened life of electric energy meters and increased operating costs.
Smart Images

Figure CN117272117B
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of electric energy metering and data processing, and in particular to an electric energy metering method and system based on historical data analysis. Background Art
[0002] In the cold winter, the internal components of the energy meter may suffer performance degradation or even malfunction due to the low temperature environment. In addition, the reading of the energy meter may also be erroneous due to temperature changes. How to ensure the normal operation of the energy meter in high-altitude and cold areas and accurate energy meter readings has become a technical problem.
[0003] In the prior art, some modification devices on the market adopt the method of adding insulation equipment, trying to ensure the normal operation of the electricity meter by increasing the temperature inside the electricity meter. However, this method has some problems. First, the operation of the insulation equipment requires additional electricity, which increases the operating cost. Secondly, the working effect of the insulation equipment is affected by the ambient temperature. When the ambient temperature is too low, the insulation equipment may not provide enough heat to ensure the normal operation of the electricity meter. Finally, the insulation equipment may pose a risk of overheating to the electronic components inside the electricity meter, which may shorten the life of the electricity meter. The electricity meters in high-altitude and cold areas need to work continuously. In low temperature environments, the battery life of the electricity meter will be greatly shortened, and the battery needs to be replaced frequently, which increases the cost of use.
[0004] CN 116704737 A discloses a method for collecting readings of electronic electric energy meters in high-cold areas. However, the solution needs to output time periods with possible errors to operation and maintenance personnel, which requires manual judgment. In addition, the technical solution can only complete the collection of electric energy meter readings and cannot provide correct metering data of the electric energy meter. Summary of the invention
[0005] The embodiment of the present application provides an electric energy metering method and system based on historical data analysis, which combines the collected electric power readings with the temperature background to form associated image information, determines the error reading points by taking the error points as identification targets, and matches the curvature data of the previous electric energy meter at the error points to obtain the correct metering data, thereby realizing automated electric energy metering and correction in high-cold areas.
[0006] The present application embodiment proposes an electric energy metering method based on historical data analysis, which is applied to electric energy data analysis and metering in high-cold areas, including the following steps:
[0007] For high-cold areas, the area range is demarcated according to the temperature range, and the electric energy meters with the same temperature range are grouped together;
[0008] For the same group of electric energy meters within the designated area, the electric energy readings of each electric energy meter are collected at the specified time interval, as well as the temperature data;
[0009] Establishing a reading-time coordinate system, mapping the collected electric quantity readings of the same group of electric energy meters into the coordinate system respectively, and mapping the temperature data of the corresponding temperature range into the coordinate system, so as to construct a temperature background;
[0010] The electric quantity reading points of the same electric energy meter are smoothly connected by using a fitting curve to construct the reading curve of each electric energy meter;
[0011] The reading curves of each electric energy meter in the same group are input together with the temperature background into the error recognition model pre-trained based on historical data to identify the mutation error points under the corresponding temperature conditions;
[0012] The identified mutation error points are replaced by adapted curvature lines to correct the mutation errors, and the electricity metering of the electricity meters in the high-cold areas is completed based on the corrected electricity data.
[0013] Optionally, the error recognition model includes a scale-adaptive convolution head, three layers of convolution kernels, and a fully connected layer arranged in sequence, wherein the scale-adaptive convolution head includes:
[0014] Transpose convolution, a convolution layer with a stride of 2, wherein the transpose convolution is used to upsample the sub-image whose input specification is smaller than the target specification to the required specification, and the convolution layer with a stride of 2 is used to downsample the sub-image whose input specification is larger than the target specification to the required specification, so as to achieve the adaptation of the input sub-image, and the output of the scale-adaptive convolution head is input into the fully connected layer after global average pooling and global maximum pooling;
[0015] The scale-adaptive convolution head also includes: 3×3 convolution and 3×3 dilated convolution, which are used to segment images of required specifications;
[0016] The three-layer convolution kernel includes a convolution layer with a convolution kernel scale of 3×3, and the output of each convolution layer is input into the fully connected layer after global average pooling and global maximum pooling.
[0017] Optionally, pre-training the error recognition model includes:
[0018] Provide a test environment and collect historical sample data in various temperature ranges for various types of electric energy meters serving in high-cold areas. The historical sample data is electric energy curve data including temperature background;
[0019] The historical sample data is marked by a marking tool, and after marking, an image of the electric quantity curve at a corresponding position is intercepted as a marking result, and the electric quantity curve in the historical sample data is segmented by using a given peak value to perform a rough detection of a mutation error, and an image of the electric quantity curve at a corresponding position is intercepted based on a rough detection position as a rough detection result;
[0020] The matching degree between the labeling result and the rough detection result is calculated, and the samples with matching degree greater than the preset threshold are taken as positive samples, and the samples with matching degree lower than the preset threshold are taken as negative samples to construct a training sample set.
[0021] Optionally, pre-training the error recognition model further includes:
[0022] Using VGGNet to classify samples in the constructed training sample set, and according to the output of VGGNet, grading the samples in the training sample set based on positive samples and negative samples;
[0023] For the classified training samples, cosine similarity is used to screen the data. For the training samples whose similarity is greater than a given similarity threshold, only the image with the highest confidence of VGGNet output is retained. Different similarity thresholds are set for different sample classifications, so that the number of samples at each level is similar.
[0024] After obtaining the specified number of samples at each level, the samples at each level are merged as the training data set.
[0025] Optionally, pre-training the error recognition model further includes:
[0026] The FocalLoss loss function is used as the error between the error recognition model output and the training label, satisfying:
[0027]
[0028] in, , represents negative samples, represents a positive sample, represents the probability that the mutation error point is a positive sample, , is the regulating factor;
[0029] Use the stochastic gradient descent method to update the parameters to meet the following requirements:
[0030]
[0031] in, , represents a randomly selected gradient direction, is an integer, represents the learning rate, represents the model parameters at time t, () represents the gradient of the model cost function.
[0032] Optionally, the reading curves of each electric energy meter in the same group together with the temperature background are input into an error recognition model pre-trained based on historical data, including:
[0033] The reading curves of each electric energy meter in the same group together with the temperature background are intercepted according to a preset time step to obtain multiple sub-images, and the sub-images of adjacent time lines are partially overlapped;
[0034] The captured sub-image is input into the error recognition model.
[0035] Optionally, replacing the identified mutation error point with an adapted curvature line to correct the mutation error includes:
[0036] From the positive samples, find the positive samples of the same model of electric energy meters under the corresponding temperature conditions, whose confidence output by VGGNet is higher than the preset confidence threshold;
[0037] In the time period corresponding to the positive samples whose confidence is higher than the preset confidence threshold, the mean curvature of the electricity curves of the remaining electricity meters except the positive samples in the electricity curve image of the corresponding group is determined as the adapted curvature.
[0038] An embodiment of the present application further proposes an electric energy metering system based on historical data analysis, comprising a processor and a memory, wherein the memory stores a computer program, and when the computer program is executed by the processor, the steps of the electric energy metering method based on historical data analysis as described above are implemented.
[0039] The method of the present application combines the collected electricity readings with the temperature background to form associated image information, determines the error reading points by taking the error points as identification targets, and matches the curvature data of the previous electricity meter at the error points to obtain the correct metering data, thereby realizing automated electricity metering and correction in high-altitude and cold areas.
[0040] The above description is only an overview of the technical solution of the present application. In order to more clearly understand the technical means of the present application, it can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of the present application more obvious and easy to understand, the specific implementation methods of the present invention are listed below. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] Various other advantages and benefits will become apparent to those of ordinary skill in the art by reading the detailed description of the preferred embodiments below. The accompanying drawings are only for the purpose of illustrating the preferred embodiments and are not to be considered as limiting the present invention. Moreover, the same reference symbols are used throughout the accompanying drawings to represent the same components. In the accompanying drawings:
[0042] Figure 1 The basic process diagram of the electric energy metering method of this embodiment is shown in FIG.
[0043] Figure 2 FIG. 1 is a schematic diagram of the error identification model structure involved in the electric energy metering method of this embodiment. DETAILED DESCRIPTION
[0044] The exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although the exemplary embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be limited by the embodiments set forth herein. On the contrary, these embodiments are provided to enable a more thorough understanding of the present disclosure and to fully convey the scope of the present disclosure to those skilled in the art.
[0045] The present application embodiment proposes an electric energy metering method based on historical data analysis, which is applied to electric energy data analysis and metering in high-cold areas, such as Figure 1 As shown, the following steps are included:
[0046] In step S101, the regional range of the high-cold areas is delineated according to the temperature range, and the electric energy meters in the same temperature range are grouped together. The electric energy metering method of the present application takes into account the temperature range in which the readings of the electric energy meters may have sudden changes in reading errors. For example, in actual applications, the metering accuracy of the electric energy meter in the range of -10°C-55°C meets the needs of production and life, and this temperature range is not within the scope of the electric energy metering method of the embodiment of the present application. In high-cold areas where the temperature range cannot meet the needs of production and life, the temperature range can be delineated at intervals of 10°C. In particular, the method of the present application is particularly suitable for the analysis of the metering accuracy of electric energy meters in extremely cold areas.
[0047] In step S102, for the same group of electric energy meters within the delimited area, the electric energy readings of each electric energy meter are collected at a specified time interval, and the temperature data is collected. For collecting temperature data, temperature collection points can be set regionally and the collection can be completed at a preset sampling rate. Alternatively, a temperature probe can be set on the electric energy meter, and the collected temperature and the corresponding electric energy meter's electric energy data can be collected together. The method of the present application is further explained in the subsequent examples in the manner of completing the collection together.
[0048] In step S103, a reading-time coordinate system is established, and the collected power readings of the same group of electric energy meters are respectively mapped into the coordinate system, and the temperature data of the corresponding temperature range is mapped into the coordinate system to construct a temperature background. Mapping the collected power readings of the same group of electric energy meters into the coordinate system can only map the metering data of the electric energy meters within the specified time interval without superimposing the previous metering readings. In some examples, a temperature background can be constructed in a manner similar to thermal imaging. Specifically, a basic thermal imaging distribution map can be uniformly constructed for temperatures below -10°C, and the collection points can be transitioned through smooth curves. For any group of electric energy meters in a temperature range, the collected temperatures are mapped from the basic thermal imaging distribution map, so that after the collected power readings of the same group of electric energy meters are respectively mapped into the coordinate system, the temperature background is constructed through the mapped color value.
[0049] In step S104, a fitting curve is used to smoothly connect each electric power reading point of the same electric power meter to construct a reading curve of each electric power meter. In some examples, for example, a function or a polynomial can be used to smoothly connect each electric power reading point of the same electric power meter to construct a reading curve based on the temperature background.
[0050] In step S105, the reading curves of each electric energy meter in the same group are input into the error recognition model pre-trained based on historical data together with the temperature background to identify the mutation error points under the corresponding temperature conditions. The method of the present invention proposes a method based on image recognition to realize the mutation error points of the metering data of the electric energy meter under the corresponding temperature conditions, so as to process and recognize a large number of data, especially in a complex curve environment, for a certain mutation error point, the sub-image formed by the temperature background and the curve group is used as input, and the mutation error, especially the smaller mutation error, can be well identified by image recognition.
[0051] In step S106, the identified mutation error point is replaced by an adapted curvature line to correct the mutation error, and based on the corrected power data, the electric energy metering of the electric energy meter in the high-cold area is completed. After the adapted curvature replacement, the mutation error is corrected, thereby completing accurate electric energy measurement.
[0052] The method of the present application combines the collected electricity readings with the temperature background to form associated image information, determines the error reading points by taking the error points as identification targets, and matches the curvature data of the previous electricity meter at the error points to obtain the correct metering data, thereby realizing automated electricity metering and correction in high-altitude and cold areas.
[0053] In some embodiments, the error identification model, such as Figure 2As shown, it includes a scale-adaptive convolution head, three layers of convolution kernels, and a fully connected layer arranged in sequence, wherein the scale-adaptive convolution head includes:
[0054] Transpose convolution, a convolution layer with a stride of 2, wherein the transpose convolution is used to upsample the sub-image whose input specification is smaller than the target specification to the required specification, and the convolution layer with a stride of 2 is used to downsample the sub-image whose input specification is larger than the target specification to the required specification, so as to achieve the adaptation of the input sub-image, and the output of the scale-adaptive convolution head is input into the fully connected layer after global average pooling and global maximum pooling;
[0055] The scale-adaptive convolution head also includes: 3×3 convolution and 3×3 dilated convolution, which are used to segment images of required specifications;
[0056] The three-layer convolution kernel includes a convolution layer with a convolution kernel scale of 3×3, and the output of each convolution layer is input into the fully connected layer after global average pooling and global maximum pooling.
[0057] In some embodiments, pre-training the error identification model includes:
[0058] Provide a test environment and collect historical sample data in various temperature ranges for various types of electric energy meters serving in high-cold areas. The historical sample data is the electric energy curve data containing the temperature background. A similar processing method can record the metering data of the electric energy meter between sampling points without accumulating the previous data.
[0059] The historical sample data is marked by a marking tool, and after marking, the electricity curve image at the corresponding position is intercepted as the marking result, and the electricity curve in the historical sample data is segmented using a given peak value to perform a rough detection of the mutation error, and the electricity curve image at the corresponding position is intercepted based on the rough detection position as the rough detection result. In some examples, the electricity curve image at the corresponding position is intercepted after marking, and the electricity curve image of a specified time span can be intercepted at the marked position as a training sub-image, and the time span is the same as the subsequent interception time step. The given peak value can be delineated according to the historical electricity consumption data of the electric energy meter. After delineation, the electricity curve in the historical sample data can be segmented based on the delineated peak value to perform a rough detection of the mutation error.
[0060] The matching degree between the labeling result and the rough detection result is calculated, and the samples with matching degree greater than the preset threshold are taken as positive samples, and the samples with matching degree lower than the preset threshold are taken as negative samples to construct the training sample set. For example, if both the labeling result and the rough detection result have mutation points, they are positive samples, otherwise they are negative samples.
[0061] In some embodiments, pre-training the error identification model further comprises:
[0062] VGGNet is used to classify the samples in the constructed training sample set, and according to the output of VGGNet, the samples in the training sample set are classified based on positive samples and negative samples. In some examples, positive samples and negative samples can be further divided into easy-to-distinguish positive samples, difficult-to-distinguish positive samples, wrongly distinguished positive samples, easy-to-distinguish negative samples, etc.
[0063] For the classified training samples, cosine similarity is used to screen the data. For the training samples whose similarity is greater than the given similarity threshold, only the image with the highest confidence of VGGNet output is retained. Different similarity thresholds are set for different sample classifications so that the number of samples at each level is similar.
[0064] After obtaining the specified number of samples at each level, the samples at each level are merged as the training data set.
[0065] In some embodiments, pre-training the error identification model further comprises:
[0066] The FocalLoss loss function is used as the error between the error recognition model output and the training label, satisfying:
[0067]
[0068] in, , represents negative samples, represents a positive sample, represents the probability that the mutation error point is a positive sample, , is the regulating factor, It is used to further alleviate the imbalance problem of positive and negative samples.
[0069] Use the stochastic gradient descent method to update the parameters to meet the following requirements:
[0070]
[0071] in, , represents a randomly selected gradient direction, is an integer, represents the learning rate, represents the model parameters at time t, () represents the gradient of the model cost function.
[0072] In some embodiments, inputting the reading curves of each electric energy meter in the same group together with the temperature background into the error recognition model pre-trained based on historical data includes:
[0073] The reading curves of each electric energy meter in the same group together with the temperature background are intercepted according to a preset time step to obtain multiple sub-images, and the sub-images of adjacent time lines are partially overlapped.
[0074] The intercepted sub-image is input into the error recognition model. By designing a partially overlapping interception method, the error recognition model can further learn the metering characteristics of the electric energy meter, thereby improving the recognition accuracy of the mutation point. After the intercepted sub-image is input into the error recognition model, the error recognition model outputs the recognition probability of the error mutation point. In some examples, for example, if the recognition probability is greater than 0.5, it is considered to be an error mutation point.
[0075] In some embodiments, replacing the identified mutation error point with an adapted curvature line to correct the mutation error includes:
[0076] From the positive samples, find the positive samples of the same model of electric energy meters under corresponding temperature conditions, whose confidence output by VGGNet is higher than the preset confidence threshold.
[0077] In the corresponding time period, the curvature mean of the electric energy curve of the electric energy meter of the corresponding group, except the positive sample with a confidence higher than the preset confidence threshold, is determined as the adaptation curvature. The positive sample in the present application is a point containing a mutation error. In the present embodiment, the curvature mean of the electric energy curve of the electric energy meter except the positive sample with a confidence higher than the preset confidence threshold is used as the adaptation curvature, so as to adapt the real measurement value under the corresponding measurement temperature condition, thereby directly obtaining the required measurement value without manual judgment, thereby reducing manpower input.
[0078] The method of the present application combines the collected electricity readings with the temperature background to form associated image information, and determines the error reading points by taking the error points as identification targets. It is particularly suitable for electricity error analysis and measurement in high-altitude and cold areas. It does not require human participation in collection or analysis and judgment, and can effectively improve the accuracy of electricity meter measurement in high-altitude and cold areas.
[0079] An embodiment of the present application further proposes an electric energy metering system based on historical data analysis, comprising a processor and a memory, wherein the memory stores a computer program, and when the computer program is executed by the processor, the steps of the electric energy metering method based on historical data analysis as described above are implemented.
[0080] In addition, although exemplary embodiments have been described herein, the scope includes any and all embodiments based on the present disclosure with equivalent elements, modifications, omissions, combinations (e.g., various embodiments intersecting schemes), adaptations or changes. It is not limited to the examples described in this specification or during the implementation of this application, and its examples will be interpreted as non-exclusive.
[0081] The above description is intended to be illustrative rather than restrictive. For example, the above examples (or one or more of them) can be used in combination with each other. For example, those of ordinary skill in the art may use other embodiments when reading the above description.
[0082] The above embodiments are merely exemplary embodiments of the present disclosure. Those skilled in the art may make various modifications or equivalent substitutions to the present invention within the essence and protection scope of the present disclosure, and such modifications or equivalent substitutions shall also be deemed to fall within the protection scope of the present invention.
Claims
1. An electric energy metering method based on historical data analysis, characterized in that: The power data analysis and metering used in high-cold areas includes the following steps: For high-cold areas, the area range is demarcated according to the temperature range, and the electric energy meters with the same temperature range are grouped together; For the same group of electric energy meters within the designated area, the electric energy readings of each electric energy meter are collected at the specified time interval, as well as the temperature data; Establishing a reading-time coordinate system, mapping the collected electric quantity readings of the same group of electric energy meters into the coordinate system respectively, and mapping the temperature data of the corresponding temperature range into the coordinate system, so as to construct a temperature background; The electric quantity reading points of the same electric energy meter are smoothly connected by using a fitting curve to construct the reading curve of each electric energy meter; The reading curves of each electric energy meter in the same group, together with the temperature background, are input into the error recognition model pre-trained based on historical data to identify the mutation error points under the corresponding temperature conditions; Pre-training the error identification model further includes: Constructing a training sample set, wherein the training sample set includes positive samples and negative samples; Using VGGNet to classify samples in the constructed training sample set, and according to the output of VGGNet, grading the samples in the training sample set based on positive samples and negative samples; For the classified training samples, cosine similarity is used to screen the data. For the training samples whose similarity is greater than a given similarity threshold, only the image with the highest confidence of VGGNet output is retained. Different similarity thresholds are set for different sample classifications, so that the number of samples at each level is similar. After obtaining the specified number of samples at each level, merge the samples at each level as the training data set; The identified mutation error points are replaced by adapted curvature lines to correct the mutation error, and the electric energy metering of electric energy meters in high-cold areas is completed based on the corrected electric energy data; The reading curves of each electric energy meter in the same group, together with the temperature background, are input into the error recognition model pre-trained based on historical data, including: The reading curves of each electric energy meter in the same group together with the temperature background are intercepted according to a preset time step to obtain multiple sub-images, and the sub-images of adjacent time lines are partially overlapped; Inputting the intercepted sub-image into the error recognition model; The identified mutation error points are replaced by the adapted curvature lines to correct the mutation error including: From the positive samples, find the positive samples of the same model of electric energy meters under the corresponding temperature conditions, whose confidence output by VGGNet is higher than the preset confidence threshold; In the time period corresponding to the positive samples whose confidence is higher than the preset confidence threshold, the mean curvature of the electricity curves of the remaining electricity meters except the positive samples in the electricity curve image of the corresponding group is determined as the adapted curvature.
2. The electric energy metering method based on historical data analysis according to claim 1, characterized in that: The error recognition model includes a scale-adaptive convolution head, three layers of convolution kernels, and a fully connected layer arranged in sequence, wherein the scale-adaptive convolution head includes: Transpose convolution, a convolution layer with a stride of 2, wherein the transpose convolution is used to upsample the sub-image whose input specification is smaller than the target specification to the required specification, and the convolution layer with a stride of 2 is used to downsample the sub-image whose input specification is larger than the target specification to the required specification, so as to achieve the adaptation of the input sub-image, and the output of the scale-adaptive convolution head is input into the fully connected layer after global average pooling and global maximum pooling; The scale-adaptive convolution head also includes: 3×3 convolution and 3×3 dilated convolution, which are used to segment images of required specifications; The three-layer convolution kernel includes a convolution layer with a convolution kernel scale of 3×3, and the output of each convolution layer is input into the fully connected layer after global average pooling and global maximum pooling.
3. The electric energy metering method based on historical data analysis according to claim 2, characterized in that: Pre-training the error recognition model includes: Provide a test environment and collect historical sample data in various temperature ranges for various types of electric energy meters serving in high-cold areas. The historical sample data is electric energy curve data including temperature background; The historical sample data is marked by a marking tool, and after marking, an image of the electric quantity curve at a corresponding position is intercepted as a marking result, and the electric quantity curve in the historical sample data is segmented by using a given peak value to perform a rough detection of a mutation error, and an image of the electric quantity curve at a corresponding position is intercepted based on a rough detection position as a rough detection result; The matching degree between the labeling result and the rough detection result is calculated, and the samples with matching degree greater than the preset threshold are taken as positive samples, and the samples with matching degree lower than the preset threshold are taken as negative samples to construct a training sample set.
4. The electric energy metering method based on historical data analysis according to claim 1, characterized in that: Pre-training the error identification model further includes: The FocalLoss loss function is used as the error between the error recognition model output and the training label, satisfying: in, , represents negative samples, represents a positive sample, represents the probability that the mutation error point is a positive sample, , is the regulating factor; Use the stochastic gradient descent method to update the parameters to meet the following requirements: in, , Represents a randomly selected gradient direction, which is an integer. represents the learning rate, represents the model parameters at time t, () represents the gradient of the model cost function.
5. An electric energy metering system based on historical data analysis, characterized in that: The method comprises a processor and a memory, wherein a computer program is stored in the memory, and when the computer program is executed by the processor, the steps of the electric energy metering method based on historical data analysis as described in any one of claims 1 to 4 are implemented.
Citation Information
Cited By
Neural network model-based electricity metering error analysis device of intelligent electric meter
CN117609704A
