Mainboard power consumption adjusting method and device based on OPS computer, equipment and medium
By obtaining and comparing the initial and current power consumption limit values of the OPS computer motherboard, determining the target power consumption limit values, and adjusting the motherboard, it solves the frequent adjustment problem caused by the power consumption difference of OPS computers in different usage scenarios, and improves the Adjustment and use efficiency.
Patent Information
- Application Number
- CN202411551354.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-01
- Publication Date
- 2025-02-14
AI Technical Summary
In different usage scenarios, the power consumption of the power input by the OPS computer will be different, resulting in frequent modification of the motherboard power consumption, which increases the inefficiency of later maintenance and adjustment, and thus the problem of low usage efficiency.
By responding to the boot command, obtain the initial power consumption limit value in the OPS computer motherboard, use the OPS interface to read multiple status values and convert the current power consumption limit value, and perform comparison processing to determine the target power consumption limit value, so as to perform the motherboard Adjustment processing.
The target power consumption limit value is accurately determined based on the comparison results of the initial and current power consumption limit values, which reduces the possibility of later maintenance and improves the regulation efficiency and use efficiency.
Smart Images

Figure CN119440212A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of mainboard power consumption, and in particular to a mainboard power consumption adjustment method, device, equipment and medium based on an OPS computer. Background Art
[0002] An OPS (Open Pluggable Specification) computer is a small, portable computer with a pre-installed operating system that can be directly plugged into a monitor, keyboard, mouse and other devices for use; and OPS computers are usually used in business meetings, classroom teaching and public entertainment venues, and generally use an X86 structure. However, due to the complex and variable power input power of OPS all-in-one computers, when the same motherboard is connected to different power supplies through the OPS interface, in order to achieve the best operating efficiency of the device, the power consumption of the CPU and the entire machine needs to be modified. That is, in different usage scenarios, the power consumption of the power input of the OPS computer will be different. Therefore, the power consumption of the motherboard needs to be frequently modified, which may lead to an increase in subsequent maintenance and lower adjustment efficiency, resulting in low efficiency. Summary of the invention
[0003] The embodiments of the present invention provide a method, device, equipment and medium for adjusting the power consumption of a mainboard based on an OPS computer, aiming to solve the problem in the prior art that the power consumption of the power input to the OPS computer may vary in different usage scenarios. Therefore, the mainboard power consumption needs to be frequently modified, which may lead to an increase in subsequent maintenance and lower adjustment efficiency, thereby resulting in lower usage efficiency.
[0004] In order to solve the above problems, in a first aspect, an embodiment of the present invention provides a method for adjusting power consumption of a mainboard based on an OPS computer, which comprises:
[0005] In response to a power-on instruction, obtaining an initial power consumption limit value stored in a mainboard of the OPS computer;
[0006] Using the OPS interface of the OPS computer to read multiple status values, and converting each status value to obtain a current power consumption limit value;
[0007] Comparing the initial power consumption limit value with the current power consumption limit value to obtain a first comparison result;
[0008] A target power consumption limit value is determined according to the first comparison result to adjust the mainboard.
[0009] In a second aspect, an embodiment of the present application provides a mainboard power consumption adjustment device based on an OPS computer, which includes:
[0010] An acquisition unit, for acquiring an initial power consumption limit value stored in a mainboard of the OPS computer in response to a power-on instruction;
[0011] A conversion unit, used for reading a plurality of status values by using the OPS interface of the OPS computer, and converting each status value to obtain a current power consumption limit value;
[0012] A comparing unit, configured to compare the initial power consumption limit value with the current power consumption limit value to obtain a first comparison result;
[0013] An adjusting unit is used to determine a target power consumption limit value according to the first comparison result so as to adjust the mainboard.
[0014] In a third aspect, an embodiment of the present application provides a computer device, comprising a memory and a processor connected to the memory; the memory is used to store a computer program, and the processor is used to run the computer program stored in the memory to execute the method described in the first aspect above.
[0015] In a fourth aspect, an embodiment of the present application provides a storage medium, wherein the storage medium stores a computer program, wherein the computer program includes program instructions, and when the program instructions are executed by a processor, the method described in the first aspect above is implemented.
[0016] The embodiment of the present invention provides a method, device, equipment and medium for adjusting the power consumption of a mainboard based on an OPS computer, and the method includes: in response to a power-on instruction, obtaining an initial power consumption limit value stored in the mainboard of the OPS computer; using the OPS interface of the OPS computer to read multiple status values, and converting each status value to obtain a current power consumption limit value; comparing the initial power consumption limit value with the current power consumption limit value to obtain a first comparison result; determining a target power consumption limit value according to the first comparison result to adjust the mainboard. It can be seen that by implementing the embodiment of the present invention, the initial power consumption limit value obtained and the current power consumption limit value obtained by conversion are compared to obtain a first comparison result, and the target power consumption limit value is accurately determined according to the first comparison result to adjust the mainboard. Therefore, the target power consumption limit value is accurately determined according to the first comparison result, and the mainboard can be adjusted more accurately and quickly to reduce the possibility of later maintenance, improve the adjustment efficiency, and thus improve the use efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying any creative work.
[0018] Figure 1 A schematic diagram of a flow chart of a method for adjusting power consumption of a mainboard based on an OPS computer provided in an embodiment of the present invention;
[0019] Figure 2 A schematic block diagram of a mainboard power consumption adjustment device based on an OPS computer provided in an embodiment of the present invention;
[0020] Figure 3 A schematic block diagram of a computer device provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0021] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0022] It should be understood that when used in this specification and the appended claims, the terms "include" and "comprises" indicate the presence of described features, integers, steps, operations, elements and / or components, but do not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or combinations thereof.
[0023] It should also be understood that the terms used in the present specification are only for the purpose of describing specific embodiments and are not intended to limit the present invention. As used in the present specification and the appended claims, unless the context clearly indicates otherwise, the singular forms "a", "an" and "the" are intended to include plural forms.
[0024] It should be further understood that the term "and / or" used in the present description and the appended claims refers to any and all possible combinations of one or more of the associated listed items, and includes these combinations.
[0025] See also Figure 1 , Figure 1 The present invention provides a flow chart of a method for adjusting the power consumption of a motherboard based on an OPS computer. Figure 1As shown, an embodiment of the present invention provides a method for adjusting the power consumption of a mainboard based on an OPS computer, and the method includes the following steps S110-S140.
[0026] S110 . In response to a power-on instruction, an initial power consumption limit value stored in a mainboard of the OPS computer is obtained.
[0027] In this embodiment, the power-on instruction may be an instruction sent from the power-on button of the OPS computer. The method for adjusting the power consumption of the motherboard based on the OPS computer is operated by the controller (i.e., the central processing unit, CPU) of the OPS computer, and the controller is arranged on the motherboard of the OPS computer; the OPS computer includes a motherboard, an OPS interface, a power interface, and a power adapter adapted to the power interface, etc.; the motherboard is provided with a controller and a FLASH ROM (Flash Memory) memory, etc., and the initial power consumption limit value is stored in the FLASH ROM memory; the motherboard is provided with an initial target power consumption limit value according to the configuration of the manufacturing design or the user manual, and the target power consumption limit value is stored as the initial power consumption limit value in the FLASH ROM memory in the motherboard; when the OPS computer is used for the first time, the initial power consumption limit value, i.e., the initial target power consumption limit value, can be used to adjust the motherboard; the power adapter inputs the power consumption to the OPS computer through the power interface.
[0028] In response to the power-on instruction, the controller obtains the initial power consumption limit value stored in the FLASH ROM memory, so as to perform subsequent targeted processing using the initial power consumption limit value.
[0029] In the case where the power consumption input by the OPS computer is different, the OPS computer can be connected to external devices such as a display, keyboard, and mouse. When the number of external devices increases or decreases, the power delivered to the mainboard by the OPS computer will decrease or increase accordingly. Therefore, in different usage scenarios, the power delivered to the mainboard by the OPS computer will change, and accordingly, the target power consumption limit value of the mainboard also needs to be adjusted accordingly to reduce the possibility of later maintenance, improve the adjustment efficiency, and thus improve the usage efficiency.
[0030] S120, using the OPS interface of the OPS computer to read multiple status values, and converting each status value to obtain a current power consumption limit value.
[0031] In this embodiment, multiple status values refer to the numerical values of the GPIO (general-purpose input / output, GPIO for short) port status read through the OPS interface. Generally, an OPS computer is provided with 8 GPIO ports. Accordingly, 8 status values can be read through the OPS interface, that is, the number of status values is 8; when manufacturing and designing the OPS computer, a specific protocol setting can be performed on the GPIO port.
[0032] The controller reads multiple status values through the OPS interface, and converts each of the multiple status values to obtain the current power consumption limit value, so as to use the current power consumption limit value to more accurately perform subsequent targeted processing.
[0033] In one embodiment, the method of using the OPS interface of the OPS computer to read multiple status values and converting each status value to obtain the current power consumption limit value includes:
[0034] Perform judgment processing on each acquired state value in a preset order to obtain a judgment result;
[0035] Perform conversion processing according to the judgment result to obtain the current sub-power consumption limit value corresponding to each state value;
[0036] The current sub-power consumption limit values are combined and processed according to the preset order to obtain the current power consumption limit value.
[0037] In yet another embodiment, the converting process according to the judgment result to obtain the current sub-power consumption limit value corresponding to each state value includes:
[0038] If the judgment result is that each state value is equal to the first preset value, the corresponding current sub-power consumption limit value is 1;
[0039] If the judgment result is that each state value is equal to the second preset value, the corresponding current sub-power consumption limit value is 0.
[0040] In this embodiment, the preset order refers to the sequence of the GPIO ports from small to large; each state value corresponds to a current sub-power consumption limit value; the first preset value can be 3.3, and the second preset value can be 0, that is, each state value may be 3.3 or 0.
[0041] The controller performs judgment processing on each acquired state value according to the preset order to obtain a corresponding judgment result; when the judgment result is that each state value is equal to the first preset value, that is, a state value is equal to 3.3, then the corresponding current sub-power consumption limit value is 1; when the judgment result is that each state value is equal to the second preset value, that is, a state value is equal to 0, then the corresponding current sub-power consumption limit value is 0; and the obtained multiple current sub-power consumption limit values are combined and processed according to the preset order to obtain the current power consumption limit value. Therefore, according to the preset order, the corresponding current sub-power consumption limit value is determined for each judgment result that the state value is equal to the first preset value or the second preset value, and the multiple current sub-power consumption limit values are combined and processed according to the preset order to obtain the current power consumption limit value, which ensures accuracy, and the current power consumption limit value can be used for subsequent targeted processing.
[0042] S130: Compare the initial power consumption limit value with the current power consumption limit value to obtain a first comparison result.
[0043] In this embodiment, the controller compares each bit of the acquired initial power consumption limit value with the bit corresponding to the current power consumption limit value to obtain the first comparison result, that is, the first bit of the initial power consumption limit value is compared with the first bit of the current power consumption limit value, the second bit of the initial power consumption limit value is compared with the second bit of the current power consumption limit value, and so on; that is, if each bit of the initial power consumption limit value is equal to the bit corresponding to the current power consumption limit value, then the first comparison result is determined to be that the initial power consumption limit value is equal to the current power consumption limit value; if any bit of the initial power consumption limit value is not equal to the bit corresponding to the current power consumption limit value, then the first comparison result is determined to be that the initial power consumption limit value is not equal to the current power consumption limit value, so that subsequent targeted processing is performed according to the first comparison result.
[0044] S140: Determine a target power consumption limit value according to the first comparison result to adjust the mainboard.
[0045] In this embodiment, the first comparison result is determined by comparing the acquired initial power consumption limit value with the current power consumption limit value, and the target power consumption limit value can be determined based on the first comparison result to adjust the mainboard.
[0046] In one embodiment, determining a target power consumption limit value according to the first comparison result to adjust the mainboard includes:
[0047] If the first comparison result is that the initial power consumption limit value is not equal to the current power consumption limit value and the current power consumption limit value is not equal to zero, the current power consumption limit value is used as the target power consumption limit value, and the target power consumption limit value is used to adjust the mainboard.
[0048] In this embodiment, when the first comparison result is that the initial power consumption limit value is not equal to the current power consumption limit value and the current power consumption limit value is not equal to zero, it means that the power value of the power supply input to the OPS computer has changed, so the current power consumption limit value is used as the target power consumption limit value, that is, the current power consumption limit value replaces the previous target power consumption limit value, and the replaced target power consumption limit value is used to adjust the mainboard; at the same time, the current power consumption limit value replaces the previous initial power consumption limit value, and the replaced initial power consumption limit value is stored in the FLASH ROM memory in the mainboard. Therefore, the target power consumption limit value is accurately determined according to the first comparison result to reduce the possibility of later maintenance, improve the adjustment efficiency, and thus improve the use efficiency.
[0049] In one embodiment, determining a target power consumption limit value according to the first comparison result to adjust the mainboard includes:
[0050] If the first comparison result is that the initial power consumption limit value is not equal to the current power consumption limit value and the current power consumption limit value is equal to zero, the initial power consumption limit value is used as the target power consumption limit value, and the mainboard is adjusted using the target power consumption limit value.
[0051] In this embodiment, when the first comparison result is that the initial power consumption limit value is not equal to the current power consumption limit value and the current power consumption limit value is equal to zero, it indicates that the specific protocol setting of the GPIO port has not been performed, so the initial power consumption limit value is used as the target power consumption limit value, that is, the initial power consumption limit value replaces the target power consumption limit value before, and the target power consumption limit value after replacement is used to adjust the mainboard. Therefore, the target power consumption limit value is accurately determined according to the first comparison result to reduce the possibility of later maintenance, improve the adjustment efficiency, and thus improve the use efficiency.
[0052] In one embodiment, determining a target power consumption limit value according to the first comparison result to adjust the mainboard includes:
[0053] If the first comparison result is that the initial power consumption limit value is equal to the current power consumption limit value and both are not equal to zero, the initial power consumption limit value and the target power consumption limit value are compared to obtain a second comparison result, and the target power consumption limit value is determined according to the second comparison result to adjust the mainboard.
[0054] In one embodiment, determining the target power consumption limit value according to the second comparison result to adjust the mainboard includes:
[0055] If the second comparison result is that the initial power consumption limit value and the target power consumption limit value are equal and both are not equal to zero, the target power consumption limit value is used to adjust the mainboard.
[0056] In this embodiment, when the first comparison result is that the initial power consumption limit value is equal to the current power consumption limit value and both are not equal to zero, the initial power consumption limit value and the target power consumption limit value are compared to obtain a second comparison result; when the second processing result is that the initial power consumption limit value and the target power consumption limit value are equal to each other and both are not equal to zero, the target power consumption limit value is directly used to adjust the mainboard. In this way, the initial power consumption limit value and the target power consumption limit value are checked twice, thereby improving accuracy.
[0057] When the second comparison result is that the initial power consumption limit value and the target power consumption limit value are not equal and are not equal to zero, the initial power consumption limit value is used as the target power consumption limit value, that is, the initial power consumption limit value replaces the target power consumption limit value before, and the replaced target power consumption limit value is used to adjust the mainboard. In this way, the initial power consumption limit value and the target power consumption limit value are checked twice, which improves the accuracy.
[0058] When the first comparison result and the second comparison result are not the above situations, the controller may replace the previous target power consumption limit value with the initial power consumption limit value, and use the replaced target power consumption limit value to adjust the mainboard; or when the first comparison result and the second comparison result are not the above situations, the controller may send an error prompt message to the OPS computer.
[0059] Therefore, the target power consumption limit value is accurately determined according to the first comparison result and the second comparison result, so as to reduce the possibility of later maintenance, improve the adjustment efficiency, and thus improve the use efficiency.
[0060] In summary, in response to a power-on instruction, the initial power consumption limit value stored in the mainboard of the OPS computer is obtained; a plurality of status values are read using the OPS interface of the OPS computer, and each status value is converted to obtain a current power consumption limit value; the initial power consumption limit value is compared with the current power consumption limit value to obtain a first comparison result; and the target power consumption limit value is determined according to the first comparison result to adjust the mainboard. It can be seen that the first comparison result is obtained by comparing the initial power consumption limit value obtained and the current power consumption limit value obtained by conversion, and the target power consumption limit value is accurately determined according to the first comparison result to adjust the mainboard. Therefore, the target power consumption limit value is accurately determined according to the first comparison result, and the mainboard can be adjusted more accurately and quickly to reduce the possibility of later maintenance, improve the adjustment efficiency, and thus improve the use efficiency.
[0061] See also Figure 2 , Figure 2 The schematic block diagram of the mainboard power consumption adjustment device 100 based on the OPS computer provided by the embodiment of the present invention. Figure 2 As shown, an embodiment of the present invention provides a mainboard power consumption adjustment device 100 based on an OPS computer for implementing the above method, and the mainboard power consumption adjustment device 100 based on an OPS computer includes:
[0062] The acquisition unit 110 is used to acquire the initial power consumption limit value stored in the mainboard of the OPS computer in response to the power-on instruction.
[0063] In this embodiment, the power-on instruction may be an instruction sent from the power-on button of the OPS computer. The mainboard power consumption adjustment device based on the OPS computer is operated by the controller (i.e., the central processing unit, CPU) of the OPS computer, and the controller is arranged on the mainboard of the OPS computer; the OPS computer includes a mainboard, an OPS interface, a power interface, and a power adapter adapted to the power interface, etc.; the mainboard is provided with a controller and a FLASH ROM (Flash Memory) memory, etc., and the initial power consumption limit value is stored in the FLASH ROM memory; the mainboard is provided with an initial target power consumption limit value according to the configuration of the manufacturing design or the user manual, and the target power consumption limit value is stored as the initial power consumption limit value in the FLASH ROM memory in the mainboard; when the OPS computer is used for the first time, the initial power consumption limit value, i.e., the initial target power consumption limit value, can be used to adjust the mainboard; the power adapter inputs the power consumption to the OPS computer through the power interface.
[0064] In response to the power-on instruction, the controller obtains the initial power consumption limit value stored in the FLASH ROM memory, so as to perform subsequent targeted processing using the initial power consumption limit value.
[0065] In the case where the power consumption input by the OPS computer is different, the OPS computer can be connected to external devices such as a display, keyboard, and mouse. When the number of external devices increases or decreases, the power delivered to the mainboard by the OPS computer will decrease or increase accordingly. Therefore, in different usage scenarios, the power delivered to the mainboard by the OPS computer will change, and accordingly, the target power consumption limit value of the mainboard also needs to be adjusted accordingly to reduce the possibility of later maintenance, improve the adjustment efficiency, and thus improve the usage efficiency.
[0066] The conversion unit 120 is used to read multiple status values using the OPS interface of the OPS computer, and convert each status value to obtain a current power consumption limit value.
[0067] In this embodiment, multiple status values refer to the numerical values of the GPIO (general-purpose input / output, GPIO for short) port status read through the OPS interface. Generally, an OPS computer is provided with 8 GPIO ports. Accordingly, 8 status values can be read through the OPS interface, that is, the number of status values is 8; when manufacturing and designing the OPS computer, a specific protocol setting can be performed on the GPIO port.
[0068] The controller reads multiple status values through the OPS interface, and converts each of the multiple status values to obtain the current power consumption limit value, so as to use the current power consumption limit value to more accurately perform subsequent targeted processing.
[0069] In one embodiment, the method of using the OPS interface of the OPS computer to read multiple status values and converting each status value to obtain the current power consumption limit value includes:
[0070] Perform judgment processing on each acquired state value in a preset order to obtain a judgment result;
[0071] Perform conversion processing according to the judgment result to obtain the current sub-power consumption limit value corresponding to each state value;
[0072] The current sub-power consumption limit values are combined and processed according to the preset order to obtain the current power consumption limit value.
[0073] In yet another embodiment, the converting process according to the judgment result to obtain the current sub-power consumption limit value corresponding to each state value includes:
[0074] If the judgment result is that each state value is equal to the first preset value, the corresponding current sub-power consumption limit value is 1;
[0075] If the judgment result is that each state value is equal to the second preset value, the corresponding current sub-power consumption limit value is 0.
[0076] In this embodiment, the preset order refers to the sequence of the GPIO ports from small to large; each state value corresponds to a current sub-power consumption limit value; the first preset value can be 3.3, and the second preset value can be 0, that is, each state value may be 3.3 or 0.
[0077] The controller performs judgment processing on each acquired state value according to the preset order to obtain a corresponding judgment result; when the judgment result is that each state value is equal to the first preset value, that is, a state value is equal to 3.3, then the corresponding current sub-power consumption limit value is 1; when the judgment result is that each state value is equal to the second preset value, that is, a state value is equal to 0, then the corresponding current sub-power consumption limit value is 0; and the obtained multiple current sub-power consumption limit values are combined and processed according to the preset order to obtain the current power consumption limit value. Therefore, according to the preset order, the corresponding current sub-power consumption limit value is determined for each judgment result that the state value is equal to the first preset value or the second preset value, and the multiple current sub-power consumption limit values are combined and processed according to the preset order to obtain the current power consumption limit value, which ensures accuracy, and the current power consumption limit value can be used for subsequent targeted processing.
[0078] The comparing unit 130 is configured to compare the initial power consumption limit value with the current power consumption limit value to obtain a first comparison result.
[0079] In this embodiment, the controller compares each bit of the acquired initial power consumption limit value with the bit corresponding to the current power consumption limit value to obtain the first comparison result, that is, the first bit of the initial power consumption limit value is compared with the first bit of the current power consumption limit value, the second bit of the initial power consumption limit value is compared with the second bit of the current power consumption limit value, and so on; that is, if each bit of the initial power consumption limit value is equal to the bit corresponding to the current power consumption limit value, then the first comparison result is determined to be that the initial power consumption limit value is equal to the current power consumption limit value; if any bit of the initial power consumption limit value is not equal to the bit corresponding to the current power consumption limit value, then the first comparison result is determined to be that the initial power consumption limit value is not equal to the current power consumption limit value, so that subsequent targeted processing is performed according to the first comparison result.
[0080] The adjusting unit 140 is configured to determine a target power consumption limit value according to the first comparison result so as to adjust the mainboard.
[0081] In this embodiment, the first comparison result is determined by comparing the acquired initial power consumption limit value with the current power consumption limit value, and the target power consumption limit value can be determined based on the first comparison result to adjust the mainboard.
[0082] In one embodiment, determining a target power consumption limit value according to the first comparison result to adjust the mainboard includes:
[0083] If the first comparison result is that the initial power consumption limit value is not equal to the current power consumption limit value and the current power consumption limit value is not equal to zero, the current power consumption limit value is used as the target power consumption limit value, and the target power consumption limit value is used to adjust the mainboard.
[0084] In this embodiment, when the first comparison result is that the initial power consumption limit value is not equal to the current power consumption limit value and the current power consumption limit value is not equal to zero, it means that the power value of the power supply input to the OPS computer has changed, so the current power consumption limit value is used as the target power consumption limit value, that is, the current power consumption limit value replaces the previous target power consumption limit value, and the replaced target power consumption limit value is used to adjust the mainboard; at the same time, the current power consumption limit value replaces the previous initial power consumption limit value, and the replaced initial power consumption limit value is stored in the FLASH ROM memory in the mainboard. Therefore, the target power consumption limit value is accurately determined according to the first comparison result to reduce the possibility of later maintenance, improve the adjustment efficiency, and thus improve the use efficiency.
[0085] In one embodiment, determining a target power consumption limit value according to the first comparison result to adjust the mainboard includes:
[0086] If the first comparison result is that the initial power consumption limit value is not equal to the current power consumption limit value and the current power consumption limit value is equal to zero, the initial power consumption limit value is used as the target power consumption limit value, and the mainboard is adjusted using the target power consumption limit value.
[0087] In this embodiment, when the first comparison result is that the initial power consumption limit value is not equal to the current power consumption limit value and the current power consumption limit value is equal to zero, it indicates that the specific protocol setting of the GPIO port has not been performed, so the initial power consumption limit value is used as the target power consumption limit value, that is, the initial power consumption limit value replaces the target power consumption limit value before, and the target power consumption limit value after replacement is used to adjust the mainboard. Therefore, the target power consumption limit value is accurately determined according to the first comparison result to reduce the possibility of later maintenance, improve the adjustment efficiency, and thus improve the use efficiency.
[0088] In one embodiment, determining a target power consumption limit value according to the first comparison result to adjust the mainboard includes:
[0089] If the first comparison result is that the initial power consumption limit value is equal to the current power consumption limit value and both are not equal to zero, the initial power consumption limit value and the target power consumption limit value are compared to obtain a second comparison result, and the target power consumption limit value is determined according to the second comparison result to adjust the mainboard.
[0090] In one embodiment, determining the target power consumption limit value according to the second comparison result to adjust the mainboard includes:
[0091] If the second comparison result is that the initial power consumption limit value and the target power consumption limit value are equal and both are not equal to zero, the target power consumption limit value is used to adjust the mainboard.
[0092] In this embodiment, when the first comparison result is that the initial power consumption limit value is equal to the current power consumption limit value and both are not equal to zero, the initial power consumption limit value and the target power consumption limit value are compared to obtain a second comparison result; when the second processing result is that the initial power consumption limit value and the target power consumption limit value are equal to each other and both are not equal to zero, the target power consumption limit value is directly used to adjust the mainboard. In this way, the initial power consumption limit value and the target power consumption limit value are checked twice, thereby improving accuracy.
[0093] When the second comparison result is that the initial power consumption limit value and the target power consumption limit value are not equal and are not equal to zero, the initial power consumption limit value is used as the target power consumption limit value, that is, the initial power consumption limit value replaces the target power consumption limit value before, and the replaced target power consumption limit value is used to adjust the mainboard. In this way, the initial power consumption limit value and the target power consumption limit value are checked twice, which improves the accuracy.
[0094] When the first comparison result and the second comparison result are not the above situations, the controller may replace the previous target power consumption limit value with the initial power consumption limit value, and use the replaced target power consumption limit value to adjust the mainboard; or when the first comparison result and the second comparison result are not the above situations, the controller may send an error prompt message to the OPS computer.
[0095] Therefore, the target power consumption limit value is accurately determined according to the first comparison result and the second comparison result, so as to reduce the possibility of later maintenance, improve the adjustment efficiency, and thus improve the use efficiency.
[0096] In summary, in response to a power-on instruction, the initial power consumption limit value stored in the mainboard of the OPS computer is obtained; a plurality of status values are read using the OPS interface of the OPS computer, and each status value is converted to obtain a current power consumption limit value; the initial power consumption limit value is compared with the current power consumption limit value to obtain a first comparison result; and the target power consumption limit value is determined according to the first comparison result to adjust the mainboard. It can be seen that the first comparison result is obtained by comparing the initial power consumption limit value obtained and the current power consumption limit value obtained by conversion, and the target power consumption limit value is accurately determined according to the first comparison result to adjust the mainboard. Therefore, the target power consumption limit value is accurately determined according to the first comparison result, and the mainboard can be adjusted more accurately and quickly to reduce the possibility of later maintenance, improve the adjustment efficiency, and thus improve the use efficiency.
[0097] It should be noted that those skilled in the art can clearly understand that the specific implementation process of the above-mentioned device and each user can refer to the corresponding description in the aforementioned method embodiment, and for the convenience and brevity of description, it will not be repeated here.
[0098] The above device can be implemented in the form of a computer program. The computer program can be Figure 3 Runs on the computer device shown.
[0099] See also Figure 3 , Figure 31 is a schematic block diagram of a computer device 500 provided in an embodiment of the present application. The computer device 500 includes terminal devices such as computers and servers. Figure 3 As shown, the device 500 includes a processor 502 , a memory, and a network interface 505 connected via a system bus 501 , wherein the memory may include a non-volatile storage medium 503 and an internal memory 504 .
[0100] The non-volatile storage medium 503 can store an operating system 5031 and a computer program 5032. When the computer program 5032 stored in the non-volatile storage medium is executed by the processor 502, the above-mentioned method for adjusting the power consumption of the motherboard based on the OPS computer can be implemented. The processor 502 is used to provide computing and control capabilities to support the operation of the entire device 500. The internal memory 504 provides an environment for the operation of the computer program in the non-volatile storage medium. When the computer program is executed by the processor 502, the processor 502 can execute the above-mentioned method for adjusting the power consumption of the motherboard based on the OPS computer. The network interface 505 is used for network communication. It can be understood by those skilled in the art that the structure shown in the figure is only a block diagram of a part of the structure related to the scheme of the present invention, and does not constitute a limitation on the device to which the scheme of the present invention is applied. The specific device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0101] The processor 502 is used to run the computer program stored in the memory to implement the following steps:
[0102] In response to a power-on instruction, obtaining an initial power consumption limit value stored in a mainboard of the OPS computer;
[0103] Using the OPS interface of the OPS computer to read multiple status values, and converting each status value to obtain a current power consumption limit value;
[0104] Comparing the initial power consumption limit value with the current power consumption limit value to obtain a first comparison result;
[0105] A target power consumption limit value is determined according to the first comparison result to adjust the mainboard.
[0106] It should be understood that in the embodiment of the present application, the processor 502 may be a central processing unit (CPU), and the processor may also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.
[0107] It can be understood by those skilled in the art that all or part of the processes in the method for implementing the above embodiment can be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a storage medium, which can be a computer-readable storage medium. The computer program is executed by at least one processor in the computer system to implement the process steps of the embodiment of the above method.
[0108] Therefore, an embodiment of the present application further provides a storage medium. The storage medium may be a computer-readable storage medium, and the computer-readable storage medium includes a non-volatile computer-readable storage medium. The storage medium stores a computer program, and when the computer program is executed by a processor, the following steps are implemented:
[0109] In response to a power-on instruction, obtaining an initial power consumption limit value stored in a mainboard of the OPS computer;
[0110] Using the OPS interface of the OPS computer to read multiple status values, and converting each status value to obtain a current power consumption limit value;
[0111] Comparing the initial power consumption limit value with the current power consumption limit value to obtain a first comparison result;
[0112] A target power consumption limit value is determined according to the first comparison result to adjust the mainboard.
[0113] The storage medium may be a USB flash drive, a mobile hard disk, a read-only memory (ROM), a magnetic disk, or an optical disk, etc., which are computer-readable storage media that can store program codes.
[0114] In the several embodiments provided in this application, it should be understood that the disclosed devices, equipment and methods can be implemented in other ways. For example, the device embodiments described above are only schematic, and the division of the units is only a logical function division, and there may be other division methods in actual implementation. Those skilled in the art can clearly understand that for the convenience and simplicity of description, the specific working processes of the devices, equipment and units described above can refer to the corresponding processes in the aforementioned method embodiments, and will not be repeated here.
[0115] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed by the present invention, and these modifications or replacements should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention shall be based on the protection scope of the claims.
Claims
1. A method for adjusting the power consumption of a motherboard based on an OPS computer, characterized in that: include: In response to a power-on instruction, obtaining an initial power consumption limit value stored in a mainboard of the OPS computer; Using the OPS interface of the OPS computer to read multiple status values, and converting each status value to obtain a current power consumption limit value; Comparing the initial power consumption limit value with the current power consumption limit value to obtain a first comparison result; A target power consumption limit value is determined according to the first comparison result to adjust the mainboard.
2. The method according to claim 1, characterized in that The step of determining a target power consumption limit value according to the first comparison result to adjust the mainboard includes: If the first comparison result is that the initial power consumption limit value is not equal to the current power consumption limit value and the current power consumption limit value is not equal to zero, the current power consumption limit value is used as the target power consumption limit value, and the target power consumption limit value is used to adjust the mainboard.
3. The method according to claim 1, characterized in that: The step of determining a target power consumption limit value according to the first comparison result to adjust the mainboard includes: If the first comparison result is that the initial power consumption limit value is not equal to the current power consumption limit value and the current power consumption limit value is equal to zero, the initial power consumption limit value is used as the target power consumption limit value, and the mainboard is adjusted using the target power consumption limit value.
4. The method according to claim 1, characterized in that: The step of determining a target power consumption limit value according to the first comparison result to adjust the mainboard includes: If the first comparison result is that the initial power consumption limit value is equal to the current power consumption limit value and both are not equal to zero, the initial power consumption limit value and the target power consumption limit value are compared to obtain a second comparison result, and the target power consumption limit value is determined according to the second comparison result to adjust the mainboard.
5. The method according to claim 4, characterized in that The step of determining the target power consumption limit value according to the second comparison result to adjust the mainboard includes: If the second comparison result is that the initial power consumption limit value and the target power consumption limit value are equal and both are not equal to zero, the target power consumption limit value is used to adjust the mainboard.
6. The method according to claim 1, characterized in that The method of using the OPS interface of the OPS computer to read multiple status values and converting each status value to obtain a current power consumption limit value includes: Perform judgment processing on each acquired state value in a preset order to obtain a judgment result; Perform conversion processing according to the judgment result to obtain the current sub-power consumption limit value corresponding to each state value; The current sub-power consumption limit values are combined and processed according to the preset order to obtain the current power consumption limit value.
7. The method according to claim 6, characterized in that The converting process according to the judgment result to obtain the current sub-power consumption limit value corresponding to each state value includes: If the judgment result is that each state value is equal to the first preset value, the corresponding current sub-power consumption limit value is 1; If the judgment result is that each state value is equal to the second preset value, the corresponding current sub-power consumption limit value is 0.
8. A mainboard power consumption adjustment device based on an OPS computer, characterized in that: include: An acquisition unit, for acquiring an initial power consumption limit value stored in a mainboard of the OPS computer in response to a power-on instruction; A conversion unit, used for reading a plurality of status values by using the OPS interface of the OPS computer, and converting each status value to obtain a current power consumption limit value; A comparing unit, configured to compare the initial power consumption limit value with the current power consumption limit value to obtain a first comparison result; An adjusting unit is used to determine a target power consumption limit value according to the first comparison result so as to adjust the mainboard.
9. A computer device, characterized in that: The computer device includes a memory and a processor, the memory stores a computer program, and the processor implements the method according to any one of claims 1 to 7 when executing the computer program.
10. A storage medium, characterized in that: The storage medium stores a computer program, wherein the computer program includes program instructions, and when the program instructions are executed by a processor, the method according to any one of claims 1 to 7 can be implemented.