Domestic platform key module power consumption management method, device, equipment and medium

By dynamically adjusting the GPIO level of key modules in the processor of domestic platforms and managing power consumption according to their working status, the problem of poor power consumption management flexibility in the existing technology is solved, and efficiency and flexibility are improved.

CN120144404APending Publication Date: 2025-06-13SHANDONG CHAOYUE DATA CONTROL ELECTRONICS CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510279094.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-10
Publication Date
2025-06-13

AI Technical Summary

Technical Problem

Domestic platforms have poor flexibility in power consumption management and cannot dynamically adjust according to the different working states of key modules, resulting in low power consumption management efficiency and waste of resources.

Method used

By receiving the power-up request for key modules in the processor of the domestic platform, obtaining the bound GPIO and driver loading method corresponding to the power supply, and dynamically adjusting the GPIO level based on this information to start or power off the key module.

Benefits of technology

Dynamic power consumption management is realized according to the working status of the key modules, improving the efficiency of power consumption management, reducing resource waste, and improving the flexibility of power consumption management.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120144404A_ABST
    Figure CN120144404A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of computers, and provides a domestic platform key module power consumption management method and device, equipment and a medium. The method comprises the following steps: in response to a power-on request, received by a processor of a domestic platform, of a key module, acquiring GPIO (General Purpose Input / Output) correspondingly bound with a power supply of the key module and a corresponding drive loading mode from the power-on request; changing a GPIO level correspondingly bound with a power supply of the key module from a first state to a second state according to the corresponding drive loading mode so as to start the key module to work; and in response to a signal that the processor receives work completion of the key module, recovering the correspondingly bound GPIO level from the second state to the first state according to the corresponding drive loading mode, so as to power off the key module. According to the scheme, dynamic adjustment can be carried out according to different working states of the key module, the power consumption management efficiency is improved, and the power consumption management flexibility is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular, to a method, device, equipment and medium for power consumption management of key modules on domestic platforms. Background Art

[0002] Domestic platforms currently include platforms such as Loongson, Phytium, Kunpeng, and Sunway. Domestic platforms have made significant progress in performance, but still face some challenges in power consumption management. On domestic platforms, some non-real-time operating modules that do not need to run in real time but play an important role in the overall operation, that is, key modules for domestic platforms, such as communication modules (wireless communication modules, wired communication modules, etc.), computing modules (graphics processors, coprocessors, etc.), storage modules (external memories, non-volatile memories, etc.), etc. Whether their power consumption can be effectively managed plays an important role in the overall power consumption management of domestic platforms.

[0003] However, in the prior art, the power consumption management method of domestic platforms is generally unified management based on a fixed power consumption management strategy, which cannot be dynamically adjusted according to the different working states of key modules, reducing the efficiency of power consumption management, easily causing waste of power consumption management resources, and having poor flexibility.

[0004] Therefore, there is an urgent need for a method that improves the efficiency and flexibility of power consumption management of domestic platforms based on the working state of key modules themselves. Summary of the Invention

[0005] In view of this, the present invention provides a method, device, equipment and medium for power consumption management of key modules on domestic platforms.

[0006] According to a first aspect of the present invention, there is provided a method for power consumption management of key modules on domestic platforms, including: In response to the processor of the domestic platform receiving a power-on request from a key module, obtaining the GPIO corresponding to the power supply of the key module and the corresponding driver loading method from the power-on request; Changing the GPIO level corresponding to the power supply of the key module from a first state to a second state according to the corresponding driver loading method to start the key module to work; In response to the processor receiving a signal that the key module has completed its work, restoring the GPIO level of the corresponding binding from the second state to the first state according to the corresponding driver loading method to power off the key module.

[0007] In some embodiments, the step of changing the GPIO level corresponding to the power supply of the key module from the first state to the second state according to the corresponding driver loading method includes: In response to the corresponding driver loading method being the dynamic loading method, load the driver program corresponding to the key module, and modify the level of the GPIO corresponding to the power supply of the key module recorded therein from a low level to a high level, so as to change from the first state to the second state.

[0008] In some embodiments, the step of modifying the level of the GPIO corresponding to the power supply of the key module recorded therein from a low level to a high level includes: By modifying the values in the module_init and module_exit functions of the driver program, modify the level of the GPIO corresponding to the power supply of the key module from a low level to a high level.

[0009] In some embodiments, the step of changing the GPIO level corresponding to the power supply of the key module from the first state to the second state according to the corresponding driver loading method includes: In response to the corresponding driver loading method being the static loading method, pull up the level of the GPIO corresponding to the power supply of the key module in the GPIO register, so as to change from the first state to the second state.

[0010] In some embodiments, the method further includes: setting the GPIO corresponding to the power supply of the key module through the association relationship between the operating voltages of several key modules and the power domains of the corresponding GPIOs.

[0011] In some embodiments, the step of restoring the GPIO level corresponding to the binding from the second state to the first state according to the corresponding driver loading method includes: In response to the corresponding driver loading method being the dynamic loading method, load the driver program corresponding to the key module, and modify the level of the GPIO corresponding to the power supply of the key module recorded therein from a high level to a low level, so as to restore from the second state to the first state.

[0012] In some embodiments, the step of restoring the GPIO level corresponding to the binding from the second state to the first state according to the corresponding driver loading method further includes: In response to the driver loading method being the static loading method, pull down the level of the GPIO corresponding to the power supply of the key module in the GPIO register, so as to restore from the second state to the first state.

[0013] According to a second aspect of the present invention, there is provided an apparatus for power consumption management of key modules of a domestic platform, the apparatus comprising: A first module, configured to, in response to a power-on request of a key module received by a processor of a domestic platform, obtain the GPIO corresponding to the power supply of the key module and the corresponding driver loading method from the power-on request; A second module, configured to change the GPIO level corresponding to the power supply of the key module from a first state to a second state according to the corresponding driver loading method, so as to start the key module to work; A third module, configured to, in response to a signal indicating that the key module has completed its work received by the processor, restore the GPIO level of the corresponding binding to the first state according to the corresponding driver loading method, so as to cut off the power supply of the key module.

[0014] According to a third aspect of the present invention, there is also provided an electronic device, the electronic device comprising: at least one processor; and a memory, the memory storing a computer program that can run on the processor, and the processor executes the program to execute the foregoing method for power consumption management of key modules of a domestic platform.

[0015] According to a fourth aspect of the present invention, there is also provided a computer-readable storage medium, the computer-readable storage medium storing a computer program, and when the computer program is executed by a processor, it executes the foregoing method for power consumption management of key modules of a domestic platform.

[0016] For the foregoing method for power consumption management of key modules of a domestic platform, when a processor of a domestic platform receives a power-on request of a key module, it obtains the GPIO corresponding to the power supply of the key module and the corresponding driver loading method of the key module from the power-on request, changes the GPIO level corresponding to the power supply of the key module from a first state to a second state according to the corresponding driver loading method, starts the key module to work, and when the processor receives a signal indicating that the key module has completed its work, restores the GPIO level of the corresponding binding to the first state according to the corresponding driver loading method, and cuts off the power supply of the key module. Based on the working state of the key module itself, rather than unified management based on a fixed power consumption management strategy, based on the corresponding driver loading method of the key module and the GPIO corresponding to its power supply, the driver is loaded according to the corresponding driver loading method and the power-on and power-off of the key module are controlled by the high and low levels of the GPIO, which can be dynamically adjusted according to the different working states of the key module. The key module is powered on when it needs to work and powered off in time after the work is completed, which improves the efficiency of power consumption management, reduces the waste of resources for power consumption management, fully faces the key module for power consumption management, and improves the flexibility of power consumption management.

[0017] In addition, the present invention also provides a device for power consumption management of key modules of a domestic platform, an electronic device, and a computer-readable storage medium, which can also achieve the above technical effects and will not be elaborated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings required for use in the description of the embodiments or the prior art. Obviously, the following drawings are only some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other embodiments can be obtained based on these drawings.

[0019] Figure 1 It is a flowchart of a method for power consumption management of key modules of a domestic platform provided in the first embodiment of the present invention; Figure 2 It is a flowchart of starting a key module provided in the first embodiment of the present invention; Figure 3 It is a schematic structural diagram of a device for power consumption management of key modules of a domestic platform provided in another embodiment of the present invention; Figure 4 It is an internal structure diagram of an electronic device in another embodiment of the present invention; Figure 5 It is a structural diagram of a computer-readable storage medium in another embodiment of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0020] To make the objectives, technical solutions, and advantages of the present invention clearer, the following further elaborates on the embodiments of the present invention in detail with reference to specific embodiments and the accompanying drawings.

[0021] It should be noted that all the expressions using "first" and "second" in the embodiments of the present invention are used to distinguish two non-identical entities or non-identical parameters with the same name. It can be seen that "first" and "second" are only for the convenience of expression and should not be construed as a limitation on the embodiments of the present invention. This will not be elaborated one by one in the subsequent embodiments.

[0022] In one embodiment, please refer to Figure 1 As shown, the present invention provides a method 100 for power consumption management of key modules of a domestic platform, specifically including: Step 101, in response to the processor of the domestic platform receiving a power-on request for a key module, obtain the GPIO bound to the power supply of the key module and the corresponding driver loading method from the power-on request; Specifically, domestic platforms include LoongArch, FT-2000 / 4, Kunpeng, SW64, etc. The key modules refer to the modules that do not need to run in real time in domestic platforms but play an important role in the overall operation of domestic platforms. The key modules can also be called non-real-time operation modules, including communication modules (wireless communication modules, wired communication modules, etc.), computing modules (graphics processors, coprocessors, etc.), storage modules (external memories, non-volatile memories, etc.), etc. When initially designing the hardware, establish a binding relationship between the working voltage of the key module and the GPIO (General-Purpose Input / Output) of the corresponding power domain. Based on the power domain corresponding to the working voltage of the key module, establish a binding relationship between the key module and the GPIO of the corresponding power domain. The driver loading method of the key module is divided into dynamic driver loading method and static driver loading method. The dynamic driver loading method can be loaded on demand. When the key module needs to be powered on and work, load the corresponding driver loading program into the kernel to achieve dynamic driver loading; the static driver loading method is to compile the driver code into the kernel image, and the driver is loaded when the system starts and cannot be unloaded during the system operation. In the domestic server platform, the relevant modules (core hardware) of the memory controller driver can only be statically loaded, while the external storage device driver and the hot-pluggable PCIE (Peripheral Component Interconnect Express) device driver can be loaded on demand through dynamic loading.

[0023] Step 102, change the GPIO level corresponding to the power supply of the key module from the first state to the second state according to the corresponding driver loading method to start the key module to work; Specifically, when the key module is in the powered-on state, the level state of the GPIO corresponding to its power supply is high level, marked as 1. When the key module is in the powered-off state, the level state of the GPIO corresponding to its power supply is low level, marked as 0. The method further includes setting the GPIO corresponding to the power supply of the key module through the association relationship between the working voltages of several key modules and the power domains of the corresponding GPIOs. As Figure 2 shown, Figure 2It is a flowchart for starting a key module. During the initial hardware design, a binding relationship is established between the operating voltage of the key module and the GPIO of the corresponding power domain. Based on the power domain corresponding to the operating voltage of the key module, a binding relationship is established between the key module and the GPIO of the corresponding power domain. If the driver loading method of the key module is the dynamic driver loading method, then load the driver program corresponding to the key module. By modifying the values in the module_init and module_exit functions in the driver program, change the level of the GPIO bound to the power supply of the key module from low level to high level, and change the identifier from 0 to 1 to start the key module. If the driver loading method of the key module is the static driver loading method, then the driver of the key module is loaded during system operation. By pulling up the level of the GPIO bound to the power supply of the key module in the GPIO register, changing it from low level to high level, and changing the identifier from 0 to 1, start the key module.

[0024] Step 103, in response to the processor receiving a signal that the key module has completed its work, restore the level of the corresponding bound GPIO from the second state to the first state according to the corresponding driver loading method to power off the key module.

[0025] Specifically, after the key module starts, it sends a start signal to the processor. After receiving the start signal, the processor starts to monitor the working state of the key module in real time to check whether the work is completed. If the processor receives a work completion signal sent by the key module, then the processor performs a power-off operation on it. According to the corresponding driver loading method of the key module (dynamic driver loading method or static driver loading method), restore the level of the GPIO bound to the key module from the second state to the first state to power off the key module. If the driver loading method of the key module is the dynamic driver loading method, load the driver program corresponding to the key module. By modifying the values in the module_init and module_exit functions in the driver program, change the level of the GPIO bound to the power supply of the key module from high level to low level, and change the identifier from 1 to 0 to power off the key module. If the driver loading method of the key module is the static driver loading method, then the driver of the key module is loaded during system operation. By pulling down the level of the GPIO bound to the power supply of the key module in the GPIO register, changing it from high level to low level, and changing the identifier from 1 to 0, power off the key module.

[0026] The above method for power consumption management of key modules of a domestic platform is based on the working state of the key modules themselves, rather than unified management based on a fixed power consumption management strategy. Based on the corresponding driver loading method of the key modules and the GPIO corresponding to their power supply, the driver is loaded according to the corresponding driver loading method, and the power on and off of the key modules are controlled through the high and low levels of the GPIO. It can be dynamically adjusted according to the different working states of the key modules. When the key modules need to work, they are powered on, and when the work is completed, they are powered off in a timely manner, improving the efficiency of power consumption management, reducing the waste of resources for power consumption management, fully targeting the key modules for power consumption management, and improving the flexibility of power consumption management.

[0027] According to some embodiments of the present invention, the step of changing the level of the GPIO corresponding to the power supply of the key module from the first state to the second state according to the corresponding driver loading method includes: in response to the corresponding driver loading method being the dynamic loading method, loading the driver program corresponding to the key module, and changing the level of the GPIO corresponding to the key module recorded therein from the low level to the high level, so as to change from the first state to the second state. The dynamic driver loading method can be loaded on demand, saving memory. At the same time, the driver can be updated separately, which is convenient for debugging and is conducive to improving the flexibility of power consumption management.

[0028] According to some embodiments of the present invention, the step of changing the level of the GPIO corresponding to the power supply of the key module recorded therein from the low level to the high level includes: by modifying the values in the module_init and module_exit functions of the driver program, changing the level of the GPIO corresponding to the power supply of the key module from the low level to the high level.

[0029] According to some embodiments of the present invention, the step of changing the level of the GPIO corresponding to the power supply of the key module from the first state to the second state according to the corresponding driver loading method includes: in response to the corresponding driver loading method being the static loading method, pulling up the level of the GPIO corresponding to the power supply of the key module in the GPIO register, so as to change from the first state to the second state. The static driver loading method is suitable for key modules with high requirements for performance and security. It is loaded after the system starts up, passes through a complete kernel verification, and has high reliability. After that, no additional loading steps are required.

[0030] According to some embodiments of the present invention, the step of restoring the level of the corresponding bound GPIO from the second state to the first state according to the corresponding driver loading method includes: in response to the corresponding driver loading method being the dynamic loading method, loading the driver program corresponding to the key module, and changing the level of the GPIO corresponding to the power supply of the key module recorded therein from the high level to the low level, so as to restore from the second state to the first state.

[0031] According to several embodiments of the present invention, the step of restoring the GPIO level corresponding to the binding to the first state from the second state according to the corresponding drive loading method further includes: in response to the drive loading method being the static loading method, pulling down the level of the GPIO corresponding to the power supply of the key module in the GPIO register to restore it to the first state from the second state.

[0032] In some embodiments, please refer to Figure 3 As shown, the present invention also provides a device 200 for power consumption management of key modules on a domestic platform. The device includes: a first module 201, which, in response to the processor of the domestic platform receiving a power-on request for a key module, obtains the GPIO corresponding to the power supply of the key module and the corresponding drive loading method from the power-on request; a second module 202, which changes the GPIO level corresponding to the power supply of the key module from the first state to the second state according to the corresponding drive loading method to start the key module to work; a third module 203, which, in response to the processor receiving a signal that the key module has completed its work, restores the GPIO level corresponding to the binding to the first state from the second state according to the corresponding drive loading method to cut off the power supply of the key module.

[0033] It should be noted that each module in the above device for power consumption management of key modules on a domestic platform can be implemented in whole or in part by software, hardware, and their combination. The above modules can be embedded in the processor of the electronic device in hardware form or be independent of it, or can be stored in the memory of the electronic device in software form so that the processor can call and execute the operations corresponding to each of the above modules.

[0034] According to another aspect of the present invention, there is provided an electronic device, which can be a server. Please refer to Figure 4 As shown. The electronic device includes a processor, a memory, a network interface, and a database connected through a system bus. Among them, the processor of the electronic device is used to provide computing and control capabilities. The memory of the electronic device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the electronic device is used to store data. The network interface of the electronic device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, it implements the method for power consumption management of key modules on a domestic platform described above.

[0035] According to yet another aspect of the present invention, there is provided a computer-readable storage medium. Please refer to Figure 5 As shown, on which a computer program is stored. When the computer program is executed by the processor, it implements the method for power consumption management of key modules on a domestic platform described above.

[0036] Those of ordinary skill in the art can understand that all or part of the processes in the methods of the above embodiments can be completed by instructing relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above methods. Among them, any reference to a memory, storage, database, or other medium used in the various embodiments provided in this application can include non-volatile and / or volatile memories. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), Rambus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and Rambus dynamic RAM (RDRAM), etc.

[0037] The technical features of the above embodiments can be combined arbitrarily. For the sake of brevity of description, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, it should be considered as the scope described in this specification.

[0038] The above-described embodiments merely represent several implementation manners of this application. The description is relatively specific and detailed, but it should not be construed as a limitation on the scope of the invention patent. It should be noted that for those of ordinary skill in the art, without departing from the concept of this application, several modifications and improvements can still be made, and these all belong to the protection scope of this application. Therefore, the protection scope of the patent of this application should be subject to the appended claims.

Claims

1. A method for power consumption management of key modules of a domestic platform, characterized in that: include: In response to the processor of the domestic platform receiving a power-on request of the key module, the GPIO corresponding to the power supply of the key module and the corresponding driver loading mode are obtained from the power-on request; According to the corresponding driver loading mode, the GPIO level corresponding to the power supply of the key module is changed from a first state to a second state, so as to start the key module to start working; In response to the processor receiving the signal indicating that the key module has completed work, the corresponding bound GPIO level is restored from the second state to the first state according to the corresponding driver loading mode to power off the key module.

2. The method for power consumption management of key modules of a domestic platform according to claim 1, characterized in that: The step of changing the GPIO level bound to the power supply of the key module from the first state to the second state according to the corresponding driver loading mode includes: In response to the corresponding driver loading mode being a dynamic loading mode, the driver program corresponding to the key module is loaded, and the level of the GPIO bound to the key module recorded therein is modified from a low level to a high level, so as to change from a first state to a second state.

3. The method for power consumption management of key modules of a domestic platform according to claim 2, characterized in that: The step of modifying the level of the GPIO bound to the key module recorded therein from a low level to a high level comprises: By modifying the values ​​in the module_init and module_exit functions of the driver, the level of the GPIO bound to the power supply of the key module is changed from a low level to a high level.

4. The method for power consumption management of key modules of a domestic platform according to claim 1, characterized in that: The step of changing the GPIO level bound to the power supply of the key module from the first state to the second state according to the corresponding driver loading mode includes: In response to the corresponding driver loading mode being a static loading mode, the level of the GPIO bound to the power supply of the key module in the GPIO register is pulled high to change from the first state to the second state.

5. The method for power consumption management of key modules of a domestic platform according to claim 1, characterized in that: Also includes: The GPIO bound to the power supply of the key modules is set based on the association between the operating voltages of several key modules and the power domains of the corresponding GPIOs.

6. The method for power consumption management of key modules of a domestic platform according to claim 1, characterized in that: The step of restoring the corresponding bound GPIO level from the second state to the first state according to the corresponding driver loading mode includes: In response to the corresponding driver loading mode being a dynamic loading mode, the driver program corresponding to the key module is loaded, and the level of the GPIO bound to the power supply of the key module recorded therein is modified from a high level to a low level to restore from the second state to the first state.

7. The method for power consumption management of key modules of a domestic platform according to claim 1, characterized in that: The step of restoring the corresponding bound GPIO level from the second state to the first state according to the corresponding driver loading mode further includes: In response to the driver loading mode being a static loading mode, the level of the GPIO bound to the power supply of the key module in the GPIO register is pulled down to restore from the second state to the first state.

8. A device for power consumption management of key modules of a domestic platform, characterized in that: The device comprises: The first module is used for obtaining the GPIO bound to the power supply of the key module and the corresponding driver loading mode from the power-on request in response to the processor of the domestic platform receiving the power-on request of the key module; The second module is used to change the GPIO level corresponding to the power supply of the key module from the first state to the second state according to the corresponding driver loading mode, so as to start the key module to start working; The third module is used for, in response to the processor receiving the signal indicating that the key module has completed its work, restoring the corresponding bound GPIO level from the second state to the first state according to the corresponding driver loading mode to power off the key module.

9. An electronic device, characterized in that: include: at least one processor; as well as A memory, wherein the memory stores a computer program that can be executed in the processor, and when the processor executes the program, the method for power consumption management of key modules of the domestic platform described in any one of claims 1-7 is executed.

10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by the processor, the method for power consumption management of key modules of the domestic platform as described in any one of claims 1-7 is performed.