Method, device, electronic device and storage medium for detecting under-voltage restart of a device

By performing mutual authentication and information exchange between devices on the same network segment, and using the ICMP protocol to analyze the cause of undervoltage restart of network camera devices, the problem of inaccurate location of undervoltage restart in existing technologies is solved, and a low-cost and efficient detection method is achieved.

CN116112658BActive Publication Date: 2025-12-12ZHEJIANG UNIVIEW TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202111318474.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-11-09
Publication Date
2025-12-12
Estimated Expiration
2041-11-09

AI Technical Summary

Technical Problem

Existing technologies cannot accurately pinpoint the cause of network camera restarts due to undervoltage, and also increase the complexity and cost of hardware design.

Method used

By performing mutual authentication between devices on the same network segment and using the ICMP protocol to send query undervoltage restart messages, the restart information of other devices can be obtained, the cause of the restart can be analyzed, and undervoltage restart detection can be achieved without adding hardware modules.

Benefits of technology

Accurately pinpointing the cause of device undervoltage restarts reduces maintenance costs, decreases the probability of device undervoltage restarts, and improves user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116112658B_ABST
    Figure CN116112658B_ABST
Patent Text Reader

Abstract

The present disclosure provides a method, device, electronic device and storage medium for detecting under-voltage restart of equipment, wherein the method comprises: in response to a target device detecting last under-voltage restart, determining other devices in the same network segment as the target device; querying whether under-voltage restart has occurred in the other devices; receiving restart information fed back by the other devices, and determining under-voltage restart causes according to the restart information. The present disclosure realizes detection of under-voltage restart of each device without increasing hardware modules.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present disclosure relates to the security field, and in particular to a method and device for detecting under-voltage restart of equipment, an electronic device, and a storage medium. BACKGROUND

[0002] Current network cameras have complex network functions and an increasing number of high-power modules. When too many external devices are turned on or a certain external device produces a large overshoot current instantaneously, the input voltage of the camera may be reduced, and the device may restart. To prevent under-voltage restart of the device, a common method is to add a voltage detection module to the input of the device to detect the input voltage of the camera in real time, and report the power shortage to the backend when a risk voltage is detected. This method increases the complexity of hardware design and the cost of product hardware, and cannot locate the restart problem of the early device without a power detection module, that is, it cannot determine the cause of the under-voltage restart of the device. Therefore, there is an urgent need for a method for detecting under-voltage restart of a network camera device. SUMMARY

[0003] The present disclosure provides a method and device for detecting under-voltage restart of equipment, an electronic device, and a storage medium to achieve detection of under-voltage restart of each device without increasing hardware modules.

[0004] According to an aspect of the present disclosure, a method for detecting under-voltage restart of equipment is provided, the method comprising:

[0005] In response to the target device detecting a last under-voltage restart, determining other devices in the same network segment as the target device;

[0006] Querying whether the other devices have ever experienced under-voltage restart;

[0007] Receiving restart information fed back by the other devices, and determining an under-voltage restart cause according to the restart information.

[0008] According to another aspect of the present disclosure, a device for detecting under-voltage restart of equipment is provided, the device comprising:

[0009] A same network segment device selection module configured to, in response to the target device detecting a last under-voltage restart, determine other devices in the same network segment as the target device;

[0010] A querying module configured to query whether the other devices have ever experienced under-voltage restart;

[0011] A receiving and analyzing module configured to receive restart information fed back by the other devices, and determine an under-voltage restart cause according to the restart information.

[0012] According to another aspect of the present disclosure, an electronic device is provided, comprising:

[0013] at least one processor; and

[0014] a memory communicatively connected with the at least one processor; wherein

[0015] The memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method for detecting under-voltage restart of the device according to any of the embodiments of the present disclosure.

[0016] According to another aspect of the present disclosure, a non-transitory computer readable storage medium storing computer instructions is provided, the computer instructions being used to cause a computer to perform the method for detecting under-voltage restart of the device according to any of the embodiments of the present disclosure.

[0017] According to the technology of the present disclosure, the cause of under-voltage restart is determined by mutual authentication of devices in the same network segment, and the under-voltage restart of each device is detected without increasing hardware modules.

[0018] It should be understood that the content described in this part is not intended to identify key or important features of the embodiments of the present disclosure, nor to limit the scope of the present disclosure. Other features of the present disclosure will become apparent from the following description. BRIEF DESCRIPTION OF DRAWINGS

[0019] The accompanying drawings are used to better understand the present scheme and do not limit the present disclosure. Among them:

[0020] Figure 1 is a flowchart of a method for detecting under-voltage restart of a device provided by an embodiment of the present disclosure;

[0021] Figure 2 is a flowchart of another method for detecting under-voltage restart of a device provided by an embodiment of the present disclosure;

[0022] Figure 3 is a flowchart of another method for detecting under-voltage restart of a device provided by an embodiment of the present disclosure;

[0023] Figure 4 is a flowchart of another method for detecting under-voltage restart of a device provided by an embodiment of the present disclosure;

[0024] Figure 5 is a structural schematic diagram of a device for detecting under-voltage restart of a device provided by an embodiment of the present disclosure;

[0025] Figure 6 is a block diagram of an electronic device for implementing the method for detecting under-voltage restart of a device according to an embodiment of the present disclosure. DETAILED DESCRIPTION

[0026] Exemplary embodiments of the present disclosure are described herein with reference to the accompanying drawings, which are meant to be exemplary in nature, and include various details intended to facilitate understanding of the present disclosure. Accordingly, it should be understood that various changes and modifications to the embodiments described herein can be made by those skilled in the art without departing from the scope and spirit of the present disclosure. Also, for the purpose of clarity and a concise description, descriptions of well-known functions and constructions are omitted from the following description.

[0027] In the embodiments of the present disclosure, a device is taken as an example of a network camera device. The network camera is matched with adapters of different manufacturers in an actual environment, and voltage instability may occur, which leads to abnormal power supply of the network device sometimes. If the abnormal cause can be accurately located in time, the maintenance cost in the later stage can be reduced. In view of this, a method for detecting device under-voltage restart is proposed. The specific process of the method is described in the following embodiments.

[0028] Figure 1 FIG. 1 is a flowchart of a method for detecting device under-voltage restart according to an embodiment of the present disclosure. The embodiment can be applied to the case of determining the restart cause by mutual authentication of devices in the same network segment. The method can be executed by a device for detecting device under-voltage restart. The device is implemented in software and / or hardware, and is integrated on an electronic device, for example, a network camera.

[0029] Specifically, referring to FIG. 1, the flow of the method for detecting device under-voltage restart is as follows: Figure 1

[0030] S101, in response to the target device detecting the last under-voltage restart, determining other devices in the same network segment as the target device.

[0031] ​In the embodiments of the present disclosure, the target device and the other devices can be network camera devices in a network. The target device detects the under-voltage restart in the following manner: after the target device is started, a start identifier written by the target device in the last start process is read from a preset memory area; if the start identifier meets the under-voltage restart condition, it is determined that the target device was last under-voltage restarted. For example, a preset memory area (the size of the memory area can be 16 bytes) that is not used and allocated by the device system is reserved in the memory of each device. During the start of the device, the start identifier init_flag is written in the preset memory area by default; if the device is restarted in a normal flow, the start identifier normal_flag is written in the preset memory area; and if the device is restarted due to insufficient voltage, a random value error_flag is written in the preset memory area as the start identifier. In this way, after the target device is restarted, the start identifier data in the reserved memory area can be read first. If the read start identifier is normal_flag, it indicates that the last restart was normal; if the read start identifier is init_flag, it indicates that the last CPU was dead; and if the read start identifier is the random value error_flag, it indicates that the last restart was under-voltage.

[0032] After it is determined that the target device was last under-voltage restarted, other devices in the same network segment as the target device are determined, mainly the network IP (Internet Protocol) address and mac (media access control address) address of the other devices in the same network segment. Since the target device and the other devices are registered in the background server, the IP address and mac address of the other devices can be determined from the registration information of the other devices recorded by the background server.

[0033] S102, whether the other devices have been under-voltage restarted is queried.

[0034] S103, restart information fed back by the other devices is received, and the under-voltage restart reason is determined according to the restart information.

[0035] Optionally, the target device sends an under-voltage restart query instruction to the other devices in the same network segment according to the IP address and mac address of the other devices in the same network segment by using a network transmission protocol, so that each of the other devices responds to the query instruction to detect whether the under-voltage restart has occurred, and generates restart information to feed back to the target device. Thus, the target device can obtain the restart information fed back by the plurality of other devices in the same network segment, and further determine the under-voltage restart reason of each device by comparing the received restart information, and feeds back the under-voltage restart reason to the background server, thereby realizing accurate positioning of the power supply abnormality problem.

[0036] In the embodiments of the present disclosure, after detecting that the target device last time restarts due to undervoltage, the reasons for the undervoltage restart of each device are determined by using the restart information fed back by other devices in the same network segment, so that the problem of abnormal power supply of the device can be accurately located, and the undervoltage restart of each device can be detected without increasing hardware modules.

[0037] Figure 2 is a flowchart of another method for detecting undervoltage restart of a device according to an embodiment of the present disclosure. The present embodiment is optimized on the basis of the above-mentioned embodiment. Referring to Figure 2 , the specific process of the method for detecting undervoltage restart of a device is as follows:

[0038] S201, in response to the target device detecting that it last time restarts due to undervoltage, determining other devices in the same network segment as the target device.

[0039] The process in which the target device detects that it last time restarts due to undervoltage is as follows: after the target device starts, reading a start identifier written by the target device in the last start process from a preset memory area; if the start identifier meets an undervoltage restart condition, it is determined that the target device last time restarts due to undervoltage. After determining that the target device last time restarts due to undervoltage, other devices in the same network segment as the target device are determined, mainly the network IP address and mac address of the other devices in the same network segment.

[0040] S202, based on a preset transmission protocol, sending a query undervoltage restart message including the power-off time of the target device to the other devices, so that the other devices respectively detect whether undervoltage restart occurs at the power-off time or other times according to the query undervoltage restart message.

[0041] In the embodiments of the present disclosure, the preset transmission protocol can be an ICMP (Internet Control Message Protocol) protocol. When the query undervoltage restart message including the power-off time of the target device is sent to the other devices by using the preset transmission protocol, the IP address and mac address of the other devices in the same network segment are used as the IP header of the message, and the power-off time of the target device is used as the ICMP header, wherein the power-off time of the target device is also the time when the target device last time restarts due to undervoltage. In order to ensure that only specific devices can recognize, a pre-agreed identifier can be written into the query undervoltage restart message, for example, the code code in the ICMP header is set to code=0x8, to indicate that the message is used to query undervoltage restart. It should be noted that in order to ensure the safety of the sent power-off time, the power-off time in the message header can be converted according to a pre-agreed conversion rule.

[0042] Further, in order to ensure that other devices can receive the query under-voltage restart message sent by the target device, the target device can send the query under-voltage restart message to other devices in the same network segment multiple times according to a preset time interval, for example, querying the under-voltage restart condition of other devices every minute, a total of three times.

[0043] In the embodiments of the present disclosure, after receiving the query under-voltage restart message, the other device can first inversely analyze the power-off time in the message, and then determine a time period according to the preset start time (for example, a fixed time point set in advance) and the power-off time. The other device can detect whether there is a power-off flag in the time period, and then take the time corresponding to the power-off flag as the time of under-voltage restart of the other device. In this way, the other device can detect whether under-voltage restart occurs due to power-off at the power-off time or other time of the target device according to the determined time period.

[0044] S203, receiving the restart information fed back by the other device, and determining the under-voltage restart reason according to the restart information.

[0045] In the embodiments of the present disclosure, the target device can receive the restart information fed back by the other device based on a preset transmission protocol (for example, ICMP protocol), that is, the restart information of the other device is encapsulated in an ICMP message, wherein the restart information at least includes information indicating that the other device has under-voltage restart at the power-off time or other time. Optionally, a pre-negotiated identifier can be used to represent the restart information, for example, code = 0x9 in the ICMP message indicates that the other device has under-voltage restart at the power-off time of the target device, and code = 0x10 indicates that the other device has under-voltage restart at other time. Then, the device restart reason can be analyzed according to the time of under-voltage restart of the other device,

[0046] In the embodiments of the present disclosure, in order to accurately analyze the reason for under-voltage restart in the future, the restart information fed back by the other device further includes a service with power greater than a preset threshold started by the other device within a preset time period before each under-voltage restart, wherein the service with power greater than the preset threshold is exemplarily a started fan, a started light supplement, a started heating, etc.

[0047] In an optional implementation, determining the under-voltage restart reason according to the restart information includes: if multiple devices have under-voltage restart at the same time, it is determined that the under-voltage restart reason of the other device that has restarted is that the external power supply system is powered off, which belongs to a normal situation; if multiple devices have under-voltage restart at different times, it is determined that the under-voltage restart reason of the other device that has restarted is that the device starts a service with power greater than a preset threshold. Thus, by analyzing the under-voltage restart reason, the abnormal restart condition of the device is distinguished.

[0048] In the embodiments of the present disclosure, based on the preset transmission protocol, communication between the target device and other devices in the same network segment can be ensured, thereby providing a guarantee for subsequent accurate analysis of the cause of device brownout restart.

[0049] Figure 3 is a flowchart of another method for detecting device brownout restart according to the embodiments of the present disclosure. The present embodiment is optimized on the basis of the above-mentioned embodiments. Referring to Figure 3 , the specific process of the method for detecting device brownout restart is as follows:

[0050] S301, in response to the target device detecting the last brownout restart, determining other devices in the same network segment as the target device.

[0051] In the embodiments of the present disclosure, the process of the target device detecting the last brownout restart includes: after the target device is started, reading a startup identifier written by the target device in the last startup process from a preset memory area; if the startup identifier meets the brownout restart condition, determining that the target device last brownout restarts.

[0052] S302, based on a preset transmission protocol, sending a query brownout restart message including the power-off moment of the target device to the other devices, so that the other devices respectively detect whether brownout restart occurs at the power-off moment or other moments according to the query brownout restart message.

[0053] S303, receiving the restart information fed back by the other devices.

[0054] The restart information fed back by each of the other devices at least includes information indicating that the other device has brownout restart at the power-off moment or other moments, and a service with power greater than a preset threshold opened by the other device within a preset time period before each brownout restart.

[0055] S304, if multiple devices brownout restart at the same moment, determining that the brownout restart cause of the other devices is power failure of an external power supply system.

[0056] S305, if multiple devices brownout restart at different moments, determining that the brownout restart cause of the other devices is a service with power greater than a preset threshold opened by the device.

[0057] The processes of S302-S305 are described above and will not be repeated here. In the embodiments of the present disclosure, when it is determined that the cause of the device brownout restart is caused by a service with power greater than a preset threshold, in order to facilitate device maintenance, it is necessary to determine the specific service causing the brownout restart. The specific process is described in S306-S307.

[0058] S306, perform intersection operation on the services whose power included in the restart information fed back by the other devices is greater than the preset threshold value, and determine the target service causing the under-voltage restart of the device according to the operation result.

[0059] Since the restart information fed back by each other device includes the services whose power started by the other device within a preset time length before each under-voltage restart is greater than a preset threshold value. Therefore, if multiple devices that have under-voltage restarts all start the same service before the restart time, the service is considered to be an abnormal service that causes the under-voltage restart of the device. When the abnormal service is specifically confirmed, intersection operation can be performed on the services whose power included in the restart information fed back by the other devices is greater than the preset threshold value, and the target service (i.e., the abnormal service) causing the under-voltage restart of the device is determined according to the operation result.

[0060] S307, report the target service to a background server, so that the background server controls the restarted device to prohibit running the target service.

[0061] After the target service causing the under-voltage restart of the device is determined, the target service can be reported to a background server, so that the background server controls the restarted device to prohibit running the target service, thereby reducing the probability of under-voltage restart of the device and improving user experience.

[0062] The embodiments of the present disclosure realize automatic finding of a service causing under-voltage restart of a device and closing, thereby reducing the probability of under-voltage restart of the device.

[0063] Figure 4 is a flowchart of another method for detecting under-voltage restart of a device according to an embodiment of the present disclosure. The present embodiment refines the process of under-voltage analysis of a single device on the basis of the above-mentioned embodiments. Referring to Figure 4 , the specific process of the method for detecting under-voltage restart of a device is as follows:

[0064] S401, in response to the target device detecting last under-voltage restart, determine other devices in the same network segment as the target device.

[0065] S402, query whether the other devices have under-voltage restarts.

[0066] S403, if the other devices have no under-voltage restarts, count a preset number of services whose power started by the target device within a preset time length before each under-voltage restart is greater than a preset threshold value.

[0067] In the embodiments of the present disclosure, if the adapter is under-voltage after the device is restarted, the problem will still recur when the device starts the same service again. Moreover, the device startup time is not much different. Therefore, to find the service that causes the device to restart under-voltage, the target device needs to be analyzed under-voltage. Optionally, a runtime partition is opened in the flash memory for saving the start time t of 10 restarts, and the under-voltage restart count cnt saved in the flash memory is updated according to the startup identifier of the preset memory area. Further, the target device reads the RTC (Real Time Clock) time in the uboot stage as the device startup time and saves it in the runtime partition. After three consecutive startups, the saved times are t1, t2, and t3, which satisfy t2-t1∈[-t s , t s ], t3-t2∈[-t s , t s ], and the memory backup section data is error_flag, cnt is incremented by 1, that is, it is determined that the device has occurred once under-voltage restart. Here, ts is a manually set time deviation.

[0068] Further, after it is determined that the target device has occurred once under-voltage restart, a preset number of services whose power is greater than a preset threshold value within a preset time period before the target device occurs under-voltage restart can be counted based on the device startup log, wherein the preset number can be set according to requirements, for example, three.

[0069] S404, the intersection operation is performed on the services whose power is greater than the preset threshold value in multiple statistics, the target service that causes the target device to restart under-voltage is determined according to the operation result, and the target service is reported to the background server, so that the background server controls the target device to prohibit running the target service.

[0070] By performing the intersection operation on the services whose power is greater than the preset threshold value in multiple statistics, the target service that causes the target device to restart under-voltage can be determined. Further, only the target service needs to be reported to the background server, so that the background server controls the target device to prohibit running the target service, which can reduce the probability of the target device restarting under-voltage. In addition, the target service can be prohibited from being configured subsequently, so that other devices will not restart under-voltage due to the target service.

[0071] Figure 5 is a structural schematic diagram of a device for detecting device under-voltage restart according to the embodiments of the present disclosure. The present embodiment can be applied to the case of determining the restart reason by mutual authentication of devices in the same network segment. As shown in Figure 5 , the device specifically comprises:

[0072] A same network segment device selection module 501 is configured to determine other devices in the same network segment as the target device in response to the target device detecting the last under-voltage restart.

[0073] The query module 502 is configured to query whether the other device has occurred under-voltage restart;

[0074] The receiving and analyzing module 503 is configured to receive the restart information fed back by the other device, and determine the under-voltage restart reason according to the restart information.

[0075] On the basis of the above embodiment, the device further comprises an under-voltage restart detection module, configured to:

[0076] After the target device is started, read the start-up identifier written by the target device in the last start-up process from a preset memory area;

[0077] If the start-up identifier meets the under-voltage restart condition, it is determined that the target device was under-voltage restarted last time.

[0078] On the basis of the above embodiment, the query module is specifically configured to:

[0079] According to a preset transmission protocol, send a query under-voltage restart message including the power-off time of the target device to the other device, so that the other device respectively detects whether under-voltage restart has occurred at the power-off time or other time according to the query under-voltage restart message.

[0080] On the basis of the above embodiment, the restart information at least includes information indicating that the other device has occurred under-voltage restart at the power-off time or other time, and a service with power greater than a preset threshold opened within a preset time before each under-voltage restart of the other device.

[0081] On the basis of the above embodiment, the receiving and analyzing module comprises:

[0082] The first judging unit is configured to, if there are multiple devices under-voltage restarted at the same time, determine that the under-voltage restart reason of the other device is that the external power supply system is powered off.

[0083] The second judging unit is configured to, if there are multiple devices under-voltage restarted at different times, determine that the under-voltage restart reason of the other device is that the device opens a service with power greater than a preset threshold.

[0084] On the basis of the above embodiment, the device further comprises:

[0085] The first operation module is configured to, after determining that the restart reason of the other device is a service with power greater than a preset threshold, perform an intersection operation on the services with power greater than the preset threshold included in the restart information fed back by the other device, and determine a target service causing the under-voltage restart of the device according to the operation result.

[0086] The first uploading module is configured to report the target service to a background server, so that the background server controls the restarted device to prohibit running the target service.

[0087] On the basis of the above-mentioned embodiments, optionally, the apparatus further comprises:

[0088] The statistical module is configured to, if no other device has an undervoltage restart, count a preset number of services whose power is greater than a preset threshold within a preset time period before each undervoltage restart of the target device;

[0089] The operation and screening module is configured to perform an intersection operation on the services whose power is greater than the preset threshold in the multiple counts, to determine the target service that causes the undervoltage restart of the target device according to an operation result, and to report the target service to a background server, so that the background server controls the target device to prohibit running the target service.

[0090] The apparatus provided in the embodiments of the present disclosure can execute the method for detecting the undervoltage restart of the device provided in any of the embodiments of the present disclosure, and has the corresponding function modules and beneficial effects of executing the method for detecting the undervoltage restart of the device. The contents not described in detail in the present embodiment can be referred to the description in any of the method embodiments of the present disclosure.

[0091] Figure 6 FIG. 1 is a structural schematic diagram of an electronic device provided in the embodiments of the present disclosure. In the embodiments of the present disclosure, the electronic device is exemplarily a server device. As shown in the structure, the electronic device provided in the embodiments of the present disclosure comprises one or more processors 602 and a memory 601; the processor 602 in the electronic device can be one or more, Figure 6 Figure 6 The memory 601 is configured to store one or more programs; the one or more programs are executed by the one or more processors 602, so that the one or more processors 602 implement the method for detecting the undervoltage restart of the device according to any of the embodiments of the present disclosure.

[0092] The electronic device can further comprise an input device 603 and an output device 604.

[0093] The processor 602, the memory 601, the input device 603 and the output device 604 in the electronic device can be connected through a bus or other means, Figure 6 for example, through the bus connection.

[0094] ​The memory 601 in the electronic device serves as a computer readable storage medium, and can be used to store one or more programs, which can be software programs, computer executable programs and modules. The processor 602 performs various functions of the electronic device and data processing by running the software programs, instructions and modules stored in the memory 601, that is, implements the method for detecting device brownout restart in the above method embodiments.

[0095] The memory 601 can include a program storage area and a data storage area. The program storage area can store an operating system and at least one application required by a function. The data storage area can store data created according to the use of the electronic device, etc. In addition, the memory 601 can include a high-speed random access memory, and can also include a non-volatile memory, such as at least one magnetic disk storage device, a flash memory device, or other non-volatile solid-state memory device. In some examples, the memory 601 can further include a memory remotely disposed relative to the processor 602, which can be connected to the device through a network. Examples of the above network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and a combination thereof.

[0096] The input device 603 can be used to receive input digital or character information, and generate key signal input related to user settings and function control of the electronic device. The output device 604 can include a display device such as a display screen.

[0097] And when the above electronic device includes one or more programs executed by one or more processors 602, the program performs the following operations:

[0098] In response to the target device detecting the last brownout restart, determining other devices in the same network segment as the target device;

[0099] Querying whether the other devices have ever brownout restarted;

[0100] Receiving restart information fed back by the other devices, and determining the brownout restart cause according to the restart information.

[0101] Of course, those skilled in the art can understand that when the above electronic device includes one or more programs executed by one or more processors, the program can also perform the related operations in the method for detecting device brownout restart provided in any embodiment of the present disclosure.

[0102] One embodiment of the present disclosure provides a computer readable storage medium having a computer program stored thereon, which is executed by a processor to perform a method for detecting device brownout restart, the method comprising:

[0103] In response to the target device detecting a last brownout restart, determining other devices in a same network segment as the target device;

[0104] Querying the other devices whether a brownout restart has occurred;

[0105] Receiving restart information fed back by the other devices, and determining a brownout restart cause according to the restart information.

[0106] The computer storage medium of the embodiments of the present disclosure can adopt any combination of one or more computer readable media. The computer readable medium can be a computer readable signal medium or a computer readable storage medium. The computer readable storage medium may, for example, be, but is not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or apparatus, or any combination thereof. More specific examples (non-exhaustive list) of the computer readable storage 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), a flash memory, an optical fiber, a portable CD-ROM, an optical storage device, a magnetic storage device, or any suitable combination of the above. The computer readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, device or apparatus.

[0107] The computer readable signal medium can include a data signal carried in a baseband or as a part of a carrier wave, in which a computer readable program code is carried. Such a propagated data signal can take any of a variety of forms, including but not limited to electro-magnetic, optical, or any suitable combination thereof. The computer readable signal medium can also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate or transport a program for use by or in connection with an instruction execution system, apparatus, or device.

[0108] The program code contained on the computer readable medium can be transmitted in any suitable medium, including but not limited to wireless, wire line, optical fiber cable, radio frequency (RF), or any suitable combination thereof, or any suitable combination thereof.

[0109] Computer program code for carrying out operations of the present disclosure can be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C++ or the like, and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code can execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the latter scenario, the remote computer can be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or the connection can be made to an external computer (for example, through the Internet using an Internet Service Provider).

[0110] It is noted that the foregoing has been a detailed description of a few embodiments of the disclosure. Accordingly, modifications and / or substitutions by one of ordinary skill in the art are considered to be within the scope of the present disclosure. That is, although specific embodiments were described herein, the scope of the disclosure should not be limited by those specific embodiments, which can vary. It should be apparent that a person having ordinary skill in the art can make changes to the embodiments described herein without departing from the scope of the present disclosure. Therefore, the scope of the disclosure should be governed by the following claims and their equivalents.

Claims

1. A method of detecting an under-voltage restart of a device, the method comprising: The method comprises the following steps: in response to the target device being started, detecting that the last starting process of the target device is under-voltage restart, determining other devices in the same network segment as the target device; inquiring whether the other devices have occurred under-voltage restart; receiving restart information fed back by the other devices, and determining under-voltage restart reasons according to the restart information fed back by the other devices; The method further comprises: if the other devices have not occurred under-voltage restart, counting a preset number of services with power greater than a preset threshold within a preset time period before each under-voltage restart of the target device; performing intersection operation on the services with power greater than the preset threshold counted for multiple times, determining a target service causing under-voltage restart of the target device according to an operation result, and reporting the target service to a background server, so that the background server controls the target device to prohibit running the target service.

2. The method of claim 1, wherein, The step of detecting that the last starting process of the target device is under-voltage restart in response to the target device being started comprises the following steps: after the target device is started, reading a starting identifier written by the target device in the last starting process from a preset memory area; if the starting identifier meets under-voltage restart conditions, it is determined that the target device has occurred under-voltage restart last time.

3. The method of claim 1, wherein, The step of inquiring whether the other devices have occurred under-voltage restart comprises the following steps: based on a preset transmission protocol, sending an under-voltage restart inquiry message including a power-off time of the target device to the other devices, so that the other devices respectively detect whether under-voltage restart has occurred at the power-off time or other times according to the under-voltage restart inquiry message.

4. The method of claim 3, wherein, The restart information fed back by the other devices at least comprises information representing that the other devices have occurred under-voltage restart at the power-off time or other times, and services with power greater than a preset threshold started by the other devices within a preset time period before each under-voltage restart.

5. The method of claim 4, wherein, The step of determining under-voltage restart reasons according to the restart information fed back by the other devices comprises the following steps: if multiple devices have occurred under-voltage restart at the same time, it is determined that the under-voltage restart reason of the other devices is power-off of an external power supply system; if multiple devices have occurred under-voltage restart at different times, it is determined that the under-voltage restart reason of the other devices is a service with starting power greater than a preset threshold.

6. The method of claim 5, wherein, After it is determined that the under-voltage restart reason of the other devices is a service with starting power greater than a preset threshold, the method further comprises the following steps: performing intersection operation on the services with power greater than the preset threshold included in the restart information fed back by the other devices, and determining a target service causing under-voltage restart of the devices according to an operation result; reporting the target service to a background server, so that the background server controls the restarted devices to prohibit running the target service.

7. An apparatus for detecting an under-voltage restart of a device, the apparatus comprising: The device comprises: a same network segment device selection module, configured to detect that the last starting process of the target device is under-voltage restart in response to the target device being started, and determine other devices in the same network segment as the target device; an inquiry module, configured to inquire whether the other devices have occurred under-voltage restart; a receiving and analyzing module, configured to receive restart information fed back by the other devices, and determine under-voltage restart reasons according to the restart information fed back by the other devices; The statistical module is configured to count a preset number of services whose power is greater than a preset threshold within a preset time period before each occurrence of an undervoltage restart of the target device if no undervoltage restart of other devices occurs. The operation and screening module is configured to perform an intersection operation on the services whose power is greater than the preset threshold in the multiple times of counting, to determine a target service causing the undervoltage restart of the target device according to an operation result, and to report the target service to a background server, so that the background server controls the target device to prohibit running of the target service. 8.An electronic device, comprising: at least one processor; and a memory connected to the at least one processor in communication; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-6.

9. A non-transitory computer readable storage medium having computer instructions stored therein, wherein, The computer instructions are used to enable the computer to perform the method of any one of claims 1-6.

Citation Information

Patent Citations

  • Method and device for achieving high availability of virtual machine

    CN107491344A