A kind of electric power synchronous meter reading method and meter reading device
By building a high-precision clock module and a multi-link power-on and network access process in the power meter reading device, the problems of insufficient time synchronization accuracy and unstable communication connection of the meter reading device are solved, high-precision data recording and stable data transmission are achieved, and the stability and maintainability of the meter reading device are improved.
Patent Information
- Application Number
- CN202510026236.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-08
- Publication Date
- 2025-03-18
- Estimated Expiration
- 2045-01-08
AI Technical Summary
In the existing power meter reading methods, the time synchronization accuracy of the meter reading equipment is insufficient, resulting in inaccurate data recording, affecting fault analysis and energy consumption statistics; at the same time, the communication connection is unstable, resulting in interruption of data reporting and difficult to identify error data.
By building a high-precision clock module in the meter reading device, clock calibration per second and interaction with authoritative time-saving sources are realized to ensure that the time synchronization of each terminal device is to the millisecond level. At the same time, a multi-link fine boot and network access process is adopted, including communication testing, SIM card authentication, APN settings and signal optimization to ensure stable network connection. For the data collected, multi-dimensional checksum error data analysis is used to eliminate the error data and generate abnormal signals.
It improves the time synchronization accuracy of the meter reading equipment, enhances the time dimension accuracy of the data, and ensures the timing accuracy of energy consumption trend analysis. At the same time, through stable network connections and efficient data quality control, the continuous and stable transmission of power data is ensured, faults and downtime are reduced, and the stability and maintainability of meter reading equipment are improved.
Smart Images

Figure CN119485068B_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of electric power meter reading, in particular to an electric power synchronous meter reading method and a meter reading device. Background Art
[0002] With the development of science and technology, electricity meter reading is gradually moving towards the Internet. In the field of electricity meter reading, traditional meter reading methods often face many challenges and limitations.
[0003] According to the publication number CN113055463A, a method for synchronous meter reading of electricity is disclosed, which includes a master node and multiple slave nodes. The master node sends a synchronous meter reading message in a broadcasting manner. After receiving the synchronous meter reading message, the slave node collects meter data at the same time, and then transmits the meter data to the master node respectively. Thus, the time synchronization of the data is guaranteed. An electric meter reading device includes a server and a meter reading terminal. The meter reading terminal is connected to the server in communication. The server is used as the master node and the meter reading terminal is used as the slave node. The meter reading terminal is connected to the meter located in the meter box.
[0004] However, when using some existing meter reading methods, on the one hand, the time synchronization accuracy of meter reading equipment is poor, and it is difficult to unify the time of each terminal device, resulting in deviations in recording the time of power data occurrence and subsequent fault analysis, energy consumption statistics and other links, affecting data accuracy and event backtracking capabilities. For example, when troubleshooting line faults, it is difficult to accurately locate the specific time point of the fault due to the time difference between devices. On the other hand, the communication connection between meter reading equipment and the external network is unstable, and the boot-up and network access process is prone to various obstacles, such as imprecise SIM card status detection, easy to make mistakes in APN settings, and poor network signal quality affecting login and data transmission. In addition, once an abnormality occurs during the communication process (login failure, heartbeat timeout, etc.), there is a lack of efficient and intelligent recovery mechanism, resulting in frequent interruptions in data reporting and loss of connection. At the same time, there is a lack of rigorous quality control and in-depth analysis methods for the collected data, making it difficult to accurately screen valid data and identify erroneous data, and it is also impossible to timely understand whether the collection cycle is abnormal based on the proportion of erroneous data. Summary of the invention
[0005] In view of the deficiencies in the prior art, the present invention provides a method and device for synchronous electric power meter reading, which solve the problems of imperfect time calibration and update mechanism of meter reading equipment and lack of systematic multi-dimensional verification and analysis process for periodically collected data.
[0006] To achieve the above objectives, the present invention is implemented by the following technical scheme: a method for synchronous electric power meter reading, the method specifically comprising the following steps:
[0007] Step 1: start the meter reading device and initialize the hardware of the meter reading device;
[0008] Step 2: Create multiple execution tasks through the meter reading device, including time processing tasks, uplink communication tasks, data collection tasks and RS485 debugging tasks, and perform execution analysis on the multiple execution tasks respectively;
[0009] Step 3: Analyze the time processing tasks in the execution tasks, perform time calibration and update through the high-precision clock module, and perform time synchronization processing according to the acquisition signal sent out during the acquisition cycle to obtain the network time;
[0010] Step 4: Analyze the uplink communication task in the execution task, analyze the boot-up phase and the successful login phase, and generate the uplink communication result;
[0011] Step 5: Analyze the data collection tasks in the execution tasks, analyze the periodically collected data, and conduct a comprehensive analysis based on the data content to screen out the correct data;
[0012] Step six, analyze the RS485 debugging task in the execution task, and realize the overall debugging task by separately analyzing the debugging instructions, system status and power-off detection.
[0013] As a further solution of the present invention, the specific method of analyzing the time processing task in step 3 is:
[0014] The system has a built-in high-precision clock module, which uses quartz crystal pulses to calibrate the system time every second and continuously interacts with the Alibaba Cloud NTP time server. At the same time, the running light flashes alternately for 1 second on and 1 second off. If a power outage occurs, it will remain on until the capacitor is exhausted. The remote light will be on for 1 second off and 1 second off when online, and off when offline.
[0015] According to the system's collection cycle, the load curve collection signal is sent once at the preset time. The daily freeze is sent at 0:05 every day, the monthly freeze is sent at 0:05 on the 1st of each month, and the broadcast time is sent at 2:13 every day. At the same time, the time synchronization signal is read once a second. If a signal is received, the current time is set to the network time.
[0016] As a further solution of the present invention, the specific method of analyzing the power-on startup phase in the uplink communication task in step 4 is:
[0017] The device is hard-powered, the system hardware self-checks and initializes basic components, and after loading the underlying driver, a communication test is carried out. A test packet is sent to a predefined address to detect the connectivity of the wired or wireless link, and the packet loss rate and delay are recorded. If the packet loss rate exceeds 5%, an abnormality is marked and processed;
[0018] At the same time, the SIM card is tested in multiple dimensions, the IMSI and ICCID verification information are read, and an authentication request is sent to the base station. After confirming that the card is normal, the APN parameters are set according to the rules. If there is no network access feedback within 30 seconds, reset and try again. Then activate PDP to build a channel with the operator, synchronize the network time and calibrate the local clock to within an error of ±1 second. When CSQ is lower than 10, adjust the antenna and switch the frequency band. After that, connect to the main station to send a login message and turn on the heartbeat. After successful login, the SIM card number is recorded. If an error occurs, restart according to the gradient time from the last restart: if it is less than 10 minutes, monitor for 2 minutes. If it exceeds 10 minutes, soft shutdown first. If it fails, hard shutdown. If the hard shutdown fails again, hard reset. After resetting, test the communication first. If normal, return to the communication test. If abnormal, start from the hard restart.
[0019] As a further solution of the present invention, the specific method of analyzing the successful login stage in the uplink communication task in step 4 is:
[0020] When an FTP upgrade command or configuration file is detected, the network is disconnected, and the upgrade is performed according to the MD5 check and other rules, with the steps of backing up first and then updating the firmware. After completion, the process is restarted and repeated, and the network connection is checked every 10 minutes. If it is disconnected, the cause is checked and the login is restarted. Heartbeat frames are sent according to the heartbeat cycle. If there is no message response from the master station for more than 2 cycles, the connection is disconnected and the login is restarted.
[0021] Continuously parse the main station instructions and respond efficiently, check CSQ every 30 minutes, optimize the signal when the sudden drop exceeds 50%, synchronize the network time at 23:10 every day and send synchronization signals to the sub-devices. If reporting is turned on and there is valid data such as load curve and daily freeze, report according to the preset cycle. If the backup port connection time exceeds 30 minutes, it will be disconnected and re-login to connect to the main station IP.
[0022] As a further solution of the present invention, the specific method of analyzing the data collection task in step 5 is:
[0023] Obtain all periodic collected data and label them as i, where i=1, 2, ..., j, where j represents the number of data, and identify and judge the data content and data source of data i respectively;
[0024] Analyze the data content to obtain data i, and analyze the data content integrity, data content accuracy and data content timeliness of data i. If there are no errors in the data content integrity, data content accuracy and data content timeliness of data i, then classify data i as normal data; otherwise, if there is any set of abnormalities in the data content integrity, data content accuracy and data content timeliness, then classify data i as erroneous data;
[0025] The classified error data is obtained and labeled as a, where a=1, 2, ..., n, where n represents the number of error data. Then the data in the same period corresponding to the error data a is obtained and labeled as the data to be analyzed. At the same time, the proportion of error data in the data to be analyzed is calculated, and the calculated proportion is compared with the preset value to generate a normal acquisition signal or an acquisition cycle abnormal signal.
[0026] As a further solution of the present invention, the specific method of generating the normal acquisition signal or the acquisition cycle abnormal signal in step 5 is:
[0027] If the number ratio is greater than the preset value, it means that there is an abnormality in the collection method of the corresponding time period, and a collection cycle abnormality signal is generated, and the corresponding erroneous data is eliminated. Conversely, if the number ratio is less than the preset value, it means that the collection method of the corresponding time period is normal, and a normal collection signal is generated, and the corresponding normal data is counted and combined.
[0028] As a further solution of the present invention, the specific method of analyzing the RS485 debugging task in the execution task in step 6 is:
[0029] The system builds an efficient command monitoring module, focusing on the RS485 port, polling and monitoring debugging commands at millisecond intervals. After capturing the command, the intelligent parsing engine is immediately activated to deeply analyze the command content based on the built-in instruction set database covering multi-function codes and operational semantics;
[0030] Set up an independent upgrade process monitoring timer, which is closely linked to the system firmware upgrade and software parameter update operations. It will accurately time the upgrade from the start. If it exceeds the preset reasonable time threshold, it will immediately trigger the hardware reset operation.
[0031] Build an intelligent perception mechanism for parameter changes. When faced with requests for terminal parameter and meter file modification, the system automatically starts multiple rounds of verification. After receiving the command, it first verifies the legitimacy of the command, checks the sender's authority and format compliance, and then rehearses and calculates the update effect in the temporary memory area based on the modified content. After it is correct, it uses the CRC algorithm to generate a checksum, and at the same time stores the complete update data in the EEPROM chip;
[0032] In response to various initialization requirements such as data, parameters, factory delivery, and hardware, a priority queuing and conditional triggering execution framework is built. When a corresponding instruction is detected, the system first evaluates the operating status, suspends non-critical services, and executes in order of hardware first, parameters and overall data second, and specific scenario data last, to ensure orderly initialization and avoid data conflicts and disorders.
[0033] Deploy a highly sensitive power-off detection circuit to monitor power supply voltage fluctuations in real time. Use filtering and threshold comparison algorithms to accurately distinguish between normal voltage drop and power-off. Once power-off is confirmed, immediately start the data protection program, store the current system time accurate to milliseconds in a dedicated storage area, and set a power-off flag.
[0034] A 30-second waiting period is set, and the uplink communication module transmits the key power-off information to the monitoring center or related equipment. After the period expires, the system restarts in an orderly manner, and the running light is always on to indicate the status. If there is no power failure, the system loops back to the RS485 command monitoring link.
[0035] A synchronous electric meter reading device, comprising an information collection module, a time processing module, an uplink communication analysis module, a data collection and analysis module, and an RS485 debugging and analysis module;
[0036] An information collection module, which is used to obtain meter reading tasks and transmit the obtained meter reading tasks separately;
[0037] The time processing module is used to analyze the acquired time processing tasks, perform time calibration and update through a high-precision clock module, and perform time synchronization processing according to the acquisition signal sent during the acquisition cycle to obtain the network time;
[0038] An uplink communication analysis module is used to analyze the acquired uplink communication tasks, analyze the boot-up phase and the successful login phase, and generate uplink communication results;
[0039] Data collection and analysis module, which is used to analyze the acquired data collection tasks, analyze the periodically collected data, and conduct a comprehensive analysis based on the data content to filter out the correct data;
[0040] RS485 debugging analysis module, which is used to analyze the acquired RS485 debugging tasks, and realize the overall debugging tasks by separately analyzing the debugging instructions, system status and power-off detection.
[0041] The present invention provides a method and device for synchronous electric power meter reading. Compared with the prior art, it has the following beneficial effects:
[0042] The present invention uses a built-in high-precision clock module, which is calibrated according to the quartz crystal pulse every second and continuously interacts with the authoritative time source. The time of each terminal device is synchronized to the millisecond level, which improves the operation and maintenance repair speed and the accuracy of the time dimension of power data, and is conducive to the precise integration of energy consumption trend analysis in time sequence;
[0043] Precise control of multiple links during startup and network access, from checking abnormalities in communication test record indicators, deep SIM card authentication, APN specification setting reset mechanism, to optimizing and adjusting according to signal quality, and coordinating gradient restart strategies to deal with login errors; regular connection checks and intelligent heartbeat reconnection during operation ensure stable network connections, such as automatic reconnection of remote office VPN to avoid data reporting loss, and support continuous and stable transmission of power data to the main station;
[0044] Verify and classify the collected data in multiple dimensions, combine the correlation analysis of erroneous data with the same period, compare the error ratio with the preset value to determine whether the collection is abnormal, eliminate erroneous data, and count normal data, so as to help operators accurately control the collection quality, provide a solid and reliable data foundation for power allocation (based on load data of different periods) and cost accounting (accurate statistics of daily frozen and monthly frozen data), and improve the scientific nature of decision-making;
[0045] RS485 command millisecond-level monitoring and analysis; intelligent monitoring of system upgrades and parameter changes (timeout reset, multiple rounds of verification and preservation); on-demand priority execution of initialization; high-sensitivity detection of power failures, marking of critical times, and orderly restart after uploading information within 30 seconds. The whole process improves equipment stability and maintainability, ensures stable operation of meter reading equipment, reduces downtime due to failures, and continuously and efficiently completes meter reading operations. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] Figure 1 It is a step method diagram of the present invention;
[0047] Figure 2 This is a functional module diagram of the meter reading device of the present invention. DETAILED DESCRIPTION
[0048] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0049] For example, see Figure 1 The present application provides a method for synchronous electric power meter reading, which specifically comprises the following steps:
[0050] Step 1: start the meter reading device and initialize the hardware of the meter reading device.
[0051] Step 2: Create multiple execution tasks through the meter reading device, including time processing tasks, uplink communication tasks, data collection tasks and RS485 debugging tasks, and perform execution analysis on the multiple execution tasks respectively.
[0052] Step three, analyze the time processing tasks in the execution task, perform time calibration and update through a high-precision clock module, and perform time synchronization processing based on the acquisition signal emitted during the acquisition cycle to obtain the network time.
[0053] The system has a built-in high-precision clock module, which calibrates the system time every second based on the stable pulse of the quartz crystal oscillator, and continuously interacts with authoritative resources such as the Alibaba Cloud NTP time server to ensure accurate time advancement. In the smart grid substation monitoring system, the time of each terminal device is synchronized to the millisecond level. For example, in the case of a line short circuit tripping fault, with accurate time records (such as 3:20:15:320 milliseconds at 3:20 a.m.), operation and maintenance personnel can efficiently trace back and analyze, locate the fault, and speed up repairs;
[0054] The operation light flashes alternately with 1 second on and 1 second off, indicating that the system is running normally. In the event of a power outage, it will switch to a constant on state until the power is exhausted, relying on the backup capacitor to store energy. The remote light is linked to the system network connection status, flashing 1 second on and 1 second off when online, indicating active interaction; it will be off when offline;
[0055] The system sends collection signals according to the preset cycle: 1 minute to capture the "snapshot" of load fluctuations of key equipment; 5 minutes to summarize the power consumption trend of local areas; 15 minutes to integrate the panoramic view of large-scale power consumption, to assist in power allocation and energy consumption analysis;
[0056] Daily freeze starts at 0:05 every day, and stores the core power data of the previous 24 hours to help analyze energy consumption structure, etc.; monthly freeze starts at 0:05 on the 1st of each month, integrating the data of the whole month to serve long-term energy planning and cost accounting. The energy management system of large office buildings uses this to generate power consumption reports to support cost sharing and energy-saving strategy formulation;
[0057] At 2:13 every day, the system broadcasts timing instructions to related devices through wired (Ethernet) and wireless (Wi-Fi, 4G / 5G module) links to calibrate time deviations. The system scans and reads synchronization signals from reliable sources such as NTP servers and GPS timing modules every second, and updates the local time to the network time once it is captured.
[0058] Step 4: Analyze the uplink communication task in the execution task, analyze the boot-up phase and the successful login phase, and generate the uplink communication result.
[0059] Start the boot phase analysis, power on the device to perform hard boot operation, the system hardware performs self-check, initializes various basic components, loads the underlying driver, and immediately conducts communication test after completing the boot initialization. Send a simple test data packet to the predefined test address to verify the physical layer and link layer connectivity of the wired (such as Ethernet port) or wireless (such as 4G / 5G module) communication link, and record basic indicators such as packet loss rate and delay to provide a reference for subsequent stable communication. Once the packet loss rate exceeds 5%, the communication is marked as abnormal, and an attempt is made to reconnect or enter the troubleshooting process. The built-in SIM card of the device is tested in multiple dimensions, and key information such as the IMSI (International Mobile Subscriber Identity) and ICCID (Integrated Circuit Card Identification) of the SIM card is read to verify the integrity and legitimacy of the information. At the same time, an authentication request is sent to the operator's base station to confirm whether the SIM card is in normal service status and whether there is any arrears or shutdown. This is similar to the detection of the SIM card when the mobile phone is turned on, to ensure smooth subsequent network access;
[0060] According to the device usage scenario and the access point name (APN) configuration rules provided by the operator, accurately set the APN parameters, including the APN name, user name, password and other core fields, and then actively initiate a network access detection request to the operator's core network and wait for feedback of successful network access confirmation information. If no feedback is received within 30 seconds, reset the APN and try again to ensure that the device can correctly access the operator's network;
[0061] Activate the packet data protocol (PDP) context and negotiate with the operator network to establish a data transmission channel. During this process, request the network server to obtain accurate network time, calibrate the local clock of the device, and make the device time consistent with the network timing source. The error is controlled within ±1 second. After the vehicle-mounted intelligent terminal activates PDP, time synchronization ensures the time accuracy of vehicle trajectory recording and remote monitoring data.
[0062] Get the current network signal quality (CSQ), quantify it into a specific value (such as 0-31, the larger the value, the better the signal), and determine whether it can stably connect to the main station port based on the signal strength. If the CSQ value is lower than 10, try to adjust the antenna position, switch the frequency band, and other operations to improve the signal. After the connection is successful, send a login message to the main station and wait for the main station to verify the reply. At the same time, start the heartbeat mechanism, send heartbeat frames at a set interval (such as every 5 minutes) to maintain the connection activity, and extract the SIM card number record for filing when the login is successful;
[0063] During the login process, if an error occurs (such as login message rejection, heartbeat timeout and no response, etc.), a gradient restart strategy is executed based on the time since the last restart. If it is less than 10 minutes since the last restart, do not restart for the time being, and continue to monitor for 2 minutes to see if it can be automatically restored; if the first error occurs after 10 minutes, perform a soft shutdown, orderly shut down the running processes, release system resources, and then restart the entire process with a hard restart; if the soft shutdown fails, perform a hard shutdown directly, and force a power outage and restart; if the hard shutdown also fails, trigger a hard reset operation (similar to the reset button function on a computer), test the communication first after the reset, and return to the communication test step if the communication is normal, otherwise restart the cycle from the hard restart step to ensure that the system has a chance to self-repair the login failure;
[0064] Analysis of the successful login stage: after successful login, the system automatically detects whether there are FTP upgrade instructions or configuration files. If an upgrade is detected, the current network connection is immediately and safely disconnected to prevent data conflicts during the upgrade process. The FTP upgrade program is started, and the upgrade is strictly performed according to the predefined upgrade package verification rules (such as MD5 checksum comparison) and upgrade steps (first back up key data, then update the firmware). After the upgrade is completed, the device is automatically restarted, and the login and subsequent processes are repeated after the restart to ensure that the device firmware is always in the latest optimized state. The network connection status is checked regularly (every 10 minutes). Once the connection is found to be disconnected, the possible reasons (such as signal loss, master station failure, etc.) are quickly traced back and the complete login process is re-executed to try to restore the connection to avoid long-term loss of connection affecting business data interaction. Similar to the automatic reconnection after the remote office VPN connection is interrupted to ensure continuous office work;
[0065] Heartbeat frames are sent strictly according to the set heartbeat cycle (such as every 5 minutes). If no message response is received from the master station for more than 2 cycles (i.e. 10 minutes), it is regarded as a connection abnormality, and the current connection is actively disconnected, the relevant session cache is cleared, the login process is restarted, and a reliable connection with the master station is rebuilt to ensure real-time and stable communication between the two parties and prevent misjudgment of "lost connection";
[0066] Continuously monitor the master station's instructions, quickly parse the instruction content (instruction type, parameter requirements, etc.) after receiving the instructions, efficiently reply to the corresponding data or perform operations (such as configuration parameter modification, data query feedback, etc.) according to the instruction specifications, and enter the next step of process monitoring after processing is completed, receive the master station's meter reading instructions to the power meter reading terminal, and accurately feedback the meter readings;
[0067] Check CSQ every 30 minutes to dynamically monitor network signal fluctuations. Once the CSQ value drops by more than 50%, try to switch network frequency bands, adjust power, and perform other optimization operations to improve the signal. Synchronize network time on time at 23:10 every day, calibrate the local clock, and send time synchronization signals to related sub-devices to unify the system time base, so as to facilitate the precise integration of data statistics and event records in a timely manner. For example, each node in a distributed energy management system is synchronized in this way to ensure accurate energy consumption statistics time.
[0068] If the data reporting function is turned on and valid data such as load curve, daily freeze, monthly freeze, power outage time, etc. are cached locally, report to the master station according to the preset reporting cycle (such as reporting daily freeze data at 0:05 every day) and format specifications; for the backup port connection scenario, monitor the connection duration in real time, disconnect if it exceeds 30 minutes, re-enter the login process to connect to the master station IP, ensure that the primary and backup connection switching is reasonable and efficient, avoid long-term idleness or abnormal occupation of the backup port, improve the overall network resource utilization and system reliability, just like redundant server link management, switch the primary and backup links according to the duration to ensure service stability.
[0069] Step five: Analyze the data collection tasks in the execution task, analyze the periodically collected data, and conduct a comprehensive analysis based on the data content to screen out the correct data.
[0070] Obtain all periodic collected data and label them as i, where i=1, 2, ..., j, where j represents the number of data, and identify and judge the data content and data source of data i respectively;
[0071] Analyze the data content to obtain data i, and analyze the data content integrity, data content accuracy and data content timeliness of data i. If there are no errors in the data content integrity, data content accuracy and data content timeliness of data i, then classify data i as normal data; otherwise, if there is any set of abnormalities in the data content integrity, data content accuracy and data content timeliness, then classify data i as erroneous data;
[0072] Regarding data content integrity, for example, a meter file should include basic meter information (such as meter number, model, installation location, etc.), metering data (such as power consumption, voltage, current, etc.), time information (meter time), and possible maintenance records, etc. If some important parts are missing, it may not be a valid file.
[0073] For data accuracy, power consumption should be accumulated over time, and parameters such as voltage and current should be within a reasonable range. If there is a sudden drop in power consumption, or the voltage value exceeds the rated range of the meter, etc., which is illogical, the accuracy of the file is questionable.
[0074] Regarding the timeliness of data content, for example, some meter files may be required to be updated every hour. If the timestamp in the file shows that the last update was two days ago, then the file may be outdated.
[0075] The classified error data is obtained and labeled as a, where a=1, 2, ..., n, where n represents the number of error data. Then, the data of the same period corresponding to the error data a is obtained, and the same period here represents the data within the same acquisition cycle, and is recorded as the data to be analyzed. At the same time, the number ratio of the error data in the data to be analyzed is calculated, and the calculated number ratio is compared with a preset value, and the specific value of the preset value is set by the operator;
[0076] If the quantity ratio is greater than the preset value, it means that there is an abnormality in the collection method of the corresponding time period, and a collection cycle abnormality signal is generated, and the corresponding erroneous data is eliminated. On the contrary, if the quantity ratio is less than the preset value, it means that the collection method of the corresponding time period is normal, and a normal collection signal is generated. At the same time, the corresponding normal data is counted and combined, and the generated collection cycle abnormality signal will be displayed to the corresponding operator, who will modify the collection method.
[0077] Step six, analyze the RS485 debugging task in the execution task, and realize the overall debugging task by separately analyzing the debugging instructions, system status and power-off detection.
[0078] To analyze the debugging instructions, the system builds an efficient and real-time instruction monitoring module, which focuses on the RS485 communication port and polls at a frequency of milliseconds to monitor whether new debugging instructions have arrived. Once the instruction signal is captured, the intelligent parsing engine is immediately activated. The engine deeply analyzes the instruction content based on the pre-built-in instruction set database covering various functional codes and operation semantics;
[0079] Determine the system status, set up an independent upgrade process monitoring timer, and closely bind it to system firmware upgrades, software parameter updates, and other operations, starting accurate timing from the moment the upgrade process starts. Once the timeout threshold (a reasonable length of time based on statistical analysis of a large number of past upgrade cases, such as 10 minutes for smart industrial controller upgrades) is exceeded, the hardware reset operation is immediately triggered;
[0080] Build an intelligent perception mechanism for parameter changes. For modification requests for core data such as terminal parameters and meter files, the system automatically starts multiple rounds of verification processes. When a modification instruction is received (for example, power operation and maintenance personnel remotely adjust the voltage transformer ratio parameters of smart meters), first compare the legality of the instruction, verify whether the sender of the instruction has the authority and whether the instruction format is compliant, then perform a rehearsal calculation in the temporary storage area of the memory based on the modification content, simulate the operating effect after the data is updated, and update the verification code after confirmation (using a cyclic redundancy check algorithm such as CRC to generate a unique verification code to ensure data integrity). Finally, the updated complete data is permanently saved to the EEPROM storage chip to ensure data modification security and traceability;
[0081] For various initialization requirements such as data initialization, parameter and all data initialization, factory initialization, hardware initialization marking, etc., an execution framework combining priority queuing and conditional triggering is built. When a corresponding initialization instruction is detected (such as the factory initialization instruction received when the smart storage equipment is first deployed in a new site), the system first evaluates the current operating status, suspends non-critical business processes, and executes operations in sequence according to the initialization type priority (hardware initialization prioritizes the normal function of basic hardware, followed by parameter and all data initialization to build the operating environment, and finally data initialization for specific scenarios) to ensure that the initialization process is orderly and avoid data conflicts and system disorders;
[0082] Analyze power-off detection, deploy a highly sensitive power-off detection circuit, monitor power supply line voltage fluctuations in real time, and use filtering and threshold comparison algorithms to accurately distinguish normal voltage drops from real power-off situations. Once a power-off is confirmed (for example, a sudden mains failure in an industrial workshop causes the voltage to drop below the set threshold of 5V in an instant), immediately start the data protection program, record and save the current critical system time (accurate to milliseconds, obtained through the built-in high-precision clock chip) to a dedicated storage area for power-off protection at nanosecond speed, and set a striking power-off mark, similar to inserting a "danger flag" in the system log, to provide key clues for subsequent restart and recovery;
[0083] A carefully considered 30-second waiting cycle is set to give the uplink communication module sufficient "breathing" time to ensure that it can successfully upload key information such as power-off time to the monitoring center or related equipment. In the intelligent street light control system, when the street light controller loses power, the uplink module will quickly package the power-off coordinates (road section number, lamp pole serial number) and time and send them during the waiting time, so that the operation and maintenance department can quickly locate the faulty street light and assess the impact of the power outage. After the waiting period expires, the system starts the restart process in an orderly manner. At the beginning of the restart, the running light is turned on and remains on, just like lighting a guiding beacon in the dark, which not only prompts that the device is restarting and recovering, but also facilitates on-site operation and maintenance personnel to intuitively judge the status of the device. After the call restores normal power supply, the system gradually recovers to a fully functional operating state according to the established initialization and self-test process. If no power outage is detected, it will continue to loop back to the RS485 command monitoring link to ensure the stability and continuous operation of the system.
[0084] For example 2, please refer to Figure 2 The present application provides a synchronous electric meter reading device, which specifically includes: an information collection module, a time processing module, an uplink communication analysis module, a data acquisition and analysis module, and an RS485 debugging and analysis module.
[0085] An information collection module, which is used to obtain meter reading tasks and transmit the obtained meter reading tasks separately;
[0086] A time processing module is used to analyze the acquired time processing tasks, perform time calibration and update through a high-precision clock module, and perform time synchronization processing according to the acquisition signal emitted during the acquisition cycle to obtain the network time. The processing process here is the same as the processing process of step three in embodiment one;
[0087] An uplink communication analysis module, which is used to analyze the acquired uplink communication tasks, analyze the boot-up phase and the successful login phase, and generate an uplink communication result, and the processing process here is the same as the processing process of step 4 in embodiment 1;
[0088] A data collection and analysis module is used to analyze the acquired data collection tasks, analyze the periodically collected data, and perform a comprehensive analysis based on the data content to screen out the correct data. The processing method here is the same as the processing process of step 5 in embodiment 1;
[0089] RS485 debugging analysis module, which is used to analyze the acquired RS485 debugging task, and realize the overall debugging task by separately analyzing the debugging instruction, system status and power-off detection. The analysis process here is the same as the processing process of step six in embodiment one.
[0090] Some of the data in the above formulas are dimensionless and numerically calculated. Meanwhile, the contents not described in detail in this specification belong to the prior art known to those skilled in the art.
[0091] The above embodiments are only used to illustrate the technical method of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical method of the present invention may be modified or replaced by equivalents without departing from the spirit and scope of the technical method of the present invention.
Claims
1. A method for synchronous electric power meter reading, characterized in that: The method specifically comprises the following steps: Step 1: start the meter reading device and initialize the hardware of the meter reading device; Step 2: Create multiple execution tasks through the meter reading device, including time processing tasks, uplink communication tasks, data collection tasks and RS485 debugging tasks, and perform execution analysis on the multiple execution tasks respectively; Step 3: Analyze the time processing tasks in the execution tasks, perform time calibration and update through the high-precision clock module, and perform time synchronization processing according to the acquisition signal sent out during the acquisition cycle to obtain the network time; Step 4: Analyze the uplink communication task in the execution task, analyze the boot-up phase and the successful login phase, and generate the uplink communication result; Step 5: Analyze the data collection tasks in the execution tasks, analyze the periodically collected data, and conduct a comprehensive analysis based on the data content to screen out the correct data; Step six, analyze the RS485 debugging task in the execution task, and realize the overall debugging task by separately analyzing the debugging instructions, system status and power-off detection.
2. A method for synchronous electric power meter reading according to claim 1, characterized in that: The specific method of analyzing the time processing task in step 3 is: The system has a built-in high-precision clock module, which uses quartz crystal pulses to calibrate the system time every second and continuously interacts with the Alibaba Cloud NTP time server. At the same time, the running light flashes alternately for 1 second on and 1 second off. If a power outage occurs, it will remain on until the capacitor is exhausted. The remote light will be on for 1 second off and 1 second off when online, and off when offline. According to the system's collection cycle, the load curve collection signal is sent once at the preset time. The daily freeze is sent at 0:05 every day, the monthly freeze is sent at 0:05 on the 1st of each month, and the broadcast time is sent at 2:13 every day. At the same time, the time synchronization signal is read once a second. If a signal is received, the current time is set to the network time.
3. A method for synchronous electric power meter reading according to claim 1, characterized in that: The specific method of analyzing the startup phase in the uplink communication task in step 4 is as follows: The device is hard-powered, the system hardware self-checks and initializes basic components, and after loading the underlying driver, a communication test is carried out. A test packet is sent to a predefined address to detect the connectivity of the wired or wireless link, and the packet loss rate and delay are recorded. If the packet loss rate exceeds 5%, an abnormality is marked and processed; At the same time, the SIM card is tested in multiple dimensions, the IMSI and ICCID verification information are read, and an authentication request is sent to the base station. After confirming that the card is normal, the APN parameters are set according to the rules. If there is no network access feedback within 30 seconds, reset and try again. Then activate PDP to build a channel with the operator, synchronize the network time and calibrate the local clock to within an error of ±1 second. When CSQ is lower than 10, adjust the antenna and switch the frequency band. After that, connect to the main station to send a login message and turn on the heartbeat. After successful login, the SIM card number is recorded. If an error occurs, restart according to the gradient time from the last restart: if it is less than 10 minutes, monitor for 2 minutes. If it exceeds 10 minutes, soft shutdown first. If it fails, hard shutdown. If the hard shutdown fails again, hard reset. After resetting, test the communication first. If normal, return to the communication test. If abnormal, start from the hard restart.
4. The method for synchronous electric power meter reading according to claim 1, characterized in that: The specific method of analyzing the successful login stage in the uplink communication task in step 4 is: When an FTP upgrade command or configuration file is detected, the network is disconnected, and the upgrade is performed according to the MD5 verification rule, backing up first and then updating the firmware. After completion, the process is restarted and repeated, and the network connection is checked every 10 minutes. If it is disconnected, the cause is checked and the login is restarted. Heartbeat frames are sent according to the heartbeat cycle. If there is no master station message response for more than 2 cycles, the connection is disconnected and the login is restarted. Continuously parse the master station's instructions and respond efficiently, check CSQ every 30 minutes, optimize the signal when the sudden drop exceeds 50%, synchronize the network time at 23:10 every day and send synchronization signals to the sub-devices. If reporting is enabled and there is load curve and daily frozen valid data, report according to the preset cycle. If the backup port connection time exceeds 30 minutes, it will be disconnected and re-login to connect to the master station IP.
5. The method for synchronous electric power meter reading according to claim 1, characterized in that: The specific method of analyzing the data collection task in step 5 is: Obtain all periodic collected data and label them as i, where i=1, 2, ..., j, where j represents the number of data, and identify and judge the data content and data source of data i respectively; Analyze the data content to obtain data i, and analyze the data content integrity, data content accuracy and data content timeliness of data i. If there are no errors in the data content integrity, data content accuracy and data content timeliness of data i, then classify data i as normal data; otherwise, if there is any set of abnormalities in the data content integrity, data content accuracy and data content timeliness, then classify data i as erroneous data; The classified error data is obtained and labeled as a, where a=1, 2, ..., n, where n represents the number of error data. Then the data in the same period corresponding to the error data a is obtained and labeled as the data to be analyzed. At the same time, the proportion of error data in the data to be analyzed is calculated, and the calculated proportion is compared with the preset value to generate a normal acquisition signal or an acquisition cycle abnormal signal.
6. A method for synchronous electric power meter reading according to claim 5, characterized in that: The specific method of generating the normal acquisition signal or the acquisition cycle abnormal signal in step 5 is: If the number ratio is greater than the preset value, it means that there is an abnormality in the collection method of the corresponding time period, and a collection cycle abnormality signal is generated, and the corresponding erroneous data is eliminated. Conversely, if the number ratio is less than the preset value, it means that the collection method of the corresponding time period is normal, and a normal collection signal is generated, and the corresponding normal data is counted and combined.
7. The method for synchronous electric power meter reading according to claim 1, characterized in that: The specific method of analyzing the RS485 debugging task in the execution task in step 6 is: The system builds an efficient command monitoring module, focusing on the RS485 port, polling and monitoring debugging commands at millisecond intervals. After capturing the command, the intelligent parsing engine is immediately activated to deeply analyze the command content based on the built-in instruction set database covering multi-function codes and operational semantics; Set up an independent upgrade process monitoring timer, which is closely linked to the system firmware upgrade and software parameter update operations. It will accurately time the upgrade from the start. If it exceeds the preset reasonable time threshold, it will immediately trigger the hardware reset operation. Build an intelligent perception mechanism for parameter changes. When faced with requests for terminal parameter and meter file modification, the system automatically starts multiple rounds of verification. After receiving the command, it first verifies the legitimacy of the command, checks the sender's authority and format compliance, and then rehearses and calculates the update effect in the temporary memory area based on the modified content. After it is correct, it uses the CRC algorithm to generate a checksum, and at the same time stores the complete update data in the EEPROM chip; In response to various initialization requirements for data, parameters, factory delivery, and hardware, a priority queuing and conditional triggering execution framework is built. When a corresponding instruction is detected, the system first evaluates the operating status, suspends non-critical services, and executes in order of hardware first, parameters and overall data second, and specific scenario data last, to ensure orderly initialization and avoid data conflicts and disorders. Deploy a highly sensitive power-off detection circuit to monitor power supply voltage fluctuations in real time. Use filtering and threshold comparison algorithms to accurately distinguish between normal voltage drop and power-off. Once power-off is confirmed, immediately start the data protection program, store the current system time accurate to milliseconds in a dedicated storage area, and set a power-off flag. A 30-second waiting period is set, and the uplink communication module transmits the key power-off information to the monitoring center or related equipment. After the period expires, the system restarts in an orderly manner, and the running light is always on to indicate the status. If there is no power failure, the system loops back to the RS485 command monitoring link.
8. A power synchronous meter reading device, used to execute a power synchronous meter reading method according to any one of claims 1 to 7, characterized in that: The device includes an information collection module, a time processing module, an uplink communication analysis module, a data collection and analysis module, and an RS485 debugging and analysis module; An information collection module, which is used to obtain meter reading tasks and transmit the obtained meter reading tasks separately; The time processing module is used to analyze the acquired time processing tasks, perform time calibration and update through a high-precision clock module, and perform time synchronization processing according to the acquisition signal sent during the acquisition cycle to obtain the network time; An uplink communication analysis module is used to analyze the acquired uplink communication tasks, analyze the boot-up phase and the successful login phase, and generate uplink communication results; Data collection and analysis module, which is used to analyze the acquired data collection tasks, analyze the periodically collected data, and conduct a comprehensive analysis based on the data content to filter out the correct data; RS485 debugging analysis module, which is used to analyze the acquired RS485 debugging tasks, and realize the overall debugging tasks by separately analyzing the debugging instructions, system status and power-off detection.
Citation Information
Patent Citations
Electric power synchronous meter reading method and meter reading device
CN113055463A
Task multi-level intelligent scheduling method for electricity utilization information acquisition
CN113627832A
Transformer area data curve storage control method and device based on HPLC (High Performance Liquid Chromatography) communication
CN115833877A