CN112306213A - Display card mode switching method and device based on terminal, storage medium and terminal - Google Patents

Display card mode switching method and device based on terminal, storage medium and terminal Download PDF

Info

Publication number
CN112306213A
CN112306213A CN202011202902.5A CN202011202902A CN112306213A CN 112306213 A CN112306213 A CN 112306213A CN 202011202902 A CN202011202902 A CN 202011202902A CN 112306213 A CN112306213 A CN 112306213A
Authority
CN
China
Prior art keywords
electric quantity
display card
terminal
mode switching
command
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202011202902.5A
Other languages
Chinese (zh)
Other versions
CN112306213B (en
Inventor
刘佳健
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shanghai Wingtech Electronic Technology Co Ltd
Original Assignee
Shanghai Wingtech Electronic Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shanghai Wingtech Electronic Technology Co Ltd filed Critical Shanghai Wingtech Electronic Technology Co Ltd
Priority to CN202011202902.5A priority Critical patent/CN112306213B/en
Publication of CN112306213A publication Critical patent/CN112306213A/en
Application granted granted Critical
Publication of CN112306213B publication Critical patent/CN112306213B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F1/00Details not covered by groups G06F3/00 - G06F13/00 and G06F21/00
    • G06F1/26Power supply means, e.g. regulation thereof
    • G06F1/32Means for saving power
    • G06F1/3203Power management, i.e. event-based initiation of a power-saving mode
    • G06F1/3206Monitoring of events, devices or parameters that trigger a change in power modality
    • G06F1/3212Monitoring battery levels, e.g. power saving mode being initiated when battery voltage goes below a certain level
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F1/00Details not covered by groups G06F3/00 - G06F13/00 and G06F21/00
    • G06F1/26Power supply means, e.g. regulation thereof
    • G06F1/32Means for saving power
    • G06F1/3203Power management, i.e. event-based initiation of a power-saving mode
    • G06F1/3234Power saving characterised by the action undertaken
    • G06F1/325Power saving in peripheral device
    • G06F1/3265Power saving in display device

Abstract

The invention discloses a display card mode switching method, a display card mode switching device, a storage medium and a terminal based on the terminal, wherein the method comprises the following steps: acquiring the electric quantity value of the battery in real time after the power supply is connected; when the electric quantity value is smaller than a first preset electric quantity threshold value, generating a mode switching command; and adjusting the level states of a plurality of interfaces of the display card according to the mode switching command so as to adjust the reference voltage of the display card and enable the display card to enter a corresponding low power consumption mode according to the reference voltage. According to the invention, the electric quantity value of the battery is acquired in real time, and when the electric quantity value is smaller than the first preset electric quantity threshold value, the level states of a plurality of interfaces of the display card are controlled by generating the corresponding mode switching command, so that the display card is adjusted to enter the corresponding low-power-consumption mode, the display card can be dynamically switched to the corresponding low-power-consumption mode when the electric quantity of the battery is lower, the endurance time of the battery is prolonged, and the waste of power consumption and the reduction of the endurance time caused by the fact that the display card works in a high-power-consumption state for a long time and the service life of the display card are reduced are.

Description

Display card mode switching method and device based on terminal, storage medium and terminal
Technical Field
The invention relates to the technical field of display card control, in particular to a display card mode switching method and device based on a terminal, a storage medium and a terminal.
Background
With the continuous development of electronic products, more and more electronic products are presented to consumers, and the current electronic products are usually provided with a display screen for facilitating interaction with the consumers and drive the display screen to work by controlling a display card. In the field of computer visual image research, standard software for evaluating performance of a graphics card, such as "3 Dmark", "PCmark", and the like, is developed in the industry based on a graphics card chip (abbreviated as a graphics card) as a hardware infrastructure, and the measurement of power consumption of the graphics card by the software is also one of work of a hardware developer before product development. In order to achieve the high performance evaluation result of the video card evaluation software, a general hardware developer sets a hardware state circuit which enables the video card to be in high performance. Considering that a user does not use software such as a computer game and the like which occupies a large memory for a long time, if the state of the display card is applied to a hardware scene with high power consumption for a long time, the waste of the power consumption of the whole computer and the reduction of the endurance time can be caused, and meanwhile, the service life of the display card can be greatly reduced.
Disclosure of Invention
The technical problem to be solved by the present invention is to provide a method, an apparatus, a storage medium and a terminal for switching modes of a display card based on a terminal, which solve the technical problems of the prior art that the display card is fixed in a high power consumption state, which causes the waste of the power consumption of the whole device and the reduction of the endurance time, and at the same time, the service life of the display card is greatly reduced.
The technical scheme for solving the technical problems is as follows:
the invention provides a display card mode switching method based on a terminal, wherein the terminal is provided with a battery and a display card, and the display card is provided with a plurality of interfaces; the method comprises the following steps:
when the terminal is detected to be connected with a power supply, acquiring the electric quantity value of the battery within a preset interval time;
comparing the electric quantity value obtained each time with a first preset electric quantity threshold value;
when the electric quantity value is smaller than a first preset electric quantity threshold value, generating a mode switching command;
adjusting the level states of a plurality of interfaces of the display card according to the mode switching command;
determining a reference voltage of the display card based on the adjusted level state;
and controlling the display card to enter a corresponding low power consumption mode according to the reference voltage.
On the basis of the technical scheme, the invention can be further improved as follows:
in a preferred embodiment, the generating the switching command when the electric quantity value is smaller than a first preset electric quantity threshold value includes:
inquiring the contrast relation between the electric quantity value and the working parameters of the display card according to the electric quantity value, and reading the corresponding working parameter information;
inquiring a preset level state truth table according to the working parameter information, and acquiring corresponding target interface level coding information;
acquiring the current level states of all interfaces, generating current interface level coding information, and generating the switching command according to the current interface level coding information and target interface level coding information;
wherein the operating parameter information comprises a reference voltage and/or a frequency.
In a preferred embodiment, the adjusting the level states of the plurality of interfaces of the graphics card according to the switching command includes:
and executing the switching command according to the level coding information of the target interface so as to adjust the level state of the corresponding interface, so that the level state combination of all the interfaces is consistent with the level coding information of the target interface.
In a preferred embodiment, the method further comprises:
when the electric quantity value is smaller than a second preset electric quantity threshold value, generating a power supply cut-off command, and turning off the power supply of the display card according to the power supply cut-off command;
and the second preset electric quantity threshold value is smaller than the first preset electric quantity threshold value.
The invention provides a display card mode switching device based on a terminal, wherein the terminal is provided with a battery and a display card, the display card is provided with a plurality of interfaces, and the device comprises an acquisition module, a comparison module, a command generation module, an adjustment module, a reference voltage module and a control module;
the acquisition module is used for acquiring the electric quantity value of the battery within a preset interval time when the terminal is detected to be connected with the power supply;
the comparison module is used for comparing the electric quantity value obtained each time with a first preset electric quantity threshold value;
the command generation module is used for generating a mode switching command when the electric quantity value is smaller than a first preset electric quantity threshold value;
the adjusting module is used for adjusting the level states of the plurality of interfaces of the display card according to the mode switching command;
the reference voltage module is used for determining the reference voltage of the display card based on the adjusted level state;
the control module is used for controlling the display card to enter a corresponding low power consumption mode according to the reference voltage.
On the basis of the technical scheme, the invention can be further improved as follows:
in a preferred embodiment, the command generation module comprises a first query unit, a second query unit and a command generation unit;
the first query unit is used for querying the comparison relation between the electric quantity value and the working parameters of the display card according to the electric quantity value and reading the corresponding working parameter information;
the second query unit is used for querying a preset level state truth table according to the working parameter information and acquiring corresponding target interface level coding information;
the switching command unit is used for acquiring the current level states of all the interfaces, generating current interface level coding information and generating the switching command according to the current interface level coding information and target interface level coding information;
wherein the operating parameter information comprises a reference voltage and/or a frequency.
In a preferred embodiment, the adjusting module is specifically configured to execute the handover command according to the target interface level coding information to adjust the level states of the corresponding interfaces, so that the level state combination of all the interfaces is consistent with the target interface level coding information.
In a preferred embodiment, the command generating module is further configured to generate a power cut-off command when the electric quantity value is smaller than a second preset electric quantity threshold, and the control module is further configured to turn off the power of the graphics card according to the power cut-off command;
and the second preset electric quantity threshold value is smaller than the first preset electric quantity threshold value.
In a third aspect of the present invention, a computer-readable storage medium is provided, which stores a computer program, and when the computer program is executed by a processor, the computer program implements the terminal-based graphics card mode switching method.
In a fourth aspect of the present invention, a terminal is provided, which includes the computer-readable storage medium and a processor, and when the processor executes a computer program on the computer-readable storage medium, the processor implements the steps of the terminal-based graphics card mode switching method.
The invention provides a display card mode switching method, a display card mode switching device, a storage medium and a terminal based on the terminal.
In order to make the aforementioned and other objects, features and advantages of the present invention comprehensible, preferred embodiments accompanied with figures are described in detail below.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the embodiments will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present invention and therefore should not be considered as limiting the scope, and for those skilled in the art, other related drawings can be obtained according to the drawings without inventive efforts.
Fig. 1 is an application scenario diagram of a video card mode switching method in a low power scenario according to an embodiment of the present invention;
fig. 2 is a schematic flow chart illustrating a video card mode switching method in a low power scene according to an embodiment of the present invention;
fig. 3 is a schematic structural diagram of a graphics card mode switching device in a low power scene according to an embodiment of the present invention;
FIG. 4 is a diagram of the internal structure of an electronic device in one embodiment.
Detailed Description
In order to make the objects, technical solutions and advantageous effects of the present invention more clearly apparent, the present invention is further described in detail below with reference to the accompanying drawings and the detailed description. It should be understood that the detailed description and specific examples, while indicating the preferred embodiment of the invention, are intended for purposes of illustration only and are not intended to limit the scope of the invention.
The method for switching the mode of the video card in the low power scene provided by the present invention can be applied to the application environment shown in fig. 1, and the method for switching the mode of the video card in the low power scene is applied to the terminal 102, wherein the terminal 102 can be, but not limited to, a computer, a notebook computer, a palm computer, a Personal Digital Assistant (PDA), a Portable Media Player (PMP), a navigation terminal, a wearable device, a smart band, a pedometer, and other notebook terminals, and fixed terminals such as a Digital TV, a desktop computer, and the like.
In one or more embodiments of the present invention, as shown in fig. 2, a method for switching modes of a graphics card in a low power scene is provided, where a terminal is provided with a battery and a graphics card, and the graphics card has a plurality of interfaces; taking the application of the method to the notebook terminal in fig. 1 as an example for explanation, the method comprises the following steps:
step S1: when the notebook computer terminal is connected with the power supply, the electric quantity value of the battery is acquired within a preset interval time, and the method specifically comprises the following steps:
and the embedded controller of the terminal polls the electric quantity value of the battery in real time through a system management bus SMBUS of the battery, wherein the polling period is 1-5 seconds each.
Step S2: comparing the electric quantity value obtained each time with a first preset electric quantity threshold value;
in this embodiment, the first preset electric quantity threshold is preferably 25%.
Step S3: when the electric quantity value is smaller than a first preset electric quantity threshold value, the notebook terminal generates a mode switching command, and the method comprises the following steps:
step 301: and the embedded controller of the notebook computer terminal inquires the comparison relation between the preset electric quantity value and the working parameter of the display card according to the electric quantity value and reads the corresponding working parameter information, wherein the working parameter information comprises reference voltage and/or frequency. The comparison relationship between the electric quantity value and the operating parameter of the display card in the embodiment of the invention is shown in the following table 1.
TABLE 1
Functional modes P0 P1 P2 P3 P4 P5
Electric quantity value 25% 22% 18% 15% 12% 8%
Reference voltage 0.9625V 0.9500V 0.9375V 0.9125V 0.8875V 0.8625V
Frequency of 2800 2500 2380 2100 1680 1400
In the embodiment of the present invention, the first preset point electric quantity threshold is 25%, and as can be seen from the above table, when the electric quantity value of the battery decreases to 25% of the first preset point electric quantity threshold, at this time, the electric quantity of the battery is considered to be at a low level, and the embedded controller of the notebook terminal needs to control the display card to switch to a low power consumption state. Aiming at different electric quantity values, a plurality of low-power consumption modes are set, for example, six low-power consumption modes P0-P5 are set, and the corresponding low-power consumption modes are sequentially switched along with the gradual reduction of the electric quantity values. Through the table 1, the corresponding low power consumption mode and the operating parameter (such as the reference voltage and/or the frequency) corresponding to the low power consumption mode can be read according to the electric quantity value, so that the corresponding interface level coding information can be read subsequently according to the operating parameter corresponding to the low power consumption mode.
Step 302: and the embedded controller of the notebook computer terminal inquires a preset level state truth table according to the working parameter information and acquires corresponding target interface level coding information.
Here, the interface level coding information is a combination of level states of all interfaces, for example, in the field of circuit technology, a low level is generally represented by "0" and a high level is generally represented by "1". Here, a binary-like interface level coding information may be formed according to the level state combination of all interfaces, and the bit number of the level coding information is the same as the number of the interfaces and corresponds to one, so that the level state to which the corresponding interface needs to be adjusted can be known according to the interface level coding information. In the embodiment of the present invention, the predetermined level truth table is shown in table 2 below.
TABLE 2
Figure BDA0002756003180000071
In the embodiment of the invention, taking an N16P-GX graphics card of NVIDIA corporation as an example, the N16P-GX graphics card is provided with 6 GPIO ports, and the reference voltage of the graphics card is adjusted by controlling the level state of each port, so as to control the low power consumption mode of the graphics card. For example, when the power value is decreased to 25%, the corresponding low power mode is P0, the reference voltage is 0.9625V, and the level truth table shows that the corresponding target level code information is 110101, i.e., the level states of the interfaces 0-5 are high level, low level, and high level.
Step 303: and the embedded controller of the notebook terminal acquires the current level states of all the interfaces, generates current interface level coding information and generates a switching command according to the current interface level coding information and the target interface level coding information.
Through the preset low-power-consumption parameter comparison table and the level state truth table, corresponding working parameter information can be read according to the electric quantity value when the electric quantity value is smaller than the first preset electric quantity threshold value, and then level coding information of the target interface is obtained, so that the level state of the corresponding interface can be conveniently adjusted according to the level coding information of the target interface subsequently, and the switching of the corresponding low-power-consumption mode is realized.
Here, also taking a 25% electric quantity value as an example, the target level coding information obtained in the step 302 is 110101, at this time, the embedded controller of the terminal reads the level states of all current interfaces, for example, the current level coding information of the interfaces 0 to 6 is 101100, at this time, the target level coding information obtained in the step 302 is compared with the current level coding information, and it is found that the level states of the interface 1, the interface 2, and the interface 5 of the video card need to be adjusted, therefore, a switching command can be generated according to the port that needs to be adjusted and the corresponding high-low level switching information, which is convenient for the embedded controller to adjust the level state of the corresponding port according to the switching command, so that after adjustment, the level turntable combination of all the ports is consistent with the target level coding information obtained in the step 302.
Step S4: and the notebook terminal adjusts the level states of the plurality of interfaces of the display card according to the mode switching command. Specifically, adjusting the level states of the plurality of interfaces of the graphics card according to the switching command specifically includes the following steps:
s401: and the embedded controller of the notebook computer executes a switching command according to the level coding information of the target interface so as to adjust the level state of the corresponding interface, so that the level state combination of all the interfaces is consistent with the level coding information of the target interface.
Here, the embedded controller reads the level code information of the target interface according to the switching command, or reads the level code of the target interface to 110101 according to the switching command by taking 25% of electric quantity value as an example; and the current level coding information is 101100, and the level states of the interface 1, the interface 2 and the interface 5 of the display card need to be adjusted to make the current level state combination of all the interfaces consistent with the level coding information of the target interface, so that the switching of the low power consumption mode is realized.
Here, according to the situation in the above embodiment, the level states of the interface 1, the interface 2 and the interface 5 of the graphics card need to be adjusted, and then the embedded controller controls the high and low level reverse switching of the interface 1, the interface 2 and the interface 5 of the graphics card, so that the level state combination of all the interfaces is consistent with the target level coding information, and thus, the reference voltage of the graphics card will be 0.9625V, and the graphics card immediately enters the low power consumption P0 mode.
Then, step S5 is executed to determine the reference voltage of the graphics card based on the adjusted level state.
And finally, executing a step S6, and controlling the display card to enter a corresponding low power consumption mode according to the reference voltage.
Optionally, in the embodiment of the present invention, when the electric quantity value is smaller than a second preset electric quantity threshold, a power cut-off command is generated, and the power of the graphics card is turned off according to the power cut-off command, where the second preset electric quantity threshold is smaller than the first preset electric quantity threshold.
Like this, when the electric quantity value further drops to being less than the second and predetermine the electric quantity threshold value, at this moment, the electric quantity of battery can not support the display card and normally work, through generating the cut-off command, controls the power that cuts off the display card, avoids the display card to last to be in performance mode, also can avoid the battery to discharge excessively simultaneously and lead to reducing its life-span.
For example, when the electric quantity value is reduced to 5%, the electric quantity of the battery is considered to be almost exhausted, so that the power supply is directly turned off at the moment in order to avoid the display card being in a low-performance state for a long time and avoid the damage caused by the transient discharge of the surface battery to influence the service life.
In practice, an MOS transistor can be used as a switch for switching on or off, a gate electrode of the MOS transistor is electrically connected with a control end of an embedded controller, a source electrode of the MOS transistor is electrically connected with a power input end of a display card, and a drain electrode of the MOS transistor is electrically connected with a reference voltage input end of the display card, so that during normal operation, the embedded controller controls the gate electrode of the MOS transistor to be at a high level, the MOS transistor is switched on, and a reference voltage of the drain electrode of the MOS transistor is led to be led to a power input end VCC of the display card; when the electric quantity value is reduced to 5%, in order to save electricity, the embedded controller controls the gate pole low level of the MOS tube, the MOS tube is cut off, and the reference voltage of the drain electrode of the MOS tube cannot be led into the power input end of the display card, so that the power of the display card is cut off.
In the above, one of the hardware ways is to turn off the power supply of the graphics card, but in practice, other hardware ways or software ways may also be used to turn off the power supply of the graphics card, and a detailed description thereof is omitted here.
The embodiment provides a display card mode switching method based on a terminal, which includes the steps of acquiring an electric quantity value of a battery in real time, and controlling level states of a plurality of interfaces of a display card by generating corresponding switching commands when the electric quantity value is smaller than a first preset electric quantity threshold value, so that the display card is adjusted to enter a corresponding low-power-consumption mode, the display card can be dynamically switched to the corresponding low-power-consumption mode when the electric quantity of the battery is low, the endurance time of the battery is prolonged, the waste of power consumption and the reduction of the endurance time caused by the fact that the display card works in a high-power-consumption state for a long time are avoided, and the service life of the display card is shortened.
It should be understood that, the sequence numbers of the steps in the foregoing embodiments do not imply an execution sequence, and the execution sequence of each process should be determined by its function and inherent logic, and should not constitute any limitation to the implementation process of the embodiments of the present invention.
Fig. 3 is a schematic structural diagram of a display card mode switching apparatus based on a terminal according to another embodiment of the present invention, where the terminal is provided with a battery and a display card, and the display card has a plurality of interfaces, as shown in fig. 3, the apparatus includes an obtaining module 100, a comparing module 200, a command generating module 300, a regulating module 400, a reference voltage module 500, and a control module 600;
the obtaining module 100 is configured to obtain a battery charge value within a preset interval time when it is detected that the terminal is connected to the power supply;
the comparison module 200 is configured to compare the electric quantity value obtained each time with a first preset electric quantity threshold;
the command generating module 300 is configured to generate a mode switching command when the electric quantity value is smaller than a first preset electric quantity threshold;
the adjusting module 400 is configured to adjust the level states of the multiple interfaces of the graphics card according to the mode switching command;
the reference voltage module 500 is configured to determine a reference voltage of the display card based on the adjusted level state;
the control module 600 is configured to control the graphics card to enter a corresponding low power consumption mode according to the reference voltage.
In a preferred embodiment, the command generating module 300 includes a first querying unit 301, a second querying unit 302 and a command generating unit 303;
the first query unit 301 is configured to query a comparison relationship between the electric quantity value and the working parameter of the display card according to the electric quantity value, and read corresponding working parameter information;
the second query unit 302 is configured to query a preset level state truth table according to the working parameter information, and obtain corresponding target interface level coding information;
the switching command unit 303 is configured to obtain current level states of all interfaces, generate current interface level coding information, and generate a switching command according to the current interface level coding information and target interface level coding information;
wherein the operating parameter information comprises a reference voltage and/or a frequency.
In one or more embodiments of the invention, the obtaining module 100 polls the electric quantity value of the battery in real time through a system management bus SMBUS of the battery, and the polling period is 1-5 seconds each.
In one or more embodiments of the present invention, the adjusting module 400 is specifically configured to execute a handover command according to the level coding information of the target interface, so as to adjust the level states of the corresponding interfaces, so that the level state combination of all the interfaces is consistent with the level coding information of the target interface. .
And reading the level coding information of the target interface through the switching command to obtain a target level state corresponding to each interface, comparing the target level state with the current level state of each interface, and adjusting the current level state of the interface inconsistent with the target level state to ensure that the current level state combination of all the interfaces is consistent with the level coding information of the target interface, thereby realizing the switching of the low-power consumption mode.
In one or more embodiments of the present invention, the command generating module 300 is further configured to generate a power cut-off command when the electric quantity value is smaller than a second preset electric quantity threshold, and turn off the power of the graphics card according to the power cut-off command;
and the second preset electric quantity threshold value is smaller than the first preset electric quantity threshold value.
Like this, when the electric quantity value further drops to being less than the second and predetermine the electric quantity threshold value, at this moment, the electric quantity of battery can not support the display card and normally work, through generating the cut-off command, controls the power that cuts off the display card, avoids the display card to last to be in performance mode, also can avoid the battery to discharge excessively simultaneously and lead to reducing its life-span.
The embodiment provides a display card mode switching device based on terminal, through the electric quantity value of acquireing the battery in real time, and when the electric quantity value is less than first predetermined electric quantity threshold value, through the switching command that generates corresponding, the level state of a plurality of interfaces of control display card, thereby adjust the display card and get into corresponding low-power consumption mode, can be when battery electric quantity is lower dynamic switch to corresponding low-power consumption mode, the time of endurance of battery has been improved, avoid the display card to be in work under the high-power consumption state for a long time and lead to the waste of power consumption and the reduction of time of endurance, and the reduction of display card life-span.
In one or more embodiments, the present invention also provides a computer-readable storage medium storing a computer program which, when executed by a processor, performs the steps of:
step S1: when the terminal is detected to be connected with a power supply, acquiring the electric quantity value of the battery within a preset interval time;
step S2: comparing the electric quantity value obtained each time with a first preset electric quantity threshold value;
step S3: when the electric quantity value is smaller than a first preset electric quantity threshold value, generating a mode switching command;
step S4, adjusting the level states of a plurality of interfaces of the display card according to the mode switching command;
step S5, determining the reference voltage of the display card based on the adjusted level state;
and step S6, controlling the display card to enter a corresponding low power consumption mode according to the reference voltage.
In one or more embodiments of the invention, the computer program when executed by the processor further performs the steps of:
s301: inquiring the contrast relation between the electric quantity value and the working parameters of the display card according to the electric quantity value, and reading the corresponding working parameter information;
s302: inquiring a preset level state truth table according to the working parameter information, and acquiring corresponding target interface level coding information;
s303: acquiring the current level states of all interfaces, generating current interface level coding information, and generating a switching command according to the current interface level coding information and the target interface level coding information;
wherein the operating parameter information comprises a reference voltage and/or a frequency.
In one or more embodiments of the invention, the computer program when executed by the processor further performs the steps of:
s401: and executing a switching command according to the level coding information of the target interface so as to adjust the level state of the corresponding interface, so that the level state combination of all the interfaces is consistent with the level coding information of the target interface.
In one or more embodiments of the invention, the computer program when executed by the processor further performs the steps of:
when the electric quantity value is smaller than a second preset electric quantity threshold value, generating a power supply cut-off command, and turning off the power supply of the display card according to the power supply cut-off command;
and the second preset electric quantity threshold value is smaller than the first preset electric quantity threshold value.
The above embodiment provides a computer-readable storage medium, on which a computer program is stored, where the computer program is executed by a processor to execute a video card mode switching method based on a terminal, and the method includes obtaining an electric quantity value of a battery in real time, and controlling level states of a plurality of interfaces of a video card by generating a corresponding switching command when the electric quantity value is smaller than a first preset electric quantity threshold, so as to adjust the video card to enter a corresponding low power consumption mode, and dynamically switch to the corresponding low power consumption mode when the electric quantity of the battery is low, thereby improving the endurance time of the battery, and avoiding waste of power consumption and reduction of endurance time caused by long-term operation of the video card in a high power consumption state, and reducing the life of the video card.
In one or more embodiments, the present invention further provides a terminal, and fig. 4 is an internal structure diagram of the terminal in an embodiment when the terminal is an electronic device, where the electronic device may be a mobile phone terminal, or may be another notebook terminal or a fixed terminal. As shown in fig. 4, the apparatus comprises a memory 81 and a processor 80, the memory 81 stores a computer program 82, and the processor 80 implements the following steps when executing the computer program 82:
step S1: when the terminal is detected to be connected with a power supply, acquiring the electric quantity value of the battery within a preset interval time;
step S2: comparing the electric quantity value obtained each time with a first preset electric quantity threshold value;
step S3: when the electric quantity value is smaller than a first preset electric quantity threshold value, generating a mode switching command;
step S4, adjusting the level states of a plurality of interfaces of the display card according to the mode switching command;
step S5, determining the reference voltage of the display card based on the adjusted level state;
and step S6, controlling the display card to enter a corresponding low power consumption mode according to the reference voltage.
In one or more embodiments of the invention, the processor 80, when executing the computer program 82, further performs the steps of:
s301: inquiring the contrast relation between the electric quantity value and the working parameters of the display card according to the electric quantity value, and reading the corresponding working parameter information;
s302: inquiring a preset level state truth table according to the working parameter information, and acquiring corresponding target interface level coding information;
s303: acquiring the current level states of all interfaces, generating current interface level coding information, and generating a switching command according to the current interface level coding information and the target interface level coding information;
wherein the operating parameter information comprises a reference voltage and/or a frequency.
In one or more embodiments of the invention, the processor 80, when executing the computer program 82, further performs the steps of:
s401: and executing a switching command according to the level coding information of the target interface so as to adjust the level state of the corresponding interface, so that the level state combination of all the interfaces is consistent with the level coding information of the target interface.
In one or more embodiments of the invention, the processor 80, when executing the computer program 82, further performs the steps of:
when the electric quantity value is smaller than a second preset electric quantity threshold value, generating a power supply cut-off command, and turning off the power supply of the display card according to the power supply cut-off command;
and the second preset electric quantity threshold value is smaller than the first preset electric quantity threshold value.
The above embodiment provides a terminal, where the processor 80 of the terminal executes the video card mode switching method based on the terminal when executing the computer program 82, and by acquiring the electric quantity value of the battery in real time and generating the corresponding switching command when the electric quantity value is smaller than the first preset electric quantity threshold, the level states of the multiple interfaces of the video card are controlled, so as to adjust the video card to enter the corresponding low power consumption mode, and dynamically switch to the corresponding low power consumption mode when the electric quantity of the battery is low, thereby improving the endurance time of the battery, and avoiding the waste of power consumption and the reduction of the endurance time caused by the long-term operation of the video card in the high power consumption state, and reducing the service life of the video card.
It will be understood by those skilled in the art that fig. 4 is only one example of the terminal of the present invention, and is not limited to the terminal, and may include more or less components than those shown, or combine some components, or different components, for example, the terminal may further include a power management module, an arithmetic processing module, an input/output device, a network access device, a bus, etc.
The Processor 80 may be a Central Processing Unit (CPU), other general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field-Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic device, discrete hardware component, or the like. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The storage 81 may be an internal storage unit of the terminal, such as a hard disk or a memory. The memory 81 may also be an external storage device of the terminal, such as a plug-in hard disk provided on the compass calibration terminal, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like. Further, the memory 81 may also include both an internal storage unit of the compass calibration terminal and an external storage device. The memory 81 is used to store computer programs and other programs and data needed for compass calibration of the terminal. The memory 81 may also be used to temporarily store data that has been output or is to be output.
It will be apparent to those skilled in the art that, for convenience and simplicity of description, the foregoing functional units and modules are merely illustrated in terms of division, and in practical applications, the foregoing functional allocation may be performed by different functional units and modules as needed, that is, the internal structure of the terminal is divided into different functional units or modules to perform all or part of the above described functions. Each functional unit and module in the embodiments may be integrated in one processing unit, or each unit may exist alone physically, or two or more units are integrated in one unit, and the integrated unit may be implemented in a form of hardware, or in a form of software functional unit. In addition, specific names of the functional units and modules are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the present application. The specific working processes of the units and modules in the above-mentioned apparatus refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the above embodiments, the descriptions of the respective embodiments have respective emphasis, and reference may be made to the related descriptions of other embodiments for parts that are not described or illustrated in a certain embodiment.
Those of ordinary skill in the art will appreciate that the various illustrative elements and method steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
In the embodiments provided in the present invention, it should be understood that the disclosed terminal/terminal device and method can be implemented in other ways. For example, the above-described terminal/terminal device embodiments are merely illustrative, and for example, a module or a unit may be divided into only one logic function, and may be implemented in other ways, for example, a plurality of units or components may be combined or integrated into another device, or some features may be omitted or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, terminals or units, and may be in an electrical, mechanical or other form.
Units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The invention is not limited solely to that described in the specification and embodiments, and additional advantages and modifications will readily occur to those skilled in the art, so that the invention is not limited to the specific details, representative apparatus, and illustrative examples shown and described herein, without departing from the spirit and scope of the general concept as defined by the appended claims and their equivalents.

Claims (10)

1. A display card mode switching method based on a terminal is provided, wherein the terminal is provided with a battery and a display card, and the display card is provided with a plurality of interfaces; the method comprises the following steps:
when the terminal is detected to be connected with a power supply, acquiring the electric quantity value of the battery within a preset interval time;
comparing the electric quantity value obtained each time with a first preset electric quantity threshold value;
when the electric quantity value is smaller than a first preset electric quantity threshold value, generating a mode switching command;
adjusting the level states of a plurality of interfaces of the display card according to the mode switching command;
determining a reference voltage of the display card based on the adjusted level state;
and controlling the display card to enter a corresponding low power consumption mode according to the reference voltage.
2. The terminal-based graphics card mode switching method of claim 1, wherein the generating a switching command when the electric quantity value is smaller than a first preset electric quantity threshold comprises:
inquiring the contrast relation between the electric quantity value and the working parameters of the display card according to the electric quantity value, and reading the corresponding working parameter information;
inquiring a preset level state truth table according to the working parameter information, and acquiring corresponding target interface level coding information;
acquiring the current level states of all interfaces, generating current interface level coding information, and generating the switching command according to the current interface level coding information and target interface level coding information;
wherein the operating parameter information comprises a reference voltage and/or a frequency.
3. The terminal-based graphics card mode switching method of claim 2, wherein the adjusting the level states of the plurality of interfaces of the graphics card according to the switching command comprises:
and executing the switching command according to the level coding information of the target interface so as to adjust the level state of the corresponding interface, so that the level state combination of all the interfaces is consistent with the level coding information of the target interface.
4. The terminal-based graphics card mode switching method according to any one of claims 1-3, wherein the method further comprises:
when the electric quantity value is smaller than a second preset electric quantity threshold value, generating a power supply cut-off command, and turning off the power supply of the display card according to the power supply cut-off command;
and the second preset electric quantity threshold value is smaller than the first preset electric quantity threshold value.
5. The utility model provides a display card mode switching device based on terminal, the terminal is provided with battery and display card, the display card has a plurality of interfaces, its characterized in that: the device comprises an acquisition module, a comparison module, a command generation module, an adjustment module, a reference voltage module and a control module;
the acquisition module is used for acquiring the electric quantity value of the battery within a preset interval time when the terminal is detected to be connected with the power supply;
the comparison module is used for comparing the electric quantity value obtained each time with the first preset electric quantity threshold value;
the command generation module is used for generating a mode switching command when the electric quantity value is smaller than a first preset electric quantity threshold value;
the adjusting module is used for adjusting the level states of the plurality of interfaces of the display card according to the mode switching command;
the reference voltage module is used for determining the reference voltage of the display card based on the adjusted level state;
the control module is used for controlling the display card to enter a corresponding low power consumption mode according to the reference voltage.
6. The terminal-based graphics card mode switching device of claim 5, wherein the command generating module comprises a first query unit, a second query unit and a command generating unit;
the first query unit is used for querying the comparison relation between the electric quantity value and the working parameters of the display card according to the electric quantity value and reading the corresponding working parameter information;
the second query unit is used for querying a preset level state truth table according to the working parameter information and acquiring corresponding target interface level coding information;
the switching command unit is used for acquiring the current level states of all the interfaces, generating current interface level coding information and generating the switching command according to the current interface level coding information and target interface level coding information;
wherein the operating parameter information comprises a reference voltage and/or a frequency.
7. The terminal-based graphics card mode switching apparatus of claim 6, wherein the adjusting module is specifically configured to execute the switch command according to the target interface level coding information to adjust the level states of the corresponding interfaces, so that the level state combination of all interfaces is consistent with the target interface level coding information.
8. The terminal-based graphics card mode switching device according to any one of claims 5 to 7, wherein the command generating module is further configured to generate a power-off command when the electric quantity value is smaller than a second preset electric quantity threshold, and the control module is further configured to turn off the power supply of the graphics card according to the power-off command;
and the second preset electric quantity threshold value is smaller than the first preset electric quantity threshold value.
9. A computer-readable storage medium, in which a computer program is stored, which, when executed by a processor, implements the terminal-based graphics card mode switching method of any one of claims 1 to 4.
10. A terminal, characterized by comprising the computer-readable storage medium of claim 9 and a processor, which when executing the computer program on the computer-readable storage medium implements the steps of the terminal-based graphics card mode switching method of any of claims 1-4.
CN202011202902.5A 2020-11-02 2020-11-02 Display card mode switching method and device based on terminal, storage medium and terminal Active CN112306213B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011202902.5A CN112306213B (en) 2020-11-02 2020-11-02 Display card mode switching method and device based on terminal, storage medium and terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011202902.5A CN112306213B (en) 2020-11-02 2020-11-02 Display card mode switching method and device based on terminal, storage medium and terminal

Publications (2)

Publication Number Publication Date
CN112306213A true CN112306213A (en) 2021-02-02
CN112306213B CN112306213B (en) 2024-03-08

Family

ID=74333556

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011202902.5A Active CN112306213B (en) 2020-11-02 2020-11-02 Display card mode switching method and device based on terminal, storage medium and terminal

Country Status (1)

Country Link
CN (1) CN112306213B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116414471A (en) * 2022-12-16 2023-07-11 摩尔线程智能科技(北京)有限责任公司 Working parameter adjusting method, host, display card, electronic equipment and storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1828479A (en) * 2005-03-01 2006-09-06 联想(北京)有限公司 Method and device for switching video card working frequency
CN101685338A (en) * 2008-09-27 2010-03-31 联想(北京)有限公司 Method of saving system resources of notebook computer and notebook computer
CN103092304A (en) * 2011-10-31 2013-05-08 宏碁股份有限公司 Power supply control method of dual-graphics-card module and computer device utilizing power supply control method
US20130130745A1 (en) * 2010-06-30 2013-05-23 Zte Corporation Power-saving system and method for a mobile terminal
CN103853306A (en) * 2012-12-04 2014-06-11 鸿富锦精密工业(深圳)有限公司 Power saving system and method for display card
CN105391470A (en) * 2015-11-28 2016-03-09 广东欧珀移动通信有限公司 Network switching method, apparatus and terminal

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1828479A (en) * 2005-03-01 2006-09-06 联想(北京)有限公司 Method and device for switching video card working frequency
CN101685338A (en) * 2008-09-27 2010-03-31 联想(北京)有限公司 Method of saving system resources of notebook computer and notebook computer
US20130130745A1 (en) * 2010-06-30 2013-05-23 Zte Corporation Power-saving system and method for a mobile terminal
CN103092304A (en) * 2011-10-31 2013-05-08 宏碁股份有限公司 Power supply control method of dual-graphics-card module and computer device utilizing power supply control method
CN103853306A (en) * 2012-12-04 2014-06-11 鸿富锦精密工业(深圳)有限公司 Power saving system and method for display card
CN105391470A (en) * 2015-11-28 2016-03-09 广东欧珀移动通信有限公司 Network switching method, apparatus and terminal

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116414471A (en) * 2022-12-16 2023-07-11 摩尔线程智能科技(北京)有限责任公司 Working parameter adjusting method, host, display card, electronic equipment and storage medium

Also Published As

Publication number Publication date
CN112306213B (en) 2024-03-08

Similar Documents

Publication Publication Date Title
US11368039B2 (en) Battery charging method and electronic device
EP3416062B1 (en) Method and terminal device for establishing connection between devices with universal serial bus usb type-c interface
US10042801B2 (en) System for detecting universal serial bus (USB) device and method thereof
EP3349323B1 (en) Terminal and method for charging the same
US20120054752A1 (en) Electronic device having operation mode dynamic adjusting mechanism and method of the same
US20130332749A1 (en) Electronic apparatus, calculation method, program, and information processing apparatus
CN112540304B (en) Battery power management method, electronic device and computer storage medium
CN110716631B (en) Power supply management method, device, equipment and readable storage medium
WO2018129991A1 (en) Charging method, charging device and terminal
CN110716633A (en) Device and method for coordinately managing SSD power consumption, computer device and storage medium
CN108681514B (en) Device detection method and device, storage medium and electronic device
CN111538678A (en) Data buffering method, device and computer readable storage medium
CN105576753A (en) Information processing method and electronic equipment
CN107885683B (en) Terminal and current testing method thereof
CN112306213B (en) Display card mode switching method and device based on terminal, storage medium and terminal
CN107291213B (en) Mode selection method, device, terminal and computer readable storage medium
CN111404242A (en) Charging method, charging device, storage medium and mobile terminal
CN111478378A (en) Protection circuit, charging control device and method, and electronic device
US9466982B2 (en) System and method for control of power consumption of information handling system devices
CN106374569A (en) Charging circuit, electronic equipment and charging method
CN110148992B (en) Charging control method, terminal device and storage medium
CN108736082B (en) Method, device, equipment and storage medium for improving endurance capacity of terminal battery
CN108958829B (en) Pre-loaded resource control method, device, storage medium and terminal
CN107590087B (en) Electronic equipment and hard disk access method of electronic equipment
CN113632044A (en) Highly configurable power delivery management policy

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant