Power management method, related system, device, storage medium and program product

By using the coordinated management of the set information and target identification information in the hardware power management system, combined with the doorbell and share Memory mechanism, the problem of insufficient security of hardware power management in the prior art is solved, and more efficient and secure hardware management is achieved.

CN119248091APending Publication Date: 2025-01-03PHYTIUM TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411217419.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-30
Publication Date
2025-01-03

AI Technical Summary

Technical Problem

In the existing hardware power management technology, the upper-level software directly manages the hardware, resulting in insufficient security and is easily maliciously managed by the outside world.

Method used

By collaborating between the first system and the second system, determining the management requirements of the hardware using the set information and the target identification information, and storing and reading management requests in the hardware storage space, the power management behavior of the target hardware is realized. The doorbell mechanism and share Memory mechanism are used to independently record and pass the assertion information and manage behavior.

Benefits of technology

It improves the security of hardware power management, reduces the probability of malicious tampering, ensures the accuracy and correctness of management behavior, and enhances the protection of hardware.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119248091A_ABST
    Figure CN119248091A_ABST
Patent Text Reader

Abstract

The invention discloses a power management method, a power management system, electronic equipment, a storage medium and a program product, and the method comprises the steps: obtaining a second management request and setting information for hardware, and enabling the second management request and the setting information to be obtained based on a first management request of a second system, the first management request is generated under the condition that a second system has a management request for hardware; based on the setting information, obtaining target identification information of target hardware with a management request in M pieces of hardware; and based on the target identification information and the second management request, obtaining a management behavior on target hardware so as to execute the management behavior on the target hardware. By using the technical scheme of the invention, the management security can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of power management technology, and in particular to a power management method, a power management system, an electronic device, a storage medium, and a program product. Background Art

[0002] In hardware power management technology, the power management behavior of the hardware includes powering on and off the hardware, configuring the hardware's operating frequency and operating voltage, obtaining the hardware's operating frequency and operating voltage, etc., to achieve better management of the hardware. In related technologies, if there is a management request for the hardware such as the aforementioned behavior, the upper-layer software directly performs relevant management operations on the hardware. Although this management method is relatively direct, it is easy to expose the management logic of the hardware to the outside world, increase the risk of malicious management of the hardware by the outside world, and lack security. Summary of the invention

[0003] The present application provides a power management method, a power management system, an electronic device, a storage medium and a program product to at least solve the above technical problems existing in the prior art.

[0004] According to a first aspect of the present application, a power management method is provided, the method being applied to a first system, the first system being capable of communicating with a second system, the method comprising:

[0005] Obtaining a second management request and setting information for the hardware, wherein the second management request and the setting information are obtained based on a first management request of the second system, and the first management request is generated when the second system has a management request for the hardware;

[0006] Based on the setting information, target identification information of target hardware for which a management request exists among the M hardware is obtained, where M is a positive integer greater than or equal to 1;

[0007] Based on the target identification information and the second management request, a management behavior for the target hardware is obtained to execute the management behavior for the target hardware.

[0008] In one possible implementation, the M hardwares have respective storage spaces; the second management request is stored in the storage space of the target hardware; wherein at least part of the information in the second management request represents a management behavior on the target hardware, and the second management request is obtained by processing the first management request;

[0009] The obtaining, based on the target identification information and the second management request, a management behavior for the target hardware, includes:

[0010] Based on the target identification information, determine a target storage space from the M storage spaces;

[0011] Obtaining a second management request from the target storage space;

[0012] The second management request is analyzed or parsed to obtain management behavior for the target hardware.

[0013] In one possible implementation, the M hardwares have respective setting information; the value of the setting information of the hardware for which the management request exists among the M hardwares is different from the value of the setting information of the hardware for which the management request does not exist;

[0014] The obtaining, based on the setting information, target identification information of the target hardware for which the management request exists among the M hardware includes:

[0015] Get the setting information of each hardware;

[0016] Based on the value of the setting information of each hardware, it is determined that there is hardware with a management request among the M hardware;

[0017] The identification information of the hardware for which the management request is made is used as the target identification information.

[0018] In one possible implementation, the number of hardware for which management requests exist in the M hardware is at least two; the second management request includes a management request for each of the at least two hardware, and the setting information includes setting information for each of the at least two hardware;

[0019] The method further comprises:

[0020] Based on the setting information of each hardware, the target identification information of each hardware is obtained;

[0021] Based on the target identification information of each hardware and the management request of each hardware, the management behavior of each hardware is obtained;

[0022] Execute management actions on each hardware according to the setting order of each hardware.

[0023] In one embodiment, the method further comprises:

[0024] In response to the management behavior of each hardware, the setting information of each hardware is updated, so as to feed back the updated setting information of each hardware to the second system.

[0025] In one embodiment, the method further comprises:

[0026] In response to the management behavior of the hardware in the preceding order in the setting sequence, updating the setting information of the hardware in the preceding order, so as to feed back the updated setting information of the hardware in the preceding order to the second system;

[0027] In response to the update of the setting information of the hardware in the previous order, the management behavior of the hardware in the next order in the setting order is performed, and the setting information of the hardware in the next order is updated, so that the updated setting information of the hardware in the next order is used to feed back the second system.

[0028] In one possible implementation, one of the first system and the second system includes a target register, the target register includes N bits, N is a positive integer greater than or equal to M;

[0029] Each bit in the target register is used to record the setting information of each hardware.

[0030] In one possible implementation, the second system includes a system kernel and a system firmware; wherein,

[0031] The system kernel determines a target function from at least two management functions based on the generated management request for the hardware and the identification information of the hardware, and transmits a first management request including the target function to the system firmware;

[0032] The system firmware obtains setting information and a second management request for the hardware based on the target function, and the second management request is stored in a storage space of the hardware where the management request exists.

[0033] According to a second aspect of the present application, a power management method is provided, which is applied to a power management system, the power management system comprising a first system and a second system, the method comprising:

[0034] The second system generates a first management request for the hardware, and based on the first management request, obtains setting information and a second management request for the hardware;

[0035] The first system obtains a second management request and setting information for the hardware, and based on the setting information, obtains target identification information of the target hardware for which the management request exists among M hardware, where M is a positive integer greater than or equal to 1; based on the target identification information and the second management request, obtains management behavior for the target hardware to execute the management behavior on the target hardware.

[0036] According to a third aspect of the present application, a power management system is provided, comprising:

[0037] a first obtaining unit, configured to obtain a second management request and setting information for the hardware, wherein the second management request and the setting information are obtained based on a first management request of a second system communicating with the power management system, the first management request being generated when the second system has a management request for the hardware;

[0038] A second obtaining unit is used to obtain target identification information of target hardware for which a management request exists among the M hardware based on the setting information, where M is a positive integer greater than or equal to 1;

[0039] The third obtaining unit is used to obtain the management behavior for the target hardware based on the target identification information and the second management request, so as to execute the management behavior for the target hardware.

[0040] According to a fourth aspect of the present application, a power management system is provided, including:

[0041] The second system is used to generate a first management request for the hardware, and obtain the setting information and the second management request for the hardware based on the first management request;

[0042] The first system is used to obtain a second management request and setting information for hardware, and based on the setting information, obtain target identification information of target hardware for which a management request exists among M hardware, where M is a positive integer greater than or equal to 1; based on the target identification information and the second management request, obtain management behavior for the target hardware to execute the management behavior on the target hardware.

[0043] According to a fifth aspect of the present application, there is provided an electronic device, including:

[0044] at least one processor; and

[0045] a memory communicatively connected to the at least one processor; wherein,

[0046] The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method described in the present application.

[0047] According to a sixth aspect of the present application, a non-transitory computer-readable storage medium storing computer instructions is provided, wherein the computer instructions are used to enable the computer to execute the method described in the present application.

[0048] According to a seventh aspect of the present application, a computer program product is provided, comprising a computer program, wherein the computer program implements the aforementioned method when executed by a processor.

[0049] In this application, each hardware is designed with its own setting information, which hardware has management requirements is determined through the setting information, and what power management behavior needs to be performed on the hardware with management requirements is determined through the target identification information and the second management request. Compared with the prior art in which the upper-layer software directly performs relevant management operations on the hardware, management security can be effectively improved.

[0050] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present application, nor is it intended to limit the scope of the present application. Other features of the present application will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0051] By reading the detailed description below with reference to the accompanying drawings, the above and other purposes, features and advantages of the exemplary embodiments of the present application will become easily understood. In the accompanying drawings, several embodiments of the present application are shown in an exemplary and non-limiting manner, wherein:

[0052] In the drawings, the same or corresponding reference numerals represent the same or corresponding parts.

[0053] Figure 1 The schematic diagram of the implementation process of the power management method in the embodiment of the present application is shown Figure 1 ;

[0054] Figure 2 The schematic diagram of the implementation process of the power management method in the embodiment of the present application is shown Figure 2 ;

[0055] Figure 3 A schematic diagram of the framework of the system on chip in an embodiment of the present application is shown;

[0056] Figure 4 A schematic diagram of interactive implementation of a power management method in an embodiment of the present application is shown;

[0057] Figure 5 A schematic diagram of the implementation process of another power management method in an embodiment of the present application is shown;

[0058] Figure 6 A schematic diagram of the composition structure of a first power management system in an embodiment of the present application is shown;

[0059] Figure 7 A schematic diagram of the structure of a second power management system in an embodiment of the present application is shown;

[0060] Figure 8 A schematic diagram of the structure of an electronic device in an embodiment of the present application is shown. DETAILED DESCRIPTION

[0061] In order to make the purpose, features, and advantages of the present application more obvious and easy to understand, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present application.

[0062] In order to make the purpose, technical solutions and advantages of the present application clearer, the present application will be further described in detail below in conjunction with the accompanying drawings. The described embodiments should not be regarded as limiting the present application. All other embodiments obtained by ordinary technicians in the field without making creative work are within the scope of protection of this application.

[0063] In the following description, reference is made to “some embodiments”, which describe a subset of all possible embodiments, but it can be understood that “some embodiments” may be the same subset or different subsets of all possible embodiments and may be combined with each other without conflict.

[0064] In the following description, the terms "first\second" involved are merely used to distinguish similar objects and do not represent a specific ordering of the objects. It can be understood that "first\second" can be interchanged with a specific order or sequence where permitted, so that the embodiments of the present application described herein can be implemented in an order other than that illustrated or described herein.

[0065] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein are only for the purpose of describing the embodiments of this application and are not intended to limit this application.

[0066] It should be understood that in the various embodiments of the present application, the size of the serial number of each implementation process does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.

[0067] This application provides a power management method for performing power management on hardware. Unlike the problem of insufficient security caused by the upper-level software directly performing power management operations on hardware in the related art, the power management method in this application can improve the security of power management on hardware. For details, please refer to the following description.

[0068] Figure 1 The schematic diagram of the implementation process of the power management method in the embodiment of the present application is shown Figure 1. The power management method is applied to a first system, and the first system can communicate with the second system. In the present application, the first system and the second system can be two independent parts of the same system on a chip (SOC), such as two independent modules. In the SOC, the first system and the second system have their own independent functions, and can work independently of each other to complete their own independent functions. Alternatively, the first system and the second system have functions that require cooperation or coordination with each other, so as to achieve more functions through cooperation or coordination between the two. The power management method of the present application can be a solution that requires the first system and the second system to cooperate or coordinate to achieve better power management of hardware.

[0069] In this application, the power management behavior of the hardware includes powering on and off the hardware, configuring the hardware's operating frequency and operating voltage, obtaining the hardware's operating frequency and operating voltage, obtaining the operating frequency supported by the hardware or the gear of the supported operating frequency, etc.

[0070] like Figure 1 As shown, the power management method of the present application includes:

[0071] S (Step) 101: Obtain a second management request and setting information for hardware, wherein the second management request and setting information are obtained based on a first management request of the second system, and the first management request is generated when the second system has a management request for the hardware.

[0072] In this application, the number of hardware that can be executed with power management behavior is M, where M is a positive integer greater than or equal to 1. The power management in this application refers to the management of hardware located on the same SOC as the first system and the second system. Based on this, in terms of structural design, the M hardware, the first system and the second system need to be integrated into the same SOC to implement power management of the internal hardware of the system on chip inside the SOC. In practical applications, the number of M is two or more, and the specific value can be determined according to actual usage.

[0073] In this step, the (first) management request for the hardware is a request for the hardware to perform one or more of the aforementioned power management behaviors on the hardware. The (first) management request is generated by the second system when there is a need for power management of the hardware in the second system. Taking into account the collaboration or cooperation between the second system and the first system, it needs to be implemented through a communication mechanism agreed upon by both parties. With respect to the generated (first) management request, the second system can process the (first) management request, for example, it can convert the (first) management request into a request that can be interpreted by the first system according to the communication mechanism agreed upon by both parties. For example, the setting information of the hardware and another management request for the hardware - the second management request. That is, in the present application, the second management request can be obtained by processing the first management request. Among them, the communication mechanism agreed upon by both parties can indicate the communication protocol used by the two parties, the communication format of the communication data, etc.

[0074] During implementation, the second system may obtain the second management request for the hardware and the setting information for the hardware by receiving information from the first system. The second system may obtain the second management request and the setting information by reading the information processed by the first system.

[0075] In this step, the second management request is a request for one or more of the aforementioned power management behaviors to be performed on a certain hardware or certain hardware. For example, a power-on request, a power-off request, a request for coordinated working voltage, etc. In the present application, M hardware have respective setting information. The value of the setting information of the hardware can indicate whether a management request is generated for the hardware. For example, when there is a management request for a certain hardware, the setting information of the hardware can be set to 1, and the setting information is 1, indicating that a management request is generated for the hardware. When there is no management request for a certain hardware, the setting information of the hardware can be set to 0, and the setting information is 0, indicating that no management request is generated for the hardware. Or vice versa. That is, in the present application, the value of the setting information of the hardware with management request among the M hardware is different from the value of the setting information of the hardware without management request. The second system can obtain the setting information for the M hardware by receiving or reading the setting information of the M hardware. The second system can also obtain the setting information for the hardware with management request by reading the setting information of the hardware with a value of 1.

[0076] S102: Based on the setting information, obtain the target identification information of the target hardware for which the management request exists among the M hardware.

[0077] In this step, the target hardware is the hardware for which a management request exists among the M hardware. The target identification information is the identification information of the hardware for which a management request exists. In the present application, the identification of the hardware may be unique. For example, when there is only one hardware of the same type or model, at least one of the hardware name, hardware model, and hardware type may be used as the hardware identification information to distinguish each hardware. If there are two or more hardware of the same type or model, at least one of the hardware name, hardware model, and hardware type may be combined with different numbers of the same hardware as the hardware identification information to distinguish different hardware of the same type or model.

[0078] During implementation, the first system can obtain the setting information of each hardware by reading the setting information of each hardware. Based on the value of the setting information of each hardware, determine whether there is hardware with management request among the M hardware. Exemplarily, taking SOC including NPU (neural network processor), GPU (graphics processor), DPDC (DC and DP control unit), VPU (video processing unit), DMU (data storage unit) and other hardware as an example, at a moment, the setting information of NPU is 1, and the setting information of GPU, DPDC, VPU and DMU is 0, then it is considered that among these hardware, there is a management request for NPU, and there is no management request for other hardware. The identification information of the hardware with management request is used as the target identification information. For example, the identification information of NPU is used as the target identification information.

[0079] S103: Based on the target identification information and the second management request, obtain a management behavior for the target hardware to execute the management behavior for the target hardware.

[0080] In this step, the management behavior of the hardware may be the aforementioned several power management behaviors of the hardware. Usually, at the same time, the management behavior generated for the same hardware may be one of the aforementioned several power management behaviors. In layman's terms, for the same target identification information (the same hardware) and the same second management request, a management behavior for the same (target) hardware is obtained. At the same or similar time, different management behaviors for the same (target) hardware can be implemented through two or more management requests. Exemplarily, for the same hardware-NPU, when there is a power-on demand for it, a management request is generated, and based on the identification information of the NPU and the management request, the management behavior of the NPU at this time is a power-on behavior, and the NPU is powered on. When there is a power-off demand for it, another management request is generated, and based on the identification information of the NPU and the other management request, the management behavior of the NPU at this time is a power-off behavior, and the NPU is powered off. In this way, the accuracy of identifying the management behavior that needs to be executed for each management request can be guaranteed.

[0081] At the same or similar moments, different or the same management behaviors for different hardware can be implemented through two or more management requests. Exemplarily, at similar moments, a management request to power on the NPU and a management request to power off the VPU are generated. Based on the identification information of the NPU and the power-on request for the NPU, it is obtained that the management behavior for the NPU is a power-on behavior, and the NPU is powered on. Based on the identification information of the VPU and the power-off request for the VPU, it is obtained that the management behavior for the VPU is a power-off behavior, and the VPU is powered off. In this way, the accuracy of identifying the management behavior that needs to be executed for each management request can be guaranteed.

[0082] In this application, M hardwares have their own storage space. For example, in the memory or storage, each hardware has its own storage space, and the address of each storage space is different. For example, the memory space with the address 0X00-0X30 is the storage space of the hardware 1 identifier (such as the NPU name). The memory space with the address 0X40-0X70 is the storage space of the hardware 2 identifier (such as the GPU name). The memory space with the address 0X80-0XC0 is the storage space of the hardware 3 identifier (such as the VPU name). In a specific implementation, the hardware identifier and the hardware storage space are in a one-to-one correspondence, and different hardware has different storage addresses in the memory space. Among them, the storage space opened up for each hardware can be continuous or discontinuous in address, depending on the specific circumstances.

[0083] In the present application, when the second system processes the first management request and obtains the second management request, the second management request is stored in the storage space opened for the target hardware. That is, the second management request is stored in the storage space of the target hardware, and at least part of the information in the second management request is characterized as the management behavior of the target hardware. It can be understood that in the storage space, the power management behavior of the target hardware is a piece of information to be stored, and it can be directly stored in the storage space of the target hardware. In this way, the first system can directly read the information in the storage space, and can know which behavior of the power management behavior is the management behavior of the target hardware without analysis or parsing. It is also possible to process the power management behavior of the target hardware, which is the information to be stored, in a certain way, such as encoding, and then store it in the storage space of the target hardware. In this way, the first system reads the information in the storage space, and after certain analysis or parsing, such as decoding, it can be known which behavior of the power management behavior is the management behavior of the target hardware.

[0084] During implementation, the first system can determine the target storage space from the M storage spaces based on the target identification information, obtain the second management request from the target storage space, analyze or parse the second management request, and obtain the management behavior for the target hardware. For example, from the M storage spaces, the space opened for the hardware with the target identification information can be found as the target storage space. The information stored in the target storage space is read out, and by analyzing or parsing it, it is known what kind of power management behavior the management behavior for the target hardware is.

[0085] Opening up a separate storage space for each hardware in the same storage or memory is equivalent to opening up storage space for each hardware through a shared (shareMemory) mechanism. The information on what power management behavior is executed on the hardware can be stored in the storage space of the hardware by the second system and read from the storage space of the hardware by the first system, thereby realizing the transmission or notification of the power management behavior information from the second system to the first system. Compared with the scheme of transmitting the power management behavior information between two systems (the first system and the second system) through the network, this method of notifying the power management behavior information using the shared Memory mechanism can greatly reduce the probability of malicious tampering, avoid malicious management of the hardware, ensure information security, and thus provide a guarantee for the safe management of the hardware.

[0086] The execution subject of the S101 to S103 schemes is the first system.

[0087] The scheme shown in S101 to S103 is a new power management scheme. Set information is designed for each piece of hardware, and the set information is used to determine which hardware has management requirements. The target identification information and the second management request are used to determine what power management behavior needs to be performed on the hardware that has management requirements. This scheme can be regarded as a new power management mechanism. Compared with the prior art in which the upper-level software directly performs relevant management operations on the hardware, this new mechanism can effectively improve management security and make it more difficult for illegal organizations to identify which hardware is being managed and what the management behavior is, that is, it makes it more difficult for illegal organizations to maliciously attack the hardware.

[0088] In this solution, the hardware identification is obtained through the hardware setting information, and the management behavior is obtained through the target identification information and the second management request. This novel way of obtaining the hardware identification and management behavior can ensure the accuracy of the hardware identification and management behavior, thereby improving the management accuracy.

[0089] In actual applications, the first management request and the second management request may be requests generated when there is a management demand for one hardware, or may be requests generated when there are management demands for at least two hardware. When the number of hardware for which there is a management request is one, power management of the hardware may be performed according to the aforementioned scheme. When the number of hardware for which there is a management request is at least two, the second management request obtained by the first system includes a management request for each of the at least two hardware, and the setting information obtained by the first system includes the setting information for each of the at least two hardware. In this case, the scheme for the first system in the present application to obtain the identification and management behavior of the hardware for which there is a management demand may be as follows: Figure 2 As shown, including:

[0090] S201: Based on the setting information of each hardware, obtain the target identification information of each hardware.

[0091] In this step, assuming that the setting information value is 1, it indicates that the corresponding hardware has a need to be managed. Then, the first system reads the setting information with a value of 1, and the hardware with the setting information of 1 among the M hardware is the hardware that has a need to be managed. Thus, it is easy to know which two or more hardwares among the M hardwares have a need to be managed. The identification information of the hardware, such as the hardware name, can be used as the target identification information of the hardware.

[0092] S202: Based on the target identification information of each hardware and the management request of each hardware, obtain the management behavior of each hardware.

[0093] In this step, for each of the two or more hardwares with management requirements, the management behavior of each hardware can be obtained through the following scheme: based on the target identification information of each hardware, determine the target storage space of each hardware from M storage spaces, obtain the second management request of each hardware from the target storage space of each hardware, analyze or resolve the second management request of each hardware, and obtain the management behavior of each hardware. In layman's terms, the management behavior of the hardware that needs to be managed is stored in the storage space of the hardware. When the identification information of the hardware is known, the address of the storage space of the hardware is easily known through the correspondence between the identification and the hardware storage space, and the data stored in the storage address is read out. After parsing or analyzing, the information obtained can be regarded as the power management behavior that needs to be executed on the hardware. In the case where there are two or more hardwares with management requirements, the scheme for obtaining the management behavior of each hardware can be specifically referred to the scheme in the case where there is only one hardware with management requirements, and the repeated parts are not repeated.

[0094] S203: Execute management actions on each hardware according to the setting order of each hardware.

[0095] In the present application, the first system can execute management actions on each hardware in the order in which each hardware having management requirements is set to 1. For example, among two or more hardware, the hardware that is first set to 1 will have its power management actions executed first. The hardware that is later set to 1 will have its power management actions executed later. In this way, in the present application, for concurrent management requests (there are management requirements for two or more hardware at the same or similar time), according to the power management mechanism of the present application, the hardware with management requests and management actions can be orderly identified and managed, which can effectively avoid the situation in which the power management behavior that should be executed on each hardware cannot be successfully implemented or the execution is wrong in the case of concurrent management requests, thereby ensuring the correctness of power management of the hardware.

[0096] In the case that the number of hardware with management request is one, the first system may execute the power management behavior for the hardware and update the setting information of the hardware to feed back to the second system. For example, the setting information of the hardware is updated from 1 to 0, indicating that the power management behavior that should be executed for the hardware is completed, and as feedback to the second system, the updated setting information is fed back to the second system to inform the second system that the power management behavior it wants has been executed for the hardware.

[0097] In the case where there are two or more hardwares for which management requests are made, that is, in the case where management requests are concurrent, the setting information of each hardware is updated in response to the management actions on each hardware, so that the updated setting information of each hardware is fed back to the second system. The first system can update the setting information of the hardware from 1 to 0 for which the management action is performed on the two or more hardwares and feed it back to the second system, so as to inform the second system that the power management action has been performed on the hardware.

[0098] In order to avoid the first system's response errors to these hardware, the first system can respond to the management behavior of the hardware in the previous order in the setting sequence, update the setting information of the hardware in the previous order, and feed back the updated setting information of the hardware in the previous order to the second system; respond to the update of the setting information of the hardware in the previous order, perform management behavior on the hardware in the later order in the setting sequence, update the setting information of the hardware in the later order, and the updated setting information of the hardware in the later order is used to feed back to the second system. In layman's terms, the first system manages concurrent hardware (hardware with management requests at the same or similar time) in the order of setting the setting information of each hardware to 1, performs power management, updates the setting information of the hardware in the previous order, feeds back the updated setting information to the second system, and then performs the same operation on the next hardware. In this way, the sequential management of hardware is realized. By managing each hardware in sequence, the success rate of managing each hardware can be improved and the error rate can be reduced.

[0099] In order to realize the setting of the setting information of each hardware, such as setting to 1 or setting to 0, the first system or the second system has a target register, which includes N bits. Each bit in the target register is used to record the setting information of each hardware. It can be understood that in order to realize the power management of M hardware, usually, the number of bits in the target register is greater than or equal to the number of hardware that needs power management. That is, N is a positive integer greater than or equal to M. In implementation, a doorbell mechanism can be used to realize the recording of hardware setting information, and the doorbell controller is used as the target register. For which hardware has the need to perform power management, the second system sets the bit corresponding to the hardware in the target register to 1, which is equivalent to setting the setting information of the hardware to 1. For the bit set to 1, an interrupt is generated, and the first system can know which hardware has the management requirement by which bit of the target register the interrupt comes from. The above scheme can be regarded as a scheme for recording the hardware setting information by using the doorbell mechanism, because the setting information of each hardware is recorded through different bits. The doorbell mechanism is used to independently record the setting information between hardware, which can effectively avoid the problem of management errors caused by confusion of setting information and improve the management accuracy. Using the doorbell mechanism to independently record the setting information of each hardware can effectively avoid malicious tampering with the setting information, avoid malicious management, and ensure the security of hardware power management.

[0100] In this application, the doorbell mechanism is used to realize the independent recording of each hardware setting information, and the sharedMemory mechanism is used to realize the notification of power management behavior information, which can effectively avoid the malicious management of hardware by illegal organizations and improve the security of hardware management.

[0101] The power management method of the present application can be completed by cooperation or coordination between the first system and the second system. The second system includes a system kernel and a system firmware. During the cooperation or coordination process, the second system can perform the following process:

[0102] (1) The system kernel determines a target function from at least two management functions based on the generated management request for the hardware and identification information of the hardware, and transmits a first management request including the target function to the system firmware.

[0103] Management functions are different types of functions set up to implement power management of hardware. For example, functions used to reflect the need to perform power-on or power-off operations on hardware, functions used to obtain operating frequencies, functions used to configure operating voltages, etc. If the system kernel has a power-on requirement for hardware 1, the function used to reflect the power-on operation in the management function is called. The function reflects the need to power on the hardware, and the parameters of the function carry the identifier of the hardware so that the system firmware knows which hardware the system kernel needs to perform what kind of power management behavior on. The target function is transmitted to the system firmware as the first management request, or the target function is transmitted to the system firmware as the information carried by the first management request.

[0104] (2) The system firmware obtains setting information and a second management request for the hardware based on the target function, and the second management request is stored in a storage space of the hardware where the management request exists.

[0105] The system firmware parses the received target function and can learn which hardware the system kernel has management requirements for by reading the function parameters in the target function. By identifying the type of management function the target function is, such as a power-on type function or a function for configuring the operating frequency type, it can be learned what kind of management behavior is for the hardware.

[0106] It can be understood that the system kernel and the system firmware are the transmission of information such as which hardware among the M hardware is implemented by the management function, and what kind of management behavior is. On the one hand, the system firmware in the second system needs to communicate with the system kernel in the second system as above. On the other hand, as a communication bridge between the second system and the first system, the system firmware also needs to communicate with the first system. The system firmware can convert the first management request from the system kernel into a request that can be interpreted by the first system according to the communication mechanism agreed upon by the first system and the second system. For example, the system kernel sets the bit position corresponding to the hardware with management requirements in the target register to 1, and stores the information of what kind of power management behavior needs to be performed on the hardware in the storage space of the hardware, so as to facilitate the first system to identify the hardware that needs to be managed and its management behavior. The setting of the bit and the storage of the power management behavior in the storage space can be regarded as a power management scheme implemented by using the doorbell mechanism and the shared memory mechanism. This scheme can effectively avoid malicious management of the hardware and improve the security of hardware management.

[0107] Combine the following Figure 3 and Figure 4 , and explain the technical solution of this application in detail.

[0108] Figure 3In the example, the first system is an out-of-band system (SE) system and the second system is an operating system. The first system is integrated as a module with the second system and the hardware layer (Hardware layer) on the same SOC. The second system includes the system kernel and the system firmware-UEFI firmware. By using the power management solution of this application, the hardware can be securely managed within the SOC, providing a guarantee for the security of the SOC.

[0109] The power management solution of the present application is implemented through the second system, specifically, the communication between the system kernel and the system firmware, the communication between the system firmware and the SE system, and the communication between the SE system and the Hardware, etc. These are described below.

[0110] Inside the second system, the communication between the system kernel and UEFI adopts the ACPI (Advanced Configuration and Power Management Interface) Method. Management functions can be defined in Method. For example, the power-on function is defined as Method (PPWO), the power-off function is defined as Method (PPWD), the function for configuring the operating frequency is defined as Method (PSCF), etc. Each function includes multiple function parameters, one of which is used to represent the hardware identification. Exemplarily, the power-on function Method (PPWO) includes parameters such as Arg0, Arg1, Arg2 and return, wherein the parameter Arg0 is used to represent the hardware identification. The parameter return is used to indicate the feedback message of whether the management behavior fed back by the second system to the first system is successfully executed. For power-on and power-off operations, return can take values ​​of 1 and 0, 1 indicates successful power-on, and 0 indicates power-on failure. For the operation of configuring the operating frequency, return can take values ​​of 1 and 0, 1 indicates successful configuration of the hardware operating frequency, and 0 indicates configuration failure.

[0111] In an exemplary scenario (Scenario 1), taking the case where the system kernel needs to drive the hardware NPU to perform a power-on operation, the system kernel calls the Method (PPWO) function and sets the Arg0 parameter to the identifier of the NPU hardware, such as the hardware number of the NPU. The system kernel transmits the Method (PPWO) function to UEFI to inform the UEFI system kernel of the power-on request for the NPU hardware. The system kernel and UEFI use the Method standard for communication, which can smoothly realize the transfer of information such as management objects (NPUs) and management behaviors (power-on operations) from the system kernel to UEFI.

[0112] The doorbell mechanism and shared memory mechanism are used between UEFI firmware and SE system to transfer management objects and management behaviors from UEFI to SE system. See the following description for details.

[0113] In this application, the doorbell mechanism is used to implement the setting information for each hardware, and the shared memory mechanism is used to implement the storage space of each hardware, as shown in Table 1. In Table 1, the first bit bit [0] of the doorbell controller indicates the setting of the hardware GPU. The storage space address opened for the GPU is 0x00-0x3F. The second bit bit [1] of the doorbell controller indicates the setting of the hardware NPU. The storage space address opened for the NPU is 0x40-0x7F.

[0114] Table 1

[0115]

[0116]

[0117] Table 1 is only a specific example of the present application and does not cover all situations. Any reasonable solution that can express hardware setting information and storage space is covered within the protection scope of the present application.

[0118] In layman's terms, the system kernel implements the transfer of management objects and management behaviors from the system kernel to the UEFI firmware through the Method function. This is equivalent to the system kernel and the UEFI firmware transferring information according to the communication mechanism agreed upon by both parties. In addition to communicating with the system kernel, the UEFI firmware can also communicate with the SE system. Different from the communication mechanism used to communicate with the system kernel, the communication between the UEFI firmware and the SE system requires the use of another set of communication mechanisms. For example, the doorbell mechanism and the shared memory mechanism are used for communication. In this application, the UEFI firmware receives the Method function from the system kernel, analyzes the received Method function, and obtains the management object that the system kernel expects to perform power management and the management behavior implemented on the management object. The UEFI firmware processes information such as management objects and management behaviors expressed in the form of functions, such as converting them into information that can be interpreted by the SE system. Taking the above exemplary scenario as an example, the UEFI system learns that the management object is the NPU, and the management behavior is the power-on operation. As shown in Table 1, the GPU bit is bit[1]. Bit[1] can be set to 1 to store the power-on management behavior in the NPU storage space, such as the storage space at address 0x40-0x7F. Therefore, it can be considered that the management object and management behavior are transferred to the SE system by adopting the doorbell mechanism and the shared memory mechanism. Among them, by default, the value of each bit in Table 1 is 0. Bit[1] is set to 1 to generate an interrupt.

[0119] The SE system responds to the interrupt, and from the bit set to 1, it can be learned that the management object is the NPU. From the storage space allocated for each hardware, the storage space of the NPU is searched. Data is read from the address of the storage space, and after analyzing or parsing the read data, it is obtained that the management behavior of the NPU is a power-on behavior. The SE system performs a power-on operation on the NPU. If the power-on operation is successful, the SE system sets bit[1] to 0 to inform the UEFI firmware that the power-on operation on the NPU is successful. The UEFI firmware sets the return parameter of the Method(PPWO) function to 1, and feeds back this information to the system kernel to inform the system kernel that the power-on operation on the NPU is successful.

[0120] In an exemplary scenario (Scenario 2), the system kernel wants to perform a power-off operation on the GPU. For this situation, the system kernel calls the Method (PPWD) function and sets one of the parameters of the function to the identifier of the GPU hardware. The system kernel transmits the Method (PPWD) function to the UEFI to inform the UEFI firmware that the system kernel has a power-off request for the GPU hardware. The UEFI firmware analyzes the received Method function and obtains that the management object that the system kernel expects to perform power management is the GPU, and the management behavior is the power-on operation. As shown in Table 1, the bit position of the GPU is bit [0]. Bit [0] can be set to 1, and the power-off management behavior is stored in the storage space with an address of 0x00-0x3F. The operation of setting bit [0] to 1 generates an interrupt, and the SE system responds to the interrupt. From the bit position set to 1, it can be known that the management object is the GPU. From the storage space opened for each hardware, the storage space of the GPU is searched. Data is read from the address of the storage space, and after analyzing or parsing the read data, it is determined that the management behavior of the GPU is a power-off behavior. The SE system performs a power-off operation on the GPU. If the power-off operation is successful, the SE system sets bit[0] to 0 to inform the UEFI firmware that the power-off operation on the GPU is successful. The UEFI firmware sets the return parameter of the Method(PPWD) function to 1 and feeds back the information to the system kernel to inform the system kernel that the power-off operation on the GPU is successful.

[0121] In the above two exemplary scenarios, at the same or similar time, if the NPU is required to power on first and then the GPU is required to power off, that is, there is a concurrent management request from the system kernel, then the two management requests can be executed sequentially according to the above scenario one and scenario two schemes. Among them, when the power-on request for the NPU is successfully executed, the SE system can update bit[1] to 0 to provide feedback to the second system. When bit[1] is updated to 0 and the power-off request for the GPU is successfully executed, the SE system can update bit[0] to 0 to provide feedback to the second system. The sequential management of hardware is achieved. Through the sequential management of hardware, the success rate of the management of each hardware can be improved and the error rate can be reduced.

[0122] From the above example scenarios, we can see that Figure 4 As shown, the power management method of the present application may include the following processes: S401: The system kernel generates a power management request for the hardware, and passes the management request to the system firmware through the management function. S402: The system firmware parses the management function, sets the bit position of the management object to 1, and stores the management behavior of the management object in the storage space of the management object; S403: The SE system responds to the interrupt generated by the bit position being set to 1, and obtains the management object through the bit position set to 1. The management behavior of the management object is obtained by analyzing or parsing the data read from the storage space of the management object. S404: The SE system executes the management behavior of the management object and feeds back the successful execution information to the system firmware. S405: The system firmware feeds back the information that the management behavior of the management object is successfully executed to the kernel through one of the parameters of the management function.

[0123] In order to save resources and the operating pressure of SE, the present application also includes an asynchronous management solution. Taking the power management behavior that needs to obtain the working voltage of a certain hardware as an example, the SE system can periodically read the working voltage of the hardware and store the latest read working voltage in the storage space of the hardware to overwrite the old data of the working voltage stored in the storage space. When the system kernel has a need to obtain the working voltage of the hardware, the demand is passed to the UEFI firmware through the management function. The UEFI firmware reads the data directly from the storage space of the hardware and feeds it back to the system kernel. This SE system's periodic reading of data such as the working voltage and working frequency of the hardware and the periodic refresh storage solution in the storage space can be regarded as an asynchronous management solution. Efficient and safe management of management behaviors such as obtaining the working voltage, working frequency and frequency gear of the hardware can be achieved.

[0124] As can be seen from the above scheme, in this application, the doorbell mechanism is used to realize the independent recording of the setting information of each hardware. This separate recording method can easily realize the separate (management) control of each hardware. Independent control of the power management behavior of each hardware will not cause management confusion, and improve the management accuracy and efficiency. The use of the doorbell mechanism to realize independent control of the setting information of each hardware can also effectively avoid malicious tampering with the setting information, avoid malicious management, and ensure the security of hardware power management.

[0125] In this application, the shared memory mechanism is used to realize the transmission of information about power management behavior. Since the storage space has a certain protection effect on the data stored in itself, it has the characteristic of being difficult to be tampered with. Therefore, the transmission of information through the data stored in the storage space can effectively avoid the malicious management of hardware by illegal organizations and improve the security of hardware management.

[0126] The power management solution of the present application is mainly designed for the power management requirements of the system (OS) kernel for different hardware, and has compatibility and reusability. If the system kernel, system firmware, SE system, and hardware layer are regarded as each layer, the technical solution of the present application can be regarded as a layered power management solution. Through the combination of the doorbell mechanism and the sharedMemory mechanism, malicious management of the hardware can be effectively avoided, and the power management security of the hardware can be guaranteed. For concurrent management requests from the system kernel, orderly management can be achieved, effectively avoiding the occurrence of management errors, and improving management accuracy and efficiency.

[0127] As can be seen from the above description, such as Table 1, for each hardware device that requires power management, a separate bit and a separate storage space can be set for each hardware. In this application, so many bits and storage spaces are set mainly to solve the concurrency problem. Generally speaking, SE performs power management of each hardware sequentially, and one interrupt can only process one power management behavior. For example, if the system kernel generates another one or more management requests when SE is processing a management request, the interrupts of these management requests will be accumulated. After SE processes the previous request, based on the accumulated interrupts, according to the order of the requests, such as the principle of first come first served, the data in the corresponding storage space is processed (such as reading, parsing or analyzing), and the management behavior of each hardware is obtained to realize the one-by-one processing of concurrent requests. Moreover, during the processing, because each request indicates that there is a device to be managed, each device has its own bit and storage space, that is, each device has an independent bit and storage space. In this way, the setting operation of a bit of a hardware will not affect the setting operation of the bit of other hardware. The processing of data in the storage space of one hardware will not affect the processing of data in the storage space of other hardware. In this way, when management requests are concurrent, using so many bits and the storage space of each hardware can ensure the correct response to each management request in the concurrent scenario, avoiding the problem of failure to respond or response error.

[0128] In some special concurrent scenarios, for a management request of a certain device, when there is already a management request for the device, a locking mechanism can be used to lock the device to prevent other management requests from being made to the device. That is, in this application, a locking mechanism can be used to prevent the same device from making concurrent requests. Of course, concurrent requests generated by the same device can also be processed one by one on a first-come, first-served basis. The specific situation can be flexibly set, and this application does not limit this.

[0129] Figure 5 The schematic diagram of the implementation process of another power management method in the embodiment of the present application is shown. The power management method is applied to a power management system, which can be a SOC. The SOC includes an SE system that can be used as a first system and an operating system that can be used as a second system. Figure 5 As shown, the method includes:

[0130] S501: The second system generates a first management request for hardware, and obtains setting information and a second management request for the hardware based on the first management request;

[0131] S502: The first system obtains a second management request and setting information for the hardware, and based on the setting information, obtains the target identification information of the target hardware for which the management request exists among the M hardware, where M is a positive integer greater than or equal to 1; based on the target identification information and the second management request, obtains the management behavior for the target hardware to execute the management behavior on the target hardware.

[0132] The power management method shown in S501-S502 designs respective setting information for each hardware, and determines which hardware has management requirements through the setting information. Through the target identification information and the second management request, it is determined what power management behavior needs to be performed on the hardware with management requirements. It is a new power management mechanism, which can effectively improve management security compared with the prior art in which the upper-layer software directly performs relevant management operations on the hardware.

[0133] For a detailed description of the power management method shown in S501 to S502, please refer to the above-mentioned related description, and the repeated parts are not repeated here.

[0134] The present application provides a first power management system, such as Figure 6 As shown, the first power management system (the aforementioned first system can be used as the first power management system) includes:

[0135] A first obtaining unit 601 is configured to obtain a second management request and setting information for hardware, wherein the second management request and the setting information are obtained based on a first management request of a second system communicating with the power management system, and the first management request is generated when the second system has a management request for the hardware;

[0136] A second obtaining unit 602 is configured to obtain target identification information of target hardware for which a management request exists among the M hardware based on the setting information, where M is a positive integer greater than or equal to 1;

[0137] The third obtaining unit 603 is used to obtain the management behavior for the target hardware based on the target identification information and the second management request, so as to execute the management behavior for the target hardware.

[0138] In one embodiment, the M hardwares have respective storage spaces; the second management request is stored in the storage space of the target hardware; wherein at least part of the information in the second management request represents the management behavior of the target hardware, and the second management request is obtained by processing the first management request. The third obtaining unit 603 is used to:

[0139] Based on the target identification information, determine a target storage space from the M storage spaces;

[0140] Obtaining a second management request from the target storage space;

[0141] The second management request is analyzed or parsed to obtain management behavior for the target hardware.

[0142] In one embodiment, the M hardwares have respective setting information; the value of the setting information of the hardware with management request in the M hardwares is different from the value of the setting information of the hardware without management request. The second obtaining unit 602 is used to:

[0143] Get the setting information of each hardware;

[0144] Based on the value of the setting information of each hardware, it is determined that there is hardware with a management request among the M hardware;

[0145] The identification information of the hardware for which the management request is made is used as the target identification information.

[0146] In one embodiment, the number of hardware for which management requests exist among the M hardware is at least two; the second management request includes a management request for each of the at least two hardware, and the setting information includes setting information for each of the at least two hardware.

[0147] Accordingly,

[0148] The second obtaining unit 602 is used to obtain the target identification information of each hardware based on the setting information of each hardware; the third obtaining unit 603 is used to obtain the management behavior of each hardware based on the target identification information of each hardware and the management request of each hardware. The first power management system also includes an execution unit, which is used to execute the management behavior of each hardware according to the setting order of each hardware.

[0149] In one embodiment, the first power management system further includes:

[0150] An updating unit, used for updating the setting information of each hardware in response to the management behavior of each hardware;

[0151] A feedback unit is used to feed back the updated setting information of each hardware to the second system.

[0152] In one embodiment,

[0153] The updating unit is used to update the setting information of the hardware in the preceding order in response to the management behavior of the hardware in the preceding order in the setting order;

[0154] The feedback unit is used to feed back the updated position information of the hardware in the previous order to the second system;

[0155] The updating unit is used to execute the management behavior of the hardware at the later position in the setting sequence in response to the updating of the setting information of the hardware at the earlier position, and update the setting information of the hardware at the later position;

[0156] The feedback unit is used to use the updated position information of the hardware in the subsequent order to feed back the second system.

[0157] In one embodiment, the first system includes a target register, the target register includes N bits, N is a positive integer greater than or equal to M; each bit in the target register is used to record the setting information of each hardware.

[0158] In one embodiment, the second system includes a system kernel and a system firmware; wherein,

[0159] The system kernel determines a target function from at least two management functions based on the generated management request for the hardware and the identification information of the hardware, and transmits a first management request including the target function to the system firmware;

[0160] The system firmware obtains setting information and a second management request for the hardware based on the target function, and the second management request is stored in a storage space of the hardware where the management request exists.

[0161] This application provides a second power management system, such as Figure 7 As shown, the second power management system includes the aforementioned first system and second system; wherein,

[0162] The second system 701 is used to generate a first management request for the hardware, and obtain the setting information and the second management request for the hardware based on the first management request;

[0163] The first system 702 is used to obtain a second management request and setting information for hardware, and based on the setting information, obtain target identification information of target hardware for which a management request exists among M hardware, where M is a positive integer greater than or equal to 1; based on the target identification information and the second management request, obtain management behavior for the target hardware to execute the management behavior on the target hardware.

[0164] It should be noted that the two power management systems in the embodiments of the present application, since the principles of solving the problems of the two power management systems are similar to those of the aforementioned power management method, the implementation process and implementation principles of the two power management systems can be referred to the description of the implementation process and implementation principles of the aforementioned power management method, and the repeated parts will not be repeated.

[0165] According to an embodiment of the present application, the present application also provides an electronic device and a readable storage medium.

[0166] The electronic device includes at least one processor; and a memory connected to the at least one processor in communication; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the power management method described in the present application. The computer instructions are used to enable the computer to execute the power management method described in the present application.

[0167] Figure 8 A schematic block diagram of an example electronic device 800 that can be used to implement an embodiment of the present application is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workbenches, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present application described and / or required herein.

[0168] like Figure 8 As shown, the device 800 includes a computing unit 801, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 802 or a computer program loaded from a storage unit 808 into a random access memory (RAM) 803. In the RAM 803, various programs and data required for the operation of the device 800 can also be stored. The computing unit 801, the ROM 802, and the RAM 803 are connected to each other via a bus 804. An input / output (I / O) interface 805 is also connected to the bus 804.

[0169] A number of components in the device 800 are connected to the I / O interface 805, including: an input unit 806, such as a keyboard, a mouse, etc.; an output unit 807, such as various types of displays, speakers, etc.; a storage unit 808, such as a disk, an optical disk, etc.; and a communication unit 809, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 809 allows the device 800 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.

[0170] The computing unit 801 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the computing unit 801 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The computing unit 801 performs the various methods and processes described above, such as the power management method. For example, in some embodiments, the power management method may be implemented as a computer software program, which is tangibly contained in a machine-readable medium, such as a storage unit 808. In some embodiments, part or all of the computer program may be loaded and / or installed on the device 800 via the ROM 802 and / or the communication unit 809. When the computer program is loaded into the RAM 803 and executed by the computing unit 801, one or more steps of the power management method described above may be performed. Alternatively, in other embodiments, the computing unit 801 may be configured to perform the power management method in any other appropriate manner (e.g., by means of firmware).

[0171] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0172] The program code for implementing the method of the present application can be written in any combination of one or more programming languages. These program codes can be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that the program code, when executed by the processor or controller, implements the functions / operations specified in the flow chart and / or block diagram. The program code can be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.

[0173] In the context of the present application, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0174] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).

[0175] The systems and techniques described herein may be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), and the Internet.

[0176] A computer system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The relationship of client and server is generated by computer programs running on respective computers and having a client-server relationship with each other. The server may be a cloud server, a server of a distributed system, or a server combined with a blockchain.

[0177] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

Claims

1. A power management method, characterized in that: The method is applied to a first system, where the first system can communicate with a second system, and the method includes: Obtaining a second management request and setting information for the hardware, wherein the second management request and the setting information are obtained based on a first management request of the second system, and the first management request is generated when the second system has a management request for the hardware; Based on the setting information, target identification information of target hardware for which a management request exists among the M hardware is obtained, where M is a positive integer greater than or equal to 1; Based on the target identification information and the second management request, a management behavior for the target hardware is obtained to execute the management behavior for the target hardware.

2. The method according to claim 1, characterized in that The M hardwares have respective storage spaces; the second management request is stored in the storage space of the target hardware; wherein at least part of the information in the second management request represents a management behavior on the target hardware, and the second management request is obtained by processing the first management request; The obtaining, based on the target identification information and the second management request, a management behavior for the target hardware, includes: Based on the target identification information, determine a target storage space from the M storage spaces; Obtaining a second management request from the target storage space; The second management request is analyzed or parsed to obtain management behavior for the target hardware.

3. The method according to claim 1 or 2, characterized in that: The M hardwares have respective setting information; the value of the setting information of the hardware for which the management request exists among the M hardwares is different from the value of the setting information of the hardware for which the management request does not exist; The obtaining, based on the setting information, target identification information of the target hardware for which the management request exists among the M hardware includes: Get the setting information of each hardware; Based on the value of the setting information of each hardware, it is determined that there is hardware with a management request among the M hardware; The identification information of the hardware for which the management request is made is used as the target identification information.

4. The method according to claim 1, characterized in that: The number of hardware for which management request exists in the M hardware is at least two; the second management request includes a management request for each hardware in the at least two hardware, and the setting information includes setting information for each hardware in the at least two hardware; The method further comprises: Based on the setting information of each hardware, the target identification information of each hardware is obtained; Based on the target identification information of each hardware and the management request of each hardware, the management behavior of each hardware is obtained; Execute management actions on each hardware according to the setting order of each hardware.

5. The method according to claim 4, characterized in that Also includes: In response to the management behavior of each hardware, the setting information of each hardware is updated, so as to feed back the updated setting information of each hardware to the second system.

6. The method according to claim 4, characterized in that Also includes: In response to the management behavior of the hardware in the preceding order in the setting sequence, updating the setting information of the hardware in the preceding order, so as to feed back the updated setting information of the hardware in the preceding order to the second system; In response to the update of the setting information of the hardware in the previous order, the management behavior of the hardware in the next order in the setting order is performed, and the setting information of the hardware in the next order is updated, so that the updated setting information of the hardware in the next order is used to feed back the second system.

7. The method according to claim 3, characterized in that One of the first system and the second system includes a target register, the target register includes N bits, N is a positive integer greater than or equal to M; Each bit in the target register is used to record the setting information of each hardware.

8. The method according to claim 1, characterized in that The second system includes a system kernel and a system firmware; wherein, The system kernel determines a target function from at least two management functions based on the generated management request for the hardware and the identification information of the hardware, and transmits a first management request including the target function to the system firmware; The system firmware obtains setting information and a second management request for the hardware based on the target function, and the second management request is stored in a storage space of the hardware where the management request exists.

9. A power management method, characterized in that: Applied to a power management system, the power management system includes a first system and a second system, and the method includes: The second system generates a first management request for the hardware, and based on the first management request, obtains setting information and a second management request for the hardware; The first system obtains a second management request and setting information for the hardware, and based on the setting information, obtains target identification information of the target hardware for which the management request exists among M hardware, where M is a positive integer greater than or equal to 1; based on the target identification information and the second management request, obtains management behavior for the target hardware to execute the management behavior on the target hardware.

10. A power management system, characterized in that: include: a first obtaining unit, configured to obtain a second management request and setting information for the hardware, wherein the second management request and the setting information are obtained based on a first management request of a second system communicating with the power management system, the first management request being generated when the second system has a management request for the hardware; A second obtaining unit is used to obtain target identification information of target hardware for which a management request exists among the M hardware based on the setting information, where M is a positive integer greater than or equal to 1; The third obtaining unit is used to obtain the management behavior for the target hardware based on the target identification information and the second management request, so as to execute the management behavior for the target hardware.

11. A power management system, characterized in that: include: The second system is used to generate a first management request for the hardware, and obtain the setting information and the second management request for the hardware based on the first management request; The first system is configured to obtain a second management request and setting information for hardware, and based on the setting information, obtain target identification information of target hardware for which the management request exists among M hardware, where M is a positive integer greater than or equal to 1; Based on the target identification information and the second management request, a management behavior for the target hardware is obtained to execute the management behavior for the target hardware.

12. An electronic device, characterized in that: include: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method of any one of claims 1 to 8 and / or claim 9.

13. A non-transitory computer-readable storage medium storing computer instructions, characterized in that: The computer instructions are used to cause the computer to execute the method according to any one of claims 1 to 8 and / or claim 9.

14. A computer program product, characterized in that The invention comprises a computer program, which implements the method according to any one of claims 1 to 8 and / or claim 9 when being executed by a processor.