Energy consumption management-based code scanning and table matching method and code scanning and table matching system

By using a barcode scanning method and system, the power meter number is automatically identified, simplifying manual data entry, reducing error rates and operational complexity, enabling in-depth data mining and anomaly early warning, and improving the efficiency and accuracy of the energy consumption management system.

CN122021683APending Publication Date: 2026-05-12ZHONGXUN BOR INTELLIGENT TECH (WUXI) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
ZHONGXUN BOR INTELLIGENT TECH (WUXI) CO LTD
Filing Date
2025-12-31
Publication Date
2026-05-12

AI Technical Summary

Technical Problem

The existing energy management system relies on manual data entry for meter matching, which has a high error rate, high technical threshold, and insufficient data processing capabilities, failing to achieve in-depth data mining and efficient application.

Method used

A barcode-based meter pairing method based on energy consumption management is adopted. Electricity meter information is entered through a debugging assistant APP, and the meter number is automatically identified using QR code identification and image recognition technology. The meter and gateway are paired through a data acquisition gateway. Combined with data feature extraction and analysis, the debugging process is simplified and the operation complexity is reduced.

Benefits of technology

It enables automatic identification of power meter numbers, reduces data entry errors, simplifies debugging processes, lowers the technical threshold, improves data entry efficiency, and provides early warning of anomalies through in-depth analysis.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122021683A_ABST
    Figure CN122021683A_ABST
Patent Text Reader

Abstract

The invention discloses a code scanning and table matching method and system based on energy consumption management. The code scanning and table matching method comprises the following steps: creating an energy consumption management project; inputting electric power meter information; outputting a point location table file; importing an energy consumption management system; pairing the electric power meter and the gateway; performing debugging; and monitoring and analyzing. According to the code scanning and meter matching method and the code scanning and meter matching system based on energy consumption management, the serial number of the electric power meter can be automatically identified, the information input time is shortened, the input error is avoided, the debugging process is simplified, the field operation complexity is reduced, the technical threshold is reduced, and abnormal early warning is realized through deep analysis of energy consumption characteristics.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the fields of Internet of Things and energy management technology, and in particular to a barcode scanning method and system for energy management-based meter matching. Background Technology

[0002] In modern buildings, industrial facilities, and commercial complexes, energy management systems have become a core infrastructure for achieving refined energy control and reducing energy costs. This system collects energy consumption data through power metering instruments deployed in various power distribution circuits. The data is then aggregated by a data acquisition gateway and transmitted to a back-end management platform for energy consumption monitoring, analysis, and optimization decisions. The stable operation of the entire system relies on two crucial aspects: precise pairing of meters and gateways ("meter matching") and in-depth data analysis and efficient management ("energy management").

[0003] Traditional data entry processes mainly involve multiple steps such as manual recording, information organization, data entry, and on-site debugging. These processes are highly dependent on manual labor, have a high error rate, and present a high technical barrier. As the application projects of the management system expand, the shortcomings of the above-mentioned data entry processes become increasingly prominent.

[0004] In terms of energy management systems, existing energy management systems generally remain at the level of data collection and simple display, failing to achieve in-depth data mining and efficient application. They have insufficient data processing capabilities, lack feature extraction, and suffer from defects such as delayed anomaly warnings and insufficient data analysis depth.

[0005] Therefore, it is necessary to improve the metering methods and systems for energy management in the existing technology. Summary of the Invention

[0006] The purpose of this invention is to overcome the defects in the existing technology and provide a barcode-based meter allocation method and system for energy management that simplifies the meter allocation process by reducing workload, minimizing errors, improving efficiency, lowering the threshold, and enabling in-depth mining of energy consumption data to improve configuration accuracy, enhance overall performance, and increase application value.

[0007] To address the aforementioned technical problems, this invention provides a barcode-based meter allocation method for energy consumption management, comprising the following steps: S10. Create an energy management project through the debugging assistant APP, and then add a data acquisition gateway to the energy management project. S20. Enter the information of each power meter for the energy management project in sequence: select the gateway to which the power meter belongs, enter the physical number of the power meter, and enter the circuit name and model information of the power meter at the same time. S30. Export the information of each power meter as a point table file; S40. Import the location table file into the energy management system; S50. The power meter configuration information in the location table is sent to the corresponding data acquisition gateway with one click through the energy management system to complete the pairing of the power meter and the gateway. S60. Debug the power meters to ensure the integrity and stability of data transmission and communication; S70. The energy management system receives monitoring data from each power meter collected by the data acquisition gateway, and monitors and analyzes the behavioral characteristics of the power users to which each power meter belongs. In step S20, the physical number of the power meter can be input by scanning the QR code on the power meter, processing the image data after capturing the panel image by a camera, or manually.

[0008] Preferably, in step 20, after acquiring the panel image through the camera, preprocessing and coarse positioning are performed sequentially. The preprocessing includes the following steps: S211, Image Denoising: Eliminating noise interference during the shooting process; S212. Grayscale conversion: Converting a color image into a grayscale image to simplify subsequent processing; S213. Binarization: Converting a grayscale image into a black-and-white binary image to improve the accuracy of character recognition; S214. Normalization: Adjust the size of the black and white binary image to a uniform size to ensure the comparability of images from different angles; S215. Contrast Enhancement: Enhance character edge features to obtain a preprocessed image, which facilitates subsequent feature extraction. Coarse positioning includes the following steps: S221. The edge features of the preprocessed image are extracted using the Canny edge feature extraction algorithm; S222. Perform morphological processing on the extracted edge features, including erosion and dilation; S223. Perform preliminary screening on the processed contours to remove contour features that are too small. S224. Calculate the minimum bounding rectangle of the remaining features. Use the area of ​​the minimum bounding rectangle and the area of ​​the contour features to calculate the rectangularity rect. The mathematical expression for the rectangularity rect is: rect = Area ol / Area rect Among them, Area ol Area is the area of ​​the outline. rect The area of ​​the smallest bounding rectangle; S225. Use contour features with a rectangularity greater than a set threshold as panel features, and extract the ROI region within the panel contour. S226. Redraw the contour features of the ROI region onto the blank image and input it as the input image into the recognition model to obtain the physical number of the power meter.

[0009] Preferably, step S60 includes the following steps: S61. Send test commands to each power meter and record the sending time t. s ; S62. Receive the network test packets returned by each power meter after receiving the test command, and record the current reception time t. R Calculate the time difference Δt = t R -t s It obtains the response time of the current test round, and parses and verifies the string of the network test packet to determine whether the data is complete. If the data is incomplete, it sends an alarm message to the administrator and ends the debugging. S63. Repeat step S62 for a total of N times, calculate the average response time and the variance of the response time, and construct the two-dimensional response characteristics of each power instrument. S64. Compare the two-dimensional response characteristics of each power meter with the feature template. The feature template includes the response time reference range and variance range constructed based on the 3sigma principle. If the average response time and the variance of the response time of the two-dimensional response characteristics are greater than the upper limit of the response time reference range and the variance range, respectively, it is determined that the response time is too long or the network fluctuates. An alarm message is sent to the management personnel and the debugging is terminated.

[0010] Preferably, step S70 includes the following steps: S71. When each power meter collects and updates data, it extracts historical energy consumption data updated in rotation for at least M days from the current time point. The energy consumption data includes the meter readings at multiple time collection points. The power meter periodically transmits data to the gateway. S72. Extract features from historical energy consumption data to reflect user behavior characteristics, including energy consumption level characteristics and trend characteristics; S73. Based on the energy consumption data of each power user, construct a two-dimensional data set of time point-energy consumption value, and perform density clustering on multiple data points in the two-dimensional data set according to the energy consumption value to obtain data point clusters with similar energy consumption values; S74. Perform similarity analysis on the time points of each data point cluster, and then perform clustering again to obtain multiple secondary clusters in order to obtain the electricity consumption patterns of power users. S75. Monitor whether the current electricity consumption behavior of electricity users conforms to the obtained electricity consumption patterns, and issue warnings to electricity users upon detecting abnormalities.

[0011] Preferably, step S72 includes the following steps: S721, Extract daily power consumption; S722. Data cleaning: removing outliers and handling missing data; S723. Data normalization: Convert energy consumption data of different dimensions into a unified range to facilitate subsequent analysis; S724. Time series alignment ensures that the data acquisition time points of each power meter are aligned, eliminating deviations caused by different acquisition frequencies.

[0012] To address the aforementioned technical problems, this invention also provides a barcode-based meter allocation system for energy consumption management, comprising: The power meter is equipped with a QR code identifier, the content of which is the unique physical number of the power meter. The debugging assistant APP is used to input information from power meters and export it as a point table file. The information includes gateway data, physical number, circuit name and model information. The debugging assistant APP has a built-in QR code scanning and recognition module and an image recognition module for recognizing physical numbers. The energy management system is used to receive point data files, power meter debugging data, and energy consumption data characteristic analysis. The data acquisition gateway is used to receive the meter configuration information issued by the energy consumption management system and collect the monitoring data of the corresponding power meters according to the meter configuration information. A scanning device is used to scan the QR code of the power meter to identify the physical number and input it into the debugging assistant APP.

[0013] Preferably, the image recognition module includes a preprocessing unit and a coarse localization unit, the preprocessing unit including: Image denoising module, used to eliminate noise interference in scanned images; The grayscale conversion module is used to convert color images into grayscale images; The binarization module is used to convert grayscale images into black-and-white binary images to improve the accuracy of character recognition. The normalization module is used to adjust the size of the black-and-white binary image to a uniform size to ensure the comparability of images from different angles. The contrast enhancement module is used to enhance character edge features to obtain a preprocessed image for subsequent feature extraction. The coarse positioning unit includes: The edge extraction module uses the Canny edge feature extraction algorithm to extract edge features from the preprocessed image; The morphological processing module is used to perform morphological processing on the extracted edge features, including erosion and dilation. The contour filtering module is used to perform preliminary filtering on the processed contours, removing contour features that are too small. The ROI extraction module is used to take the contour features with a rectangle size greater than a set threshold as panel features, extract the ROI region within the panel contour, redraw the contour features of the ROI region onto a blank image, and input it as the input image into the recognition model to obtain the physical number of the power meter.

[0014] Preferably, the energy management system has a built-in instrument debugging module, which includes: The instruction sending unit is used to send test instructions and record the sending time t. s ; The data receiving unit is used to receive the network test packets returned by each power meter after receiving the test command, and to record the receiving time t. R ; The feature calculation unit calculates the reaction time Δt=t for each round of testing. R -t s After N rounds of testing, the average reaction time and reaction time variance were calculated to construct two-dimensional reaction characteristics; A threshold comparison unit is used to compare the two-dimensional reaction features with a feature template constructed based on the 3sigma principle, wherein the feature template includes a reaction time reference range and a variance range. The data validation unit is used to parse the string data in the network test packet and verify the data integrity. An alarm unit is used to trigger an alarm and push it to the management terminal when the average reaction time of the two-dimensional reaction feature is greater than the upper limit of the reaction time reference range and the reaction time variance is greater than the upper limit of the variance reference range, or when the string data of the network test packet is incomplete.

[0015] Preferably, the energy management system has a built-in energy consumption feature extraction module, which includes: The historical data capture unit is used to capture historical energy consumption data updated in rotation for at least M days at the current time point when the power meter collects and updates data. The energy consumption data includes the meter readings at multiple time collection points. A behavioral feature construction unit is used to extract features from historical energy consumption data to reflect user behavioral characteristics, including energy consumption level features and trend features. The first clustering unit is used to construct a two-dimensional data set of time point-energy consumption value based on the energy consumption data of each power user, and to perform density clustering on multiple data points in the two-dimensional data set according to the energy consumption value to obtain data point clusters with similar energy consumption values; The secondary clustering unit is used to perform similarity analysis on the time points of each data point cluster, and then perform clustering again to obtain multiple secondary clusters in order to obtain the electricity consumption patterns of power users. The alarm unit is also used to issue a warning to the power user when the user’s current electricity consumption behavior does not match the obtained electricity consumption pattern.

[0016] Preferably, the behavioral feature construction unit includes: The daily power consumption calculation module is used to calculate daily power consumption. The data cleaning module is used to remove outliers and handle missing data; The data normalization module is used to convert energy consumption data of different dimensions into a unified range; The time sequence alignment module is used to align the time series to ensure that the acquisition time points of each power meter are aligned, so as to eliminate the deviation caused by different acquisition frequencies.

[0017] In summary, compared with existing technologies, the energy consumption management-based barcode meter matching method and system of this invention can automatically identify the power meter number, shorten the information entry time, eliminate entry errors, simplify the debugging process, reduce the complexity of on-site operation, thereby lowering the technical threshold, and achieve abnormal early warning through in-depth analysis of energy consumption characteristics. Attached Figure Description

[0018] Figure 1 This is a flowchart illustrating the energy management-based barcode meter matching method of the present invention. Figure 2 This is a schematic diagram of the image data preprocessing process of the present invention; Figure 3 This is a flowchart illustrating the image data coarse localization process of the present invention; Figure 4 This is a schematic diagram of the process for debugging power meters according to the present invention; Figure 5 This is a schematic diagram of the monitoring and analysis process of this invention; Figure 6 This is a schematic diagram of the process for feature extraction from historical energy consumption data according to the present invention. Detailed Implementation

[0019] The specific embodiments of the present invention will be further described below with reference to the accompanying drawings and examples. The following examples are only used to more clearly illustrate the technical solutions of the present invention and should not be construed as limiting the scope of protection of the present invention.

[0020] like Figures 1-6 As shown, the present invention provides a method for meter allocation based on energy consumption management via barcode scanning, comprising the following steps: S10. Create an energy management project through the debugging assistant APP, and then add a data acquisition gateway to the energy management project. S20. Enter the information of each power meter for the energy management project in sequence: Select the gateway to which the power meter belongs, enter the physical number of the power meter, and enter the circuit name and model information of the power meter at the same time. S30. Export the information of each power meter as a point table file; S40. Import the location list file into the energy management system; S50. The power meter configuration information in the point table is sent to the corresponding data acquisition gateway with one click through the energy consumption management system to complete the pairing of power meters and gateways. S60. Debug the power meters to ensure the integrity and stability of data transmission and communication; S70 The energy management system receives monitoring data from each power meter collected by the data acquisition gateway, and monitors and analyzes the behavioral characteristics of the power users to which each power meter belongs; In step S20, the physical number of the power meter can be input by scanning the QR code on the power meter, processing the image data after capturing the panel image by a camera, or manually.

[0021] In the energy management-based barcode meter matching method of this embodiment, each power meter is usually assigned a 12-digit number at the factory as its unique number, and this number serves as the communication address of the power meter in the Modbus protocol.

[0022] In step S20, the hierarchical information of the power meter is also entered. This hierarchical information is used to logically group the power meters according to the building structure or power distribution structure.

[0023] To facilitate data processing, in step S30, the exported point table file is preferably an Excel or CSV spreadsheet file to facilitate database management.

[0024] Furthermore, in this energy management-based barcode meter matching method, the data acquisition gateway supports remote configuration, thus eliminating the need for separate parameter settings on the gateway in the field.

[0025] When the QR code meter matching method of this embodiment is applied to a newly built commercial integrated deployment energy consumption management system, it is as follows.

[0026] The first step is to create a new project, which is step S10 above. The debugging personnel open the debugging assistant APP installed on the mobile phone or tablet, create a new project, enter the project name (such as "XX Business Center"), click OK to complete the project creation, and then add a data acquisition gateway in the created project, enter the unique number of the gateway, and save. The second step is to batch input the instrument information, which is step S20 above. The commissioning personnel scan the QR code information in the created data acquisition gateway. During the operation, the QR code of the power instrument to be configured is scanned by the device camera. After the commissioning assistant APP automatically recognizes the content of the QR code, the recognized content is entered. The instrument panel provides both the QR code and the 12-digit physical number. Following the above operation steps, the information of each power instrument is entered into the corresponding data acquisition gateway. The third step is to export the point location table file, which is step S30 above. After all the power meter information has been entered, the point location table file is generated by the debugging assistant AP. The point location table file contains information on all gateways and power meters in the project created in the first step. The point location table file is preferably an Excel or CSV format spreadsheet file. The fourth step is to import the data into the energy management system, which is step S40 above. In the management backend of the energy management system, upload the location table file obtained in the third step.

[0027] The fifth step is to send the configuration with one click, which is step S50 above. In the energy management system, select the project and gateway that have been imported. The system will automatically package the meter number, model and other information in the point table and send it to the corresponding data acquisition gateway through the network. The sixth step is debugging and testing, which is step S60 above. By debugging and testing the instrument, the current communication network and response time are detected. If there is no excessively long response time or network communication failure, the debugging is completed. Otherwise, an alarm is triggered and the abnormal situation is reported to the management terminal. The seventh step is data monitoring and analysis, which is step S70 above. After debugging and ensuring normal communication, the energy management system receives energy consumption data collected by the data acquisition gateway through the power meter, performs characteristic analysis on the electricity consumption behavior of power users, and issues timely warnings when abnormalities are detected.

[0028] Correspondingly, based on this energy management method for meter allocation via barcode scanning, the present invention also provides a barcode meter allocation system, comprising: The power meter is marked with a QR code, which contains the power meter's unique physical identifier. The debugging assistant APP is used to input information from power meters and export it as a point table file. The information includes gateway data, physical number, circuit name and model information. The debugging assistant APP has a built-in QR code scanning and recognition module and an image recognition module for recognizing physical numbers. The energy management system is used to receive point data files, power meter debugging data, and energy consumption data characteristic analysis. The data acquisition gateway is used to receive the meter configuration information issued by the energy consumption management system and collect the monitoring data of the corresponding power meters according to the meter configuration information. The scanning device is used to scan the QR code label of the power meter to identify the physical number and input it into the commissioning assistant APP.

[0029] Compared with existing technologies, the barcode scanning meter matching method and system of this invention can automatically identify the physical number of power meters by scanning barcodes, eliminating the need for manual copying and input, greatly shortening the information entry time, significantly improving efficiency, and avoiding address input errors caused by manual mistakes, thus ensuring the accuracy of data entry. Furthermore, it simplifies complex on-site configuration into several clear steps: "scan-enter-export-import-download," making it easy to operate, simplifying the debugging process, and lowering the technical threshold. During debugging, no complex professional operations on power meters and data acquisition gateways are required; ordinary personnel can complete the task after simple training, reducing reliance on specialized technical personnel. In addition, the debugging assistant APP, as a unified information management platform, facilitates the organization and export of project, gateway, and power meter information, thereby simplifying information processing.

[0030] A further improvement is that in step 20, after acquiring the panel image through the camera, preprocessing and coarse positioning are performed sequentially. The preprocessing includes the following steps: S211, Image Denoising: Eliminating noise interference during the shooting process; S212. Grayscale conversion: Converting a color image into a grayscale image to simplify subsequent processing; S213. Binarization: Converting a grayscale image into a black-and-white binary image to improve the accuracy of character recognition; S214. Normalization: Adjust the size of the black and white binary image to a uniform size to ensure the comparability of images from different angles; S215. Contrast Enhancement: Enhance character edge features to obtain a preprocessed image, which facilitates subsequent feature extraction. Coarse positioning includes the following steps: S221. Use the Canny edge feature extraction algorithm to extract edge features from the preprocessed image; S222. Perform morphological processing on the extracted edge features, including erosion and dilation; S223. Perform preliminary screening on the processed contours to remove contour features that are too small. S224. Calculate the minimum bounding rectangle of the remaining features. Use the area of ​​the minimum bounding rectangle and the area of ​​the contour features to calculate the rectangularity rect. The mathematical expression for the rectangularity rect is: rect = Area ol / Area rect Among them, Area ol Area is the area of ​​the outline. rect The area of ​​the smallest bounding rectangle; S225. Use contour features with a rectangularity greater than a set threshold as panel features, and extract the ROI region within the panel contour. S226. Redraw the contour features of the ROI region onto the blank image and input it as the input image into the recognition model to obtain the physical number of the power meter.

[0031] When the QR code on the power meter cannot be recognized, the meter information can be entered not only by manually entering the physical code, but also by using a camera to capture the panel image of the power meter and entering the physical code through image recognition, making information entry more convenient, faster and more accurate.

[0032] Correspondingly, in the barcode scanning and meter matching system, the image recognition module includes a preprocessing unit and a coarse positioning unit. The preprocessing unit includes: Image denoising module, used to eliminate noise interference in scanned images; The grayscale conversion module is used to convert color images into grayscale images; The binarization module is used to convert grayscale images into black-and-white binary images to improve the accuracy of character recognition. The normalization module is used to adjust the size of black and white binary images to a uniform size, ensuring the comparability of images from different angles; The contrast enhancement module is used to enhance character edge features to obtain a preprocessed image for subsequent feature extraction. The coarse positioning unit includes: The edge extraction module uses the Canny edge feature extraction algorithm to extract edge features from the preprocessed image; The morphological processing module is used to perform morphological processing on the extracted edge features, including erosion and dilation. The contour filtering module is used to perform preliminary filtering on the processed contours, removing contour features that are too small. The ROI extraction module is used to take the contour features with a rectangle size greater than a set threshold as panel features, extract the ROI region within the panel contour, redraw the contour features of the ROI region onto a blank image, and input it as the input image into the recognition model to obtain the physical number of the power meter.

[0033] A further improvement is that step S60 includes the following steps: S61. Send test commands to each power meter and record the sending time ts; S62. Receive the network test packet returned by each power meter after receiving the test command, record the current receiving time tR, calculate the time difference Δt=tR-ts, obtain the response time of the current test round, and at the same time parse and verify the string of the network test packet to determine whether the data is complete. If the data is incomplete, send an alarm message to the management personnel and end the debugging. S63. Repeat step S62 for a total of N times, calculate the average response time and the variance of the response time, and construct the two-dimensional response characteristics of each power instrument. S64. Compare the two-dimensional response characteristics of each power meter with the feature template. The feature template includes the response time reference range and variance range constructed based on the 3sigma principle. If the average response time and the variance of the response time of the two-dimensional response characteristics are greater than the upper limit of the response time reference range and the variance range, respectively, it is determined that the response time is too long or the network fluctuates. An alarm message is sent to the management personnel and the debugging is terminated.

[0034] The above debugging steps facilitate the testing of communication between power meters and data acquisition gateways, ensuring smooth reception of energy consumption data uploaded by the data acquisition gateway during subsequent monitoring. After the debugging phase, if there are no issues with excessively long response times or network fluctuations, and the network test packet data is complete, the debugging is finished. Data acquisition and analysis of each power meter can then be performed to monitor and analyze the behavioral characteristics of each power user. Otherwise, an alarm should be triggered, and abnormal situations should be sent to the management terminal for further detection and maintenance.

[0035] Correspondingly, in the barcode meter matching system, the energy management system has a built-in meter debugging module, which includes: The instruction sending unit is used to send test instructions and record the sending time t. s ; The data receiving unit is used to receive the network test packets returned by each power meter after receiving the test command, and to record the receiving time t. R ; The feature calculation unit calculates the reaction time Δt=t for each round of testing. R -t sAfter N rounds of testing, the average reaction time and reaction time variance were calculated to construct two-dimensional reaction characteristics; The threshold comparison unit is used to compare two-dimensional reaction features with a feature template constructed based on the 3sigma principle. The feature template includes a reaction time reference range and a variance range. The data validation unit is used to parse the string data in the network test packet and verify the data integrity. The alarm unit is used to trigger an alarm and push it to the management terminal when the average reaction time of the two-dimensional reaction feature is greater than the upper limit of the reaction time reference range and the reaction time variance is greater than the upper limit of the variance reference range, or when the string data of the network test packet is incomplete.

[0036] A further improvement is that step S70 includes the following steps: S71. When each power meter collects and updates data, it extracts historical energy consumption data updated in rotation for at least M days from the current time point. The energy consumption data includes the meter readings at multiple time collection points. The power meter periodically transmits data to the gateway. S72. Extract features from historical energy consumption data to reflect user behavior characteristics, including energy consumption level characteristics and trend characteristics. S73. Based on the energy consumption data of each power user, construct a two-dimensional data set of time point-energy consumption value, and perform density clustering on multiple data points in the two-dimensional data set according to the energy consumption value to obtain data point clusters with similar energy consumption values; S74. Perform similarity analysis on the time points of each data point cluster, and then perform clustering again to obtain multiple secondary clusters in order to obtain the electricity consumption patterns of power users. S75. Monitor whether the current electricity consumption behavior of electricity users conforms to the obtained electricity consumption patterns, and issue warnings to electricity users upon detecting abnormalities.

[0037] Furthermore, step S72 includes the following steps: S721, Extract daily power consumption; S722. Data cleaning: removing outliers and handling missing data; S723. Data normalization: Convert energy consumption data of different dimensions into a unified range to facilitate subsequent analysis; S724. Time series alignment ensures that the data acquisition time points of each power meter are aligned, eliminating deviations caused by different acquisition frequencies.

[0038] Specifically, when collecting and updating data, each power meter extracts historical energy consumption data updated in rotation for at least 180 days prior to the current time point. The historical energy consumption data includes the meter readings at multiple collection time points. The power meter supports uploading energy data to the data acquisition gateway every 24 hours or 12 hours.

[0039] Feature extraction from historical energy consumption data can reflect user behavior characteristics, including energy consumption level characteristics and trend characteristics.

[0040] Specifically, in step S721, the formula E is calculated. t =R t -R t-1 Daily power consumption can be calculated, where E t R represents the energy consumption value at time point t. t R represents the electricity meter reading at time point t. t-1 This represents the meter reading at time point t-1.

[0041] In step S722, the outliers removed are usually sudden abnormally high energy consumption or negative values. When processing missing data, it is preferable to use linear interpolation or moving average to fill in the missing data.

[0042] In step S723, when performing data normalization, the MAX-MIN method is specifically used for normalization, and its processing formula is Nor_E. t =(E t -E min ) / ( E max -E min In the expression, Nor_E t E represents the normalized daily power consumption. min E represents the minimum daily power consumption. max This indicates the maximum daily power consumption.

[0043] After completing the above processing steps, for each electricity user's energy consumption data, the constructed two-dimensional dataset of time-point energy consumption values ​​includes multiple data points data(t,E). t In this process, the format of the time points needs to be standardized. For example, the time point 11:30 on December 12, 2021, should be converted to 7.5 (which represents the daily progress of Sunday at a ratio of 11.5 / 24≈0.5. This is the conversion method for extracting weekly patterns. If monthly patterns need to be extracted, the conversion should be based on the time of each month. For example, 25.3 represents the daily progress of the 25 days of the month at a ratio of 0.3. 0.3*24=7.2, which represents 7:12 am).

[0044] In step S73, the DSCAN algorithm is typically used based on the energy consumption value E. tDensity clustering is performed on multiple data points in the set to obtain multiple clusters of data points with similar energy consumption values. Then, similarity analysis is performed on the time points of each data point cluster. Specifically, each data point is clustered again to obtain multiple secondary clusters. If the variance is small, it indicates that the distribution is relatively even and there may be no obvious time pattern. Conversely, if the variance is large, it indicates that the distribution is uneven and there may be an obvious time pattern. In this case, the data point subgroups of each secondary cluster are extracted, and the ratio of the number of data points in each target secondary cluster to the total number of data points in the corresponding data point cluster is calculated. Secondary clusters with a ratio exceeding a predetermined value (this predetermined value is adjustable) are taken as target clusters, indicating that within the corresponding time range of this secondary cluster, the energy consumption value always falls within the energy consumption range corresponding to that data point cluster.

[0045] For example, let's set the above-mentioned predetermined value to 20%, and label a data point cluster of a certain electricity user as cluster A. Cluster A contains 100 data points, which are the energy consumption records of the user at different time points. The time points in the data points have been converted into a unified format (such as 11:30 on Sunday being represented as 7.5, that is, the schedule progress of Sunday is approximately 11.5 / 24≈0.5).

[0046] Perform secondary clustering on 100 data points in cluster A, assuming three secondary clusters are obtained, namely cluster A1, cluster A2, and cluster A3, as follows: Cluster A1 contains 40 data points, with a time range of 9:00 AM to 11:00 AM from Monday to Wednesday (time points are represented as 2.375-2.5, 3.375-3.5, and 4.375-4.5). Cluster A2 contains 35 data points, with a time range of 2 p.m. to 4 p.m. from Thursday to Friday (time points are represented as 5.375-5.5 and 6.375-6.5). Cluster A3 contains 25 data points, with a time range of 10:00 AM to 12:00 PM from Saturday to Sunday (time points are represented as 0.5-0.75 and 1.5-1.75).

[0047] After obtaining clusters A1 to A3, calculate the variance of the number of data points in these three quadratic clusters. The average value is approximately (40 + 35 + 25) / 3 ≈ 33.33, and the variance is approximately (40 - 33.33). 2 +(35-33.33) 2 +(25-33.33) 2 The variance is approximately 39.34, which indicates that the distribution of these data points is uneven and there may be a clear time pattern.

[0048] After determining that the variance is large, the ratio of the number of data points in each quadratic cluster to the total number of clusters A is calculated. The ratio of the number of data points in cluster A1 is 40%, the ratio of the number of data points in cluster A2 is 35%, and the ratio of the number of data points in cluster A3 is 25%. All three are greater than the predetermined value of 20%. Therefore, clusters A1 to A3 are all considered as target clusters.

[0049] Assuming the energy consumption range corresponding to cluster A is [100 kWh, 150 kWh], it can be expressed as: Cluster A1 (40%): From 9:00 AM to 11:00 AM, Monday through Wednesday, this user's energy consumption always falls within the energy consumption range corresponding to Cluster A; Cluster A2 (35%): Between 2 PM and 4 PM on Thursday and Friday, this user's energy consumption always falls within the energy consumption range corresponding to Cluster A; Cluster A3 (25%): Between 10:00 AM and 12:00 PM on Saturday and Sunday, this user's energy consumption always falls within the energy consumption range corresponding to Cluster A.

[0050] Therefore, through the above analysis, the energy consumption behavior characteristics of this electricity user can be obtained. This electricity user has stable high energy consumption from 9:00 to 11:00 AM and 2:00 to 4:00 PM on weekdays, and also has stable high energy consumption from 10:00 AM to 12:00 PM on weekends. Therefore, the QR code meter matching system defines the user's energy consumption level characteristics as follows: the energy consumption value is stably maintained in the range of 100 kWh to 150 kWh during the weekdays from 9:00 to 11:00 AM, 2:00 to 4:00 PM, and 10:00 to 12:00 PM on weekends.

[0051] If the energy consumption value at the current time (e.g., 10:00 AM on Tuesday) is outside the range of [100 kWh, 150 kWh], the system can determine that the energy consumption is abnormal and issue a warning to the user, indicating that there may be equipment failure or appliances that have not been turned off.

[0052] The above examples demonstrate how to identify the energy consumption patterns of electricity users within a specific time frame through secondary clustering and ratio calculation, thereby constructing effective energy consumption level characteristics.

[0053] Preferably, the time range of each target cluster and the energy consumption level range of the data point cluster are calculated using the Nsigma principle to obtain the energy consumption level ranges corresponding to multiple time ranges, denoted as (ranget, rangeE). (ranget, rangeE) constructs the user's energy consumption level feature featureE.

[0054] The process of extracting trend feature T includes: Data points data(t,E) for each electricity user t This is mapped to a two-dimensional coordinate system, which includes a time axis and an energy consumption data axis. The average energy consumption E for multiple time windows is extracted using the sliding average method. step ; Construct the linear fitting equation: E=kt+b, where E represents energy consumption, k is the slope, t represents the time point, and b is the error term; Multiple data points data(t,E) t Substitute the values ​​into the linear fitting equation and use the least squares method to fit the equation to obtain the value of the slope k.

[0055] The value of the slope k reflects the overall energy consumption trend of the user at this point in time. If |k| > k threshold If the slope k indicates a clear trend, it means that the user's energy consumption level is relatively stable and there is no clear trend. The slope k is the trend feature T.

[0056] The energy consumption level feature E and trend feature T obtained through the above process can be used for: First, compare the energy consumption data at the current time with the energy consumption level characteristics. If the energy consumption data at the current time does not match the energy consumption level characteristics, it means that the user's energy consumption level is abnormal. If the abnormality exceeds the upper limit, it can be sent to the user in the store, and the user can be prompted whether there are unnecessary appliances that have not been turned off or whether there is a equipment malfunction. Secondly, if a user shows a clear upward or downward trend in energy consumption, statistical data and charts of energy consumption levels across multiple time windows can be sent to the user to determine if the user has aging appliances or potential energy consumption malfunctions.

[0057] The above describes the energy consumption level feature E and the trend feature T. Furthermore, these features can be used to construct user profiles. For example, a user feature vector cha(featureE, featureT) can be constructed using these features. After density clustering of the user feature vectors of multiple users, multiple user clusters are obtained. Based on this, the user information within these clusters is clustered again to determine if there are similar users or mutual user characteristics. If so, this can be used for predicting the energy consumption behavior of new users and segmenting user groups.

[0058] The above-mentioned QR code scanning method makes the entire form matching process efficient, accurate and convenient, thus effectively solving the pain points of the traditional model.

[0059] Correspondingly, the energy management system has a built-in energy consumption feature extraction module, which includes: The historical data capture unit is used to capture historical energy consumption data updated in rotation for at least M days at the current time point when the power meter collects and updates data. The energy consumption data includes the meter readings at multiple time collection points. The behavioral feature construction unit is used to extract features from historical energy consumption data to reflect user behavior characteristics, including energy consumption level characteristics and trend characteristics. The first clustering unit is used to construct a two-dimensional data set of time point-energy consumption value based on the energy consumption data of each power user, and to perform density clustering on multiple data points in the two-dimensional data set according to the energy consumption value to obtain data point clusters with similar energy consumption values; The secondary clustering unit is used to perform similarity analysis on the time points of each data point cluster, and then perform clustering again to obtain multiple secondary clusters in order to obtain the electricity consumption patterns of power users. The alarm unit is also used to issue a warning to the electricity user when the user’s current electricity consumption behavior does not match the obtained electricity consumption pattern.

[0060] Preferably, the behavioral feature construction unit includes: The daily power consumption calculation module is used to calculate daily power consumption. The data cleaning module is used to remove outliers and handle missing data; The data normalization module is used to convert energy consumption data of different dimensions into a unified range; The time sequence alignment module is used to align the time series to ensure that the acquisition time points of each power meter are aligned, so as to eliminate the deviation caused by different acquisition frequencies.

[0061] The above description is only a preferred embodiment of the present invention. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the technical principles of the present invention, and these improvements and modifications should also be considered within the scope of protection of the present invention.

Claims

1. A method for meter allocation via barcode scanning based on energy consumption management, characterized in that, Includes the following steps: S10. Create an energy management project through the debugging assistant APP, and then add a data acquisition gateway to the energy management project. S20. Enter the information of each power meter for the energy management project in sequence: select the gateway to which the power meter belongs, enter the physical number of the power meter, and enter the circuit name and model information of the power meter at the same time. S30. Export the information of each power meter as a point table file; S40. Import the location table file into the energy management system; S50. The power meter configuration information in the location table is sent to the corresponding data acquisition gateway with one click through the energy management system to complete the pairing of the power meter and the gateway. S60. Debug the power meters to ensure the integrity and stability of data transmission and communication; S70. The energy management system receives monitoring data from each power meter collected by the data acquisition gateway, and monitors and analyzes the behavioral characteristics of the power users to which each power meter belongs. In step S20, the physical number of the power meter can be input by scanning the QR code on the power meter, processing the image data after capturing the panel image by a camera, or manually.

2. The energy consumption management-based barcode meter matching method according to claim 1, characterized in that: In step 20, after capturing the panel image through the camera, preprocessing and coarse positioning are performed sequentially. The preprocessing includes the following steps: S211, Image Denoising: Eliminating noise interference during the shooting process; S212. Grayscale conversion: Converting a color image into a grayscale image to simplify subsequent processing; S213. Binarization: Converting a grayscale image into a black-and-white binary image to improve the accuracy of character recognition; S214. Normalization: Adjust the size of the black and white binary image to a uniform size to ensure the comparability of images from different angles; S215. Contrast Enhancement: Enhance character edge features to obtain a preprocessed image, which facilitates subsequent feature extraction. Coarse positioning includes the following steps: S221. The edge features of the preprocessed image are extracted using the Canny edge feature extraction algorithm; S222. Perform morphological processing on the extracted edge features, including erosion and dilation; S223. Perform preliminary screening on the processed contours to remove contour features that are too small. S224. Calculate the minimum bounding rectangle of the remaining features. Use the area of ​​the minimum bounding rectangle and the area of ​​the contour features to calculate the rectangularity rect. The mathematical expression for the rectangularity rect is: rect = Area ol / Area rect Among them, Area ol Area is the area of ​​the outline. rect The area of ​​the smallest bounding rectangle; S225. Use contour features with a rectangularity greater than a set threshold as panel features, and extract the ROI region within the panel contour. S226. Redraw the contour features of the ROI region onto the blank image and input it as the input image into the recognition model to obtain the physical number of the power meter.

3. The energy consumption management-based barcode meter matching method according to claim 1, characterized in that: Step S60 includes the following steps: S61. Send test commands to each power meter and record the sending time t. s ; S62. Receive the network test packets returned by each power meter after receiving the test command, and record the current reception time t. R Calculate the time difference Δt = t R -t s It obtains the response time of the current test round, and parses and verifies the string of the network test packet to determine whether the data is complete. If the data is incomplete, it sends an alarm message to the administrator and ends the debugging. S63. Repeat step S62 for a total of N times, calculate the average response time and the variance of the response time, and construct the two-dimensional response characteristics of each power instrument. S64. Compare the two-dimensional response characteristics of each power meter with the feature template. The feature template includes the response time reference range and variance range constructed based on the 3sigma principle. If the average response time and the variance of the response time of the two-dimensional response characteristics are greater than the upper limit of the response time reference range and the variance range, respectively, it is determined that the response time is too long or the network fluctuates. An alarm message is sent to the management personnel and the debugging is terminated.

4. The energy consumption management-based barcode meter matching method according to claim 1, characterized in that: Step S70 includes the following steps: S71. When each power meter collects and updates data, it extracts historical energy consumption data updated in rotation for at least M days from the current time point. The energy consumption data includes the meter readings at multiple time collection points. The power meter periodically transmits data to the gateway. S72. Extract features from historical energy consumption data to reflect user behavior characteristics, including energy consumption level characteristics and trend characteristics; S73. Based on the energy consumption data of each power user, construct a two-dimensional data set of time point-energy consumption value, and perform density clustering on multiple data points in the two-dimensional data set according to the energy consumption value to obtain data point clusters with similar energy consumption values; S74. Perform similarity analysis on the time points of each data point cluster, and then perform clustering again to obtain multiple secondary clusters in order to obtain the electricity consumption patterns of power users. S75. Monitor whether the current electricity consumption behavior of electricity users conforms to the obtained electricity consumption patterns, and issue warnings to electricity users upon detecting abnormalities.

5. The energy consumption management-based barcode meter matching method according to claim 4, characterized in that: Step S72 includes the following steps: S721, Extract daily power consumption; S722. Data cleaning: removing outliers and handling missing data; S723. Data normalization: Convert energy consumption data of different dimensions into a unified range to facilitate subsequent analysis; S724. Time series alignment ensures that the data acquisition time points of each power meter are aligned, eliminating deviations caused by different acquisition frequencies.

6. A barcode-based meter allocation system for energy management, characterized in that, include: The power meter is equipped with a QR code identifier, the content of which is the unique physical number of the power meter. The debugging assistant APP is used to input information from power meters and export it as a point table file. The information includes gateway data, physical number, circuit name and model information. The debugging assistant APP has a built-in QR code scanning and recognition module and an image recognition module for recognizing physical numbers. The energy management system is used to receive point data files, power meter debugging data, and energy consumption data characteristic analysis. The data acquisition gateway is used to receive the meter configuration information issued by the energy consumption management system and collect the monitoring data of the corresponding power meters according to the meter configuration information. A scanning device is used to scan the QR code of the power meter to identify the physical number and input it into the debugging assistant APP.

7. The energy consumption management-based barcode meter allocation system according to claim 6, characterized in that: The image recognition module includes a preprocessing unit and a coarse localization unit. The preprocessing unit includes: Image denoising module, used to eliminate noise interference in scanned images; The grayscale conversion module is used to convert color images into grayscale images; The binarization module is used to convert grayscale images into black-and-white binary images to improve the accuracy of character recognition. The normalization module is used to adjust the size of the black-and-white binary image to a uniform size to ensure the comparability of images from different angles. The contrast enhancement module is used to enhance character edge features to obtain a preprocessed image for subsequent feature extraction. The coarse positioning unit includes: The edge extraction module uses the Canny edge feature extraction algorithm to extract edge features from the preprocessed image; The morphological processing module is used to perform morphological processing on the extracted edge features, including erosion and dilation. The contour filtering module is used to perform preliminary filtering on the processed contours, removing contour features that are too small. The ROI extraction module is used to take the contour features with a rectangle size greater than a set threshold as panel features, extract the ROI region within the panel contour, redraw the contour features of the ROI region onto a blank image, and input it as the input image into the recognition model to obtain the physical number of the power meter.

8. The energy consumption management-based barcode meter allocation system according to claim 6, characterized in that: The energy management system has a built-in instrument debugging module, which includes: The instruction sending unit is used to send test instructions and record the sending time t. s ; The data receiving unit is used to receive the network test packets returned by each power meter after receiving the test command, and to record the receiving time t. R ; The feature calculation unit calculates the reaction time Δt=t for each round of testing. R -t s After N rounds of testing, the average reaction time and reaction time variance were calculated to construct two-dimensional reaction characteristics; A threshold comparison unit is used to compare the two-dimensional reaction features with a feature template constructed based on the 3sigma principle, wherein the feature template includes a reaction time reference range and a variance range. The data validation unit is used to parse the string data in the network test packet and verify the data integrity. An alarm unit is used to trigger an alarm and push it to the management terminal when the average reaction time of the two-dimensional reaction feature is greater than the upper limit of the reaction time reference range and the reaction time variance is greater than the upper limit of the variance reference range, or when the string data of the network test packet is incomplete.

9. The energy consumption management-based barcode meter allocation system according to claim 6, characterized in that, Its features are: The energy management system has a built-in energy consumption feature extraction module, which includes: The historical data capture unit is used to capture historical energy consumption data updated in rotation for at least M days at the current time point when the power meter collects and updates data. The energy consumption data includes the meter readings at multiple time collection points. A behavioral feature construction unit is used to extract features from historical energy consumption data to reflect user behavioral characteristics, including energy consumption level features and trend features. The first clustering unit is used to construct a two-dimensional data set of time point-energy consumption value based on the energy consumption data of each power user, and to perform density clustering on multiple data points in the two-dimensional data set according to the energy consumption value to obtain data point clusters with similar energy consumption values; The secondary clustering unit is used to perform similarity analysis on the time points of each data point cluster, and then perform clustering again to obtain multiple secondary clusters in order to obtain the electricity consumption patterns of power users. The alarm unit is also used to issue a warning to the power user when the user’s current electricity consumption behavior does not match the obtained electricity consumption pattern.

10. The energy consumption management-based barcode meter allocation system according to claim 9, characterized in that, Its features are, The behavioral feature construction unit includes: The daily power consumption calculation module is used to calculate daily power consumption. The data cleaning module is used to remove outliers and handle missing data; The data normalization module is used to convert energy consumption data of different dimensions into a unified range; The time sequence alignment module is used to align the time series to ensure that the acquisition time points of each power meter are aligned, so as to eliminate the deviation caused by different acquisition frequencies.