Power management method and device

By configuring traversal instructions and tasks for the cycle time wheel, the problem of network equipment being powered off or abnormally cannot be triggered, and high-reliability power management and wireless timing functions are achieved.

CN119440211APending Publication Date: 2025-02-14HANGZHOU HONYAR INTELLIGENCE TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411490620.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-24
Publication Date
2025-02-14

AI Technical Summary

Technical Problem

In the prior art, when a network device is powered off or the network is abnormal, the timing function cannot be triggered, resulting in unreliable power management.

Method used

By configuring traversal instruction trigger conditions, time calibration tasks and timing tasks for the time nodes of the cyclic time wheel, ensure that time calibration and timing tasks are performed at the appropriate time, and avoid network abnormalities affecting the timing function.

Benefits of technology

Wireless timing management is realized, the reliability and efficiency of power management are improved, and the equipment is accurately turned on or off at a predetermined time.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119440211A_ABST
    Figure CN119440211A_ABST
Patent Text Reader

Abstract

The invention discloses a power management method and device, and belongs to the technical field of power management, and the method comprises the steps: S1, configuring a traversal instruction triggering condition, a time calibration task and a timing task for a time node of a cycle time wheel; s2, judging whether a traversal instruction triggering condition of a cycle time wheel is reached or not; when a traversal instruction triggering condition is reached, executing S3, otherwise, executing S2; and S3, receiving and executing the time calibration task through the power management equipment, synchronizing the local time with the network time, then matching the execution time of the timing task, and triggering the timer to execute the timing task. According to the scheme, the time node of the cycle time wheel configures the traversal instruction triggering condition, the time calibration task and the timing task, the power management device receives and executes the time calibration task when the traversal instruction triggering condition is met, then the timing task is executed, timing management can be carried out on the power supply of the electrical equipment, and the power management efficiency is improved. And the reliability of power management is obviously improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of power management, and in particular to a power management method and device. Background Art

[0002] Office electrical equipment such as personal computers, servers, and network equipment need to be shut down and powered off when not in use for a long period of time in order to save electricity and protect network security. In order to save energy and improve production efficiency, the above equipment needs to be turned on in advance so that it can enter the standby state when people use it.

[0003] The existing processing technology mainly relies on manual power on and off, or on and off the power supply through the device's own timed scheduled tasks. The manual power on and off method requires users to strengthen the energy conservation and emission reduction concept. If it is to be continuously implemented, it is necessary to give play to human subjective initiative. And because the power on needs to be manually triggered, the user needs to wait for the device to be in the standby state. Therefore, most of them use the timed scheduled tasks to execute the power on and off. However, the timed scheduled tasks require users to have a certain system operation foundation. In addition, the device is actually in the standby state, and the power supply is not cut off. It is still in a high power consumption state, and the effect of saving electricity is not achieved. It can only switch the power supply of the electrical equipment, but cannot make the equipment enter an effective working state when it is turned on, and cannot achieve the power off of the electrical equipment when it is turned off. On the basis of manual power on and off, smart devices with timing functions can be used to assist in powering on and off. However, on the one hand, such smart devices may ignore the timed shutdown trigger time and fail to save data normally to shut down the system, resulting in data loss or equipment system damage when the power is directly cut off. On the other hand, the use of network servers for timing is to perform timed power on and off by executing the timed task instructions issued by the cloud to which the smart device is connected. However, since the network server may have network anomalies, the timed task cannot reach the corresponding electrical equipment, resulting in the failure of the timed task. Summary of the invention

[0004] The purpose to be achieved by the present invention is to provide a power management method and device to solve the problem that the timing function cannot be triggered due to power failure of network equipment or network anomaly of the network service provided in the prior art. By configuring the traversal instruction trigger condition, time calibration task and timing task for the time node of the cyclic time wheel, the time calibration task can be received and executed by the power management device when the traversal instruction trigger condition is met, and then the timer is triggered to execute the timing task after matching the time of the timing task, so as to perform timing management on the power supply of the electrical equipment. By controlling the trigger timer to directly execute the timing task, the problem that the timing function cannot be triggered due to power failure of the network equipment or network anomaly can be avoided, wireless timing is realized, and the reliability of power management is significantly improved.

[0005] In order to achieve the above object, the present invention adopts the following technical solutions: In a first aspect, the present invention provides a power management method, comprising the following steps: S1, configure the traversal instruction triggering conditions, time calibration tasks and timing tasks for the time nodes of the cyclic time wheel; S2, determine whether the traversal instruction triggering condition of the loop time wheel is reached; if the traversal instruction triggering condition is reached, execute S3, otherwise execute S2; S3. After receiving and executing the corresponding time calibration task, the power management device executes the timing task.

[0006] In the above technical scheme, by configuring the traversal instruction trigger conditions for the time nodes of the cyclic time wheel, efficient time calibration and scheduled task management can be achieved, and the system's precise control over time is improved; by determining whether the traversal instruction trigger conditions of the cyclic time wheel are reached, it is ensured that the time calibration task is executed at the appropriate time, so that the local time is synchronized with the network time, and then the execution time of the scheduled task is matched. After the matching is completed, the scheduled task is executed through the timer, which can avoid the problem of not being able to trigger the timing function due to power failure of the network device or network abnormality, thereby improving the accuracy and reliability of task triggering; by receiving and executing the time calibration task under the trigger condition, the real-time calibration of the system time is ensured, the accuracy of time synchronization is improved, and the scheduled task is executed immediately after the time calibration task is executed, so as to achieve smooth connection between tasks and improve the reliability and efficiency of power management.

[0007] Preferably, S1 comprises the following steps: S11, obtaining the time configuration node corresponding to the timer to build a cyclic time wheel; S12, constructing a device traversal task list, and configuring instruction trigger conditions, timed tasks, and time calibration tasks for the traversal columns in the device traversal task list; S13. Configure a time configuration node for the traversal column based on the traversal instruction trigger condition.

[0008] In the above technical scheme, a cyclic time wheel is constructed by obtaining the time configuration node class of the timer, configuring the instruction trigger conditions, scheduled tasks and time calibration tasks for the device traversal task list, and configuring the time configuration node for the traversal column. This improves the construction efficiency of the cyclic time wheel, provides support for the flexible management of the device traversal task list, makes the association between the time configuration node and the traversal column clearer, enables time management and task scheduling, and improves the efficiency of power management.

[0009] Preferably, the traversal instruction triggering condition includes executing the scheduled tasks and time calibration tasks in the traversal column when the network time of the network server is consistent with the time of the time configuration node; The configuring of the time configuration node for the traversal column based on the traversal instruction trigger condition includes: When the triggering conditions of the traversal instruction are met, all traversal columns of the current time configuration node are retrieved to obtain the scheduled tasks and time calibration tasks corresponding to the traversal columns.

[0010] In the above technical scheme, the traversal instruction trigger condition is based on the consistency of network time and time configuration node time, so as to realize intelligent triggering of task execution, ensure the execution of scheduled tasks and time calibration tasks at the appropriate time, and improve the intelligence of the system; based on the traversal instruction trigger condition, the time configuration node is configured for the traversal column, so as to realize the timing synchronization management of the scheduled tasks and time calibration tasks of all traversal columns under the current time configuration node, and ensure the execution of tasks according to the scheduled time.

[0011] Preferably, S3 comprises the following steps: S31, determining the electrical device corresponding to the local time of the current electrical device, and sending the time calibration task and the timing task to the electrical device at the same time; S32, calibrating the local time of the current electrical device through the time calibration instruction in the time calibration task and the network time, so that the local time is synchronized with the network time; S33, matching the shutdown time in the scheduled task through the time manager, and triggering the timer to execute the shutdown instruction in the scheduled task when the shutdown time arrives; S34, matching the power-on time in the scheduled task through the time manager, and triggering the timer to execute the power-on instruction in the scheduled task when the power-on time arrives.

[0012] In the above technical scheme, by calibrating the time of electrical equipment at the same time and issuing scheduled tasks, it is ensured that the equipment performs shutdown and startup operations as planned; through the execution of shutdown and startup instructions, precise control of the power supply of the equipment is achieved, the reliability of power management is improved, and time calibration and task execution can be effectively coordinated, thereby improving the coordination and efficiency of the system.

[0013] Preferably, the S33 comprises the following steps: S331, matching the shutdown time of the scheduled task with the time manager of the power management device, and determining that the shutdown time has arrived when the local time and the shutdown time are the same; S332, when the shutdown time arrives, issuing a shutdown instruction to the electrical device based on the timer in the power management device; S333, judging whether the system has been shut down based on the connection status of the electrical equipment; S334: If the system has been shut down, a disconnection instruction is sent to a corresponding circuit of the electrical device connected to the power management device based on a timer in the power management device to cut off the power supply of the electrical device.

[0014] In the above technical solution, the shutdown operation is ensured to be executed accurately at the shutdown time point, and by detecting the connection status of the electrical equipment, it is avoided to send a disconnect command when the device has not shut down the system, thereby improving the accuracy and safety of the shutdown operation, ensuring that the system completes the necessary operations before shutting down the device, and helping to prevent unnecessary data loss or system errors.

[0015] Preferably, the S34 comprises the following steps: S341, matching the startup time of the scheduled task based on the time manager of the power management device, and determining that the startup time has arrived when the local time and the startup time are the same; S342, when the shutdown time is reached, sending a pull-in instruction to the circuit connected to the electrical device through the timer in the power management device to turn on the power of the electrical device; S343, the power management device starts the electrical device based on the network adapter, and Device to electricity The gas equipment issues a start-up command.

[0016] In the above technical scheme, the arrival of the power-on time is determined by the matching mechanism of the time manager to ensure that the power-on operation is accurately performed at the power-on time point, thereby improving the accuracy of the power-on operation; by sending a pull-in instruction to the circuit connected to the electrical equipment, precise control of the power supply is achieved to ensure that the power supply of the electrical equipment is reliably turned on when the power is turned on, thereby improving the reliability and safety of the power-on operation; the electrical equipment is started by means of a network adapter, and a power-on instruction is sent to the electrical equipment, thereby achieving safe startup of the equipment, helping to prevent unauthorized equipment startup and improving the security of the system.

[0017] Preferably, S3 comprises the following steps: Sending a time calibration task and a timing task corresponding to the local time of the current electrical device to the current electrical device, and sending a time calibration task corresponding to the local time of the next electrical device to the next electrical device; Calibrate the local time of the current electrical device using the time calibration instruction in the time calibration task corresponding to the local time of the current electrical device and the network time; Matching the shutdown time and the startup time in the scheduled task based on the time manager in the power management device, executing the shutdown instruction in the scheduled task when the calibrated local time reaches the shutdown time, and executing the startup instruction in the scheduled task when the calibrated local time reaches the startup time; The local time of the next electrical device is calibrated based on the time calibration instruction in the time calibration task corresponding to the local time of the next electrical device and the network time.

[0018] In the above technical scheme, by sending the time calibration task and the timing task corresponding to the local time of the current electrical device to the current electrical device, and sending the time calibration task corresponding to the local time of the next electrical device to the next electrical device, time-sharing management of multiple devices is realized, and the efficiency of power management is improved; the local time of the current electrical device is calibrated by the time calibration instruction and network time in the time calibration task corresponding to the local time of the current electrical device, ensuring the accuracy and synchronization of the device time and preventing problems caused by time errors; based on the time manager matching the shutdown time and startup time in the timing task, precise control of the device at the shutdown and startup time points is realized; based on the time calibration instruction and network time in the time calibration task corresponding to the local time of the next electrical device, the local time of the next electrical device is calibrated, providing an accurate time reference for the timing task preparation of the next electrical device, ensuring the continuity and stability of the system.

[0019] In a second aspect, the present invention further provides a power management device, the device comprising a communication unit, a time manager and a task processing unit; The communication unit is used for communicating with the time server, receiving network time and calibrating local time; The time manager is used to process the timing time and trigger the timer event; The task processing unit is used to send scheduled tasks to electrical equipment.

[0020] In the above technical scheme, the communication unit communicates with the time server, receives the network time, and uses the time manager to calibrate the local time to ensure that the time in the system is accurate, which helps to maintain the time consistency between devices and prevent problems caused by time errors; the time manager and the task processing unit work together to process the timing time, trigger the timer event, and issue the timing task to the electrical equipment, so that the equipment can perform the power on and off operations according to the predetermined schedule, thereby improving the automation management level of the system; the communication unit is responsible for communicating with the time server and has the ability to obtain the network time, which increases the system's adaptability to external time sources and helps to maintain time synchronization in different network environments; the task processing unit can issue the timing task to the electrical equipment, thereby realizing the remote management of the equipment.

[0021] Preferably, the communication unit comprises: A connection module, used for communication connection between the power management device and the time server; A receiving module, used for receiving network time from a time server; The calibration module is used to calibrate the local time.

[0022] In the above technical scheme, the connection module is responsible for the communication connection between the power management device and the time server, which can ensure a stable communication connection and accurately obtain the network time, thereby ensuring time synchronization in the system; the receiving module is used to receive the network time from the time server, ensuring that the system can obtain the external time source in a timely and accurate manner and maintain the time consistency between devices; the calibration module is used to calibrate the local time, and the network time received from the time server is compared and calibrated with the local time to ensure that the local time of the device is synchronized with the external time source and improve the accuracy of the time; the design of the connection module and the receiving module helps to improve the anti-interference ability of the communication unit; dividing the connection, reception and calibration functions into different modules helps to achieve a fast and effective time calibration process and can ensure that the system synchronizes time in a short time.

[0023] Preferably, the processing of the scheduled time is performed by traversing the scheduled task list when the local time after the query time manager is started is the calibrated time, and inserting the scheduled time of the scheduled task into the cyclic time wheel corresponding to the time manager; The trigger timer event periodically matches the time nodes on the ring time wheel and sends an event notification to the scheduled task corresponding to the matched timing time.

[0024] In the above technical solution, by querying whether the local time after the time manager is started is the calibrated time, it is ensured that the operation is based on the accurate time when processing the scheduled task after startup, avoiding the execution error of the scheduled task caused by the inaccurate local time at startup, and by traversing the scheduled task list and inserting the scheduled time of each scheduled task into the circular time wheel corresponding to the time manager, the efficient management of the scheduled task is realized, ensuring that it is triggered at the correct time point, and improving the stability and reliability of the device; by periodically matching the time nodes on the circular time wheel, the occurrence of the scheduled event can be detected quickly and efficiently, and the real-time nature of the triggering is improved. Sending event notifications to the scheduled task corresponding to the matched scheduled time ensures that the scheduled task can be triggered at a precise time point, further improving the accuracy of the scheduled task, and adopting the design of the circular time wheel to support the triggering of periodic tasks, which is helpful for processing scheduled tasks that need to be repeatedly executed within a fixed time interval, and increasing the flexibility of the device.

[0025] The beneficial effects of the present invention are as follows: accurate time calibration and scheduled task management are achieved by configuring the time nodes of the cyclic time wheel, thereby improving the system's control accuracy over time; determining the traversal triggering conditions ensures that tasks are executed at appropriate times, thereby enhancing the accuracy of task triggering; receiving and executing time calibration tasks ensures real-time calibration, and immediately executing scheduled tasks improves task connectivity, thereby improving the reliability and efficiency of power management; constructing a cyclic time wheel by acquiring timer configuration, configuring a device traversal task list improves construction efficiency, supports flexible management of the device traversal task list, and improves the efficiency of power management; the device traversal task list comprehensively manages the device, and the execution of task triggering based on network time enhances intelligence; a rich set of task types can be configured to adapt to different needs, thereby realizing the timing synchronization management of tasks and ensuring that tasks are executed as planned; simultaneously performing time calibration and issuing scheduled tasks ensures that the device executes operations as planned, and that shutdown operations are accurate and safe, thereby avoiding unnecessary data loss or system system errors; determining the time-sharing management of multiple devices improves the efficiency of power management, ensures the accuracy and synchronization of device time, realizes precise control of the device at the shutdown and startup time points, and ensures the continuity and stability of the system; communicates with the time server through the communication unit, uses the time manager to calibrate the local time, can synchronize the local time with the network time, maintain the consistency of device time, and the collaborative time manager and task processing unit improve the level of system automation management, increase the adaptability to external time sources, and realize remote management of devices; the connection module ensures a stable communication connection, the receiving module obtains accurate network time from the time server, and the calibration module improves time accuracy. The design helps to improve the anti-interference ability of the communication unit, and the division of functional modules helps to quickly and effectively calibrate the time, ensuring that the system synchronizes time in a short time; the local time after querying the startup and the efficient management of the cyclic time wheel improve the stability and reliability of the system.

[0026] The above invention content is only an overview of the technical solution of the present invention. In order to more clearly understand the technical means of the present invention, it can be implemented according to the contents of the specification. In order to make the above and other purposes, features and advantages of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are listed below. BRIEF DESCRIPTION OF THE DRAWINGS

[0027] Other features, objects and advantages of the present invention will become more apparent by reading the detailed description of non-limiting embodiments made with reference to the following drawings. The drawings are only for the purpose of illustrating preferred embodiments and are not to be considered as limiting the present invention. Also, the same reference symbols are used throughout the drawings to represent the same parts.

[0028] Figure 1 This is a flow chart of a power management method according to Embodiment 1 of the present invention; Figure 2A schematic diagram of a power management implementation environment of Embodiment 1 of the present invention; Figure 3 This is a schematic diagram of a time manager and a scheduled task list in Example 1 of the present invention; Figure 4 This is a detailed flow chart of a power management method according to Embodiment 1 of the present invention. DETAILED DESCRIPTION

[0029] In order to make the objectives, technical solutions and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific implementation method described herein is only an optimal embodiment of the present invention, which is only used to explain the present invention and does not limit the scope of protection of the present invention. All other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.

[0030] Before discussing the exemplary embodiments in more detail, it should be mentioned that some exemplary embodiments are described as processes or methods depicted as flow charts. Although the flow charts describe the operations (or steps) as sequential processes, many of the operations (or steps) therein can be implemented in parallel, concurrently, or simultaneously. In addition, the order of the operations can be rearranged. The process can be terminated when its operation is completed, but can also have additional steps not included in the drawings; the process can correspond to a method, function, procedure, subroutine, subprogram, etc.

[0031] Example: like Figure 1 As shown, a power management method comprises the following steps: S1. Configure traversal instruction trigger conditions, time calibration tasks and timing tasks for the time nodes of the cyclic time wheel.

[0032] Specifically, S1 includes the following steps: S11, obtaining the time configuration node corresponding to the timer to build a cyclic time wheel; S12, constructing a device traversal task list, and configuring instruction trigger conditions, timed tasks, and time calibration tasks for the traversal columns in the device traversal task list; S13. Configure a time configuration node for the traversal column based on the traversal instruction trigger condition.

[0033] In this embodiment, a cyclic time wheel is constructed by obtaining the time configuration node class of the timer, configuring the instruction trigger conditions, scheduled tasks and time calibration tasks for the device traversal task list, configuring the time configuration node for the traversal column, improving the construction efficiency of the cyclic time wheel, providing support for the flexible management of the device traversal task list, making the association between the time configuration node and the traversal column clearer, enabling time management and task scheduling, and improving the efficiency of power management.

[0034] S2, determine whether the traversal instruction triggering condition of the loop time wheel is reached; if the traversal instruction triggering condition is reached, execute S3, otherwise execute S2.

[0035] Specifically, the triggering conditions of the traversal instruction include executing the scheduled tasks and time calibration tasks in the traversal column when the network time of the network server is consistent with the time of the time configuration node; The configuration nodes for configuring the time for the traversal column based on the traversal instruction trigger conditions include: When the triggering conditions of the traversal instruction are met, all traversal columns of the current time configuration node are retrieved to obtain the scheduled tasks and time calibration tasks corresponding to the traversal columns.

[0036] In this embodiment, the traversal instruction trigger condition is based on the consistency of network time and time configuration node time, realizes intelligent triggering of task execution, ensures that scheduled tasks and time calibration tasks are executed at the appropriate time, and improves the intelligence of the system; based on the traversal instruction trigger condition, the time configuration node is configured for the traversal column, and the timing synchronization management of the scheduled tasks and time calibration tasks of all traversal columns under the current time configuration node is realized, ensuring that the tasks are executed at the scheduled time.

[0037] S3. Receive and execute the time calibration task through the power management device to synchronize the local time with the network time, and then match the execution time of the scheduled task to trigger the timer to execute the scheduled task.

[0038] Specifically, S3 includes the following steps: S31, determining the electrical device corresponding to the local time of the current electrical device, and sending the time calibration task and the timing task to the electrical device at the same time; S32, calibrating the local time of the current electrical device through the time calibration instruction in the time calibration task and the network time, so that the local time is synchronized with the network time; S33, matching the shutdown time in the scheduled task through the time manager, and triggering the timer to execute the shutdown instruction in the scheduled task when the shutdown time arrives; S34, matching the power-on time in the scheduled task through the time manager, and triggering the timer to execute the power-on instruction in the scheduled task when the power-on time arrives.

[0039] In this embodiment, by simultaneously calibrating the time of electrical equipment and issuing scheduled tasks, it is ensured that the equipment performs shutdown and startup operations as planned; through the execution of shutdown and startup instructions, precise control of the power supply of the equipment is achieved, the reliability of power management is improved, and time calibration and task execution can be effectively coordinated, thereby improving the coordination and efficiency of the system.

[0040] Specifically, S33 includes the following steps: S331, matching the shutdown time of the scheduled task with the time manager of the power management device, and determining that the shutdown time has arrived when the local time and the shutdown time are the same; S332, when the shutdown time arrives, issuing a shutdown instruction to the electrical device based on the timer in the power management device; S333, judging whether the system has been shut down based on the connection status of the electrical equipment; S334: If the system has been shut down, a disconnection instruction is sent to a corresponding circuit of the electrical device connected to the power management device based on a timer in the power management device to cut off the power supply of the electrical device.

[0041] In this embodiment, the shutdown operation is ensured to be performed accurately at the shutdown time point, and by detecting the connection status of the electrical equipment, it is avoided to send a disconnect command when the device has not shut down the system, thereby improving the accuracy and safety of the shutdown operation, ensuring that the system completes necessary operations before shutting down the device, and helping to prevent unnecessary data loss or system errors.

[0042] Specifically, S34 includes the following steps: S341, matching the startup time of the scheduled task based on the time manager of the power management device, and determining that the startup time has arrived when the local time and the startup time are the same; S342, when the shutdown time is reached, sending a pull-in instruction to the circuit connected to the electrical device through the timer in the power management device to turn on the power of the electrical device; S343. The power management device starts the electrical device based on the network adapter and sends a power-on instruction to the electrical device through a timer.

[0043] In this embodiment, the arrival of the power-on time is determined by the matching mechanism of the time manager to ensure that the power-on operation is accurately performed at the power-on time point, thereby improving the accuracy of the power-on operation; by sending a pull-in instruction to the circuit connected to the electrical equipment, precise control of the power supply is achieved to ensure that the power supply of the electrical equipment is reliably turned on when the power is turned on, thereby improving the reliability and safety of the power-on operation; the electrical equipment is started by means of a network adapter, and a power-on instruction is sent to the electrical equipment, thereby achieving safe startup of the equipment, helping to prevent unauthorized equipment startup and improving the security of the system.

[0044] Specifically, for example, the local time of the current electrical device A is 11:00, and the local time of the current electrical device A corresponds to time calibration task 1 and timing task 1. The time calibration task 1 and timing task 1 are sent to the current electrical device A at the same time, and the local time of the current electrical device A is compared with the real-time time. If the error of the local time of the current electrical device A is less than 5s, the timing task is directly executed based on the local time of the current electrical device A. If the error of the local time of the current electrical device A is greater than 5s, the local time of the current electrical device is calibrated through time calibration task 1, and the corresponding timing task 1 is executed based on the calibrated local time of the current electrical device A. The time manager on the source management device matches the shutdown time of scheduled task 1. For example, if the matched shutdown time of scheduled task 1 is 11:10, the timing starts based on the calibrated local time of the current electrical device. When the local time of the current electrical device reaches 11:10, it is determined that the shutdown time has arrived, and a shutdown command is sent to the current electrical device A through the power management device. After executing the shutdown command, the power management device determines whether the system has been shut down based on the connection status of the current device A. If it is determined that the system has been shut down, a disconnect command is sent to the corresponding circuit a connected to the power management device based on the power management device. Circuit a is disconnected, and the power supply of the current electrical device A is cut off. Then, the startup time of scheduled task 1 is matched through the time manager on the power management device. For example, if the startup time of scheduled task 1 is matched to 11:20, the time calibration task is re-executed based on the local time of the current parent after the startup is completed. After the time calibration task is executed, the timing is restarted based on the calibrated local time of the current parent. When the local time of the current electrical device reaches 11:20, it is determined that the startup time has arrived, and the power management device sends a pull-in instruction to the circuit a connected to the current electrical device A and the power management device, and then the circuit a is pulled in, and the power corresponding to the current electrical device A is turned on. Finally, the power management device starts the current electrical device A based on the network adapter and sends the corresponding startup instruction to the current electrical device A. After executing the time calibration task and the scheduled task of the current electrical device A, when the local time of the next electrical device B is reached, the time calibration task 2 and the scheduled task 2 corresponding to the local time of the next electrical device B are sent to the next electrical device B.

[0045] Specifically, Figure 2 The figure shows a schematic diagram of the power management implementation environment of the present invention, in which the four-way power strip 101 supplies power to the office electrical equipment wireless router 102 and the server 103 through a power adapter; the four-way power strip forms a local area network with the wireless router 102 through a Wi-Fi network, and the server 103 forms a local area network with the wireless router 102 through a wired network; the wireless router 102 and the NTP time server 105 establish communication connection through the Internet 104.

[0046] Specifically, Figure 3The figure shows a schematic diagram of the time manager and the timed task list. When the time synchronization timer is started, the power management device sends a request to the NTP time server to obtain the network time based on the NTP protocol interaction specification. The network time obtained is the time zone time of the area where the power management device is located. If the network time acquisition fails, wait for the time synchronization timer to trigger the event again. If the network time acquisition succeeds, the local time is calibrated to the network time. Determine the corresponding power-on time and power-off time, and construct the power-on instruction and power-off instruction. Set the scheduled task through the power-on time, power-on instruction, power-off time and power-off instruction. Add the obtained scheduled task to the scheduled task list through APP or Web. The scheduled tasks in the scheduled task list 200 all include the following structural information: index, which is used to identify and retrieve the unique number of the scheduled task in the scheduled task list; scheduled time, including: trigger time, the time of the day when the scheduled task is started, which is a 24-hour system; repetition cycle, the frequency of execution of the scheduled task in each week, including single, daily, weekdays, weekends, and a designated day of each week; execution instruction, including: instruction attributes, the operation of office electrical equipment instructions, such as power on and off; instruction parameter 1 and instruction parameter 2, the instruction parameter is the additional parameter of the instruction attribute, and has a sequential execution order.

[0047] Specifically, Figure 4 The figure shows a detailed flow chart of a power management method. When the local time calibration is successful, the scheduled task is started through the power management device, the scheduled task list is checked and the valid scheduled task is added to the local time manager. The storage structure of the local time manager is a ring time wheel, and there are multiple storage cells on the ring time wheel. Each storage cell is used to store the scheduled time of each scheduled task in the scheduled task list and the index corresponding to the scheduled task.

[0048] Specifically, there are 8 nodes on the circular time wheel, numbered from 0 to 7. The calculation formula for storing the scheduled task in the circular time wheel is: storage number = number of minutes from zero % 8, where % means taking the remainder; number of minutes from zero = hours of trigger time * 60 minutes + minutes of trigger time; for example, the trigger time of index 1 is 08:57, and the number of minutes from zero = 08 * 60 + 57 = 537; and because the local time of the current electrical equipment is 10:06 when adding, the trigger time of index 1 has passed. Time, but since the repetition period of the scheduled task of index 1 is every day, the next execution of the scheduled task of index 1 is 24 hours later, so its effective trigger time is 537+24*60=1977. 537%8=1, so the scheduled task of index 1 is stored in the storage cell numbered 1 of the circular time wheel, that is, 1977 minutes. Similarly, since the scheduled task of index 2 is triggered after 10:06, the number of minutes from zero is 1323, which is stored in the storage cell numbered 3. Each storage cell can store multiple scheduled task nodes to form a linked list.

[0049] Specifically, the timing time of a valid scheduled task can be triggered after the local time of the current electrical device. For example, if the local time of the current electrical device is 10:00, if the trigger time in the timing time of the scheduled task is 09:00 and the repetition period is single, then the scheduled task is not a valid scheduled task and will not be added to the local time manager 201.

[0050] Specifically, when the scheduled task list is retrieved and added, the local time manager is started, and the startup method is to set a periodic trigger timer with a period of 1 minute; the local time manager has a time pointer 202 on the ring time wheel, which points to a numbered storage grid, and moves forward one number clockwise when periodically triggered. When the local time manager is started, the initial storage grid number of the local time manager is determined according to the local time at the time of startup. For example, when the local time at the time of startup is 10:06, the calculation method of the storage grid number pointed to is consistent with the storage number of the scheduled task, and the time pointer points to the storage grid number 6.

[0051] Specifically, the local time manager triggers the scheduled arrival event, and the time pointer moves forward one grid clockwise; matching the scheduled time, the local time manager checks whether there is a scheduled task node in the storage grid with the number currently pointed to by the time pointer. If not, it returns and waits for the next trigger of the local time manager; otherwise, the scheduled task is triggered when a match is found. Figure 2In the circular time wheel of the local time manager, when the local time manager moves to the storage cell numbered 1 after multiple timed triggers, it detects that there is a scheduled task with index 1 in the storage cell, but it cannot be executed because only 3 minutes have passed since the start time 10:06, that is, 10:09, and the effective trigger time of the scheduled task with index 1 is 08:57 the next day. Even if it moves to the storage cell numbered 3, the scheduled task with index 2 cannot be executed because the local time is 10:11 at this time, and the effective trigger time of the scheduled task with index 2 is 22:03 on the same day. This involves another calculation parameter: the number of cycles of the circular time wheel. When setting, the effective trigger time of the task is xH in hours and xM in minutes; when adding a scheduled task to the list, the local time is yH in hours and hM in minutes. The number of scheduled task cycles = (xH*60+xM) / 8-(yH*60+yM) / 8, where / represents the integer quotient. Then we get: The number of scheduled task cycles of index 1 = ((8+24)*60)+57) / 8-(10*60+6) / 8 = 247-75 = 172; The number of scheduled task cycles of index 2 = (22*60+3) / 8-(10*60+6) / 8 = 165-75 = 90; Therefore, the principle of whether the matching is consistent is to check whether the number of cycles of the timed task node in the storage cell with the number currently pointed to by the time pointer is > 0. If so, it is reduced by 1, otherwise the matching is successful.

[0052] Specifically, the local time manager retrieves the corresponding scheduled task in the scheduled task list according to the index value of the scheduled task node in the storage cell; according to the trigger time and repetition period of the scheduled task, it recalculates and adds it to the ring time wheel of the local time manager, calls the execution instruction in the scheduled task, and issues instruction parameter 1.

[0053] Specifically, if the command attribute of this scheduled task is shutdown, the command parameter 1 corresponds to the shutdown system command; wherein the shutdown system command includes the physical address of the office electrical equipment and the shutdown command parameter; the shutdown system command is issued in the physical address of the office electrical equipment, and the IP address of the office electrical equipment is searched; wherein the search method is based on the ARP protocol; the power management device establishes communication with the office electrical equipment; wherein the establishment method is based on the TCP protocol; the IP address field in the shutdown command parameter is replaced with the IP address, and the shutdown command parameter is issued; for example, under the network management of the wireless router, the four-way power strip and the server are in the same local area network, wherein the server is the target management office electrical equipment, the physical address of the server is 00:11:22:33:44:55, the operating system running is the Linux system, the remote management user name is: root, and the ssh service port is the default 22. Then in the scheduled task, its shutdown command parameter is: ssh root@IPshutdown-h now. The four-way power strip sends an ARP request frame to search for the IP address corresponding to 00:11:22:33:44:55 in the local area network formed by the wireless router. After receiving the request frame, the server responds with its own IP address if it matches, such as 192.168.1.2; the four-way power strip establishes a TCP connection with the server with port number 22; the four-way power strip encapsulates the SSH protocol data frame based on ssh root@192.168.1.2shutdown-h now and sends it through the TCP socket, and further sends the password corresponding to the root user; after receiving the instruction parameter 1, the server 103 executes the system shutdown action.

[0054] Specifically, the power management device waits for the office electrical equipment to safely shut down the system, wherein the waiting method is that the power management device sends a ping IP command to the office electrical equipment; for example, after the four-way power strip sends instruction parameter 1, it periodically sends the ping 192.168.1.2 command in the local area network. If the server has shut down the system, the ping feedback cannot access the target host, and it is determined that the server has safely shut down the system. The power management device sends instruction parameter 2, wherein instruction parameter 2 refers to sending a disconnect instruction to the corresponding circuit of the office electrical equipment connected to the power management device; for example, if the server is connected to the circuit 4 socket of the four-way power strip, the four-way power strip turns off the relay of circuit 4 to cut off the power supply of the circuit 4 socket; similarly, the four-way power strip turns off the relay of circuit 2 to turn off the wireless router. The wireless router and server of the office electrical equipment have been safely shut down, and only the four-way power strip of the power management device is in working state, waiting for the timing to trigger the power-on operation.

[0055] Specifically, if the command attribute of the scheduled task is to start up, the command parameter 1 corresponds to turning on the power of the office electrical equipment; wherein, the way to turn on the power is to send a pull-in command to the corresponding circuit of the office electrical equipment connected to the power management device; for example, if the wireless router is connected to the circuit 2 socket of the four-way power strip, the four-way power strip sends a pull-in command to the relay corresponding to circuit 2 to turn on the power of the circuit 2 socket; similarly, the four-way power strip turns on the power of circuit 4 corresponding to the server. Waiting for the device to be powered on, the judgment method is that the power management device has obtained an IP address; for example, after turning on the power, the wireless router starts working and establishes a local area network, and the four-way power strip can be assigned an IP address from the wireless router; the server is in standby mode. Sending command parameter 2; the office electrical equipment needs to enable the network wake-up option in the motherboard BIOS, and the network card setting can accept the wake-up data packet. When the office electrical equipment is powered on, it will obtain an IP address from the network device and enter a waiting state for wake-up; the power management device sends instruction parameter 2 to the local area network, wherein the sending method is based on UDP local area network broadcast, and instruction parameter 2 is a wake-up data packet. Furthermore, the format of the wake-up data packet is: 6 pairs of "FF" prefixes + 16 repeated physical addresses; the office electrical equipment will start the system after receiving the wake-up data packet; the power management device waits for the office electrical equipment to start up successfully, wherein the criterion for successful startup is the success of the pingIP command; for example, a four-way power strip encapsulates a UDP broadcast data frame, and the frame content is: 6 pairs of "FF" prefixes + 16 repeated server physical addresses, which need to be converted to binary format for transmission; all devices in the local area network formed by the wireless router will receive the data frame, and only the server will successfully match the data frame and start the system; when the server system is started, the four-way power strip can successfully ping the server's IP address, so that the server enters normal working state.

[0056] In this embodiment, the Wi-Fi network, the server and the wireless router form a local area network through a wired network. The formed local area network does not need an external network server to provide a network to trigger the timer to execute the timing task, and by cooperating with the network card in the wake-up device of the office equipment, it can realize the safe and timed opening or closing of the system and power supply of office electrical equipment including network equipment, servers, etc., which can solve the problem that the office electrical equipment cannot be turned on and off on time because the network equipment is turned off. It can realize the fully automated operation of powering on, starting the power supply of the equipment, starting the operating system, shutting down the operating system, and powering off. In the environment of multiple office equipment, such as routers and computers, by setting multiple timed tasks, the routers and computers are started in sequence and delayed respectively, and the switching from no electricity and no network to network is realized. When the electrical equipment is turned on, it can enter the normal working state, and when the electrical equipment is controlled, the power supply of the electrical equipment can be effectively disconnected.

[0057] The beneficial effects of this embodiment are as follows: by timing the triggering of safe shutdown of electrical equipment and cutting off the power supply, and timing the power supply to turn on and start the office electrical equipment to enter the standby state during the period without network service, the system and power supply of the electrical equipment can be safely turned on or off at a scheduled time, and the situation that the scheduled switching of office electrical equipment cannot be performed due to network abnormalities, and the inefficiency caused by the need for a combination of multiple means is solved, which significantly improves the efficiency of power management; and can avoid the loss of data or damage to the equipment system when the power is directly cut off due to ignoring the scheduled shutdown trigger time and shutting down the system without saving data normally.

[0058] Embodiment 2: It can be understood that in order to improve the efficiency of power management, the time calibration task and the timing task can be sent to the corresponding electrical equipment in a time-sharing manner. When the timing task is sent to the electrical equipment of the local time of the current electrical equipment, the time calibration task of the local time of the next electrical equipment is sent to the electrical equipment corresponding to the local time of the next electrical equipment at the same time, and the timing task of the local time of the current electrical equipment and the time calibration task of the local time of the next electrical equipment are executed at the same time. When executing the timing task of the local time of the next electrical equipment, there is no need to calibrate the time again. Therefore, S3 includes the following steps: Sending the time calibration task and the timing task corresponding to the local time of the current electrical device to the current electrical device, and sending the time calibration task corresponding to the local time of the next electrical device to the next electrical device; Calibrate the local time of the current electrical device using the time calibration instruction in the time calibration task corresponding to the local time of the current electrical device and the network time; Matching the shutdown time and the startup time in the scheduled task based on the time manager in the power management device, executing the shutdown instruction in the scheduled task when the calibrated local time reaches the shutdown time, and executing the startup instruction in the scheduled task when the calibrated local time reaches the startup time; The local time of the next electrical device is calibrated based on the time calibration instruction in the time calibration task corresponding to the local time of the next electrical device and the network time.

[0059] Specifically, for example, the local time of the current electrical device A is 11:00, and the local time of the next electrical device B is 11:30, the time calibration task 1 and the timing task 1 corresponding to the local time of the current electrical device A are sent to the current electrical device A, and the time calibration task 2 corresponding to the local time of the next electrical device B is sent to the next electrical device B. The error between the local time of the current electrical device A and the real-time time is determined according to the local time obtained. If the error is less than 5s, there is no need to calibrate the local time of the current electrical device A, and the timing task of the current electrical device A is executed based on the current local time. If the error is greater than 5s, the time calibration task 1 is executed to calibrate the local time of the current electrical device A, and the timing task of electrical device A is executed according to the calibrated local time. The shutdown time in scheduled task 1 is matched through the time manager in the power management device. If the shutdown time is 11:10, the shutdown command of the current electrical device A is executed when the local time of the current electrical device A is matched to 11:10; if the startup time is 11:20, the shutdown command of the current electrical device A is executed when the local time of the current electrical device A is matched to 11:20. When executing the time calibration task and the scheduled task of the current electrical device A, the time calibration task of the next electrical device B is executed at the same time. When the local time of the next electrical device B reaches 11:30, the scheduled task 2 corresponding to the next electrical device B is directly sent to the next electrical device B and executed, and the shutdown time and startup time in scheduled task 2 are matched through the time manager in the power management device. The shutdown time is matched to execute the shutdown command, and the startup command is executed when the startup time is matched.

[0060] In this embodiment, by sending the time calibration task and the timing task corresponding to the local time of the current electrical device to the current electrical device, and sending the time calibration task corresponding to the local time of the next electrical device to the next electrical device, time-sharing management of multiple devices is achieved, and the efficiency of power management is improved; the local time of the current electrical device is calibrated by the time calibration instruction and network time in the time calibration task corresponding to the local time of the current electrical device, thereby ensuring the accuracy and synchronization of the device time and preventing problems caused by time errors; based on the time manager matching the shutdown time and startup time in the timing task, precise control of the device at the shutdown and startup time points is achieved; based on the time calibration instruction and network time in the time calibration task corresponding to the local time of the next electrical device, the local time of the next electrical device is calibrated, providing an accurate time reference for the timing task preparation of the next electrical device, thereby ensuring the continuity and stability of the system.

[0061] It can be understood that the contents not described in this embodiment refer to Embodiment 1.

[0062] Embodiment 3: It can be understood that when the time calibration task and the timing task are sent to the corresponding electrical equipment, the time calibration task of the current electrical equipment can be executed when executing the timing task of the previous electrical equipment. This can enable the electrical equipment to execute only one task at a time. There is no need to execute the time calibration task and the timing task at the same time, thereby ensuring the execution conditions of each task, improving execution efficiency, avoiding conflicts in tasks of the same electrical equipment, reducing potential failure points, and improving the reliability of power management.

[0063] S3 includes the following steps: Sending a timing task corresponding to the local time of the current electrical device to the current electrical device, and sending a time calibration task corresponding to the local time of the next electrical device to the next electrical device; Based on the time manager in the power management device, the shutdown time and startup time in the scheduled task of the current electrical device are matched, and the shutdown instruction in the scheduled task is executed when the local time of the current electrical device reaches the shutdown time, and the startup instruction in the scheduled task is executed when the local time of the current device reaches the startup time; The local time of the next electrical device is calibrated based on the time calibration instruction in the time calibration task corresponding to the local time of the next electrical device and the network time.

[0064] Specifically, for example, the local time of the current electrical device A is 11:00, and the local time of the next electrical device B is 11:30. The local time of the current electrical device A has been calibrated when executing the time calibration task and the timing task of the previous electrical device. Therefore, it is only necessary to send and execute the corresponding timing task 1 to the current electrical device A, and at the same time send and execute the corresponding time calibration task 2 to the next electrical device B.

[0065] It can be understood that the contents not described in this embodiment refer to Embodiment 1.

[0066] Embodiment 4: A power management device comprises a communication unit, a time manager and a task processing unit; The communication unit is used for communicating with the time server, receiving network time and calibrating local time; The time manager is used to process the timing and trigger the timer events; The task processing unit is used to send scheduled tasks to electrical equipment.

[0067] In this embodiment, the communication unit uses a wired network, a Wi-Fi network and a wireless router to form a local area network. The external socket strip communicates with the electrical device through the obtained local area network. When the timer task is reached, the timer task is executed to control the power on and off of the electrical device through the socket strip. It can be understood that multiple timer tasks can also be set to delay the start of the router and the electrical device respectively, so that the electrical device can be switched from no network to network, so that the timed start of the electrical device is not only to turn on the power, but also to put the electrical device into a normal working state.

[0068] In this embodiment, the communication unit communicates with the time server, receives the network time, and uses the time manager to calibrate the local time to ensure that the time in the system is accurate, which helps to maintain the time consistency between devices and prevent problems caused by time errors; the time manager and the task processing unit work together to process the timing time, trigger the timer event, and issue the timing task to the electrical equipment, so that the equipment can perform power on and off operations according to the predetermined schedule, thereby improving the system's automation management level; the communication unit is responsible for communicating with the time server and has the ability to obtain network time, which increases the system's adaptability to external time sources and helps to maintain time synchronization in different network environments; the task processing unit can issue timing tasks to the electrical equipment to achieve remote management of the equipment.

[0069] Specifically, the communication unit includes: A connection module, used for communication connection between the power management device and the time server; A receiving module, used for receiving network time from a time server; The calibration module is used to calibrate the local time.

[0070] In this embodiment, the connection module is responsible for the communication connection between the power management device and the time server, which can ensure a stable communication connection and accurately obtain the network time, thereby ensuring time synchronization in the system; the receiving module is used to receive the network time from the time server, which ensures that the system can obtain the external time source in a timely and accurate manner and maintain the time consistency between devices; the calibration module is used to calibrate the local time, and the network time received from the time server is compared and calibrated with the local time to ensure that the local time of the device is synchronized with the external time source and improve the accuracy of the time; the design of the connection module and the receiving module helps to improve the anti-interference ability of the communication unit; dividing the connection, reception and calibration functions into different modules helps to achieve a fast and effective time calibration process and can ensure that the system synchronizes time in a short time.

[0071] Specifically, the processing time is to traverse the timed task list when the local time after querying the time manager is started is the calibrated time, and insert the timed time of the timed task into the corresponding cyclic time wheel of the time manager; The timer event is triggered by periodically matching the time nodes on the ring time wheel and sending event notifications to the scheduled tasks corresponding to the matched scheduled time.

[0072] In this embodiment, by querying whether the local time after the time manager is started is the calibrated time, it is ensured that the operation is based on the accurate time when processing the scheduled task after startup, avoiding the execution error of the scheduled task caused by the inaccurate local time at startup. By traversing the scheduled task list and inserting the scheduled time of each scheduled task into the circular time wheel corresponding to the time manager, efficient management of the scheduled task is achieved, ensuring that it is triggered at the correct time point, and improving the stability and reliability of the device; by periodically matching the time nodes on the circular time wheel, the occurrence of the scheduled event can be detected quickly and efficiently, improving the real-time nature of the trigger. Sending event notifications to the scheduled task corresponding to the matched scheduled time ensures that the scheduled task can be triggered at a precise time point, further improving the accuracy of the scheduled task. The design of the circular time wheel supports the triggering of periodic tasks, which is helpful for processing scheduled tasks that need to be repeatedly executed within a fixed time interval, and increasing the flexibility of the device.

[0073] The specific implementation described above is a preferred implementation of a power management method and device of the present invention, and is not intended to limit the specific implementation scope of the present invention. The scope of the present invention includes but is not limited to this specific implementation. All equivalent changes made in accordance with the shape and structure of the present invention are within the protection scope of the present invention.

Claims

1. A power management method, characterized in that: The steps include: S1, configure the traversal instruction triggering conditions, time calibration tasks and timing tasks for the time nodes of the cyclic time wheel; S2, determine whether the traversal instruction triggering condition of the loop time wheel is reached; if the traversal instruction triggering condition is reached, execute S3, otherwise execute S2; S3. After receiving and executing the corresponding time calibration task through the power management device, the timing task is executed.

2. A power management method according to claim 1, characterized in that: The S1 comprises the following steps: S11, obtaining the time configuration node corresponding to the timer to build a cyclic time wheel; S12, constructing a device traversal task list, and configuring instruction trigger conditions, timed tasks, and time calibration tasks for the traversal columns in the device traversal task list; S13. Configure a time configuration node for the traversal column based on the traversal instruction trigger condition.

3. A power management method according to claim 2, characterized in that: The traversal instruction triggering condition includes executing the scheduled tasks and time calibration tasks in the traversal column when the network time of the network server is consistent with the time configuration node time; The configuring of the time configuration node for the traversal column based on the traversal instruction trigger condition includes: When the triggering conditions of the traversal instruction are met, all traversal columns of the current time configuration node are retrieved to obtain the scheduled tasks and time calibration tasks corresponding to the traversal columns.

4. A power management method according to claim 3, characterized in that: The S3 comprises the following steps: S31, determining the electrical equipment corresponding to the current local time, and sending the time calibration task and the timing task to the electrical equipment at the same time; S32, calibrating the local time of the current electrical device through the time calibration instruction in the time calibration task and the network time, so that the local time is synchronized with the network time; S33, matching the shutdown time in the scheduled task through the time manager, and triggering the timer to execute the shutdown instruction in the scheduled task when the shutdown time arrives; S34, matching the power-on time in the scheduled task through the time manager, and triggering the timer to execute the power-on instruction in the scheduled task when the power-on time arrives.

5. A power management method according to claim 4, characterized in that: The S33 comprises the following steps: S331, matching the shutdown time of the scheduled task with the time manager of the power management device, and determining that the shutdown time has arrived when the local time and the shutdown time are the same; S332, when the shutdown time arrives, issuing a shutdown instruction to the electrical device based on the timer in the power management device; S333, judging whether the system has been shut down based on the connection status of the electrical equipment; S334: If the system has been shut down, a disconnection instruction is sent to a corresponding circuit of the electrical device connected to the power management device based on a timer in the power management device to cut off the power supply of the electrical device.

6. A power management method according to claim 4, characterized in that: The S34 comprises the following steps: S341, matching the startup time of the scheduled task based on the time manager of the power management device, and determining that the startup time has arrived when the local time and the startup time are the same; S342, when the shutdown time is reached, sending a pull-in instruction to the circuit connected to the electrical device through the timer in the power management device to turn on the power of the electrical device; S343. The power management device starts the electrical device based on the network adapter and sends a power-on instruction to the electrical device through a timer.

7. A power management method according to claim 1, characterized in that: The S3 comprises the following steps: Sending a time calibration task and a timing task corresponding to the local time of the current electrical device to the current electrical device, and sending a time calibration task corresponding to the local time of the next electrical device to the next electrical device; Calibrate the local time of the current electrical device using the time calibration instruction in the time calibration task corresponding to the local time of the current electrical device and the network time; Matching the shutdown time and the startup time in the scheduled task based on the time manager in the power management device, executing the shutdown instruction in the scheduled task when the calibrated local time reaches the shutdown time, and executing the startup instruction in the scheduled task when the calibrated local time reaches the startup time; The local time of the next electrical device is calibrated based on the time calibration instruction in the time calibration task corresponding to the local time of the next electrical device and the network time.

8. A power management device, applicable to a power management method as claimed in any one of claims 1 to 7, characterized in that: The device includes a communication unit, a time manager and a task processing unit; The communication unit is used for communicating with the time server, receiving network time and calibrating local time; The time manager is used to process the timing time and trigger the timer event; The task processing unit is used to send scheduled tasks to the electrical equipment.

9. A power management device according to claim 8, characterized in that: The communication unit comprises: A connection module, used for communication connection between the power management device and the time server; A receiving module, used for receiving network time from a time server; The calibration module is used to calibrate the local time.

10. A power management device according to claim 9, characterized in that: The processing timer is performed by querying the time manager to traverse the timer task list when the local time after the time manager is started is the calibrated time, and inserting the timer time of the timer task into the cyclic time wheel corresponding to the time manager; The trigger timer event periodically matches the time nodes on the ring time wheel and sends an event notification to the scheduled task corresponding to the matched timing time.