Device power outage warning method and apparatus

The use of UDP channels for buffering and prioritizing power outage warnings in the kernel mode addresses inefficiencies in TCP-based reporting, ensuring rapid and reliable device power outage detection.

JP2026502572APending Publication Date: 2026-01-23HUAWEI TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
JP2025540947
Authority / Receiving Office
JP · JP
Patent Type
Applications
Current Assignee / Owner
Filing Date
2023-01-12
Publication Date
2026-01-23

AI Technical Summary

Technical Problem

Current methods for reporting device power outages in baseband units (BBUs) or radio units (RUs) are inefficient, often relying on Transmission Control Protocol (TCP) channels that can fail to deliver outage alarms promptly, complicating network maintenance and dispatch.

Method used

A method and apparatus that utilizes User Datagram Protocol (UDP) channels to buffer and prioritize power outage warning messages in the kernel mode of a device, ensuring timely delivery to a network manager by bypassing user-mode protocol stacks.

Benefits of technology

Reduces power outage warning reporting time from milliseconds to microseconds, enhancing the reliability and speed of outage detection and response.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 2026502572000001_ABST
    Figure 2026502572000001_ABST
Patent Text Reader

Abstract

A device power outage warning method and apparatus are provided to optimize the handling of device power outage warnings. After determining a UDP power outage warning message, the first device buffers the UDP power outage warning message. After a power outage interruption, the first device sends the UDP power outage warning message to a network manager. The network manager determines that a power outage has occurred in the first device according to the UDP power outage warning message. In this way, the first device can report the power outage warning message via a UDP channel, thereby reducing the power outage warning reporting time.
Need to check novelty before this filing date? Find Prior Art

Description

[Technical Field]

[0001] The present application relates to the field of communication technology, and in particular to a device power outage warning method and apparatus. [Background technology]

[0002] Currently, a baseband unit (BBU) or radio unit (RU) can fail for various reasons, such as a faulty Ethernet (ETH) port, a faulty transmission device, or a power outage. If the network manager does not know the cause of the outage, such as a broken BBU / RU link, operation and maintenance can become difficult. Therefore, if the BBU / RU does not have backup power, the device must be able to report a device outage alarm so that operators can accurately dispatch a notification to the department after the BBU / RU goes down. However, currently, the device outage alarm is sent in user mode via a transmission control protocol (TCP) channel, which can take a long time or cause the outage alarm to fail to be reported. Summary of the Invention

[0003] The present application provides a device power failure warning method and apparatus for optimizing the handling of device power failure warnings. [Means for solving the problem]

[0004] According to a first aspect, the present application provides a device power outage warning method, which may include: after determining a user data protocol (UDP) power outage warning message, a first device buffers the UDP power outage warning message, and then the first device sends the UDP power outage warning message to a network manager after a power outage interruption.

[0005] In the aforementioned method, the first device can report the power outage warning message via a UDP channel, reducing the power outage warning reporting time.

[0006] In a possible design, a method for buffering the UDP power outage warning message by the first device may be as follows: The first device may buffer the UDP power outage warning message in the kernel mode of the first device. In this way, the UDP power outage warning message may be buffered in advance, so that after a power outage interruption of the first device, the kernel mode of the first device can directly send the message to the forwarding plane system for processing, so as to reduce the device power outage warning reporting time.

[0007] In a possible design, a method for buffering the UDP power outage warning message in the kernel mode of the first device by the first device may be as follows: The first device may buffer the UDP power outage warning message in the kernel mode of the first device using any of the following methods: completing user and kernel data transmission ( / netlink), writing to the process file system ( / procfs), writing kernel control parameters ( / sysctl), reading kernel files ( / sysfs), etc. In this way, the UDP power outage warning message can be buffered flexibly and accurately.

[0008] In a possible design, a method for the first device to send a UDP power outage warning message to the network manager may be as follows: The first device may send the UDP power outage warning message to the network manager according to the priority of the UDP power outage warning message. In this way, the priority of the UDP power outage warning message may be increased to ensure that the UDP power outage warning message is sent preferentially.

[0009] In a possible design, a method for a first device to send a UDP power outage warning message to a network manager may be as follows: the first device may send a UDP power outage warning message from a kernel mode of the first device to a forwarding plane system of the first device, and then the first device sends the UDP power outage warning message to the network manager via the forwarding plane system. In this way, the UDP power outage warning message can be reported normally.

[0010] In a possible design, a method for the first device to send a UDP message to the network manager through the forwarding plane system may be as follows: The first device may send the UDP power outage warning message to the network manager through the forwarding plane system according to the priority of the UDP power outage warning message. In this way, the priority of the UDP power outage warning message may be increased to ensure that the UDP power outage warning message is sent preferentially.

[0011] In a possible design, the priority of the UDP power outage warning message may be higher than the transmission priority of some or all messages other than the UDP power outage warning message. In this way, the priority of the UDP power outage warning message may be increased to ensure that the UDP power outage warning message is transmitted preferentially.

[0012] In a possible design, the priority of the UDP power outage warning message is a differentiated services code point (DSCP) priority or a virtual local area network (VLAN) priority, thereby ensuring that the UDP power outage warning message has a high priority.

[0013] In one possible design, before the first device determines the UDP power outage warning message, the first device may load a first program into its kernel mode, and the first program may be used to trigger at least one of the following processes: sending the UDP power outage warning message according to a power outage interrupt, buffering the UDP power outage warning message, or associating power outage interrupt handling with the power outage interrupt. In this way, the first device can support reporting of the UDP power outage warning message to reduce the time consumed by the power outage warning.

[0014] In a possible design, the first device may determine the UDP power outage warning message using the following method: The first device may determine the UDP power outage warning message based on the first device's UDP port number, a source Internet Protocol (IP) address, a destination IP address, and a UDP port number of the network manager, where the source IP address and the destination IP address are used for the connection between the network manager and the first device. In this way, the UDP power outage warning message to be buffered can be accurately determined.

[0015] In a possible design, the UDP port number of the network manager may be received by the first device from the network manager, or the UDP port number of the network manager may be preset.

[0016] In one possible design, the first device may receive a first key from the network manager, and then encrypt the UDP power outage warning message based on the first key. In this way, security of the UDP power outage warning message can be ensured.

[0017] In a possible design, the first key may be generated based on a random number or based on an identifier of the first device.

[0018] In a possible design, the first device may buffer the UDP power outage warning message in the following cases: the first device may buffer the UDP power outage warning message after the first device establishes a connection to the network manager, or the first device may buffer the UDP power outage warning message after reconnection due to a change in the IP address of the first device and / or the network manager, or the first device may periodically buffer the UDP power outage warning message. In this way, it can be ensured that the UDP power outage warning message is buffered normally.

[0019] In a possible design, the UDP power outage alert message may include an identifier of the first device, so that the network manager subsequently identifies that the UDP power outage alert message is reported by the first device.

[0020] According to a second aspect, the present application provides a device power outage warning method, which may include: after receiving a UDP power outage warning message from a first device, a network manager determines, according to the UDP power outage warning message, that a power outage has occurred in the first device;

[0021] In the aforementioned method, the first device can report the power outage warning message via a UDP channel, reducing the power outage warning reporting time.

[0022] In a possible design, the network manager may send the network manager's UDP port number to the first device, so that the first device determines the UDP power outage warning message based on the network manager's UDP port number.

[0023] In one possible design, the network manager may send a first key to the first device, and the first key is used to encrypt the UDP power outage warning message. In this way, security of the UDP power outage warning message can be guaranteed.

[0024] In a possible design, the network manager may generate the first key based on a random number, or the network manager may generate the first key based on an identifier of the first device. In this way, the network manager can flexibly determine the first key.

[0025] In a possible design, the network manager may record a correspondence between the first key and the first device, so that the first key used to decrypt the UDP power outage alert message corresponding to the first device is subsequently determined based on the correspondence.

[0026] In a possible design, the correspondence between the first key and the first device may be a correspondence between the first key and the IP address of the first device, or a correspondence between the first key and the identifier of the first device.

[0027] In one possible design, the network manager may determine a first key corresponding to the first device according to the correspondence between the first key and the first device, and then the network manager can decrypt the UDP power outage warning message based on the first key. In this way, the network manager can accurately decrypt the UDP power outage warning message.

[0028] In one possible design, the network manager may determine a first key corresponding to the first device according to the correspondence between the first key and the first device as follows: The network manager may determine a first key corresponding to the IP address of the first device according to the IP address of the first device and the correspondence between the first key and the first device. Alternatively, the network manager may determine a first key corresponding to the identifier of the first device according to the identifier of the first device included in the UDP power outage warning message and the correspondence between the first key and the first device. In this way, the network manager can accurately determine the first key to successfully decrypt the UDP power outage warning message.

[0029] According to a third aspect, the present application further provides a device power outage warning device. The device power outage warning device may be a first device. The device power outage warning device has a function for implementing the first aspect or a possible design example of the first aspect. The function may be implemented by hardware or by hardware executing corresponding software. The hardware or software includes one or more modules corresponding to the aforementioned functions.

[0030] In a possible design, the structure of the device power outage warning device includes a communication unit and a processing unit. These units may implement corresponding functions in the first aspect or possible design examples of the first aspect. For details, please refer to the detailed description in the method example. Details will not be described here.

[0031] In a possible design, the device power outage warning device structure includes a communication interface and a processor, and optionally further includes a memory. The communication interface is configured to receive and transmit messages or data and to communicate and interact with other devices in the system. The processor is configured to support the device power outage warning device in performing corresponding functions in the first embodiment or a possible design example of the first embodiment. The memory is coupled to the processor and stores program instructions and data required for the device power outage warning device.

[0032] According to a fourth aspect, the present application further provides a device power outage warning device. The device power outage warning device may be a network manager. The device power outage warning device has a function for implementing the second aspect or a possible design example of the second aspect. The function may be implemented by hardware or by hardware executing corresponding software. The hardware or software includes one or more modules corresponding to the aforementioned functions.

[0033] In a possible design, the structure of the device power outage warning device includes a communication unit and a processing unit. These units may implement corresponding functions in the second aspect or possible design examples of the second aspect. For details, please refer to the detailed description in the method example. Details will not be described here.

[0034] In a possible design, the device power outage warning device structure includes a communication interface and a processor, and optionally further includes a memory. The communication interface is configured to receive and transmit messages or data and to communicate and interact with other devices in the system. The processor is configured to support the device power outage warning device in performing corresponding functions in the second embodiment or a possible design example of the second embodiment. The memory is coupled to the processor and stores program instructions and data required for the device power outage warning device.

[0035] According to a fifth aspect, an embodiment of the present application provides a system, which may include a first device, and the first device may be configured to perform the operations of the first aspect and any of the methods of the first aspect.

[0036] In a possible design, the system may further include a network manager, and the network manager may be configured to perform the operations of the second aspect and any of the methods of the second aspect.

[0037] According to a sixth aspect, an embodiment of the present application provides a computer-readable storage medium. The computer-readable storage medium stores program instructions, which, when run on a computer, enable the computer to perform a method according to any one of the first aspect and possible designs of the first aspect of the embodiment of the present application, or a method according to any one of the second aspect and possible designs of the second aspect of the embodiment of the present application. For example, the computer-readable storage medium may be any available medium that can be accessed by a computer. By way of example and not limitation, the computer-readable medium may include non-transitory computer-readable media, random-access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), CD-ROM or other optical disk storage, magnetic disk storage media or other magnetic storage devices, or any other medium that can hold or store desired program code in the form of instructions or data structures and that can be accessed by a computer.

[0038] According to a seventh aspect, an embodiment of the present application provides a computer program product comprising computer program code or computer program instructions which, when run on a computer, perform a method according to the first aspect or any one of the possible designs of the first aspect, or a method according to the second aspect or any one of the possible designs of the second aspect.

[0039] According to an eighth aspect, the present application further provides a chip including a processor, coupled to a memory and configured to read and execute program instructions stored in the memory, such that the chip implements a method of the first aspect or any possible design of the first aspect or the second aspect or any possible design of the second aspect.

[0040] For each of the third to eighth aspects and the technical effects that can be achieved in those aspects, please refer to the above description of the technical effects that can be achieved in the first aspect or a possible solution of the first aspect or the second aspect or a possible solution of the second aspect, and the details will not be described again here. [Brief explanation of the drawings]

[0041] [Figure 1a] FIG. 1 is a diagram of a system architecture according to the present application. [Figure 1b] FIG. 2 is a diagram of the structure of an access network device according to the present application. [Figure 2] 1 is a diagram illustrating receiving different alert messages by a network manager according to the present application; [Figure 3] 1 is a flowchart of a device power outage warning method according to the present application. [Figure 4] FIG. 1 is a diagram of an implementation process of a first device for buffering and forwarding UDP power outage warning messages according to the present application. [Figure 5] 1 is a flowchart of an example of a device power outage warning method according to the present application. [Figure 6] 1 is a diagram of the structure of a device power outage alarm device according to the present application; [Figure 7] 1 is a diagram of the structure of a device power outage alarm device according to the present application; DETAILED DESCRIPTION OF THE INVENTION

[0042] Embodiments of the present application are described in detail below with reference to the accompanying drawings.

[0043] An embodiment of the present application provides a device power outage warning method and apparatus for optimizing the handling of device power outage warning.The method and apparatus in the present application are based on the same technical concept.Because the problem-solving principles of the method and apparatus are similar, cross-references may be made to the implementation forms of the apparatus and method, and the repeated parts will not be described.

[0044] In the description of this application, terms such as "first" and "second" are used merely to distinguish between descriptions and should not be understood as indicating or implying relative importance or as an implied indication of order.

[0045] In the description of this application, "at least one (type)" means one or more (types), and "multiple (types)" means two or more (types). Also, "at least one of the following items" or similar expressions means any combination of those items, including any combination of single items or multiple items. For example, at least one of a, b, or c can refer to a, b, c, a and b, a and c, b and c, or a, b, and c, and a, b, and c can be singular or plural.

[0046] In the description of this application, "and / or" describes an association relationship between associated objects and indicates that three relationships may exist. For example, A and / or B may indicate that only A is present, that both A and B are present, or that only B is present, and A and B may be singular or plural. Also, " / " indicates "or." For example, a / b indicates a or b.

[0047] To describe the technical solutions in the embodiments of the present application more clearly, the communication methods and apparatuses provided in the embodiments of the present application are described in detail below with reference to the accompanying drawings.

[0048] FIG. 1a illustrates a possible system architecture to which the device power outage warning method according to the present application can be applied. The system architecture may include a network device, a network, and a network manager. The network device may report a warning message to the network manager. For example, as shown in FIG. 1a, a power outage warning may be implemented between the network device and the network manager via a user datagram protocol (UDP) channel, while another type of warning other than a power outage warning may be realized via a transmission control protocol (TCP) channel between the network device and the network manager. As shown in FIG. 2, the network manager may receive a UDP message used for a power outage warning and a TCP message used for another type of warning, and then handle the corresponding warning.

[0049] The network device may be a radio access network (RAN) device, which may include various types of base stations, such as a macro base station, a micro base station (also called a small cell), a relay station, and an access point. The network device may be an evolved NodeB (eNB) in a 4G system, a next-generation NodeB (gNB) in a 5G system, a base station in a 6G system evolved after 5G, or a base station in another system, or an access network device or a module of an access network device in an open access network (ORAN) system. Specifically, the network device may include, but is not limited to, a home base station (e.g., a home evolved NodeB or home NodeB, HNB), a BBU, an active antenna unit (AAU), a wireless relay node, a wireless backhaul node, a transmission point (TP) or a transmission reception point (TRP), or one antenna panel or a group of antenna panels (including multiple antenna panels) of a base station in a 5G mobile communication system. Alternatively, the access network device may be a module or unit capable of several functionalities of an access network device, such as a module or unit in the diagram of the access network device in Figure 1b. For example, the access network device may be a central unit (CU), a distributed unit (DU), a CU control plane (CP), a CU user plane (UP), or a radio unit (RU).As shown in Figure 1b, an access network device includes one or more central units (CUs), one or more distributed units (DUs), and one or more radio units (RUs). For clarity, Figure 1b shows only one CU, one DU, and one RU. The CU is configured to connect to a core network and one or more DUs. Optionally, the CU may have some functionality of the core network. The CU may include a CU control plane (CP) and a CU user plane (UP).

[0050] The CU and DU may be configured based on the protocol layer functionality of the wireless network implemented by the CU and DU. For example, the CU is configured to implement functionality of a packet data convergence protocol (PDCP) layer and higher protocol layers (e.g., a radio resource control (RRC) layer and / or a service data adaptation protocol (SDAP) layer). The DU is configured to implement functionality of protocol layers lower than the PDCP layer (e.g., a radio link control (RLC) layer, a media access control (MAC) layer, and / or a physical (PHY) layer). In another example, the CU is configured to implement functionality of protocol layers higher than the PDCP layer (e.g., an RRC layer and / or an SDAP layer), and the DU is configured to implement functionality of the PDCP layer and protocol layers lower than the PDCP layer (e.g., an RLC layer, a MAC layer, and / or a PHY layer).

[0051] When a CU includes a CU-CP and a CU-UP, the CU-CP is configured to implement the control plane functionality of the CU, and the CU-UP is configured to implement the user plane functionality of the CU. For example, when a CU is configured to implement the functionality of a PDCP layer, an RRC layer, and an SDAP layer, the CU-CP is configured to implement the RRC layer functionality and the control plane functionality of the PDCP layer, and the CU-UP is configured to implement the SDAP layer functionality and the user plane functionality of the PDCP layer.

[0052] The CU-CP may interact with a network element in a core network configured to implement control plane functionality. The network element in the core network configured to implement control plane functionality may be an access and mobility function network element, such as an access and mobility management function (AMF) in a 5G system. The access and mobility function network element is configured to be responsible for mobility management in a mobile network, such as location updates of terminal devices, network registration of terminal devices, and handover of terminal devices.

[0053] The CU-UP may interact with a network element in the core network configured to implement user plane functionality, such as a User Plane Function (UPF) in a 5G system configured to handle the forwarding and reception of data at terminal devices.

[0054] The above-described configuration of the CU and DU is merely an example. Alternatively, the functionality of the CU and DU may be configured as needed. For example, the CU or DU may be configured to have more protocol layer functionality, or the CU or DU may be configured to have some of the processing functionality of the protocol layers. For example, some functionality of the RLC layer and functionality of protocol layers above the RLC layer may be configured on the CU, while the remaining functionality of the RLC layer and functionality of protocol layers below the RLC layer may be configured on the DU. As another example, the functionality of the CU or DU may be divided according to service type or other system requirements. For example, the functionality may be divided by latency. Functionality whose processing time must meet low latency requirements may be configured on the DU, and functionality whose processing time does not need to meet latency requirements may be configured on the CU.

[0055] The DU and RU may cooperate to implement PHY layer functionality. One DU may be connected to one or more RUs. The functionality of the DU and RU may be configured in multiple ways according to the design. For example, the DU may be configured to implement baseband functionality, and the RU may be configured to implement mid- and radio frequency functionality. In another example, the DU may be configured to implement upper layer functionality of the PHY layer, and the RU may be configured to implement lower layer functionality of the PHY layer or lower layer functionality and radio frequency functionality. The upper layer functionality of the PHY layer may include part of the functionality of the PHY layer, with part of the functionality closer to the MAC layer. The lower layer functionality of the PHY layer may include another part of the functionality of the PHY layer, with part of the functionality closer to the mid- and radio frequency side.

[0056] The RRC layer information ultimately becomes or is converted from the PHY layer information. Therefore, in the architecture, higher layer signaling, such as RRC layer signaling or PHCP layer signaling, may also be considered to be transmitted by the DU or by the DU and RU. The CU and DU may be separately located or may be included in the same network element, such as a baseband unit (BBU). The RU may be included in a radio frequency device or radio frequency unit, such as a remote radio unit (RRU), an active antenna unit (AAU), or a remote radio head (RRH).

[0057] In different systems, the CU (or CU-CP and CU-UP), DU, or RU may also have different names, and those skilled in the art will understand the meaning of the names. In an ORAN system, the CU may also be referred to as O-CU, the DU may also be referred to as open (O)-DU, the CU-CP may also be referred to as O-CU-CP, the CU-UP may also be referred to as O-CUP-UP, and the RU may also be referred to as O-RU. In an ORAN system, the correspondence between ORAN network elements and protocol layer functionality that may be implemented by the ORAN network elements may be shown in Table 1:

[0058] [Table 1]

[0059] For ease of explanation, the CU, CU-CP, CU-UP, DU, and RU are used as examples for explanation in this application. Any of the CU (or CU-CP or CU-UP), DU, and RU in this application may be implemented by a software module, a hardware module, or a combination thereof.

[0060] The network may be an ethernet (ETH) or the like.

[0061] It should be noted that the system architecture shown in Figure 1a is merely an example and may take other forms or further include other devices, which is not a limitation of this application.

[0062] Currently, for network devices that report power outage warning messages, a management plane channel is typically established between the network device and the network manager using TCP to implement the power outage warning report. Specifically, after receiving a power outage interrupt in Linux kernel mode, the network device sends the power outage interrupt to a user-mode first-in, first-out (FIFO) task and uses a user-mode protocol stack to send a TCP message through the transport system. However, TCP message transmission takes a long time, and the network device operates for a short time after a power outage. TCP-based warning reporting cannot guarantee that the message can be sent to the network manager immediately. The main reasons are as follows: TCP is a stateful, connection-oriented protocol. Furthermore, TCP has a retransmission mechanism, which cannot guarantee the successful transmission of messages. If the first five messages are not sent, the sixth power outage warning message cannot be sent either. Furthermore, when using TCP messages for power outage warning, the network device must perform task switching. Furthermore, TCP sockets involve semaphore protection, and the time cannot be guaranteed. In consideration of this, an embodiment of the present application provides a device power outage warning method and apparatus. To reduce reporting time for power outage warnings, power outage warning messages can be reported over a UDP channel because UDP messages can be pre-buffered without undergoing user-mode protocol stack processing.

[0063] In the following implementation, the device power outage warning method provided in the embodiment of the present application will be described in detail by using a first device and a network manager as an example. It should be understood that the operation performed by the first device may also be implemented by a processor, a chip or chip system, a functional module, etc. within the first device. This is not limited in the present application. The operation performed by the network manager may also be implemented by a processor, a chip or chip system, a functional module, etc. within the network manager. This is not limited in the present application. Optionally, the first device may be the network device of FIG. 1a or a module or unit within the network device, such as a BBU or RU, and the RU may be an O-RU, etc.

[0064] Based on the foregoing description, the device power outage warning method provided in one embodiment of the present application may be as shown in Figure 3. The process of this method may include the following steps:

[0065] Step 301: The first device determines the UDP power outage warning message.

[0066] The UDP power outage warning message may be understood as a device power outage warning, a device power outage indication, etc. In the present application, the UDP power outage warning message may be a message encapsulated based on the UDP protocol to indicate a device power outage warning.

[0067] The priority of the UDP power outage warning message may be higher than the transmission priority of some or all messages other than the UDP power outage warning message. For example, the priority of the UDP power outage warning message may be higher than the priority of another type of warning message. In this way, the priority of the UDP power outage warning message may be increased to ensure that the UDP power outage warning message is transmitted preferentially.

[0068] Optionally, the priority of the UDP power outage warning message may be a differentiated services code point (DSCP) priority, a virtual local area network (VLAN) priority, or the like.

[0069] In an optional implementation, before the first device determines the UDP power outage warning message, the first device may load a first program of the first device into kernel mode. The first program may be used to trigger at least one of the following processes: sending the UDP power outage warning message according to a power outage interrupt, buffering the UDP power outage warning message, associating power outage interrupt handling with the power outage interrupt, etc. Furthermore, based on the first program, the first device may implement buffering of the UDP power outage warning message and send the UDP power outage warning message to the network manager after the power outage interrupt.

[0070] The kernel mode of the first device may also be referred to as the kernel space of the first device, which is the area where kernel processes / threads are located and is responsible for system execution, hardware interaction, etc. For example, the kernel mode of the first device may be the Linux kernel mode. Correspondingly, loading the first program into the kernel mode can trigger alarm handling using a UDP channel after a device power failure interrupt.

[0071] For example, the first program may be a program related to a power outage warning, and the first program may be called a kernel (mode) program or may be described in another manner, which is not a limitation of the present application.

[0072] Optionally, associating the power failure interrupt process with the power failure interrupt may be described as power failure interrupt vector registration, or may be understood as power failure interrupt handling function registration, or may be described in another manner, which is not limited in the present application.

[0073] In one example, the first device may load the first program into the kernel mode of the first device via a kernel module (xx.kernel object, xx.Ko), eBpf, etc.

[0074] In a possible manner, the first device may determine the UDP power outage warning message using the following method: the first device may determine the UDP power outage warning message based on the UDP port number of the first device, the source IP address, the destination IP address, and the UDP port number of the network manager, where the source IP address and the destination IP address are used for the connection between the network manager and the first device. The first device determining the UDP message may also be described as the first device generating the UDP message, etc.

[0075] When the first device establishes a connection to the network manager, the first device may record the source IP address and the destination IP address of the connection between the first device and the network manager. For example, the connection between the first device and the network manager may be a TCP connection between the first device and the network manager.

[0076] Optionally, after the first device is successfully connected to the network manager, the first device may receive a notification event from the network manager through an application (APP) of the first device, which is used to notify the network manager of power outage-related information used by the network manager, such as the network manager's UDP port number and first key.

[0077] In one example, the network manager's UDP port number may be received by the first device from the network manager, for example, carried in the notification event described above, or may be preset.

[0078] In an optional implementation, the first device may receive a first key (e.g., carried in the aforementioned notification event) from the network manager so that the first device can encrypt the UDP power outage warning message based on the first key.

[0079] For example, the first device may encrypt the UDP power outage warning message using an encryption method such as HMAC-SHA256.

[0080] For example, the first key may be generated by the network manager based on a random number or based on an identifier of the first device, i.e., the network manager generates the first key based on a random number, or the network manager generates the first key based on an identifier of the first device.

[0081] In one example, the UDP power outage alert message may include an identifier of the first device.

[0082] Step 302: The first device buffers the UDP power outage warning message.

[0083] In an optional implementation, the first device may buffer the UDP power outage warning message in a kernel mode of the first device.

[0084] For example, the first device may buffer the UDP power outage warning message in kernel mode of the first device using any of the following methods: completing user and kernel data transmission / netlink, writing to a process file system / procfs, writing a kernel control parameter / sysctl, reading a kernel file / sysfs, etc.

[0085] Optionally, if the first device buffers the UDP power outage warning message in the kernel mode of the first device using any of the aforementioned methods, the APP of the first device may deliver the UDP power outage warning message to the kernel mode of the first device using a method such as / netlink, / procfs, / sysctl, or / sysfs.

[0086] For example, the first device may buffer the UDP power outage warning message after the first device establishes a connection to the network manager, or the first device may buffer the UDP power outage warning message after a reconnection (i.e., a TCP connection is re-established) due to a change in the IP address of the first device and / or the network manager, or the first device may periodically buffer the UDP power outage warning message.

[0087] Optionally, the first device that buffers the UDP power outage warning message in a kernel mode of the first device may specifically be a first device that buffers the UDP power outage warning message in a kernel mode first program of the first device.

[0088] Step 303: The first device sends a UDP power outage warning message to the network manager after the power outage interruption.

[0089] The first device may send a UDP power outage warning message to the network manager according to the priority of the UDP power outage warning message described in step 301 .

[0090] Optionally, the method for identifying a power failure interrupt of the first device may be determining, by the first device, that a voltage change in hardware of the first device causes an interrupt.

[0091] For example, an interrupt is generated when the voltage of the substrate of the first device drops from 12 volts (V) to a first value, in which case it is determined that a power failure interrupt of the first device has occurred. Optionally, the first value may be 6 V, 8 V, or another value.

[0092] In an optional implementation, after a power outage interruption of the first device, the first device may send a UDP power outage warning message to the network manager using the following method: the first device sends a UDP power outage warning message directly from the kernel mode of the first device to the forwarding plane system of the first device without protocol stack processing, and then the first device sends the UDP power outage warning message to the network manager via the forwarding plane system.

[0093] Optionally, when the first device sends a UDP power outage warning message to the network manager, the UDP power outage warning message buffer may be sent by using a separate register to avoid time consumption by pass and release operations (pv operations) due to contention with other messages for semaphore protection.

[0094] In one possible scheme, the first device may send a UDP power outage warning message to the network manager via a forwarding plane system according to the priority of the UDP power outage warning message described in step 301. For example, the forwarding plane system of the first device may process the UDP power outage warning message as a high-priority message. For example, the DSCP of the UDP power outage warning message may be set to a high-priority DSCP and / or the VLAN priority may be set to a high-priority DSCP.

[0095] Optionally, since the UDP power outage warning message is constructed before being forwarded through the forwarding plane, the first device may send the UDP power outage warning message to the network manager through the forwarding plane system using any of the following methods: active / standby path switching, port aggregation (trunk), internet protocol security (IPsec), etc.

[0096] Step 304: The network manager determines, according to the UDP power outage alert message, that a power outage has occurred in the first device.

[0097] In an optional implementation, after determining the first key and sending the first key to the first device, the network manager may record a correspondence between the first key and the first device.

[0098] For example, the correspondence between the first key and the first device may be a correspondence between the first key and the IP address of the first device, or a correspondence between the first key and the identifier of the first device.

[0099] Then, after the network manager receives the UDP power outage warning message from the first device, the network manager may determine a first key corresponding to the first device according to the correspondence between the first key and the first device, so that the network manager can decrypt the UDP power outage warning message based on the first key.

[0100] Optionally, the network manager determining the first key corresponding to the first device according to the correspondence between the first key and the first device may be implemented as follows: the network manager may determine the first key corresponding to the IP address of the first device according to the IP address of the first device and the correspondence between the first key and the first device. Alternatively, the network manager may determine the first key corresponding to the identifier of the first device according to the identifier of the first device included in the UDP power outage warning message and the correspondence between the first key and the first device.

[0101] In the aforementioned method, the first device can report the power outage warning message via a UDP channel, reducing the power outage warning reporting time.

[0102] Based on the above description, the implementation process diagram of the first device buffering and forwarding the UDP power outage warning message may be as shown in FIG. 4. Specifically, the power outage warning message may use a separate UDP channel. The first device may buffer the UDP power outage warning message in advance in the Linux kernel mode. After the Linux kernel mode receives a power outage interrupt, the buffered UDP power outage warning message is directly sent from the kernel mode to the forwarding system. The forwarding system forwards the UDP power outage warning message as a high-priority message.

[0103] The power outage warning method provided in the embodiment of the present application will be described below by using a specific example. For example, the method included in the embodiment shown in Figure 3 and Figure 4 will be described in detail by using the example of the power outage warning method shown in Figure 5. The process of the example shown in Figure 5 can be shown as follows:

[0104] Step 501: The first device loads a kernel program related to power outage warning (ie, the first program described in the previous embodiment) into the (linux) kernel mode.

[0105] For example, the first device may load a kernel program into kernel mode via xx.Ko, eBpf, etc.

[0106] Specifically, for a specific description of the kernel program, please refer to the relevant description of the first program in the embodiment shown in Figure 3. The details will not be described again here.

[0107] Step 502: The first device establishes a connection to the network manager, and the APP of the first device records the source IP address and the destination IP address of the connection between the network manager and the first device.

[0108] For example, a TCP connection may be established between a first device and a network manager.

[0109] Step 503: The APP of the first device receives a notification event from the network manager, and the notification event is used to notify the power outage related information used by the network manager.

[0110] Optionally, the notification event may carry a first key.

[0111] Optionally, the notification event may further carry the UDP port number of the network manager (ie, the UDP port number of the network manager that uses the power outage alarm).

[0112] Step 504: The APP of the first device determines the UDP power outage warning message according to the UDP port number, the source IP address, the destination IP address of the first device, and the UDP port number of the network manager.

[0113] Optionally, if the notification event carries a first key, the APP of the first device may encrypt the UDP power outage warning message based on the first key.

[0114] For details, please refer to the relevant description of step 301 in the embodiment shown in FIG.

[0115] Step 505: The APP of the first device buffers the UDP power outage warning message in a kernel program in the kernel mode of the first device.

[0116] Optionally, the APP of the first device may buffer the UDP power outage warning message to a kernel program in kernel mode using any of the following methods: / netlink, / procfs, / sysctl, / sysfs, etc. calls.

[0117] For details, please refer to the relevant description of step 302 in the embodiment shown in FIG.

[0118] Step 506: When a power outage occurs in the first device, the hardware of the first device generates an interrupt and triggers interrupt handling, that is, the hardware reports the interrupt to a kernel program in kernel mode.

[0119] Step 507: After receiving the interrupt, the kernel program may send the buffered UDP power outage warning message directly to the forwarding plane system of the first device without protocol stack processing.

[0120] Optionally, the message buffer buffer may be sent by the kernel program using a separate register to avoid time wasting by the pv operation due to contention with other messages for semaphore protection.

[0121] Step 508: The forwarding plane system processes the UDP power outage warning message and sends it to the network manager as a high priority message.

[0122] For example, the forwarding plane system may set the DSCP of the message to a high-priority DSCP and set the VLAN priority to a high-priority DSCP. Because the message is constructed before forwarding, various forwarding processes such as active / standby route switching, trunking, and IPsec are supported.

[0123] It should be noted that when the network changes, for example when the IP address of the first device or the network manager changes, the TCP connection needs to be re-established, in which case steps 502 to 505 are repeated.

[0124] In the above example, the power outage warning message can be reported over a UDP channel, reducing the power outage warning reporting time. For example, the time for a power outage warning for the first device can be reduced from 20-200 milliseconds (ms) to 0.03 ms.

[0125] It should be noted that the above-described device power outage warning method in this application may also be applicable to an IPsec scenario, an IPsec encrypted management plane scenario, or another scenario, which is not limited in this application.

[0126] Based on the above embodiment, an embodiment of the present application further provides a device power outage warning apparatus. See Fig. 6. The device power outage warning apparatus 600 may include a communication unit 601 and a processing unit 602. The communication unit 601 may be configured to receive and transmit information (e.g., messages), etc. The processing unit 602 may control and manage the operation of the device power outage warning apparatus 600. The processing unit 602 may further control the operation performed by the communication unit 601.

[0127] For example, the device power outage warning device 600 may be the first device, the processor of the first device, a chip, a chip system, a functional module, etc. in the above-described embodiments. Alternatively, the device power outage warning device 600 may also be the network manager, the processor of the network manager, a chip, a chip system, a functional module, etc. in the above-described embodiments.

[0128] In an embodiment, when the device power outage warning apparatus 600 is configured to implement the function of the first device in the aforementioned embodiment, it may include the following: the processing unit 602 may be configured to determine a UDP power outage warning message and buffer the UDP power outage warning message, and the communication unit 601 may be configured to send the UDP power outage warning message to the network manager after a power outage interruption.

[0129] In an optional implementation, the processing unit 602 may be configured, when buffering the UDP power outage warning message, to buffer the UDP power outage warning message in kernel mode.

[0130] For example, when buffering the UDP power outage warning message in the kernel mode of the first device, the processing unit 602 may be configured to buffer the UDP power outage warning message in the kernel mode of the first device using any of the following methods: completion of user and kernel data transmission / netlink, writing to a process file system / procfs, writing a kernel control parameter / sysctl, or reading a kernel file / sysfs.

[0131] In a possible manner, when sending a UDP power outage warning message to the network manager, the communication unit 601 may be configured to send the UDP power outage warning message to the network manager according to the priority of the UDP power outage warning message.

[0132] Optionally, the processing unit 602 may be further configured to send a UDP power outage warning message to the forwarding plane system from the kernel mode, and the communication unit 601 may be configured to send the UDP power outage warning message to the network manager via the forwarding plane system when sending the UDP power outage warning message to the network manager.

[0133] Optionally, when sending a UDP message to the network manager via the forwarding plane system, the communication unit 601 may be configured to send the UDP power outage warning message to the network manager via the forwarding plane system according to the priority of the UDP power outage warning message.

[0134] For example, the priority of the UDP power outage warning message may be higher than the transmission priority of some or all messages other than the UDP power outage warning message.

[0135] For example, the priority of the UDP power outage warning message may be a Differentiated Services Code Point DSCP priority or a Virtual Local Area Network VLAN priority.

[0136] In one example, the processing unit 602 may be further configured to load a first program into kernel mode before determining the UDP power outage warning message, and the first program is used to trigger at least one of the following processes: sending the UDP power outage warning message according to the power outage interrupt, buffering the UDP power outage warning message, or associating power outage interrupt handling with the power outage interrupt.

[0137] For example, when determining the UDP power outage warning message, the processing unit 602 may be configured to determine the UDP power outage warning message based on the UDP port number, the source Internet Protocol IP address, the destination IP address of the first device, and the UDP port number of the network manager, where the source IP address and the destination IP address are used for the connection between the network manager and the first device.

[0138] Optionally, the UDP port number of the network manager is received by the communication unit 601 from the network manager, or the UDP port number of the network manager is preset.

[0139] In a possible manner, the communication unit 601 may be further configured to receive a first key from the network manager, and the processing unit 602 may be further configured to encrypt the UDP power outage warning message based on the first key.

[0140] For example, the first key may be generated based on a random number or based on an identifier of the first device.

[0141] In a possible implementation, the processing unit 602, when buffering the UDP power outage warning message, buffering the UDP power outage alert message after the first device establishes a connection to the network manager; or Buffering UDP power outage alert messages after reconnection due to a change in the IP address of the first device and / or network manager, or Periodically buffering UDP power outage warning messages It may be configured as follows.

[0142] For example, the UDP power outage warning message includes an identifier of the first device.

[0143] In an embodiment, when the device power outage warning apparatus 600 is configured to perform the function of the network manager in the aforementioned embodiment, it may include the following: the communication unit 601 may be configured to receive a User Datagram Protocol (UDP) power outage warning message from the first device, and the processing unit 602 may be configured to determine, according to the UDP power outage warning message, that a power outage has occurred in the first device.

[0144] Optionally, the communication unit 601 may be further configured to send a UDP port number of the network manager to the first device, and the UDP port number of the network manager is used by the first device to determine the UDP power outage warning message.

[0145] Optionally, the communication unit 601 may be further configured to send a first key to the first device, where the first key is used to encrypt the UDP power outage warning message.

[0146] In an optional implementation, the processing unit 602 may be further configured to generate the first key based on a random number or to generate the first key based on an identifier of the first device.

[0147] In an optional implementation, the processing unit 602 may be further configured to record a correspondence between the first key and the first device.

[0148] For example, the correspondence between the first key and the first device includes a correspondence between the first key and the IP address of the first device, or a correspondence between the first key and the identifier of the first device.

[0149] In a possible manner, the processing unit 602 may be further configured to determine a first key corresponding to the first device according to the correspondence between the first key and the first device, and decrypt the UDP power outage warning message based on the first key.

[0150] Optionally, the processing unit 602 may be configured, when determining the first key corresponding to the first device according to the correspondence between the first key and the first device, to determine the first key corresponding to the IP address of the first device according to the correspondence between the IP address of the first device and the first key and the first device, or to determine the first key corresponding to the identifier of the first device according to the correspondence between the identifier of the first device included in the UDP power outage warning message and the first key and the first device.

[0151] It should be noted that in this embodiment of the present application, the division into units is an example and merely a logical division of functions. In actual implementation, other division schemes may be used. The functional units in the embodiment of the present application may be integrated into one processing unit, each unit may exist physically alone, or two or more units may be integrated into one unit. The integrated unit may be implemented in the form of hardware or in the form of a software functional unit.

[0152] When the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, the integrated unit may be stored in a computer-readable storage medium. Based on this understanding, an essential part of the technical solution of the present application, a part that contributes to the prior art, or all or part of the technical solution may be implemented in the form of a software product. The software product is stored in a storage medium and includes some instructions for instructing a computer device (which may be a personal computer, a server, or a network device) or a processor to perform all or some steps of the methods described in the embodiments of this specification. The above-mentioned storage medium includes any medium capable of storing program code, such as a USB flash drive, a removable hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.

[0153] Based on the above embodiment, an embodiment of the present application further provides a device power outage warning device. See FIG. 7. The device power outage warning device 700 may include a communication interface 701 and a processor 702. Optionally, the device power outage warning device 700 may further include a memory 703. The memory 703 may be disposed inside the device power outage warning device 700 or may be disposed outside the device power outage warning device 700. The processor 702 may control the communication interface 701 to receive and transmit packets, information, messages, data, etc.

[0154] Specifically, the processor 702 may be a central processing unit (CPU), a network processor (NP), or a combination of a CPU and an NP. The processor 702 may further include a hardware chip. The hardware chip may be an application-specific integrated circuit (ASIC), a programmable logic device (PLD), or a combination thereof. The PLD may be a complex programmable logic device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL), or any combination thereof.

[0155] The communication interface 701, the processor 702, and the memory 703 are connected to each other. Optionally, the communication interface 701, the processor 702, and the memory 703 are connected to each other via a bus 704. The bus 704 may be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The bus may be classified into an address bus, a data bus, a control bus, etc. For ease of representation, only one thick line is used in the representation of FIG. 7, but this does not mean that there is only one bus or only one type of bus.

[0156] In an optional implementation, the memory 703 is configured to store a program or the like. Specifically, the program may include program code, and the program code includes computer operation instructions. The memory 703 may include RAM or may further include non-volatile memory, for example, one or more magnetic disk memories. The processor 702 executes an application stored in the memory 703 to implement the functions of the device power outage warning device 700.

[0157] For example, the device power outage warning apparatus 700 may be the first device in the above-described embodiment or the network manager in the above-described embodiment.

[0158] In one embodiment, when the device power outage warning device 700 performs the functions of the first device in the above-described method embodiment, the communication interface 701 may implement the receiving and transmitting operations performed by the first device in the above-described method embodiment, and the processor 702 may implement other operations other than the receiving and transmitting operations performed by the first device in the above-described method embodiment. For detailed related descriptions, please refer to the related descriptions in the above-described embodiment. Details will not be described again here.

[0159] In another embodiment, when the device power outage warning device 700 performs the function of the network manager in the above method embodiment, the communication interface 701 may perform the receiving and transmitting operations performed by the network manager in the above method embodiment, and the processor 702 may perform other operations than the receiving and transmitting operations performed by the network manager in the above method embodiment. For detailed related descriptions, please refer to the related descriptions in the above embodiment. Details will not be described again here.

[0160] Based on the above-mentioned embodiment, an embodiment of the present application provides a system, which may include the first device, the network manager, etc. in the above-mentioned embodiment.

[0161] An embodiment of the present application further provides a computer-readable storage medium configured to store a computer program, which, when executed by a computer, can cause the computer to implement the device power outage warning method provided in the above-mentioned method embodiment.

[0162] An embodiment of the present application further provides a computer program product, which is configured to store a computer program, which, when executed by a computer, can cause the computer to implement the device power outage warning method provided in the above method embodiment.

[0163] An embodiment of the present application further provides a chip including a processor, coupled to a memory and configured to invoke a program in the memory, such that the chip implements the device power outage warning method provided in the aforementioned method embodiment.

[0164] An embodiment of the present application further provides a chip, wherein the chip is coupled to a memory, and the chip is configured to implement the device power failure warning method provided in the above method embodiment.

[0165] Those skilled in the art will understand that the embodiments of the present application may be provided as a method, a system, or a computer program product. Thus, the present application may take the form of a hardware-only embodiment, a software-only embodiment, or an embodiment having a combination of software and hardware. In addition, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk memory, CD-ROM, optical memory, etc.) containing computer-usable program code.

[0166] The present application has been described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to the present application. It should be understood that computer program instructions can be used to implement each process and / or each block in the flowcharts and / or block diagrams, and combinations of processes and / or blocks in the flowcharts and / or block diagrams. These computer program instructions may be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or some other programmable data processing device to create a machine, such that the instructions executed by the processor of the computer or some other programmable data processing device create an apparatus that implements the specified functionality in one or more processes in the flowcharts and / or one or more blocks in the block diagrams.

[0167] These computer program instructions may be stored in a computer-readable memory that can instruct a computer or any other programmable data processing device to act in a particular manner, such that the instructions stored in the computer-readable memory create an artifact that includes an instruction apparatus that implements the specific functions of one or more processes in the flowcharts and / or one or more blocks in the block diagrams.

[0168] The computer program instructions may alternatively be loaded into a computer or other programmable data processing device and performed on the computer or other programmable device to produce a sequence of operations and steps that result in a computer-implemented process. Thus, the instructions that execute on the computer or other programmable device provide steps for implementing a particular function in one or more procedures of the flowcharts and / or one or more blocks of the block diagrams.

[0169] It is apparent that those skilled in the art can make various modifications and variations to this application without departing from the scope of this application. This application is intended to cover these modifications and variations of this application as long as they fall within the scope of protection defined by the following claims and their equivalents. [Explanation of symbols]

[0170] 600 Device Power Outage Alarm 601 Communication Unit 602 Processing Unit 700 Device Power Outage Alarm 701 Communication Interface 702 processor 703 memory 704 Bus

Claims

1. determining, by the first device, a User Datagram Protocol (UDP) power outage warning message; buffering, by the first device, the UDP power outage warning message; sending, by the first device, the UDP power outage warning message to a network manager after a power outage interruption; A device power outage warning method comprising:

2. The step of buffering the UDP power outage warning message by the first device includes: buffering, by the first device, the UDP power outage warning message in a kernel mode of the first device; 2. The method of claim 1, comprising:

3. The step of buffering the UDP power outage warning message in the kernel mode of the first device by the first device includes: buffering the UDP power outage warning message in the kernel mode of the first device using one of the following methods: completing user and kernel data transfer ( / netlink), writing to a process file system ( / procfs), writing a kernel control parameter ( / sysctl), or reading a kernel file ( / sysfs).

3. The method of claim 2, comprising:

4. The step of sending the UDP power outage warning message to the network manager by the first device includes: sending, by the first device, the UDP power outage warning message to the network manager according to a priority of the UDP power outage warning message; 4. The method of claim 1, comprising:

5. The step of sending the UDP power outage warning message to the network manager by the first device includes: sending, by the first device, the UDP power outage warning message from the kernel mode of the first device to a forwarding plane system of the first device; sending, by the first device, the UDP power outage warning message to the network manager via the forwarding plane system; 4. The method of claim 2 or 3, comprising:

6. sending, by the first device, the UDP message to the network manager via the forwarding plane system; sending, by the first device, the UDP power outage warning message to the network manager via the forwarding plane system according to a priority of the UDP power outage warning message; 6. The method of claim 5, comprising:

7. The method of claim 4 or 6, wherein the priority of the UDP power outage warning message is higher than the transmission priority of some or all messages other than the UDP power outage warning message.

8. The method of claim 4, 6, or 7, wherein the priority of the UDP power outage warning message is a Differentiated Services Code Point DSCP priority or a Virtual Local Area Network VLAN priority.

9. Prior to the step of determining, by the first device, the UDP power outage warning message, the method further comprises: loading, by the first device, a first program into the kernel mode of the first device, the first program being used to trigger at least one of the following processes: sending the UDP power outage warning message according to the power outage interrupt; buffering the UDP power outage warning message; or associating power outage interrupt handling with the power outage interrupt; 7. The method of any one of claims 2 and 3 or 5 and 6, further comprising:

10. The step of determining, by the first device, the UDP power outage warning message includes: determining, by the first device, the UDP power outage warning message based on a UDP port number of the first device, a source Internet Protocol IP address, a destination IP address, and a UDP port number of the network manager, the source IP address and the destination IP address being used for a connection between the network manager and the first device; 10. The method of any one of claims 1 to 9, comprising:

11. The method of claim 10 , wherein the UDP port number of the network manager is received by the first device from the network manager, or the UDP port number of the network manager is preset.

12. The method comprises: receiving, by the first device, a first key from the network manager; encrypting, by the first device, the UDP power outage warning message based on the first key; 12. The method of any one of claims 1 to 11, further comprising:

13. The method of claim 12 , wherein the first key is generated based on a random number or based on an identifier of the first device.

14. The step of buffering the UDP power outage warning message by the first device includes: buffering, by the first device, the UDP power outage warning message after the first device establishes a connection to the network manager; or buffering, by the first device, the UDP power outage warning message after a reconnection due to a change in IP address of the first device and / or the network manager; or periodically buffering the UDP power outage warning message by the first device.

14. The method of any one of claims 1 to 13, comprising:

15. The method of claim 1 , wherein the UDP power outage warning message includes the identifier of the first device.

16. receiving, by a network manager, a User Datagram Protocol (UDP) power outage alert message from the first device; determining, by the network manager, according to the UDP power outage alert message, that a power outage has occurred in the first device; A device power outage warning method comprising:

17. sending, by the network manager, a UDP port number of the network manager to the first device, the UDP port number of the network manager being used by the first device to determine the UDP power outage warning message; 17. The method of claim 16, further comprising:

18. sending, by the network manager, a first key to the first device, the first key being used to encrypt the UDP power outage warning message; 18. The method of claim 16 or 17, further comprising:

19. generating, by the network manager, the first key based on a random number; or generating, by the network manager, the first key based on an identifier of the first device; 20. The method of claim 18, further comprising:

20. recording, by the network manager, a correspondence between the first key and the first device; 20. The method of claim 18 or 19, further comprising:

21. The correspondence between the first key and the first device is: a correspondence between the first key and the IP address of the first device; or a correspondence between the first key and the identifier of the first device; 21. The method of claim 20, comprising:

22. determining, by the network manager, the first key corresponding to the first device according to the correspondence between the first key and the first device; decrypting, by the network manager, the UDP power outage warning message based on the first key; 22. The method of claim 20 or 21, further comprising:

23. determining, by the network manager, the first key corresponding to the first device according to the correspondence between the first key and the first device, determining, by the network manager, the first key corresponding to the IP address of the first device according to the IP address of the first device and the correspondence between the first key and the first device; or determining, by the network manager, the first key corresponding to the identifier of the first device according to the identifier of the first device included in the UDP power outage warning message and the correspondence between the first key and the first device; 23. The method of claim 22, comprising:

24. A device power failure warning device comprising a module or unit configured to carry out the method according to any one of claims 1 to 15.

25. A device power failure warning device comprising a module or unit configured to carry out the method of any one of claims 16 to 23.

26. A device power outage warning device comprising a processor and a communication interface, the communication interface is configured to receive and send messages; The processor is coupled to a memory and configured to invoke computer instructions in the memory via the communication interface to perform the method of any one of claims 1 to 15. Device power outage alarm.

27. A device power outage warning device comprising a processor and a communication interface, the communication interface is configured to receive and send messages; The processor is coupled to a memory and configured to invoke computer instructions in the memory via the communication interface to perform the method of any one of claims 16 to 23. Device power outage alarm.

28. 26. A computer-readable storage medium storing computer-executable instructions that, when invoked by a computer, perform the method of any one of claims 1 to 15 or any one of claims 16 to 23.

29. 24. A computer program product comprising instructions which, when run on a computer, cause the method of any one of claims 1 to 15 or the method of any one of claims 16 to 23 to be performed.

30. A chip, the chip being coupled to a memory and configured to read and execute program instructions stored in the memory, for implementing the method of any one of claims 1 to 15 or the method of any one of claims 16 to 23.