Voltage abnormality monitoring method, device and electronic equipment

By integrating microcontrollers in network equipment to collect and send abnormal power supply voltage information, the restart problem caused by unstable power supply voltage is solved, the timeliness and reliability of monitoring are improved, and data support is provided for troubleshooting.

CN113049871BActive Publication Date: 2024-09-24HANGZHOU HIKMICRO SENSING TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN201911379049.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2019-12-27
Publication Date
2024-09-24
Estimated Expiration
2039-12-27

AI Technical Summary

Technical Problem

Existing network equipment often restarts when the power supply voltage is unstable, and troubleshooting the problem is time-consuming, laborious, and difficult to reproduce, making it more difficult to solve.

Method used

Integrate the microcontroller in the network equipment to collect the power supply voltage value when starting, save the abnormal voltage information higher or lower than the preset threshold, and send it to the main platform for alarm processing to improve the timeliness and reliability of voltage abnormality monitoring. .

Benefits of technology

It improves the timeliness and efficiency of detecting abnormal power supply voltage values ​​of network equipment, provides data support for troubleshooting causes of abnormal restarts or damage, and reduces the difficulty of troubleshooting.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113049871B
    Figure CN113049871B
Patent Text Reader

Abstract

The present application provides a voltage anomaly monitoring method, device and electronic device, the method comprising: when the single chip microcomputer completes startup, collecting the voltage value of the power supply of the network device; when the collected voltage value is higher than a first threshold, or lower than a second threshold, saving abnormal voltage information, and sending the abnormal voltage information to the main platform, so that the main platform performs alarm processing based on the abnormal voltage information; wherein the first threshold is greater than the second threshold. The method can improve the timeliness and efficiency of discovering abnormal voltage values ​​of the power supply of the network device, and provide data support for the investigation of abnormal restart or damage causes of the network device.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of network equipment, and in particular to a voltage anomaly monitoring method, device and electronic equipment. Background Art

[0002] With the development of network technology, the deployment of network equipment is becoming more and more popular, including in some remote areas, where network equipment such as network cameras are also deployed.

[0003] In actual applications, network devices often restart. Although experience shows that this is most likely caused by unstable power supply voltage, it is usually necessary to arrange staff to go to the site for investigation and verification to finally confirm the actual cause. This is not only time-consuming and labor-intensive, but may not be able to reproduce the problem, increasing the difficulty of solving the problem. Summary of the invention

[0004] In view of this, the present application provides a voltage anomaly monitoring method, device and electronic equipment.

[0005] Specifically, the present application is implemented through the following technical solutions:

[0006] According to a first aspect of an embodiment of the present application, a voltage anomaly monitoring method is provided, which is applied to a single-chip microcomputer in a network device including a single-chip microcomputer and a main platform, and the method includes:

[0007] When the single chip microcomputer completes startup, collecting the voltage value of the power supply of the network device;

[0008] When the collected voltage value is higher than a first threshold value, or lower than a second threshold value, abnormal voltage information is saved and sent to the main platform so that the main platform performs alarm processing based on the abnormal voltage information; wherein the first threshold value is greater than the second threshold value.

[0009] According to a second aspect of an embodiment of the present application, there is provided a voltage anomaly monitoring device, which is applied to a single-chip microcomputer in a network device including a single-chip microcomputer and a main platform, and the device includes:

[0010] A collection unit, used for collecting the voltage value of the power supply of the network device when the single chip microcomputer completes startup;

[0011] A storage unit, used for storing abnormal voltage information when the voltage value collected by the collection unit is higher than a first threshold value or lower than a second threshold value;

[0012] A sending unit is used to send the abnormal voltage information to the main platform, so that the main platform performs alarm processing based on the abnormal voltage information; wherein the first threshold is greater than the second threshold.

[0013] According to a third aspect of an embodiment of the present application, an electronic device is provided, the electronic device comprising:

[0014] A processor and a machine-readable storage medium, wherein the machine-readable storage medium stores machine-executable instructions that can be executed by the processor; the processor is used to execute the machine-executable instructions to implement the above method.

[0015] The voltage anomaly monitoring method of the embodiment of the present application integrates a single-chip microcomputer in the network device, and when the single-chip microcomputer completes startup, it collects the voltage value of the power supply of the network device; when the collected voltage value is higher than a first threshold value, or lower than a second threshold value, it saves the abnormal voltage information, and sends the abnormal voltage information to the main platform, so that the main platform performs alarm processing based on the abnormal voltage information, thereby improving the timeliness and efficiency of discovering the abnormal voltage value of the power supply of the network device, and improving the reliability of the network device for voltage anomaly monitoring, providing data support for the investigation of abnormal restart or damage causes of the network device. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] Figure 1 A schematic flow chart of a method for monitoring abnormal voltage according to an exemplary embodiment of the present application;

[0017] Figure 2 This is a schematic diagram of an architecture of a specific application scenario shown in an exemplary embodiment of the present application;

[0018] Figure 3 A schematic flow chart of a method for monitoring abnormal voltage according to an exemplary embodiment of the present application;

[0019] Figure 4 This is a schematic diagram of the structure of a voltage anomaly monitoring device shown in an exemplary embodiment of the present application;

[0020] Figure 5 An exemplary embodiment of the present application is shown Figure 4 Schematic diagram of the hardware structure of the device shown. DETAILED DESCRIPTION

[0021] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application. Instead, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims.

[0022] The terms used in this application are for the purpose of describing specific embodiments only and are not intended to limit this application. The singular forms "a", "said" and "the" used in this application and the appended claims are also intended to include plural forms, unless the context clearly indicates other meanings.

[0023] In order to enable those skilled in the art to better understand the technical solutions provided by the embodiments of the present application and to make the above-mentioned purposes, features and advantages of the embodiments of the present application more obvious and understandable, the technical solutions in the embodiments of the present application are further described in detail below in conjunction with the accompanying drawings.

[0024] See also Figure 1 , is a flow chart of a voltage anomaly monitoring method provided in an embodiment of the present application, wherein the voltage anomaly monitoring method can be applied to a single-chip microcomputer in a network device including a single-chip microcomputer and a main platform, such as Figure 1 As shown, the voltage anomaly monitoring method may include the following steps:

[0025] Step S100: When the single chip microcomputer completes startup, the voltage value of the power supply of the network device is collected.

[0026] In an embodiment of the present application, in order to promptly detect an abnormality in the voltage of the power supply of the network device (which may be referred to as the power supply voltage), the network device may monitor the voltage of the power supply.

[0027] Considering that if the voltage of the power supply is monitored through the main platform of the network device, it is easy for the network device to restart or be damaged due to the voltage being lower than the normal working voltage of the network device, which in turn makes it impossible to record the voltage abnormality. In the subsequent process, it is impossible to determine whether the restart or damage of the network device is caused by the power supply. Therefore, in order to improve the reliability of voltage abnormality monitoring, a single-chip microcomputer can be integrated into the network device and the voltage abnormality can be monitored through the single-chip microcomputer. Since the single-chip microcomputer can still work normally at very low voltage, the voltage during the voltage drop process can be collected and the voltage abnormality can be recorded, providing a data basis for the subsequent analysis of the cause of the restart or damage of the network device.

[0028] For example, since the microcontroller usually completes startup faster than the network device, the voltage value of the power supply of the network device can be collected when the microcontroller completes startup, without waiting for the network device to complete startup, thereby further improving the reliability of voltage anomaly monitoring.

[0029] The single chip microcomputer can collect the voltage value of the power supply of the network device according to a preset strategy, and compare the collected voltage value with a preset high voltage threshold (referred to as the first threshold in this article) and a low voltage threshold (referred to as the second threshold in this article); the first threshold is greater than the second threshold.

[0030] Exemplarily, the single-chip microcomputer may collect the voltage value of the power supply of the network device in real time, or the single-chip microcomputer may collect the voltage value of the power supply of the network device periodically.

[0031] Step S110: When the collected voltage value is higher than the first threshold value or lower than the second threshold value, the abnormal voltage information is saved and sent to the main platform, so that the main platform performs alarm processing based on the abnormal voltage information.

[0032] In an embodiment of the present application, when the voltage value collected by the single-chip microcomputer is higher than a first threshold value (i.e., the voltage value of the power supply of the network device is too high) or lower than a second threshold value (i.e., the voltage value of the power supply of the network device is too low), the single-chip microcomputer determines that the power supply voltage of the network device is abnormal. At this time, on the one hand, the single-chip microcomputer can save the abnormal voltage information so that when the network device is abnormally restarted or damaged later, the cause can be investigated based on the abnormal voltage information recorded by the single-chip microcomputer; on the other hand, the single-chip microcomputer can send the abnormal voltage information to the main platform, and the main platform will perform alarm processing to improve the timeliness and efficiency of discovering the abnormal voltage value of the power supply of the network device.

[0033] Exemplarily, the main platform may be a main control chip of a network device.

[0034] Exemplarily, abnormal voltage information may include but is not limited to voltage collection time, collected voltage value, and voltage state (such as a state where the voltage value is higher than a first threshold (which may be called a high voltage state) or a state where the voltage value is lower than a second threshold (which may be called a low voltage state)).

[0035] For example, assuming that the voltage value collected by the single chip microcomputer at time T1 is V1, and V1 is greater than the first threshold, the abnormal voltage information recorded by the single chip microcomputer may include: voltage collection time-T1, collected voltage value-V1, and voltage state-high voltage state.

[0036] For another example, assuming that the voltage value collected by the microcontroller at time T2 is V2, and V2 is less than the second threshold, the abnormal voltage information recorded by the microcontroller may include: voltage collection time-T2, collected voltage value-V2, and voltage state-low voltage state.

[0037] When the main platform receives the abnormal voltage information sent by the single chip microcomputer, it can perform alarm processing based on the abnormal voltage information.

[0038] Exemplarily, the main platform may report the abnormal voltage information to the alarm platform to trigger an alarm.

[0039] In one example, the single chip microcomputer and the main platform can exchange information via serial port communication.

[0040] It can be seen that in Figure 1 In the method flow shown, the voltage value of the power supply of the network device is monitored by the single-chip microcomputer when the startup is completed. When the voltage value of the power supply of the network device is detected to be abnormal, such as higher than a first threshold value, or lower than a second threshold value, the abnormal voltage information is saved and the abnormal voltage information is reported to the main platform, thereby improving the timeliness and efficiency of discovering the abnormal voltage value of the power supply of the network device, and providing data support for the investigation of the cause of abnormal restart or damage of the network device.

[0041] In a possible embodiment, when the voltage value is higher than the first threshold value or lower than the second threshold value, saving abnormal voltage information and sending the abnormal voltage information to the main platform may include:

[0042] When an abnormality occurs and the voltage state changes, the abnormal voltage information is saved according to the first strategy, and the abnormal voltage information is sent to the main platform;

[0043] When an abnormality occurs and the voltage state does not change, the abnormal voltage information is saved according to the second strategy and the abnormal voltage information is sent to the main platform.

[0044] Exemplarily, in order to improve the flexibility of saving and sending abnormal voltage information, different strategies can be used to save and send abnormal voltage information for the situations where an abnormality occurs and the voltage state changes (which can be called the first time entering a certain abnormal state) and when an abnormality occurs and the voltage state does not change (which can be called not the first time entering the abnormal state).

[0045] Accordingly, when the single-chip microcomputer detects that the voltage of the power supply of the network device is abnormal, the single-chip microcomputer can determine whether the voltage state of the network device has changed.

[0046] Exemplarily, the voltage state may include but is not limited to a high voltage state (i.e., the voltage of the power supply of the network device is higher than a first threshold), a low voltage state (i.e., the voltage of the power supply of the network device is lower than a second threshold), or a normal voltage state (i.e., the network device is within the range of the first threshold and the second threshold).

[0047] The voltage state changes include changing from a normal voltage state to a high voltage state, from a normal voltage state to a low voltage state, from a high voltage state to a low voltage state, from a low voltage state to a high voltage state, from a high voltage state to a normal voltage state, or from a low voltage state to a normal voltage state.

[0048] In one example, the single chip microcomputer can maintain a voltage status flag, which is used to indicate whether the voltage status of the network device is a high voltage state, a low voltage state, or a normal voltage state. When the single chip microcomputer detects that the voltage of the power supply of the network device is abnormal, it can determine whether the voltage status has changed based on the voltage status flag.

[0049] For example, when the microcontroller detects that the power supply voltage of the network device is higher than the first threshold, if the voltage status flag indicates that the voltage status of the network device is a high voltage state, the microcontroller determines that the voltage status has not changed; if the voltage status flag indicates that the voltage status of the network device is a low voltage state or a normal voltage state, the microcontroller determines that the voltage status has changed.

[0050] For another example, when the microcontroller detects that the power supply voltage of the network device is lower than the second threshold, if the voltage status flag indicates that the voltage status of the network device is in a low voltage state, the microcontroller determines that the voltage status has not changed; if the voltage status flag indicates that the voltage status of the network device is in a high voltage state or a normal voltage state, the microcontroller determines that the voltage status has changed.

[0051] It should be noted that when the single chip microcomputer determines that the voltage state has changed, the value of the voltage state flag bit can be updated to a value consistent with the currently monitored voltage state.

[0052] For example, the initial value of the voltage status flag is a value used to indicate that the power supply of the network device is in a normal voltage state (which can be called the first value); when the single-chip computer determines that the voltage value of the power supply of the network device is abnormal based on the collected voltage value, the value of the voltage status flag can be set to a value used to indicate that the power supply of the network device is in a high voltage state (which can be called the second value) or a value used to indicate that the power supply of the network device is in a low voltage state (which can be called the third value) based on the collected voltage value being higher than the first threshold or lower than the second threshold.

[0053] Exemplarily, when the single chip microcomputer detects that the network device enters a certain abnormal state for the first time, the abnormal voltage information can be saved according to the first strategy, and the abnormal voltage information can be sent to the main platform;

[0054] When the single chip microcomputer detects that the network device does not enter a certain abnormal state for the first time, the abnormal voltage information can be saved according to the second strategy and the abnormal voltage information can be sent to the main platform.

[0055] Exemplarily, the second strategy has a different sending interval from the first strategy, that is, the single chip microcomputer uses different sending intervals to send the abnormal voltage information to the main platform.

[0056] In one example, saving abnormal voltage information according to the first strategy and sending the abnormal voltage information to the main platform may include: saving current voltage information and sending the current voltage information to the main platform;

[0057] Saving abnormal voltage information according to a second strategy and sending the abnormal voltage information to a main platform may include: when the duration of the voltage anomaly does not reach a preset threshold, saving the current voltage information according to a first time interval; when the duration of the voltage anomaly reaches a preset time threshold, saving the current voltage information according to a second time interval and sending the current voltage information to the main platform, the second time interval being greater than the first time interval.

[0058] For example, in order to avoid too frequent alarms when the power supply of the network device is in a low voltage state or a high voltage state for a long time, the sending interval of abnormal voltage information can be increased to reduce the alarm frequency when the network device is in a low voltage state or a high voltage state for a long time.

[0059] Accordingly, when the single-chip microcomputer detects that the voltage of the power supply of the network device is abnormal and the voltage state changes, the current voltage information can be saved and sent to the main platform. That is, when the single-chip microcomputer detects that the network device enters a certain abnormal voltage state for the first time, the single-chip microcomputer saves the abnormal voltage information and sends the abnormal voltage information to the main platform.

[0060] When the microcontroller detects that the voltage of the power supply of the network device is abnormal and the voltage state has not changed, the microcontroller can count the duration of the voltage abnormality (the duration during which the voltage state of the network device remains in the same abnormal state) and take different measures based on the duration of the voltage abnormality.

[0061] Exemplarily, when the duration of the voltage anomaly does not reach a preset time threshold (which can be set according to the actual scenario, such as 1s), the single-chip microcomputer can save the current voltage information according to a first time interval (which can be set according to the actual scenario, such as 200ms), but does not send the abnormal voltage information to the main platform. In order to avoid too frequent alarm uploads, the changing trend of the abnormal voltage is recorded to facilitate later acquisition and troubleshooting.

[0062] When the duration of the voltage anomaly reaches a preset time interval, the single chip microcomputer can save the current voltage information according to a second time interval (which can be set according to the actual scenario, such as 10s), and send the current voltage information to the main platform.

[0063] In one possible embodiment, when the current voltage information is saved, the sending status is not sent. When the current voltage information is sent to the main platform and an alarm success feedback message sent by the main platform is received, the sending status is updated to sent and the updated sending status is saved.

[0064] In this embodiment, considering that in actual applications, the abnormal voltage information may not be sent to the main platform, or the main platform has not completed the alarm processing, and the network device may abnormally restart or be damaged. In this case, when the network device restarts, the microcontroller may not be able to determine whether the recorded abnormal voltage information includes abnormal voltage information that has not been sent to the main platform or the main platform has not completed the alarm processing.

[0065] Based on this, for the recorded abnormal voltage information, the single chip microcomputer can also maintain the sending status of the abnormal voltage information.

[0066] Exemplarily, the sending status includes not sent or sent.

[0067] When the single chip microcomputer determines that the power supply voltage of the network device is abnormal based on the collected voltage value, the single chip microcomputer can generate abnormal voltage information corresponding to the collected voltage value and save the abnormal voltage information. At this time, the sending status included in the abnormal voltage information is not sent.

[0068] After the single chip microcomputer sends the abnormal voltage information to the main platform, the main platform can perform alarm processing based on the received abnormal voltage information.

[0069] When the main platform completes the alarm processing, it can send an alarm success feedback message to the microcontroller to notify the microcontroller that the alarm processing is completed. At this time, the microcontroller can update the sending status included in the saved abnormal voltage information from not sent to sent.

[0070] In one example, the voltage anomaly monitoring method may further include:

[0071] When the microcontroller completes startup, it is detected whether abnormal voltage information with a sending status of not sent is saved;

[0072] If so, the voltage information with the sending status of not sent is sent to the main platform, and when the alarm success feedback message sent by the main platform is received, the sending status is updated to sent, and the updated sending status is saved.

[0073] In this example, in order to avoid the situation where abnormal voltage information cannot be sent to the main platform or the main platform fails to complete alarm processing due to abnormal restart or damage of the network device, when the microcontroller completes the startup, the microcontroller can query whether there is abnormal voltage information with a sending status of not sent in the saved abnormal voltage information.

[0074] If it exists, the single-chip microcomputer can send the abnormal voltage information whose saved sending status is not sent to the main platform.

[0075] For example, when the network device is restarted, the restart of the MCU is usually faster than the restart of the main platform. In addition, since the MCU does not support RTC (real-time clock), a timer is generally used for timing. Therefore, in order to ensure that the MCU and the main platform are synchronized, the main platform will send a time calibration command to the MCU at fixed intervals after the restart is completed.

[0076] Accordingly, when the single chip microcomputer completes startup, upon receiving the time calibration command sent by the main platform, the saved abnormal voltage information with the sending status as unsent can be sent to the main platform to avoid sending abnormal voltage information to the main platform when the main platform has not completed startup.

[0077] It should be noted that in the embodiment of the present application, in order to avoid the oscillation phenomenon caused by the voltage fluctuating above and below a threshold (such as the first threshold or the second threshold mentioned above), the threshold used for judging whether the voltage enters an abnormal state from a normal state (such as the first threshold or the second threshold mentioned above) and the threshold used for judging whether the voltage recovers from an abnormal state to a normal state may be different.

[0078] Exemplarily, assuming that the threshold for the voltage value of the power supply of the network device to enter the high voltage state from the normal state is the first threshold, and the threshold for entering the low voltage state from the normal state is the second threshold, then the threshold for the voltage value of the power supply of the network device to enter the normal state from the high voltage state (referred to as the third threshold in this article) needs to be lower than the first threshold, and the threshold for entering the normal state from the low voltage state (referred to as the fourth threshold in this article) needs to be higher than the second threshold.

[0079] For example, assuming that the normal operating voltage range of the network device is 30V~50V (that is, the first threshold is 50V and the second threshold is 30V), that is, when the power supply voltage value of the network device is between 30V~50V (including 30V or 50V), the power supply voltage of the network device is judged to be normal, then the threshold range for judging whether the power supply voltage of the network device has recovered from an abnormal state to a normal state (which can be called a voltage drop threshold range) can be 31V~49V (that is, the third threshold is 49V and the fourth threshold is 31V).

[0080] In order to enable those skilled in the art to better understand the technical solutions provided by the embodiments of the present application, the technical solutions provided by the embodiments of the present application are described below in conjunction with specific application scenarios.

[0081] See also Figure 2 , is a structural diagram of a specific application scenario provided by an embodiment of the present application, such as Figure 2As shown, in this application scenario, the network device can collect the voltage value of the power supply in real time through the single-chip microcomputer, and when the voltage is determined to be abnormal, the abnormal voltage information (including voltage collection time, voltage value, voltage status and sending status) is saved to EEPROM (Electrically Erasable Programmable read only memory), and the abnormal voltage information is reported to the main platform through the serial port, and the main platform reports it to the alarm platform.

[0082] In this embodiment, the main platform supports the following functions through serial communication with the microcontroller:

[0083] 1) Read and clear all sent or unsent abnormal voltage information in EEPROM through the microcontroller serial port;

[0084] 2) Obtain the current power supply voltage value in real time;

[0085] 3) Send a time calibration command to the microcontroller;

[0086] 4) Sending down the upper and lower threshold values ​​of the normal operating voltage (i.e. the first threshold and the second threshold mentioned above);

[0087] 5) Get the current version number of the microcontroller.

[0088] See also Figure 3 ,based on Figure 2 In the application scenario shown, the implementation process of voltage anomaly monitoring is as follows:

[0089] 1. After the system is powered on, the microcontroller initializes resources, then reads the abnormal voltage information in the EEPROM and determines the starting position where the abnormal voltage information is written.

[0090] Exemplarily, in order to extend the service life of the EEPROM, data is written to the EEPROM in a cyclic writing manner. Therefore, the microcontroller can determine the writing address of the newly added abnormal voltage information each time it is started. When the EEPROM is full, it is rewritten from address zero.

[0091] 2. The single-chip microcomputer collects the voltage value of the power supply of the network device in real time. When the collected voltage value is greater than the upper threshold value (i.e., the first threshold value mentioned above), it enters the high voltage state processing; when the collected voltage value is less than the lower threshold value (i.e., the second threshold value mentioned above), it enters the low voltage state processing; when the collected voltage value is less than or equal to the first threshold value and greater than or equal to the second threshold value, it enters the normal voltage state processing.

[0092] 3. High-voltage state processing: If the value of the voltage state flag is not the second value, that is, it is the first time to enter the high-voltage state, then the value of the voltage state flag is updated to the second value, and the abnormal voltage information (current time, voltage value, voltage state, sending state) is written to the EEPROM. At this time, the sending state is not sent, and the abnormal voltage information is sent to the main platform through the serial port to trigger the alarm; when the alarm success feedback message returned by the main platform is received, the sending state in the recorded abnormal voltage information is updated to sent. If the value of the voltage state flag is the second value, that is, it is not the first time to enter the high-voltage state, a time-divided sending strategy is adopted, that is, the voltage information is saved every 200ms (that is, the first time interval mentioned above), and it is not sent to the main platform (the sending state is not sent), and the change trend of the abnormal voltage is recorded to facilitate the later acquisition and troubleshooting; when the time interval from the last sending of the abnormal voltage information reaches 1S (that is, the second time interval mentioned above), the abnormal voltage information is saved and sent every 10S (that is, the third time interval mentioned above) to avoid the alarm upload too frequently caused by the power supply of the network equipment being in a high-voltage state for a long time.

[0093] 4. Low voltage state processing: If the value of the voltage state flag is not the third value, that is, it is the first time to enter the low voltage state, then the value of the voltage state flag is updated to the third value, and the abnormal voltage information (current time, voltage value, voltage state, sending state) is written to the EEPROM. At this time, the sending state is not sent, and the abnormal voltage information is sent to the main platform through the serial port to trigger the alarm; when the alarm success feedback message returned by the main platform is received, the sending state in the recorded abnormal voltage information is updated to sent. If the value of the voltage state flag is the third value, that is, it is not the first time to enter the low voltage state, the strategy of sending in time periods is adopted, that is, the voltage information (including time, voltage value, voltage state, etc.) is saved every 200ms, and it is not sent to the main platform (the sending state is not sent), and the change trend of the abnormal voltage is recorded to facilitate the later acquisition and troubleshooting; when the time interval from the last sending of abnormal voltage information reaches 1S, the abnormal voltage information is saved and sent every 10S to avoid the alarm upload too frequently caused by the power supply of the network equipment being in a low voltage state for a long time.

[0094] 5. Normal voltage state processing: When the voltage is at the normal working voltage, the value of the voltage state flag is set to the first value.

[0095] 6. Active upload of unsent alarm information: Since the MCU does not support RTC, a timer is used for timing, and the main platform sends a time calibration command at fixed intervals to calibrate the MCU time. Therefore, when the MCU receives the time calibration command from the main platform for the first time, it can read the abnormal voltage information in the EEPROM and send the abnormal voltage information with the saved sending status as unsent to the main platform to avoid abnormal restart or damage before the device sends the abnormal voltage information to the main platform or the main platform completes the alarm processing, which greatly facilitates the abnormal restart and damage of the positioning device due to power supply reasons.

[0096] 7. The main platform obtains the information stored in the EEPROM: When the MCU receives the command sent by the main platform, it needs to parse and process the received command in order to support the functions supported by the above serial port communication.

[0097] In an embodiment of the present application, a single-chip microcomputer is integrated in a network device, and when the single-chip microcomputer completes startup, the voltage value of the power supply of the network device is collected; when the collected voltage value is higher than a first threshold value, or lower than a second threshold value, abnormal voltage information is saved, and the abnormal voltage information is sent to a main platform, so that the main platform performs alarm processing based on the abnormal voltage information, thereby improving the timeliness and efficiency of discovering abnormal voltage values ​​of the power supply of the network device, and improving the reliability of voltage anomaly monitoring of the network device, providing data support for the investigation of abnormal restart or damage causes of the network device.

[0098] The method provided by the present application is described above. The device provided by the present application is described below:

[0099] See also Figure 4 , is a schematic diagram of the structure of a voltage anomaly monitoring device provided in an embodiment of the present application, such as Figure 4 As shown, the voltage anomaly monitoring device may include:

[0100] A collection unit, used for collecting the voltage value of the power supply of the network device when the single chip microcomputer is started up;

[0101] A storage unit, used for storing abnormal voltage information when the voltage value collected by the collection unit is higher than a first threshold value or lower than a second threshold value;

[0102] A sending unit is used to send the abnormal voltage information to the main platform, so that the main platform performs alarm processing based on the abnormal voltage information; wherein the first threshold is greater than the second threshold.

[0103] In one embodiment, the storage unit is specifically used to save abnormal voltage information according to a first strategy when an abnormality occurs and the voltage state changes, and send the abnormal voltage information to the main platform through the sending unit; the voltage state includes a high voltage state, a low voltage state or a normal voltage state;

[0104] When an abnormality occurs and the voltage state does not change, the abnormal voltage information is saved according to a second strategy, and the abnormal voltage information is sent to the main platform through the sending unit. The sending interval of the second strategy is different from that of the first strategy.

[0105] In one embodiment, the storage unit is specifically used to save the current voltage information when an abnormality occurs and the voltage state changes, and send the current voltage information to the main platform through the sending unit;

[0106] When an abnormality occurs and the voltage state does not change, if the duration of the voltage abnormality does not reach the preset time threshold, the current voltage information is saved according to the first time interval; if the duration of the voltage abnormality reaches the preset time threshold, the current voltage information is saved according to the second time interval, and the current voltage information is sent to the main platform through the sending unit, and the second time interval is greater than the first time interval.

[0107] In one embodiment, the saving unit is also used to set the sending status to not sent when saving the current voltage information. When the sending unit sends the current voltage information to the main platform and receives an alarm success feedback message sent by the main platform, the sending status is updated to sent and the updated sending status is saved.

[0108] In one embodiment, the saving unit is also used to detect whether voltage information with a sending status of not sent is saved when the single-chip microcomputer completes startup; if so, the voltage information with a sending status of not sent is sent to the main platform through the sending unit, and when the alarm success feedback message sent by the main platform is received, the sending status is updated to sent, and the updated sending status is saved.

[0109] Correspondingly, the present application also provides Figure 4 The hardware structure of the device shown. Figure 5 The hardware structure may include: a processor and a machine-readable storage medium, the machine-readable storage medium storing machine-executable instructions that can be executed by the processor; the processor is used to execute the machine-executable instructions to implement the method disclosed in the above example of this application.

[0110] Based on the same application concept as the above method, an embodiment of the present application also provides a machine-readable storage medium, on which a number of computer instructions are stored. When the computer instructions are executed by a processor, the method disclosed in the above example of the present application can be implemented.

[0111] Exemplarily, the above-mentioned machine-readable storage medium can be any electronic, magnetic, optical or other physical storage device that can contain or store information, such as executable instructions, data, etc. For example, the machine-readable storage medium can be: RAM (Radom Access Memory), volatile memory, non-volatile memory, flash memory, storage drive (such as hard disk drive), solid state drive, any type of storage disk (such as CD, DVD, etc.), or similar storage medium, or a combination thereof.

[0112] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.

[0113] The above description is only a preferred embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application shall be included in the scope of protection of the present application.

Claims

1. A voltage anomaly monitoring method, characterized in that: The single-chip microcomputer is applied to a network device including a single-chip microcomputer and a main platform, and the method comprises: When the single chip microcomputer completes startup, collecting the voltage value of the power supply of the network device; When the collected voltage value is higher than a first threshold value, or lower than a second threshold value, abnormal voltage information is saved, and the abnormal voltage information is sent to the main platform, so that the main platform performs alarm processing based on the abnormal voltage information; wherein the first threshold value is greater than the second threshold value; Wherein, when the voltage value is higher than a first threshold value or lower than a second threshold value, saving abnormal voltage information and sending the abnormal voltage information to the main platform comprises: When an abnormality occurs and the voltage state changes, abnormal voltage information is saved according to a first strategy, and the abnormal voltage information is sent to the main platform; the voltage state includes a high voltage state, a low voltage state or a normal voltage state; When an abnormality occurs and the voltage state does not change, abnormal voltage information is saved according to a second strategy, and the abnormal voltage information is sent to the main platform, and the sending interval of the second strategy is different from that of the first strategy; The single-chip microcomputer maintains a voltage status flag, and the voltage status flag is used to indicate whether the voltage status of the network device is a high voltage status, a low voltage status or a normal voltage status; the single-chip microcomputer determines whether the voltage status has changed based on the voltage status flag; When the single chip microcomputer determines that the voltage state has changed, the value of the voltage state flag is updated to a value consistent with the currently monitored voltage state.

2. The method according to claim 1, characterized in that Saving abnormal voltage information according to the first strategy and sending the abnormal voltage information to the main platform includes: saving current voltage information and sending the current voltage information to the main platform; Saving abnormal voltage information according to a second strategy and sending the abnormal voltage information to the main platform includes: when the duration of the voltage abnormality does not reach a preset time threshold, saving the current voltage information according to a first time interval; when the duration of the voltage abnormality reaches the preset time threshold, saving the current voltage information according to a second time interval and sending the current voltage information to the main platform, the second time interval is greater than the first time interval.

3. The method according to claim 1 or 2, characterized in that: When the current voltage information is saved, the sending status is not sent. When the current voltage information is sent to the main platform and an alarm success feedback message sent by the main platform is received, the sending status is updated to sent, and the updated sending status is saved.

4. The method according to claim 3, characterized in that The method further comprises: When the single chip microcomputer completes startup, detecting whether voltage information with a sending status of not sent is saved; If so, the voltage information with a sending status of not sent is sent to the main platform, and when an alarm success feedback message sent by the main platform is received, the sending status is updated to sent, and the updated sending status is saved.

5. A voltage anomaly monitoring device, characterized in that: The single-chip microcomputer is applied to a network device including a single-chip microcomputer and a main platform, and the device comprises: A collection unit, used for collecting the voltage value of the power supply of the network device when the single chip microcomputer is started up; A storage unit, used for storing abnormal voltage information when the voltage value collected by the collection unit is higher than a first threshold value or lower than a second threshold value; wherein the first threshold value is greater than the second threshold value; A sending unit, configured to send the abnormal voltage information to the main platform, so that the main platform performs an alarm process based on the abnormal voltage information; wherein the first threshold is greater than the second threshold; The storage unit is specifically used to store abnormal voltage information according to a first strategy when an abnormality occurs and the voltage state changes, and send the abnormal voltage information to the main platform through the sending unit; the voltage state includes a high voltage state, a low voltage state or a normal voltage state; When an abnormality occurs and the voltage state does not change, abnormal voltage information is saved according to a second strategy, and the abnormal voltage information is sent to the main platform through the sending unit, and the sending interval of the second strategy is different from that of the first strategy; The single-chip microcomputer maintains a voltage status flag, and the voltage status flag is used to indicate whether the voltage status of the network device is a high voltage status, a low voltage status or a normal voltage status; the single-chip microcomputer determines whether the voltage status has changed based on the voltage status flag; When the single chip microcomputer determines that the voltage state has changed, the value of the voltage state flag is updated to a value consistent with the currently monitored voltage state.

6. The device according to claim 5, characterized in that The storage unit is specifically used to save the current voltage information when an abnormality occurs and the voltage state changes, and send the current voltage information to the main platform through the sending unit; When an abnormality occurs and the voltage state does not change, if the duration of the voltage abnormality does not reach the preset time threshold, the current voltage information is saved according to the first time interval; if the duration of the voltage abnormality reaches the preset time threshold, the current voltage information is saved according to the second time interval, and the current voltage information is sent to the main platform through the sending unit, and the second time interval is greater than the first time interval.

7. The device according to claim 5 or 6, characterized in that The saving unit is also used to set the sending status to not sent when saving the current voltage information. When the sending unit sends the current voltage information to the main platform and receives the alarm success feedback message sent by the main platform, the sending status is updated to sent and the updated sending status is saved.

8. The device according to claim 7, characterized in that The saving unit is also used to detect whether voltage information with a sending status of not sent is saved when the single-chip microcomputer completes startup; if so, the voltage information with a sending status of not sent is sent to the main platform through the sending unit, and when the alarm success feedback message sent by the main platform is received, the sending status is updated to sent, and the updated sending status is saved.

9. An electronic device, characterized in that: The electronic device includes: A processor and a machine-readable storage medium, wherein the machine-readable storage medium stores machine-executable instructions that can be executed by the processor; the processor is used to execute the machine-executable instructions to implement the method steps of any one of claims 1-4.