Method and device for preventing communication module of electric energy meter from downtime, storage medium and equipment
By implementing a scenario-based, hierarchical, and remotely controllable watchdog protection mechanism, the problem of frequent downtime of smart meter communication modules due to software failures has been solved. This enables efficient identification and handling of anomalies, improves the operational stability of the communication module, and reduces maintenance costs.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-01-04
- Publication Date
- 2026-04-10
AI Technical Summary
The communication module of smart meters frequently crashes due to software failures, leading to data interruptions and increased maintenance costs. Existing technologies are unable to effectively identify and resolve hidden anomalies at the software level.
A scenario-based, hierarchical, and remotely controllable watchdog protection mechanism is adopted. The concentrator controller monitors the abnormal status of the communication module and performs hierarchical reset according to different abnormalities. Combined with remote adjustment of watchdog parameters, anomalies are identified and handled.
It significantly improves the operational stability of the communication module, reduces the probability of downtime, improves the accuracy of anomaly identification, reduces the impact of reset on the module, and extends the long-term downtime operation time of the communication module.
Smart Images

Figure CN121833339A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application belongs to the technical field of smart grid, and relates to a method and device for preventing a communication module of an electric energy meter from being down, a storage medium and electronic equipment. BACKGROUND
[0002] As a key component for realizing remote data acquisition, state monitoring and bidirectional interaction of smart electric energy meters, a communication module has been widely applied in smart grids. However, with the increasing complexity of communication functions and the rapid expansion of module deployment scale, the software reliability problem of the communication module has gradually become prominent, and has become one of the important factors restricting the stable operation of a power grid data acquisition system. According to industry statistics, the unreliability of the communication module of a smart electric energy meter in a 10-year operation cycle has reached 0.126, that is, about 126 modules per thousand modules fail due to faults, and more than 70% of the failures are attributed to software defects or abnormalities.
[0003] When the communication module is down due to software failure, the module usually needs to be manually replaced or restarted after being powered off to restore normal operation. Such a processing method not only significantly increases the operation and maintenance cost and the labor burden, but also may cause data interruption and meter reading failure, thereby affecting the accurate collection of user power consumption information and the timeliness of electricity bill settlement. Therefore, how to provide a technical solution capable of reducing the down probability of the communication module in operation has become one of the technical problems to be solved by relevant technical personnel. SUMMARY
[0004] Embodiments of the application provide a method and device for preventing a communication module of an electric energy meter from being down, a storage medium and equipment, for reducing the down probability of the communication module in operation.
[0005] In a first aspect, embodiments of the application provide a method for preventing a communication module of an electric energy meter from being down. The method comprises: based on an application scenario of the communication module, adopting a watchdog to protect sources of input and output of data, wherein the watchdog adopts at least two levels of reset mechanisms, and when a first level of reset is triggered, a corresponding module state machine of the communication module is reset, and when a second level of reset is triggered, the communication module as a whole is reset; and remotely controlling parameters of the watchdog by a concentrator controller.
[0006] In some implementations, remotely controlling the parameters of the watchdog by the concentrator controller comprises: remotely configuring, by the concentrator controller, trigger thresholds of the first level of reset and the second level of reset; and / or remotely starting or stopping the watchdog by the concentrator controller; and / or periodically collecting, by the concentrator controller, error state words and count values of the watchdog of each communication module; and / or monitoring, by the concentrator controller, whether there is meter reading abnormality in each communication module, and sending a restart command to the communication module with meter reading abnormality.
[0007] In some implementations, when the triggering threshold of the first level reset is triggered, it is determined that the communication module is slightly abnormal, and the corresponding module state machine of the communication module is reset; and / or when the triggering threshold of the second level reset is triggered, it is determined that the communication module is severely abnormal, and the entire communication module is reset.
[0008] In some implementations, after the triggering threshold of the first level reset is triggered multiple times, the triggering threshold of the second level reset is triggered.
[0009] In some implementations, when applied to a serial port transceiving communication scenario, the method further comprises: if the serial port does not transceive data within a time period of t1, or the serial port has data check errors for n1 consecutive times, it is determined that the count value triggers the triggering threshold of the first level reset, and all state machines related to serial port transceiving are reset, wherein t1>0, and n1 is a positive integer; if the number of consecutive triggers of the triggering threshold of the first level reset is greater than a first threshold, it is determined that the count value triggers the triggering threshold of the second level reset, and the entire communication module is reset.
[0010] In some implementations, when applied to a power line communication transceiving scenario, the method further comprises: if all messages received by the communication module within a time period of t2 are decoding errors, or no power line data is sent within a time period of t3, or data is sent for n2 consecutive times, it is determined that the count value triggers the triggering threshold of the first level reset, and the state machine related to physical layer power communication is reset, wherein t2>0, t3>0, and n2 is a positive integer; if the number of consecutive triggers of the triggering threshold of the first level reset is greater than a second threshold, it is determined that the count value triggers the triggering threshold of the second level reset, and the entire communication module is reset.
[0011] In some implementations, when applied to a wireless communication transceiving scenario, the method further comprises: if the communication module does not receive any wireless message within a time period of t4, or does not send a wireless message within a time period of t5, it is determined that the count value triggers the triggering threshold of the first level reset, and the state machine related to physical layer wireless communication is reset, wherein t4>0 and t5>0; if the number of consecutive triggers of the triggering threshold of the first level reset is greater than a third threshold, it is determined that the count value triggers the triggering threshold of the second level reset, and the entire communication module is reset.
[0012] In a second aspect, an apparatus for preventing a communication module of an electric energy meter from crashing is provided. The apparatus includes a protection module configured to protect sources of data input and output of the communication module based on an application scenario of the communication module using a watchdog, wherein the watchdog uses at least two levels of reset mechanisms, and when a first level of reset is triggered, a corresponding module state machine of the communication module is reset, and when a second level of reset is triggered, the communication module as a whole is reset; and a remote control module configured to remotely control parameters of the watchdog by a concentrator controller.
[0013] In a third aspect, a computer readable storage medium having a computer program stored thereon is provided. The computer program, when executed by a processor, implements the method of any one of the first aspect.
[0014] In a fourth aspect, an electronic device is provided. The electronic device includes a memory storing a computer program, and a processor communicatively connected to the memory and configured to invoke the computer program to implement the method of any one of the first aspect.
[0015] As described above, for the problem of crashing caused by software invisible abnormality of a communication module of an electric energy meter, a scenario-based, hierarchical and remotely controllable solution is provided. In the solution, the watchdog protection can be performed on the sources of input and output according to the application scenario of the communication module, so as to effectively identify the abnormality. In addition, the parameters of the watchdog can be adjusted remotely, so that the inconsistent problem of the parameters of the watchdog in different application scenarios can be flexibly solved. Furthermore, in the present application, a hierarchical recovery mechanism is used, and different reset operations are used for different degrees of abnormality, which is beneficial to reducing the impact of reset on the communication module. BRIEF DESCRIPTION OF DRAWINGS
[0016] Figure 1 An implementation environment of the present application is shown.
[0017] Figure 2A And Figure 2B A flowchart of a method for preventing a communication module of an electric energy meter from crashing is shown.
[0018] Figure 3 A structure diagram of an apparatus for preventing a communication module of an electric energy meter from crashing is shown.
[0019] Figure 4 A structure diagram of an electronic device is shown.
[0020] ELEMENT NUMBER EXPLANATION
[0021] 300 Apparatus for preventing a power meter communication module from going down 301 Guard module 302 Remote control module 400 Electronic device 401 Processor 402 Memory 4021 Operating system 4022 Application program 403 Network interface 404 Bus system 405 User interface S21~S22 Step DETAILED DESCRIPTION
[0022] The present application is illustrated by way of example and not limitation in the figures of the accompanying drawings in which like references indicate similar elements, and in which:
[0023] It is also to be understood that the terminology used herein is for the purpose of describing the present application and the use of terms such as first and second should not be construed as limiting the present application to a only two embodiments and that terms such as first and second are used to distinguish one embodiment from another unless explicitly stated otherwise.
[0024] In the present application, the word "exemplary" or "for example" is used to mean "an example of" or "an example, only. As used in this application, "exemplary" or "for example" should not be construed as meaning "preferred" or "advantageous over other embodiments." Rather, "exemplary" or "for example" is simply used to indicate that the described embodiment is one of a possible wide variety of embodiments.
[0025] In the present application, the phrase "at least one of" follows in the normal order of the elements and refers to the interjection of at least one of an element that can have one or more of the elements. For example, if the phrase "at least one of a, b, and c" is used, it means one or more of a, or b, or c, or any combination thereof. For example, a only, or b only, or c only; or the three of a, b, and c; or any two of a, b, and c; and so on.
[0026] Figure 1 A schematic diagram showing an overall implementation environment of an embodiment of the present application. As shown in FIG. 1, the environment includes one or more client systems 100, one or more servers 102, and a network 104. The network 104 can be any type of network, including, but not limited to, the Internet, an intranet, an extranet, a local area network (LAN), a wide area network (WAN), a wireless network, a digital subscriber line (DSL), a frame relay, an advanced intelligent network (AIN) infrastructure, or any combination thereof. The network 104 is connected to one or more networks 106 and to one or more networks 108. For the purposes of this embodiment, the network 104 can be any communication method by which information can travel between the client systems 100, the servers 102, and any other devices or systems coupled to the network 104. Figure 1As shown, the electric energy meter, the communication module and the concentrator are in communication connection. Among them, the electric energy meter is responsible for metering the power consumption of the user, and real-time monitoring of the equipment state and abnormal events (such as electricity stealing, cover opening, voltage loss, etc.). The communication module acts as a bridge between the electric energy meter and the concentrator, and is responsible for transmitting the data collected by the electric energy meter (such as power consumption, voltage, current, etc.) to the concentrator, and receiving instructions or configuration information from the concentrator and passing it to the electric energy meter. The concentrator acts as a communication convergence node, not only bearing the data acquisition task, but also having functions such as data caching, protocol analysis and uplink forwarding. The concentrator maintains connection with multiple communication modules under its jurisdiction through power line carrier or micro-power wireless, and uploads the aggregated data to the master station system through a remote communication channel (such as 4G, optical fiber, etc.).
[0027] In actual application, the communication module often causes downtime due to software level problems. The inventors have found through practice and research that the reasons for the downtime of the communication module mainly include: the robustness of the frame format analysis protection mechanism is poor, in the interconnection environment, it is easy to be disturbed by the messages sent by other manufacturers' modules, causing frame format analysis error, causing a large amount of data in the memory to be overwritten; the use of variables in the software logic is not standardized, which may cause the variables to be tampered with, thereby causing the module state machine to be disorderly, and finally causing the meter reading function to fail. Some technical solutions only rely on hardware watchdog to reset, but the hardware watchdog can only monitor the overall running state of the module and cannot identify software level implicit abnormalities such as protocol stack crash and memory leakage.
[0028] At least in view of the above problems, the embodiments of the present application provide a downtime prevention scheme that fuses a scenario-based watchdog, hierarchical recovery and remote parameter control, which can realize early identification and processing of abnormalities through periodic monitoring of key processes and dynamic adjustment of watchdog parameters, and can significantly improve the running stability of the communication module.
[0029] Figure 2A And Figure 2B A flowchart of a method for preventing the communication module of the electric energy meter from downtime is shown in the embodiments of the present application. As shown in Figure 2A The method comprises the following steps S21 to S22.
[0030] S21, based on the application scenario of the communication module, the source of data input and output is protected by a watchdog. Among them, the watchdog adopts at least two levels of reset mechanism, and when the first level of reset is triggered, the corresponding module state machine of the communication module is reset, and when the second level of reset is triggered, the whole communication module is reset.
[0031] It should be noted that the reset mechanism of the watchdog in the embodiments of the present application can be two levels or multiple levels, which is not limited in the present application.
[0032] In some implementations, in order to realize monitoring of different types of exceptions, the embodiments of the present application provide a new watchdog model to reduce the hidden dangers caused by overly complex watchdog design. The core parameters of the watchdog include a watchdog switch, an error status word, a watchdog count value, a watchdog trigger threshold, and a callback function executed after the watchdog is triggered, etc.
[0033] The watchdog switch parameter is used to start and stop the watchdog. Exemplarily, when the value of the watchdog switch parameter is 0, it indicates that the watchdog is stopped, and when the value is 1, it indicates that the watchdog is started.
[0034] The error status word parameter is used to mark the type of exception to facilitate tracking the source of the problem. Exemplarily, “01” can be used to represent a serial communication exception, “10” can be used to represent a power line communication exception, and “11” can be used to represent a wireless communication exception, etc.
[0035] The watchdog count value parameter can be flexibly configured according to actual scenarios and requirements. Exemplarily, the type of the count value parameter can be “execution times” and / or “duration”, but the present application is not limited thereto.
[0036] The watchdog trigger threshold parameter can correspond to the trigger conditions of a multi-level recovery mechanism. Exemplarily, the trigger threshold parameter can include threshold 1 and threshold 2, where threshold 1 is a mild exception threshold and threshold 2 is a severe exception threshold, and the specific values of the two thresholds can be independently configured according to actual scenario requirements.
[0037] The callback function executed after the watchdog is triggered can be configured according to different thresholds, so that different functions are called after different thresholds are triggered.
[0038] S22, remotely control the parameters of the watchdog by a central coordinator (CCO).
[0039] Specifically, in order to improve the scene adaptability of the method, the central coordinator can be introduced as a remote control node in the embodiments of the present application to realize real-time adjustment of the watchdog parameters.
[0040] Exemplarily, the first trigger threshold of the first level reset (hereinafter also referred to as the first threshold) and the second trigger threshold of the second level reset (hereinafter also referred to as the second threshold) can be remotely configured by the central coordinator in the embodiments of the present application. In actual operation, the watchdog of the communication module is easily triggered, thereby causing unnecessary restart of the communication module. In order to solve this problem, the central coordinator can adjust the trigger threshold of the watchdog by remote control in the embodiments of the present application, and the communication module will store the configured threshold value to FLASH so as to restore the parameters again after restart.
[0041] Exemplarily, the watchdog can be remotely started or stopped by the concentrator controller in the embodiments of the present application.
[0042] Exemplarily, the concentrator controller can periodically collect the error status word and the count value of the watchdog of each communication module in the embodiments of the present application. For example, the concentrator controller can collect the error status word and the count value of the watchdog of each communication module every 15 minutes, and construct an abnormality statistical report based on the collected data, thereby providing data support for power grid operation and maintenance.
[0043] Exemplarily, the concentrator controller can monitor whether there is a meter reading exception in each communication module, and send a restart command to the communication module with the meter reading exception. For example, when the concentrator controller detects that there is a meter reading exception (such as 10 consecutive meter reading failures) in a communication module through meter reading data, the concentrator controller can actively send a restart command to the communication module without waiting for the watchdog to trigger, thereby achieving active repair of the exception.
[0044] In some implementations, the method for preventing the communication module of the electric energy meter from crashing provided by the embodiments of the present application can further include: starting a main loop, and determining whether the watchdog has a feed action in the main loop period; if there is no feed action, updating the count value of the watchdog; and if there is a feed action, clearing the feed flag bit, not updating the count value of the watchdog, and ending the current loop. The type of the count value is determined according to the application scenario.
[0045] In some implementations, in order to reduce the influence of abnormal recovery on the operation of the communication module, two-level recovery strategies can be designed in the embodiments of the present application to perform differential operations according to abnormal conditions. Specifically, when the count value of the watchdog triggers a first threshold, it is determined that there is a mild abnormality, and the corresponding module state machine in the communication module is reset. When the count value of the watchdog triggers a second threshold, it is determined that there is a severe abnormality, and the entire communication module is reset. Before the reset of the communication module is performed, the abnormality may still continue to appear after multiple resets of the state machine in the mild abnormality, but the present application is not limited thereto.
[0046] In some implementations, when applied to a serial port transceiving communication scenario, the method for preventing the communication module of the electric energy meter from crashing provided by the embodiments of the present application further includes: if the serial port does not transceive data within a time period t1, or the serial port has a data check error for n1 consecutive times, it is determined that the count value triggers a first threshold, and all state machines related to serial port transceiving are reset, wherein t1>0, n1 is a positive integer, and the specific values of t1 and n1 can be set according to actual requirements or experience, and the present application does not limit the specific values of t1 and n1. If the number of consecutive triggers of the first threshold is greater than a first threshold value, it is determined that the count value triggers a second threshold, and the entire communication module is reset. The specific value of the first threshold value can be set according to actual requirements or experience, and the present application does not limit the specific value of the first threshold value.
[0047] Exemplarily, in the application scenario of carrier meter reading, the communication module can actively read the data of the electric meter. In the embodiment of the application, the serial port watchdog can be used to monitor the continuity and integrity of the data interaction between the serial port of the communication module and the electric energy meter. Exemplarily, the count value can include time and number, and the trigger condition of the serial port watchdog can include, for example, no serial port data transceiving for 12 hours (i.e., t1=12 hours) and 10 consecutive serial port data verification errors (i.e., n1=10). When any of the above conditions is met, the threshold 1 of the watchdog is triggered, and all state machines related to serial port transceiving are reset. When the condition of the threshold 1 is triggered continuously for 2 times (i.e., the first threshold is 1) or more, the entire communication module is reset, so that the module is re-run.
[0048] In some implementations, when applied to the scenario of power line communication transceiving, the method for preventing the communication module of the electric energy meter from crashing provided in the embodiment of the application further includes: if all the messages received by the communication module in a time period with a length of t2 are decoded incorrectly, or no power line data is sent in a time period with a length of t3, or data is sent unsuccessfully for n2 consecutive times, it is determined that the count value triggers the first threshold, and the state machine related to the physical layer power communication is reset, where t2>0, t3>0, and n2 is a positive integer. The specific values of the three can be set according to actual requirements or experience, and the application does not limit the specific values of the three. If the number of continuous triggers of the first threshold is greater than a second threshold, it is determined that the count value triggers the second threshold, and the entire communication module is reset. The specific value of the second threshold can be set according to actual requirements or experience, and the application does not limit the specific value of the second threshold.
[0049] Exemplarily, when applied to the scenario of power line communication transceiving, the communication module will periodically send and receive beacon frames after being connected to the network, and the maximum interval of the beacon frames is 20 seconds. Based on this, in the embodiment of the application, the trigger condition of the watchdog can include, for example, that all the messages received for 1 minute (i.e., t2=1 minute) are decoded incorrectly, such as incorrect message frame format and CRC verification failure; no power line data is sent for 3 minutes (i.e., t3=3 minutes); and data sending returns unsuccessfully for 100 times (i.e., n2=100). When any of the conditions is met, the threshold 1 of the watchdog is triggered, and the state machine related to the physical layer power line communication is reset. When the condition of the threshold 1 is triggered continuously for 7 times (i.e., the second threshold is 7), the entire communication module is reset.
[0050] In some implementations, when applied to a wireless communication transceiving scenario, the method for preventing a communication module of an electric energy meter from crashing provided in the embodiments of the present application further includes: if the communication module does not receive any wireless message within a time period of t4 or does not send a wireless message within a time period of t5, determining that the count value triggers a first threshold, and resetting a state machine related to physical layer wireless communication, where t4>0 and t5>0, and the specific values of t4 and t5 can be set according to actual requirements or experience, and the present application does not limit the specific values of t4 and t5; if the number of continuous triggering of the first threshold is greater than a third threshold, determining that the count value triggers a second threshold, and resetting the entire communication module, and the specific value of the third threshold can be set according to actual requirements or experience, and the present application does not limit the specific value of the third threshold.
[0051] For example, when applied to a dual-mode communication scenario, the frequency of wireless transceiving data is lower than that of power line data, so the watchdog is started only when the communication module detects that there is wireless communication in the environment. Based on this, the triggering condition of the watchdog in the embodiments of the present application may, for example, include: not receiving any wireless message for 5 minutes continuously (i.e., t4=5 minutes); not sending a wireless message for 30 minutes continuously (i.e., t5=30 minutes). When any of the conditions is met, the threshold 1 of the watchdog is triggered, and the state machine related to physical layer wireless communication is reset; when the condition of the threshold 1 is continuously triggered for 10 times (i.e., the third threshold is 10), the entire communication module is reset.
[0052] In summary, for the problem of crashing caused by software invisible abnormality of a communication module of an electric energy meter, the embodiments of the present application propose a scenario-based, hierarchical, and remotely controllable solution. In this solution, the watchdog protection can be performed on the source of input and output according to the application scenario of the communication module, so as to effectively identify the abnormality. In addition, the parameters of the watchdog can be adjusted remotely, so that the inconsistent problem of the parameters of the watchdog in different application scenarios can be flexibly solved. Furthermore, the hierarchical recovery mechanism is adopted in the embodiments of the present application, different reset operations are adopted for different degrees of abnormality, so as to reduce the influence of the reset.
[0053] In some actual applications, after the method for preventing a communication module of an electric energy meter from crashing provided in the embodiments of the present application is adopted, the accuracy of abnormality identification of the communication module is improved to 90%, and the communication module can be recovered in an abnormal situation. The time of long-time running of the communication module without crashing is improved from 1 month to 5 years. In addition, the number of monthly meter reading interruptions of the communication module adopting the method is reduced from 10 times to 1 time in various interconnection and intercommunication environments. Therefore, the method for preventing a communication module of an electric energy meter from crashing provided in the embodiments of the present application can effectively overcome the various defects in the prior art and has high industrial value.
[0054] The protection scope of the method for preventing the communication module of an electricity meter from crashing provided in this application is not limited to the execution order of the steps listed in this embodiment. Any solution implemented by adding, subtracting, or replacing steps in the prior art based on the principles of this application is included within the protection scope of this application.
[0055] This application also provides a device for preventing the communication module of an electricity meter from crashing. This device can implement the method for preventing the communication module of an electricity meter from crashing as described in this application. However, the implementation device for the method for preventing the communication module of an electricity meter from crashing as described in this application includes, but is not limited to, the structure of the device for preventing the communication module of an electricity meter from crashing as listed in this embodiment. All structural modifications and substitutions of the prior art made based on the principles of this application are included within the protection scope of this application.
[0056] Figure 3 This is a schematic block diagram of a device for preventing the communication module of an electricity meter from crashing, provided in an embodiment of this application. Figure 3 As shown, the device 300 for preventing the communication module of an electricity meter from crashing includes a protection module 301 and a remote control module 302. The protection module 301 employs a watchdog timer to protect the data input and output sources based on the application scenario of the communication module. The watchdog timer uses at least a two-level reset mechanism: triggering the first-level reset resets the corresponding module state machine of the communication module, and triggering the second-level reset resets the entire communication module. The remote control module 302 is used to remotely control the parameters of the watchdog timer through the concentrator controller.
[0057] It should be understood that the specific process of each module performing the above-mentioned steps has been described in detail in the above method embodiments, and will not be repeated here for the sake of brevity.
[0058] The embodiment of the present application further provides a computer readable storage medium, which stores a computer program. The computer program is executed by a processor to implement the method for preventing a communication module of an electric energy meter from crashing. Those skilled in the art can understand that all or part of the steps of the method described above can be instructed by a program to complete the processor, and the program can be stored in a computer readable storage medium. The storage medium is a non-transitory medium, for example, a random access memory, a read only memory, a flash memory, a hard disk, a solid state disk, a magnetic tape, a floppy disk, an optical disc and any combination thereof. The storage medium can be any available medium accessible by a computer or a data storage device such as a server, a data center and the like, which includes one or more available medium sets. The available medium can be a magnetic medium (for example, a floppy disk, a hard disk, a magnetic tape), an optical medium (for example, a digital video disc (DVD)) or a semiconductor medium (for example, a solid state disk (SSD)) and the like.
[0059] The embodiment of the present application further provides an electronic device. Figure 4 is a schematic block diagram of the electronic device provided by the embodiment of the present application. As shown in Figure 4 , the electronic device 400 includes at least one processor 401, a memory 402, at least one network interface 403 and a user interface 405. The various components in the electronic device 400 are coupled together through a bus system 404. It can be understood that the bus system 404 is used to realize the connection communication between the components. In addition to the data bus, the bus system 404 also includes a power bus, a control bus and a status signal bus. However, in order to clearly illustrate, all kinds of buses are marked as the bus system in Figure 4 .
[0060] The user interface 405 can include a display, a keyboard, a mouse, a trackball, a click gun, a key, a button, a touchpad or a touch screen and the like.
[0061] It can be appreciated that the memory 402 can be a volatile memory or a nonvolatile memory, and can also include both volatile and nonvolatile memory. Among them, the nonvolatile memory can be a Read Only Memory (ROM), a Programmable Read-Only Memory (PROM), which is used as an external cache. By way of example but not limitation, many forms of RAM can be used, such as Static Random Access Memory (SRAM), Synchronous Static Random Access Memory (SSRAM). The memory described in the embodiments of the present application is intended to include but not limited to these and any other suitable category of memory.
[0062] The memory 402 in the embodiments of the present application is used to store various categories of data to support the operation of the electronic device 400. Examples of these data include: any executable program for operating on the electronic device 400, such as an operating system 4021 and an application program 4022; the operating system 4021 contains various system programs, such as a framework layer, a core library layer, a driver layer, etc., for implementing various basic services and processing hardware-based tasks. The application program 4022 can contain various application programs, such as a Media Player, a Browser, etc., for implementing various application services. The method for preventing the communication module of the electric energy meter from being down provided in the embodiments of the present application can be included in the application program 4022.
[0063] The method disclosed in the above embodiments of the present application can be applied in the processor 401 or implemented by the processor 401. The processor 401 can be an integrated circuit chip having a processing capability of signals. In the implementation process, each step of the above method can be completed by integrated logic circuits or instructions in software form of the hardware in the processor 401. The processor 401 described above can be a general-purpose processor, a Digital Signal Processor (DSP), or other programmable logic device, discrete gate or transistor logic device, discrete hardware component, etc. The processor 401 can implement or execute the methods, steps and logic block diagrams disclosed in the embodiments of the present application. The general-purpose processor 401 can be a microprocessor or any conventional processor, etc. The steps of the method provided in the embodiments of the present application in conjunction with the accessory optimization method can be directly embodied as a hardware decoding processor for execution, or executed by a combination of hardware and software modules in the decoding processor. The software module can be located in a storage medium, which is located in the memory, and the processor reads the information in the memory and combines the hardware to complete the steps of the above method.
[0064] In an exemplary embodiment, the electronic device 400 can be implemented with one or more application specific integrated circuits (ASICs), DSPs, programmable logic devices (PLDs), complex programmable logic devices (CPLDs), or the like for performing the aforementioned methods.
[0065] Embodiments of the present application can also provide a computer program product including one or more computer instructions. When the computer instructions are loaded and executed on a computing device, all or part of the processes or functions described in embodiments of the present application are generated. The computer instructions can be stored in a computer readable storage medium, or transferred from one computer readable storage medium to another, for example, the computer instructions can be transferred from one website, computer or data center to another website, computer or data center through wired (such as coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (such as infrared, wireless, microwave, etc.) mode.
[0066] The computer program product is executed by a computer, and the computer executes the method described in the foregoing method embodiment. The computer program product can be a software installation package, and when the foregoing method needs to be used, the computer program product can be downloaded and executed on the computer.
[0067] The terms "component", "module", "system", and the like used in the present specification are used to represent computer-related entities, hardware, combinations of hardware and software, software, or software in execution. For example, a component can be, but is not limited to, a process running on a processor, a processor, an object, an executable, a thread of execution, a program, and / or a computer. By way of illustration, both an application running on a computing device and the computing device can be a component. One or more components can reside within a process and / or thread of execution, and a component can be localized on one computer and / or distributed between two or more computers. In addition, these components can execute from various computer readable media having various data structures stored thereon. The components can communicate by way of local and / or remote processes such as in accordance with a signal having one or more data packets (e.g., data from one component interacting with another component in a local system, distributed system, and / or across a network such as the Internet with other systems) by way of the signal.
[0068] Those of skill in the art would understand that the various illustrative logical blocks, modules, and steps described in connection with the embodiments disclosed herein can be implemented as electronic hardware, computer software, or combinations of both. The choice of hardware or software, or combinations of both, would be dependent on the specific application and design constraints imposed on the overall system. Skilled artisans can implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
[0069] In several embodiments provided in the present application, it should be understood that the disclosed system, device and method can be implemented in other ways. For example, the above-described device embodiments are merely illustrative, for example, the division of units is merely a logical function division, and in actual implementation, another division manner can be used, for example, a plurality of units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between the units shown or discussed can be indirect coupling or communication connection through some interface, device or unit, and can be electrical, mechanical or other forms.
[0070] The units described as separate components can or can not be physically separate, and the components shown as units can or can not be physical units, that is, they can be located in one place, or can be distributed on a plurality of network units. Part or all of the units can be selected according to actual needs to achieve the purpose of the embodiments.
[0071] In addition, the functional units in each embodiment of the present application can be integrated into a processing unit, or each unit can be physically present alone, or two or more units can be integrated into one unit.
[0072] In the above embodiments, the functions of the various elements can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented in software, the functions can be stored in or transmitted over as one or more computer programs in whole or in part, and can be implemented in a computer-readable medium. The computer-readable medium can be a computer-readable storage medium or a computer-readable transmission medium. The computer-readable storage medium can be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific computer-readable storage medium examples (a computer-readable storage medium or a computer-readable transmission medium) include an electrical connection having one or more wires, a portable computer diskette, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), and a global positioning system (GPS) device. Program instructions can be downloaded to your computer or any other processor from an Internet website, a server, a computer network, or any other network from the computer-readable storage medium or the computer-readable transmission medium. The program instructions can be executed by one or more processors of the computer or any other processor to implement a method for operating a computer according to the embodiments of the present application.
[0073] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solutions of the present application essentially or the parts that make contributions to the prior art or parts of the technical solutions can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes a number of instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods of the embodiments of the present application. The aforementioned storage medium includes: a U disk, a mobile hard disk, a read-only memory, a random access memory, a magnetic disk or an optical disk, and various media that can store program codes.
[0074] The above embodiments are only illustrative of the principles and effects of the present application, and are not intended to limit the present application. Any person skilled in the art can modify or change the above embodiments without departing from the spirit and scope of the present application. Therefore, all equivalent modifications or changes made by those skilled in the art without departing from the spirit and technical ideas disclosed by the present application should be covered by the claims of the present application.
Claims
1. A method for preventing the communication module of an electricity meter from crashing, characterized in that, The method includes: Based on the application scenario of the communication module, watchdog protection is adopted for the source of data input and output. The watchdog adopts at least two-level reset mechanism. When the first level reset is triggered, the corresponding module state machine of the communication module is reset. When the second level reset is triggered, the entire communication module is reset. The parameters of the watchdog can be remotely controlled via a concentrator controller.
2. The method according to claim 1, characterized in that, Remote control of watchdog parameters via a concentrator controller includes: The trigger thresholds for the first-level reset and the second-level reset can be remotely configured via the concentrator controller; and / or The watchdog can be remotely turned on or off via the concentrator controller; and / or The concentrator controller periodically collects the watchdog error status words and count values of each communication module; and / or The concentrator controller monitors whether there are any meter reading abnormalities in each communication module and sends a restart command to the communication module with the abnormal meter reading.
3. The method according to claim 1, characterized in that, When the trigger threshold of the first-level reset is triggered, the communication module is determined to be in a minor abnormality, and the corresponding module state machine of the communication module is reset; and / or When the trigger threshold of the second-level reset is triggered, the communication module is determined to be severely abnormal, and the entire communication module is reset.
4. The method according to claim 3, characterized in that, After the trigger threshold of the first-level reset is triggered multiple times, the trigger threshold of the second-level reset is triggered.
5. The method according to claim 1, characterized in that, When applied to serial port transceiver communication scenarios, the method further includes: If the serial port does not send or receive data within a time period of t1, or if the serial port experiences data verification errors n1 times consecutively, then the count value is determined to trigger the first-level reset threshold, resetting all state machines related to serial port transmission and reception, where t1>0 and n1 is a positive integer; If the number of consecutive triggers of the first-level reset trigger threshold is greater than the first threshold, then the count value is determined to trigger the second-level reset trigger threshold, thus resetting the entire communication module.
6. The method according to claim 1, characterized in that, When applied to power line communication transceiver scenarios, the method further includes: If the communication module receives all messages with decoding errors within a time period of t2, or fails to send power line data within a time period of t3, or fails to send data for n2 consecutive times, then the count value is determined to trigger the trigger threshold of the first-level reset, and the physical layer power communication related state machine is reset, where t2>0, t3>0, and n2 is a positive integer; If the number of consecutive triggers of the first-level reset trigger threshold is greater than the second threshold, then the count value is determined to trigger the second-level reset trigger threshold, and the entire communication module is reset.
7. The method according to claim 1, characterized in that, When applied to wireless communication transceiver scenarios, the method further includes: If the communication module does not receive any wireless message within a time period of duration t4, or does not send any wireless message within a time period of duration t5, then it is determined that the count value triggers the trigger threshold of the first-level reset, and the physical layer wireless communication related state machine is reset, where t4>0 and t5>0. If the number of consecutive triggers of the first-level reset trigger threshold is greater than the third threshold, then the count value is determined to trigger the second-level reset trigger threshold, thus resetting the entire communication module.
8. A device for preventing the communication module of an electricity meter from crashing, characterized in that, The device includes: The protection module is used in application scenarios based on the communication module to protect the source of data input and output with a watchdog. The watchdog adopts at least two-level reset mechanism. When the first level reset is triggered, the corresponding module state machine of the communication module is reset. When the second level reset is triggered, the entire communication module is reset. The remote control module is used to remotely control the parameters of the watchdog through the concentrator controller.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the method of any one of claims 1 to 7.
10. An electronic device, characterized in that, The electronic device includes: A memory that stores a computer program; The processor, which is communicatively connected to the memory, executes the method of any one of claims 1 to 7 when the computer program is invoked.