Refresh rate switching method, software program product, electronic equipment and storage medium
By adjusting the screen refresh rate when the display mode is not independent display only, the black screen problem that occurs in electronic devices during the refresh rate adjustment process is solved, ensuring the continuity and smoothness of the user experience.
Patent Information
- Application Number
- CN202410868530.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-28
- Publication Date
- 2025-10-10
AI Technical Summary
Electronic devices are prone to black screen phenomenon during the screen refresh rate adjustment process, affecting the user experience.
During the screen refresh rate adjustment process, the screen refresh rate is adjusted only when the display mode of the electronic device is not independent display only, and adjustment is avoided when the display mode is independent display only.
It effectively avoids the brief black screen phenomenon during the screen refresh rate adjustment process, ensuring the continuity and smoothness of the user experience.
Smart Images

Figure CN120766633A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] Embodiments of the present application relate to the technical field of display, and in particular, to a refresh rate switching method, a software program product, an electronic device and a storage medium. BACKGROUND
[0002] In the process of using an electronic device, in order to ensure user experience while reducing certain screen power consumption, the prior art can adaptively adjust the screen refresh rate according to different application scenarios. For example, for a game application with higher refresh rate requirements, the electronic device needs to set the screen refresh rate to be higher to ensure a more smooth visual experience and smoothness of user operation. For a file or web application scenario, a lower screen refresh rate will not affect the user's browsing and operation experience, and a lower refresh rate can be selected to reduce screen power consumption.
[0003] However, in the process of setting the screen refresh rate, the electronic device is prone to black screen phenomenon, resulting in poor user experience. SUMMARY
[0004] Embodiments of the present application provide a refresh rate switching method, a software program product, an electronic device and a storage medium, which avoid the black screen phenomenon of the electronic device in the process of setting the screen refresh rate, and ensure user experience.
[0005] To achieve the above object, the embodiments of the present application adopt the following technical solutions:
[0006] In a first aspect, a refresh rate switching method is provided, applied to an electronic device, the electronic device including a discrete graphics card and an integrated graphics card, and the display mode of the electronic device including only the discrete graphics card. The method includes:
[0007] At a first time, a window of a first application is displayed, at the first time, the window of the first application is a focus window, and a screen refresh rate is a first value. At a second time, a first operation is received, and a window of a second application is displayed. After the second time, the window of the second application is a focus window, and a screen refresh rate is a second value, the second value being different from the first value. At a third time, a second operation is received, and the window of the first application is displayed. After the third time, the window of the first application is a focus window, and the screen refresh rate is the first value. Between the first time and the third time, the display mode of the electronic device is not only the discrete graphics card. At a fourth time, the display mode of the electronic device is set to only the discrete graphics card. At a fifth time, a third operation is received, and the window of the second application is displayed. After the fifth time, the window of the second application is a focus window, and the screen refresh rate is the first value. The fifth time is after the fourth time.
[0008] Because adjusting the screen refresh rate when the independent graphics card is directly connected can cause a brief black screen, this implementation only adjusts the screen refresh rate when the electronic device's display mode is not independent graphics only. When the electronic device's display mode is independent graphics only, the screen refresh rate is not adjusted. This prevents brief black screens during screen refresh rate adjustment and ensures a better user experience.
[0009] In a possible implementation of the first aspect, the refresh rate switching method may further include: at a second moment, based on the display mode of the electronic device not being the independent display only, adjusting the screen refresh rate to set the screen refresh rate to a second value; and at a third moment, based on the display mode of the electronic device not being the independent display only, adjusting the screen refresh rate to set the screen refresh rate to the first value. When the display mode of the electronic device is not the independent display only, the electronic device adjusts the screen refresh rate normally.
[0010] In a possible implementation of the first aspect, the refresh rate switching method may further include: at a fifth moment, based on the display mode of the electronic device being independent display only, the screen refresh rate is not adjusted, and the screen refresh rate is the first value.
[0011] When the display mode of the electronic device is independent display only, the electronic device does not adjust the screen refresh rate, thereby avoiding a brief black screen phenomenon on the display and ensuring user experience.
[0012] In a possible implementation of the first aspect, the refresh rate switching method may further include: at a second moment, based on the window of the second application changing to the focus window, setting the screen refresh rate to the second value; at a third moment, based on the window of the first application changing to the focus window, setting the screen refresh rate to the first value.
[0013] When the focus window (application scenario) of the electronic device changes, the electronic device adjusts the screen refresh rate so that the screen refresh rate matches the focus window (application scenario), thereby reducing screen power consumption while ensuring smooth picture.
[0014] In a possible implementation of the first aspect, the refresh rate switching method may further include: in response to the first operation, displaying a window of the second application and setting the second application window as the focus window; or, in response to the second operation, displaying a window of the first application and setting the first application window as the focus window; or, in response to a third operation, displaying a window of the second application and setting the second application window as the focus window. That is, the electronic device can change the focus window by directly responding to the user's operation.
[0015] In a possible implementation of the first aspect, the electronic device includes a UX switch, which is used to control on / off adjustment of the screen refresh rate. Therefore, the refresh rate switching method may further include:
[0016] Between the first moment and the third moment, the UX switch state is UX switch on; after the fourth moment, the UX switch state is UX switch off and the user is prohibited from turning it on. In this way, when the screen refresh rate adjustment is allowed (UX switch on), the electronic device adjusts the screen refresh rate. However, because the display mode is independent display only, the screen refresh rate adjustment is not allowed. In order to prevent the user from turning on the adjustment of the screen refresh rate, the electronic device sets the UX switch to off.
[0017] In a possible implementation of the first aspect, the refresh rate switching method may further include: reading a separate display state flag; determining whether the display mode of the electronic device is a separate display only display according to the separate display state flag;
[0018] Among them, the independent graphics status flag is set based on the graphics card status of the electronic device. When the graphics card status is independent graphics direct connection, the independent graphics status flag indicates that the display mode is independent graphics only. When the graphics card status is not independent graphics direct connection, the independent graphics status flag indicates that the display mode is not independent graphics only.
[0019] By recording the independent graphics status flag corresponding to the graphics card status, you can directly read the independent graphics status flag to determine whether the electronic device has only an independent graphics card when you need to determine the display mode, thereby improving the processing speed. If you need to adjust the refresh rate, you can also improve the adjustment speed.
[0020] In a possible implementation of the first aspect, the refresh rate switching method may further include: reading a UX switch flag; determining a UX switch state according to the UX switch flag;
[0021] Among them, the UX switch flag is set based on the UX switch status. When the UX switch status is UX switch off, the UX switch flag indicates that the UX switch is off. When the UX switch status is UX switch on, the UX switch flag indicates that the UX switch is on. The UX switch status is set based on the graphics card status of the electronic device. When the graphics card status is a direct connection to an independent graphics card, the UX switch status is UX switch off and is set to a state that prohibits users from turning it on. When the graphics card status is a direct connection to a non-independent graphics card and the UX switch status is already a state that prohibits users from turning it on, the UX switch status is set to a state that allows users to turn it on.
[0022] By recording the corresponding UX switch status through the graphics card status and recording the UX switch flag based on the UX switch status, it is possible to directly determine whether the screen refresh rate is allowed to be adjusted by reading the UX switch flag, thereby improving the processing speed. If the refresh rate adjustment is allowed, the adjustment speed can also be improved.
[0023] In a possible implementation of the first aspect, the UX switch flag and the UX switch state need to be initialized and set when the electronic device is powered on. Based on this, the refresh rate switching method may further include: after the electronic device is powered on, obtaining the UX switch state at the last shutdown from a configuration file, and obtaining the graphics card state stored at the last shutdown; initializing and setting the UX switch flag according to the UX switch state at the last shutdown; wherein, when the UX switch state at the last shutdown is UX switch on, the UX switch flag indicates that the UX switch is on; and when the UX switch state at the last shutdown is UX switch off, the UX switch flag indicates that the UX switch is off;
[0024] The UX switch state is set according to the graphics card state stored at the last shutdown; wherein, if the graphics card state stored at the last shutdown is independent graphics card direct connection, and the UX switch state is UX switch on, the UX switch state is set to UX switch off and set to a state in which users are prohibited from turning on the switch; if the graphics card state stored at the last shutdown is independent graphics card direct connection, and the UX switch state is UX switch off but not set to a state in which users are prohibited from turning on the switch, the UX switch state is set to a state in which users are prohibited from turning on the switch; if the graphics card state stored at the last shutdown is not independent graphics card direct connection, or if the graphics card state stored at the last shutdown is independent graphics card direct connection but the UX switch state is UX switch off and is already a state in which users are prohibited from turning on the switch, the UX switch state is not changed.
[0025] In a possible implementation of the first aspect, the electronic device includes a dual-display triple-mode function module, an intelligent refresh rate module, and a UX interface display module; and the refresh rate switching method may further include:
[0026] The dual-display triple-mode function module receives a basic input and output system (BIOS) notification, which indicates the current graphics card status of the electronic device; the dual-display triple-mode function module sends an inter-process communication (IPC) message to the smart refresh rate module and the UX interface display module based on the BIOS notification, and the IPC message indicates the current graphics card status of the electronic device;
[0027] When the IPC message carries a parsing identifier, the intelligent refresh rate module parses the IPC message to obtain the current graphics card status of the electronic device, and sets the independent graphics card status flag according to the current graphics card status of the electronic device; wherein, when the current graphics card status of the electronic device is independent graphics card direct connection, the independent graphics card status flag indicates that the display mode is independent graphics card only; when the graphics card status is not independent graphics card direct connection, the independent graphics card status flag indicates that the display mode is not independent graphics card only;
[0028] The UX interface display module parses the IPC to obtain the current graphics card status of the electronic device, and sets the UX switch status according to the current graphics card status of the electronic device; wherein, when the current graphics card status of the electronic device is a direct connection to an independent graphics card, the UX switch status is that the UX switch is closed and is set to a state that prohibits the user from opening it; when the current graphics card status of the electronic device is a non-direct connection to an independent graphics card and the UX switch status is already a state that prohibits the user from opening it, the UX switch status is set to a state that allows the user to open it; after the UX interface display module changes the UX switch status, the UX interface display module notifies the intelligent refresh rate module to change the setting of the UX switch flag.
[0029] In this way, the independent graphics card status flag is updated in real time according to the graphics card status, which can ensure the accuracy of the independent graphics card status flag. At the same time, the UX switch status is updated in real time according to the graphics card status, and the UX switch flag is updated in real time based on the UX switch status, which can ensure the accuracy of the UX switch flag.
[0030] In a possible implementation of the first aspect, at the second moment, based on the fact that the display mode of the electronic device is not a separate display only, the screen refresh rate is adjusted and the screen refresh rate is set to a second value, including: at the second moment, obtaining the screen refresh rate corresponding to the second application from a preset file to obtain the second value; based on the fact that the display mode of the electronic device is not a separate display only, the screen refresh rate is adjusted and the screen refresh rate is set to the second value.
[0031] The screen refresh rates for different applications can be configured in a preset file in advance. When the focus window (application scenario) changes, the screen refresh rate for the application (such as the second application) can be directly determined based on the preset file, thereby obtaining the value that needs to be adjusted. For example, if the screen refresh rate for the application is 120Hz, the corresponding value is 120.
[0032] In a possible implementation of the first aspect, at the fifth moment, based on the display mode of the electronic device being a single display only, the screen refresh rate is not adjusted, and the screen refresh rate is a first value, the method includes: at the fifth moment, obtaining a screen refresh rate corresponding to a second application from a preset file to obtain a second value; and based on the display mode of the electronic device being a single display only, the screen refresh rate is not adjusted, and the screen refresh rate is the first value. The screen refresh rate corresponding to the application (i.e., the focus window) can be directly obtained through the preset file, thereby obtaining the value that needs to be adjusted.
[0033] In a possible implementation of the first aspect, based on the window of the second application being changed to the focus window, the screen refresh rate is set to a second value, including: obtaining a focus window change event; when it is determined that the application scenario of the second application is different from the application scenario of the first application based on the focus change event, the screen refresh rate is set to the second value based on the window of the second application being changed to the focus window.
[0034] The focus window change is monitored by subscribing to the focus change event. Meanwhile, in the case that the focus window changes, if it is determined through scene filtering that the application scene of the first application is different from that of the second application (i.e., the application scenes of the first application and the second application are different), it is indicated that the screen refresh rate can change due to the change of the focus window, and thus the screen refresh rate is adjusted again.
[0035] In a possible implementation of the first aspect, the screen refresh rate is set to the first value based on the window change of the first application to the focus window, including: obtaining the focus window change event; in the case that it is determined according to the focus change event that the application scene of the first application is different from that of the second application, the screen refresh rate is set to the first value based on the window change of the first application to the focus window.
[0036] In a possible implementation of the first aspect, the focus window change event includes a focus change event of a preset application scene; the screen refresh rate is set to the second value based on the window change of the second application to the focus window, including: in the case that the obtained focus window change event is a focus window change event corresponding to the preset application scene, the screen refresh rate is set to the second value based on the window change of the second application to the focus window; the second value corresponds to the screen refresh rate of the preset application scene.
[0037] For the application scene (i.e., the preset application scene) such as a game application, which has a relatively high requirement on the switching rate of the refresh rate, the focus window change event can be subscribed separately. For such a focus window change event, the screen refresh rate can be directly set in the case that the screen refresh rate can be adjusted, without scene filtering, so that a certain processing time can be saved to improve the switching rate of the screen refresh rate.
[0038] In a second aspect, the present application provides a refresh rate switching method, an electronic device includes a separate graphics card and an integrated graphics card; the electronic device includes a high dynamic range rendering (HDR) function, the HDR function is supported to be turned on in an alternating current (AC) mode, and the HDR function is not supported to be turned on in a direct current (DC) mode; the method includes:
[0039] At a first moment, a window of a first application is displayed. At the first moment, the window of the first application is a focus window, and the screen refresh rate is a first value. At a second moment, a first operation is received, and a window of a second application is displayed. After the second moment, the window of the second application is a focus window, and the screen refresh rate is a second value, which is different from the first value. At a third moment, a second operation is received, and a window of the first application is displayed. After the third moment, the window of the first application is a focus window, and the screen refresh rate is the first value. Between the first moment and the third moment, the HDR function of the electronic device is turned off. At a fourth moment, the HDR function of the electronic device is turned on. At a fifth moment, a third operation is received, and a window of the second application is displayed. After the fifth moment, the window of the second application is a focus window, and the screen refresh rate is the first value. The fifth moment is after the fourth moment.
[0040] Because adjusting the screen refresh rate when the HDR function is turned on can cause a brief black screen, in this implementation, the electronic device adjusts the screen refresh rate only when the HDR function is turned off. When the HDR function is turned on, the electronic device does not adjust the screen refresh rate. This can avoid the brief black screen phenomenon during the screen refresh rate adjustment process and ensure the user experience.
[0041] In a possible implementation of the second aspect, the refresh rate switching method may further include: at a second moment, based on the HDR function of the electronic device being turned off, adjusting the screen refresh rate to set the screen refresh rate to a second value; and at a third moment, based on the HDR function of the electronic device being turned off, adjusting the screen refresh rate to set the screen refresh rate to the first value. When the HDR function of the electronic device is turned off, the electronic device adjusts the screen refresh rate normally.
[0042] In a possible implementation of the second aspect, the refresh rate switching method may further include: at a fifth moment, based on the HDR function of the electronic device being enabled, not adjusting the screen refresh rate, and setting the screen refresh rate to a first value. When the HDR function of the electronic device is enabled, the electronic device does not adjust the screen refresh rate, thereby avoiding a brief black screen phenomenon and ensuring a user experience.
[0043] In a possible implementation of the second aspect, the refresh rate switching method may further include: at a second moment, the window of the second application is changed to the focus window, and the screen refresh rate is set to the second value; at a third moment, the window of the first application is changed to the focus window, and the screen refresh rate is set to the first value.
[0044] When the focus window (application scenario) of the electronic device changes, the electronic device adjusts the screen refresh rate so that the screen refresh rate matches the focus window (application scenario), thereby reducing screen power consumption while ensuring smooth picture.
[0045] In a possible implementation of the second aspect, the electronic device includes a UX switch, where the UX switch is used to control on / off adjustment of the screen refresh rate; and the refresh rate switching method may further include:
[0046] Between the first moment and the third moment, the UX switch state is UX switch on; after the fourth moment, the UX switch state is UX switch off and the user is prohibited from turning it on. In this way, when the screen refresh rate adjustment is allowed (UX switch on), the electronic device adjusts the screen refresh rate. However, because the HDR function is turned on, the screen refresh rate adjustment is not allowed. In order to prevent the user from turning on the adjustment of the screen refresh rate, the electronic device sets the UX switch to off.
[0047] In a possible implementation of the second aspect, the refresh rate switching method may further include: reading an HDR switch flag; determining a state of an HDR function according to the HDR switch flag;
[0048] Among them, the HDR switch flag is based on the HDR switch state and the power mode setting of the electronic device. When the HDR switch state is HDR switch off and the power mode is AC mode, the HDR switch flag indicates that the HDR function is off; when the HDR switch state is HDR switch on and the power mode is AC mode, the HDR switch flag indicates that the HDR function is on; when the power mode is DC mode, the setting of the HDR switch flag is not changed.
[0049] By recording the corresponding HDR switch flag of the graphics card status, you can directly determine whether the electronic device has turned on the HDR function by reading the HDR switch flag when you need to determine the display mode, thereby improving the processing speed. If you need to adjust the refresh rate, you can also improve the adjustment speed.
[0050] Also, because the electronic device switches directly from AC mode and HDR-enabled scenes to DC mode, the electronic device may not completely disable the HDR function in the background, so the electronic device adjusts the screen refresh rate in DC mode (HDR switch is off), and a brief black screen phenomenon will still occur. Therefore, in this implementation, when the power mode of the electronic device is DC mode, the setting of the HDR switch flag is not changed, so that the HDR switch flag remains the same. In this way, even if the electronic device switches directly from AC mode and HDR-enabled scenes to DC mode (corresponding to HDR switch off), because the HDR switch flag is not changed, the HDR switch flag still corresponds to the HDR switch being on, then the HDR switch flag indicates that the HDR function is on, and then the screen refresh rate will not be switched, thereby avoiding the brief black screen phenomenon caused by the AC mode directly switching to DC mode to adjust the screen refresh rate.
[0051] In a possible implementation of the second aspect, the refresh rate switching method may further include: reading a UX switch flag; determining a UX switch state according to the UX switch flag; wherein the UX switch flag is set based on the UX switch state, and when the UX switch state is UX switch off, the UX switch flag indicates that the UX switch is off; and when the UX switch state is UX switch on, the UX switch flag indicates that the UX switch is on;
[0052] The UX switch status is based on the status of the HDR function and the power mode setting of the electronic device. When the HDR function status is that the HDR function is on and the power mode is in AC mode, the UX switch status is that the UX switch is off and is set to a state that prohibits users from turning it on; when the HDR function status is that the HDR function is off, the UX switch status is already a state that prohibits users from turning it on and the power mode is in AC mode, the UX switch status is set to a state that allows users to turn it on; when the power mode is in DC mode, the setting of the HDR switch status is not changed.
[0053] By recording the corresponding UX switch status through the status of the HDR function and the power mode of the electronic device, and recording the UX switch flag based on the UX switch status, it is possible to directly determine whether the screen refresh rate is allowed to be adjusted by reading the UX switch flag, thereby improving the processing speed. If the refresh rate adjustment is allowed, the adjustment speed can also be improved.
[0054] And even if the electronic device switches directly from the AC mode with the HDR switch on to the DC mode with the current HDR switch off, but because the UX switch flag bit is not changed, the UX switch flag bit still corresponds to the UX switch off at this time, so the screen refresh rate switching will not be performed, thereby avoiding the short black screen phenomenon that occurs when the screen refresh rate is adjusted directly from the AC mode with the HDR switch on to the DC mode.
[0055] In a possible implementation of the second aspect, the refresh rate switching method can further include: after the electronic device is powered on, obtaining the stored HDR switch state at the last power-off; initializing and setting the HDR switch flag bit according to the stored HDR switch state at the last power-off; wherein when the stored HDR switch state at the last power-off is that the HDR switch is on, the HDR switch flag bit indicates that the HDR function is enabled, and when the stored HDR switch state at the last power-off is that the HDR switch is off, the HDR switch flag bit indicates that the HDR function is disabled.
[0056] initializing and setting the UX switch state according to the stored HDR switch state at the last power-off; wherein when the stored HDR switch state at the last power-off is that the HDR switch is on and the UX switch state is that the UX switch is on, the UX switch state is set to that the UX switch is off and to a state that is disabled for user opening; when the stored HDR switch state at the last power-off is that the HDR switch is on and the UX switch state is that the UX switch is off but is not set to the state that is disabled for user opening, the UX switch state is set to the state that is disabled for user opening; and when the stored HDR switch state at the last power-off is that the HDR switch is off, or the stored HDR switch state at the last power-off is that the HDR switch is on but the UX switch state is that the UX switch is off and is already the state that is disabled for user opening, the UX switch state is not changed. In this way, the initialization and setting of the HDR switch flag bit and the UX switch state are completed.
[0057] In a possible implementation of the second aspect, the electronic device includes an HDR monitor, an intelligent refresh rate module, and a UX interface display module; the refresh rate switching method can further include: the HDR monitor receives a display change message, checks the HDR switch state according to the display change message, and sends an inter-process communication (IPC) message to the intelligent refresh rate module and the UX interface display module, the IPC message indicating the current HDR switch state.
[0058] After receiving the IPC message, the intelligent refresh rate module obtains the power mode of the electronic device. When the power mode is AC mode, the intelligent refresh rate module sets the HDR switch flag according to the HDR switch state indicated by the IPC message; wherein, when the HDR switch state is HDR switch on, the HDR switch flag indicates that the HDR function is on; when the HDR switch state is HDR switch off, the HDR switch flag indicates that the HDR function is off;
[0059] When the power mode is AC mode, the UX interface display module sets the UX switch state according to the HDR switch state indicated by the IPC message; wherein, when the HDR switch state is HDR switch on, the UX switch state is UX switch off and is set to a state that prohibits the user from turning on; when the HDR switch state is HDR switch off and the UX switch state is already a state that prohibits the user from turning on, the UX switch state is set to a state that allows the user to turn on; after the UX interface display module changes the UX switch state, the UX interface display module notifies the intelligent refresh rate module to change the setting of the UX switch flag.
[0060] In AC mode, the HDR switch flag is updated in real time according to the status of the HDR function (HDR switch on or HDR switch off), which can ensure the accuracy of the HDR switch flag. At the same time, the UX switch status is updated in real time according to the status of the HDR function, and the UX switch flag is updated in real time based on the UX switch status, which can ensure the accuracy of the UX switch flag.
[0061] In another possible implementation of the second aspect, the refresh rate switching method may further include: when the power mode is DC mode, the intelligent refresh rate module and the UX interface display module both ignore the IPC message, the intelligent refresh rate module does not change the setting of the HDR switch flag; and the UX interface display module does not change the setting of the UX switch state.
[0062] In this way, even if the electronic device is switched to DC mode and the HDR switch is turned off, the HDR switch flag and the UX switch flag are not changed because the IPC message is not ignored. Therefore, the HDR switch flag and the UX switch flag recorded at this time still correspond to the HDR switch being on and the UX switch being off. Then the screen refresh rate will not be switched, thereby avoiding the brief black screen phenomenon caused by adjusting the screen refresh rate after switching directly from AC mode to DC mode.
[0063] In a possible implementation of the second aspect, at the second moment, based on the HDR function of the electronic device being disabled, adjusting the screen refresh rate to set the screen refresh rate to a second value includes: at the second moment, obtaining the screen refresh rate corresponding to the second application from a preset file to obtain the second value; and based on the HDR function of the electronic device being disabled, adjusting the screen refresh rate to set the screen refresh rate to the second value. The beneficial effects achieved by this implementation can be referred to the first aspect above and are not further described.
[0064] In a possible implementation of the second aspect, at the fifth moment, based on the HDR function of the electronic device being enabled, the screen refresh rate is not adjusted, and the screen refresh rate is a first value, including: at the fifth moment, obtaining the screen refresh rate corresponding to the second application from a preset file to obtain the second value; based on the HDR function of the electronic device being enabled, the screen refresh rate is not adjusted, and the screen refresh rate is the first value. The beneficial effects achieved by this implementation can be referred to the first aspect above and are not further described.
[0065] In a possible implementation of the second aspect, at the second moment, based on the window of the second application becoming the focus window, setting the screen refresh rate to a second value includes: obtaining a focus window change event; when the focus window change event is not a focus window change event for a preset application scenario, determining, based on the focus change event, that the application scenario of the second application is different from that of the first application, setting the screen refresh rate to the second value based on the window of the second application becoming the focus window; when the focus window change event is a focus window change event for a preset application scenario, setting the screen refresh rate to the second value based on the window of the second application becoming the focus window; the second value corresponds to the screen refresh rate for the preset application scenario. The beneficial effects achievable by this implementation can be referred to the first aspect above and will not be elaborated upon.
[0066] In a third aspect, a software program product is provided, including a software program. When the software program is executed by a processor in an electronic device, the electronic device performs a refresh rate switching method, the method comprising the following steps:
[0067] At a first moment, when the window of the first application becomes the focus window, setting the screen refresh rate to a first value;
[0068] At the second moment, when the window of the second application becomes the focus window, the screen refresh rate is set to a second value; wherein, between the first moment and the second moment, the display mode of the electronic device is not independent display only; and the first value and the second value are different;
[0069] At the third moment, when the window of the first application becomes the focus window, the screen refresh rate is not adjusted; the third moment is after the second moment; after the second moment, the display mode of the electronic device is independent display only.
[0070] In a possible implementation of the third aspect, when the above-mentioned software program is executed by the processor, the electronic device further performs the following steps: at a first moment, based on the display mode of the electronic device is not only a separate display, the screen refresh rate is set to a first value; at a second moment, based on the display mode of the electronic device is not only a separate display, the screen refresh rate is set to a second value; at a third moment, based on the display mode of the electronic device is only a separate display, the screen refresh rate is not adjusted, and the screen refresh rate is the second value.
[0071] In a possible implementation of the third aspect, when the above-mentioned software program is executed by the processor, the electronic device further performs the following steps: reading the independent display status flag; determining whether the display mode of the electronic device is independent display only based on the independent display status flag; wherein the independent display status flag is set based on the graphics card status of the electronic device, when the graphics card status is independent display direct connection, the independent display status flag indicates that the display mode is independent display only, and when the graphics card status is not independent display direct connection, the independent display status flag indicates that the display mode is not independent display only.
[0072] In a possible implementation of the third aspect, when the above-mentioned software program is executed by the processor, the electronic device further performs the following steps: reading the UX switch flag; determining the UX switch state according to the UX switch flag; wherein the UX switch flag is set based on the UX switch state, when the UX switch state is UX switch off, the UX switch flag indicates that the UX switch is off, and when the UX switch state is UX switch on, the UX switch flag indicates that the UX switch is on; the UX switch state is set based on the graphics card state of the electronic device, when the graphics card state is a direct connection to an independent graphics card, the UX switch state is UX switch off and is set to a state that prohibits the user from opening it, and when the graphics card state is a direct connection to a non-independent graphics card and the UX switch state is already a state that prohibits the user from opening it, the UX switch state is set to a state that allows the user to open it.
[0073] In a possible implementation of the third aspect, when the above-mentioned software program is executed by the processor, the electronic device further performs the following steps: after the electronic device is turned on, obtaining the UX switch state at the last shutdown from the configuration file, and obtaining the graphics card state stored at the last shutdown; initializing the UX switch flag bit according to the UX switch state at the last shutdown; wherein, when the UX switch state at the last shutdown is UX switch on, the UX switch flag bit indicates that the UX switch is on; when the UX switch state at the last shutdown is UX switch off, the UX switch flag bit indicates that the UX switch is off; setting the graphics card state stored at the last shutdown according to the graphics card state stored at the last shutdown UX switch status; wherein, if the graphics card status stored at the last shutdown was independent graphics card direct connection, and the UX switch status was UX switch on, the UX switch status is set to UX switch off and set to a state where the user is prohibited from opening; if the graphics card status stored at the last shutdown was independent graphics card direct connection, and the UX switch status was UX switch off but not set to a state where the user is prohibited from opening, the UX switch status is set to a state where the user is prohibited from opening; if the graphics card status stored at the last shutdown was non-independent graphics card direct connection, or if the graphics card status stored at the last shutdown was independent graphics card direct connection but the UX switch status was UX switch off and already a state where the user is prohibited from opening, the UX switch status is not changed.
[0074] In a possible implementation of the third aspect, the software program includes a dual-display three-mode function module, an intelligent refresh rate module and a UX interface display module; when the software program is executed by the processor, the electronic device further performs the following steps: the dual-display three-mode function module receives a basic input and output system BIOS notification, and the BIOS notification indicates the current graphics card status of the electronic device; the dual-display three-mode function module sends an inter-process communication IPC message to the intelligent refresh rate module and the UX interface display module according to the BIOS notification, and the IPC message indicates the current graphics card status of the electronic device; when the IPC message carries a parsing identifier, the intelligent refresh rate module parses the IPC message to obtain the current graphics card status of the electronic device, and sets the independent graphics card status flag according to the current graphics card status of the electronic device; wherein, when the current graphics card status of the electronic device is independent graphics direct connection, the independent graphics card status flag indicates that the display mode is independent display only; when the graphics card status is not independent graphics direct connection, the independent graphics card status flag indicates The display mode is not independent display only; the UX interface display module parses the IPC to obtain the current graphics card status of the electronic device, and sets the UX switch status according to the current graphics card status of the electronic device; wherein, when the current graphics card status of the electronic device is independent display direct connection, the UX switch status is UX switch off and is set to a state that prohibits the user from turning it on; when the current graphics card status of the electronic device is not independent display direct connection and the UX switch status is already a state that prohibits the user from turning it on, the UX switch status is set to a state that allows the user to turn it on; after the UX interface display module changes the UX switch status, the UX interface display module notifies the intelligent refresh rate module to change the setting of the UX switch flag.
[0075] In a possible implementation of the third aspect, when the above-mentioned software program is executed by the processor, the electronic device further performs the following steps: at a second moment, obtaining the screen refresh rate corresponding to the second application from the preset file to obtain the second value; based on the display mode of the electronic device is not independent display only, adjusting the screen refresh rate and setting the screen refresh rate to the second value; at a fifth moment, obtaining the screen refresh rate corresponding to the second application from the preset file to obtain the second value; based on the display mode of the electronic device is independent display only, not adjusting the screen refresh rate, and the screen refresh rate is the first value.
[0076] In a possible implementation of the third aspect, when the above-mentioned software program is executed by the processor, the electronic device further performs the following steps: obtaining a focus window change event; when it is determined based on the focus change event that the application scenario of the second application is different from the application scenario of the first application, the screen refresh rate is set to the second value based on the window of the second application being changed to the focus window; obtaining a focus window change event; when it is determined based on the focus change event that the application scenario of the first application is different from the application scenario of the second application, the screen refresh rate is set to the first value based on the window of the first application being changed to the focus window.
[0077] In a possible implementation form of the third aspect, when the software program is executed by the processor, the electronic device further performs the following step: in a case where the obtained focus window change event is a focus window change event corresponding to a preset application scenario, setting the screen refresh rate to a second value based on the window of the second application being changed to the focus window; the second value corresponds to a screen refresh rate of the preset application scenario.
[0078] It should be noted that the beneficial effects achieved by the third aspect can refer to the above-mentioned first aspect, and will not be described again.
[0079] In a fourth aspect, a software program product is provided, comprising a software program, which, when executed by a processor in an electronic device, causes the electronic device to perform a refresh rate switching method, the method comprising the following steps:
[0080] at a first time, setting the screen refresh rate to a first value when the window of the first application becomes the focus window;
[0081] at a second time, setting the screen refresh rate to a second value when the window of the second application becomes the focus window; wherein between the first time and the second time, the HDR function of the electronic device is closed; the first value and the second value are different;
[0082] at a third time, when the window of the first application becomes the focus window, the screen refresh rate is not adjusted; the third time is after the second time; after the second time, the HDR function of the electronic device is opened.
[0083] In a possible implementation form of the fourth aspect, when the software program is executed by the processor, the electronic device further performs the following step:
[0084] at a first time, setting the screen refresh rate to a first value based on the HDR function of the electronic device being closed; at a second time, setting the screen refresh rate to a second value based on the HDR function of the electronic device being closed; at a third time, based on the HDR function of the electronic device being opened, the screen refresh rate is not adjusted, and the screen refresh rate is the second value.
[0085] In a possible implementation of the fourth aspect, when the above-mentioned software program is executed by the processor, the electronic device further performs the following steps: reading the HDR switch flag; determining the status of the HDR function according to the HDR switch flag; wherein the HDR switch flag is based on the HDR switch status and the power mode setting of the electronic device, when the HDR switch status is HDR switch off and the power mode is AC mode, the HDR switch flag indicates that the HDR function is off; when the HDR switch status is HDR switch on and the power mode is AC mode, the HDR switch flag indicates that the HDR function is on; when the power mode is DC mode, the setting of the HDR switch flag is not changed.
[0086] In a possible implementation of the fourth aspect, the electronic device includes a UX switch, where the UX switch is used to control turning on / off adjustment of the screen refresh rate. When the above software program is executed by a processor, the electronic device further performs the following steps:
[0087] Read the UX switch flag; determine the UX switch state according to the UX switch flag; wherein, the UX switch flag is set based on the UX switch state, and when the UX switch state is UX switch off, the UX switch flag indicates that the UX switch is off, and when the UX switch state is UX switch on, the UX switch flag indicates that the UX switch is on; the UX switch state is based on the state of the HDR function and the power mode setting of the electronic device, and when the state of the HDR function is that the HDR function is on and the power mode is in AC mode, the UX switch state is that the UX switch is off and is set to a state that prohibits the user from turning it on; when the state of the HDR function is that the HDR function is off, the UX switch state is already a state that prohibits the user from turning it on and the power mode is in AC mode, the UX switch state is set to a state that allows the user to turn it on; when the power mode is in DC mode, the setting of the HDR switch state is not changed.
[0088] In a possible implementation of the fourth aspect, when the above software program is executed by the processor, the electronic device further performs the following steps: after the electronic device is turned on, obtaining the HDR switch state stored when the device was last turned off; initializing the HDR switch flag according to the HDR switch state stored when the device was last turned off; wherein, when the HDR switch state stored when the device was last turned off is that the HDR switch is on, the HDR switch flag indicates that the HDR function is on; when the HDR switch state stored when the device was last turned off is that the HDR switch is off, the HDR switch flag indicates that the HDR function is off; initializing the UX switch state according to the HDR switch state stored when the device was last turned off; wherein In the HDR switch state stored at the last shutdown, if the HDR switch state is HDR switch on and the UX switch state is UX switch on, the UX switch state is set to UX switch off and set to the state where user opening is prohibited; if the HDR switch state stored at the last shutdown is HDR switch on and the UX switch state is UX switch off but not set to the state where user opening is prohibited, the UX switch state is set to the state where user opening is prohibited; if the HDR switch state stored at the last shutdown is HDR switch off, or if the HDR switch state stored at the last shutdown is HDR switch on but the UX switch state is UX switch off and is already the state where user opening is prohibited, the UX switch state is not changed. This completes the initialization setting of the HDR switch flag and UX switch state.
[0089] In a possible implementation of the fourth aspect, the software program includes an HDR monitor, an intelligent refresh rate module, and a UX interface display module; when the software program is executed by a processor, the electronic device further performs the following steps:
[0090] The HDR monitor receives the display change message, checks the HDR switch state according to the display change message, and sends an inter-process communication (IPC) message to the intelligent refresh rate module and the UX interface display module, the IPC message indicating the current HDR switch state; after the intelligent refresh rate module receives the IPC message, the power mode of the electronic device is obtained, and when the power mode is an AC mode, the intelligent refresh rate module sets an HDR switch flag bit according to the HDR switch state indicated by the IPC message; wherein when the HDR switch state is that the HDR switch is opened, the HDR switch flag bit indicates that the HDR function is opened; when the HDR switch state is that the HDR switch is closed, the HDR switch flag bit indicates that the HDR function is closed; the UX interface display module sets a UX switch state according to the HDR switch state indicated by the IPC message when the power mode is the AC mode; wherein when the HDR switch state is that the HDR switch is opened, the UX switch state is that the UX switch is closed and is set to a state of being prohibited to be opened by a user; when the HDR switch state is that the HDR switch is closed and the UX switch state is already the state of being prohibited to be opened by the user, the UX switch state is set to a state of being allowed to be opened by the user; after the UX interface display module changes the UX switch state, the UX interface display module notifies the intelligent refresh rate module to change the setting of the UX switch flag bit.
[0091] In a possible implementation form of the fourth aspect, when the software program is executed by the processor, the electronic device further performs the following steps: when the power mode is a DC mode, the intelligent refresh rate module and the UX interface display module both ignore the IPC message, the intelligent refresh rate module does not change the setting of the HDR switch flag bit; and the UX interface display module does not change the setting of the UX switch state.
[0092] In a possible implementation form of the fourth aspect, when the software program is executed by the processor, the electronic device further performs the following steps: at the second time, a second value corresponding to the screen refresh rate of the second application is obtained from the preset file; based on that the HDR function of the electronic device is closed, the screen refresh rate is adjusted, and the screen refresh rate is set to the second value; at the fifth time, the second value corresponding to the screen refresh rate of the second application is obtained from the preset file; based on that the HDR function of the electronic device is opened, the screen refresh rate is not adjusted, and the screen refresh rate is the first value.
[0093] In a possible implementation of the fourth aspect, when the above-mentioned software program is executed by the processor, the electronic device further performs the following steps: obtaining a focus window change event; when the focus window change event is not a focus window change event of a preset application scenario, determining that the application scenario of the second application is different from the application scenario of the first application based on the focus change event, setting the screen refresh rate to a second value based on the window of the second application being changed to the focus window; when the focus window change event is a focus window change event of a preset application scenario, setting the screen refresh rate to a second value based on the window of the second application being changed to the focus window; the second value corresponds to the screen refresh rate of the preset application scenario.
[0094] It should be noted that the beneficial effects that can be achieved in the fourth aspect can be referred to the above-mentioned second aspect, and no further details will be given.
[0095] In a fifth aspect, the present application provides an electronic device, comprising: one or more processors and a memory, the memory being coupled to the processor; the processor comprising an independent graphics card and an integrated graphics card; one or more computer program codes being stored in the memory, the computer program codes comprising computer instructions; when the processor executes the computer instructions, the electronic device performs the following steps: at a first moment, displaying a window of a first application, at the first moment, the window of the first application is a focus window, and the screen refresh rate is a first value; at a second moment, receiving a first operation, displaying a window of a second application, after the second moment, the window of the second application is a focus window, and the screen refresh rate is a second value, which is different from the first value; at a third moment, receiving a second operation, displaying the window of the first application, after the third moment, the window of the first application is a focus window, and the screen refresh rate is the first value, and between the first moment and the third moment, the display mode of the electronic device is not independent display only; at a fourth moment, setting the display mode of the electronic device to independent display only; at a fifth moment, receiving a third operation, displaying a window of the second application, after the fifth moment, the window of the second application is a focus window, and the screen refresh rate is the first value; wherein the fifth moment is after the fourth moment.
[0096] In a possible implementation of the fifth aspect, when the above-mentioned computer instructions are executed by the processor, the electronic device further performs the following steps: at a second moment, based on the display mode of the electronic device is not only a separate display, adjusting the screen refresh rate, and setting the screen refresh rate to a second value; at a third moment, based on the display mode of the electronic device is not only a separate display, adjusting the screen refresh rate, and setting the screen refresh rate to the first value.
[0097] In a possible implementation of the fifth aspect, when the above-mentioned computer instructions are executed by the processor, the electronic device further performs the following steps: at the fifth moment, based on the display mode of the electronic device being only independent display, the screen refresh rate is not adjusted, and the screen refresh rate is a first value.
[0098] In a possible implementation of the fifth aspect, when the above-mentioned computer instructions are executed by the processor, the electronic device further performs the following steps: at a second moment, based on the window of the second application changing to the focus window, the screen refresh rate is set to the second value; at a third moment, based on the window of the first application changing to the focus window, the screen refresh rate is set to the first value.
[0099] In a possible implementation of the fifth aspect, when the above-mentioned computer instructions are executed by the processor, the electronic device further performs the following steps: reading the independent display status flag; determining whether the display mode of the electronic device is independent display only based on the independent display status flag; wherein the independent display status flag is set based on the graphics card status of the electronic device, when the graphics card status is independent display direct connection, the independent display status flag indicates that the display mode is independent display only, and when the graphics card status is not independent display direct connection, the independent display status flag indicates that the display mode is not independent display only.
[0100] In a possible implementation of the fifth aspect, when the above-mentioned computer instructions are executed by the processor, the electronic device further performs the following steps: reading the UX switch flag; determining the UX switch state according to the UX switch flag; wherein the UX switch flag is set based on the UX switch state, when the UX switch state is UX switch off, the UX switch flag indicates that the UX switch is off, and when the UX switch state is UX switch on, the UX switch flag indicates that the UX switch is on; the UX switch state is set based on the graphics card state of the electronic device, when the graphics card state is a direct connection to an independent graphics card, the UX switch state is UX switch off and is set to a state that prohibits the user from opening it, and when the graphics card state is a direct connection to a non-independent graphics card and the UX switch state is already a state that prohibits the user from opening it, the UX switch state is set to a state that allows the user to open it.
[0101] In a possible implementation of the fifth aspect, when the above-mentioned computer instructions are executed by the processor, the electronic device further performs the following steps: after the electronic device is turned on, obtaining the UX switch state at the last shutdown from the configuration file, and obtaining the graphics card state stored at the last shutdown; initializing the UX switch flag according to the UX switch state at the last shutdown; wherein, when the UX switch state at the last shutdown is UX switch on, the UX switch flag indicates that the UX switch is on; when the UX switch state at the last shutdown is UX switch off, the UX switch flag indicates that the UX switch is off; setting the graphics card state stored at the last shutdown according to the graphics card state stored at the last shutdown UX switch status; wherein, if the graphics card status stored at the last shutdown was independent graphics card direct connection, and the UX switch status was UX switch on, the UX switch status is set to UX switch off and set to a state where the user is prohibited from opening; if the graphics card status stored at the last shutdown was independent graphics card direct connection, and the UX switch status was UX switch off but not set to a state where the user is prohibited from opening, the UX switch status is set to a state where the user is prohibited from opening; if the graphics card status stored at the last shutdown was non-independent graphics card direct connection, or if the graphics card status stored at the last shutdown was independent graphics card direct connection but the UX switch status was UX switch off and already a state where the user is prohibited from opening, the UX switch status is not changed.
[0102] In a possible implementation of the fifth aspect, the electronic device includes a dual-display three-mode function module, an intelligent refresh rate module and a UX interface display module; when the above-mentioned computer instructions are executed by the processor, the electronic device further performs the following steps: the dual-display three-mode function module receives a basic input and output system BIOS notification, and the BIOS notification indicates the current graphics card status of the electronic device; the dual-display three-mode function module sends an inter-process communication IPC message to the intelligent refresh rate module and the UX interface display module according to the BIOS notification, and the IPC message indicates the current graphics card status of the electronic device; when the IPC message carries a parsing identifier, the intelligent refresh rate module parses the IPC message to obtain the current graphics card status of the electronic device, and sets the independent display status flag according to the current graphics card status of the electronic device; wherein, when the current graphics card status of the electronic device When the status is independent graphics direct connection, the independent graphics status flag indicates that the display mode is independent graphics only; when the graphics card status is not independent graphics direct connection, the independent graphics status flag indicates that the display mode is not independent graphics only; the UX interface display module parses the IPC to obtain the current graphics card status of the electronic device, and sets the UX switch status according to the current graphics card status of the electronic device; wherein, when the current graphics card status of the electronic device is independent graphics direct connection, the UX switch status is that the UX switch is closed and is set to a state that prohibits the user from opening it; when the current graphics card status of the electronic device is not independent graphics direct connection and the UX switch status is already a state that prohibits the user from opening it, the UX switch status is set to a state that allows the user to open it; after the UX interface display module changes the UX switch status, the UX interface display module notifies the intelligent refresh rate module to change the setting of the UX switch flag.
[0103] In a possible implementation of the fifth aspect, when the above-mentioned computer instructions are executed by the processor, the electronic device further performs the following steps: at a second moment, obtaining the screen refresh rate corresponding to the second application from a preset file to obtain the second value; based on the display mode of the electronic device not being a separate display only, adjusting the screen refresh rate and setting the screen refresh rate to the second value.
[0104] In a possible implementation of the fifth aspect, when the above-mentioned computer instructions are executed by the processor, the electronic device further performs the following steps: at the fifth moment, obtain the screen refresh rate corresponding to the second application from the preset file to obtain a second value; based on the display mode of the electronic device being only a separate display, the screen refresh rate is not adjusted, and the screen refresh rate is the first value.
[0105] In a possible implementation of the fifth aspect, when the above-mentioned computer instructions are executed by the processor, the electronic device further performs the following steps: obtaining a focus window change event; when it is determined based on the focus change event that the application scenario of the second application is different from the application scenario of the first application, based on the window of the second application being changed to the focus window, setting the screen refresh rate to a second value.
[0106] In a possible implementation of the fifth aspect, when the above-mentioned computer instructions are executed by the processor, the electronic device further performs the following steps: obtaining a focus window change event; when it is determined that the application scenario of the first application is different from the application scenario of the second application based on the focus change event, setting the screen refresh rate to a first value based on the window of the first application being changed to the focus window.
[0107] In a possible implementation of the fifth aspect, when the above-mentioned computer instructions are executed by the processor, the electronic device further performs the following steps: when the acquired focus window change event is a focus window change event corresponding to a preset application scenario, based on the window of the second application being changed to the focus window, the screen refresh rate is set to a second value; the second value corresponds to the screen refresh rate of the preset application scenario.
[0108] It should be noted that the beneficial effects that can be achieved in the fifth aspect can be referred to the first aspect mentioned above, and no further details will be given.
[0109] In a sixth aspect, the present application provides an electronic device comprising: a battery, one or more processors and a memory, the memory being coupled to the processor; the processor comprising an independent graphics card and an integrated graphics card; one or more computer program codes being stored in the memory, the computer program codes comprising computer instructions; when the processor executes the computer instructions, the electronic device performs the following steps: at a first moment, displaying a window of a first application, at the first moment, the window of the first application is a focus window, and the screen refresh rate is a first value; at a second moment, receiving a first operation, displaying a window of a second application, after the second moment, the window of the second application is a focus window, and the screen refresh rate is a second value, which is different from the first value; at a third moment, receiving a second operation, displaying a window of the first application, after the third moment, the window of the first application is a focus window, and the screen refresh rate is the first value, and between the first moment and the third moment, the HDR function of the electronic device is turned off; at a fourth moment, turning on the HDR function of the electronic device; at a fifth moment, receiving a third operation, displaying a window of the second application, after the fifth moment, the window of the second application is a focus window, and the screen refresh rate is the first value; wherein the fifth moment is after the fourth moment.
[0110] In a possible implementation of the sixth aspect, when the above-mentioned computer instructions are executed by the processor, the electronic device further performs the following steps: at a second moment, based on the HDR function of the electronic device being turned off, adjusting the screen refresh rate and setting the screen refresh rate to a second value; at a third moment, based on the HDR function of the electronic device being turned off, adjusting the screen refresh rate and setting the screen refresh rate to a first value.
[0111] In a possible implementation of the sixth aspect, when the above-mentioned computer instructions are executed by the processor, the electronic device further performs the following steps: at the fifth moment, based on the fact that the HDR function of the electronic device is turned on, the screen refresh rate is not adjusted, and the screen refresh rate is the first value.
[0112] In a possible implementation of the sixth aspect, when the above-mentioned computer instructions are executed by the processor, the electronic device further performs the following steps: at a second moment, the window of the second application is changed to the focus window, and the screen refresh rate is set to the second value; at a third moment, the window of the first application is changed to the focus window, and the screen refresh rate is set to the first value.
[0113] In a possible implementation of the sixth aspect, when the above-mentioned computer instructions are executed by the processor, the electronic device further performs the following steps: reading the HDR switch flag; determining the status of the HDR function according to the HDR switch flag; wherein the HDR switch flag is based on the HDR switch status and the power mode setting of the electronic device, when the HDR switch status is that the HDR switch is off and the power mode is AC mode, the HDR switch flag indicates that the HDR function is off; when the HDR switch status is that the HDR switch is on and the power mode is AC mode, the HDR switch flag indicates that the HDR function is on; when the power mode is DC mode, the setting of the HDR switch flag is not changed.
[0114] In a possible implementation of the sixth aspect, when the above-mentioned computer instructions are executed by the processor, the electronic device further performs the following steps: reading the UX switch flag; determining the UX switch state according to the UX switch flag; wherein the UX switch flag is set based on the UX switch state, and when the UX switch state is UX switch off, the UX switch flag indicates that the UX switch is off, and when the UX switch state is UX switch on, the UX switch flag indicates that the UX switch is on; the UX switch state is based on the state of the HDR function and the power mode of the electronic device, and when the state of the HDR function is that the HDR function is on and the power mode is in AC mode, the UX switch state is that the UX switch is off and is set to a state that prohibits the user from turning it on; when the state of the HDR function is that the HDR function is off, the UX switch state is already a state that prohibits the user from turning it on and the power mode is in AC mode, the UX switch state is set to a state that allows the user to turn it on; when the power mode is in DC mode, the setting of the HDR switch state is not changed.
[0115] In a possible implementation of the sixth aspect, when the computer instructions are executed by the processor, the electronic device further performs the following steps: after the electronic device is powered on, obtaining the HDR switch state stored when the device was last powered off; and initializing the HDR switch flag according to the HDR switch state stored when the device was last powered off; wherein, when the HDR switch state stored when the device was last powered off is that the HDR switch is on, the HDR switch flag indicates that the HDR function is on; and when the HDR switch state stored when the device was last powered off is that the HDR switch is off, the HDR switch flag indicates that the HDR function is off; and initializing the UX switch state according to the HDR switch state stored when the device was last powered off; Specifically, if the HDR switch state stored at the last shutdown was HDR switch on and the UX switch state was UX switch on, the UX switch state is set to UX switch off and set to a state where the user is prohibited from turning on the switch; if the HDR switch state stored at the last shutdown was HDR switch on and the UX switch state was UX switch off but not set to a state where the user is prohibited from turning on the switch, the UX switch state is set to a state where the user is prohibited from turning on the switch; if the HDR switch state stored at the last shutdown was HDR switch off, or if the HDR switch state stored at the last shutdown was HDR switch on but the UX switch state was UX switch off and already a state where the user is prohibited from turning on the switch, the UX switch state is not changed. This completes the initialization setting of the HDR switch flag and the UX switch state.
[0116] In a possible implementation of the sixth aspect, an electronic device includes an HDR monitor, an intelligent refresh rate module, and a UX interface display module; when the computer instructions are executed by a processor, the electronic device further performs the following steps:
[0117] In a possible implementation of the sixth aspect, when the above-mentioned computer instructions are executed by the processor, the electronic device further performs the following steps: the HDR monitor receives a display change message, checks the HDR switch status according to the display change message, and sends an inter-process communication IPC message to the smart refresh rate module and the UX interface display module, the IPC message indicating the current HDR switch status; after receiving the IPC message, the smart refresh rate module obtains the power mode of the electronic device, and when the power mode is AC mode, the smart refresh rate module sets the HDR switch flag according to the HDR switch status indicated by the IPC message; wherein, when the HDR switch status is that the HDR switch is on, the HDR switch flag indicates whether the HDR function is on When the HDR switch state is HDR switch off, the HDR switch flag indicates that the HDR function is off; when the power mode is AC mode, the UX interface display module sets the UX switch state according to the HDR switch state indicated by the IPC message; wherein, when the HDR switch state is HDR switch on, the UX switch state is UX switch off and is set to a state that prohibits the user from turning on; when the HDR switch state is HDR switch off and the UX switch state is already a state that prohibits the user from turning on, the UX switch state is set to a state that allows the user to turn on; after the UX interface display module changes the UX switch state, the UX interface display module notifies the smart refresh rate module to change the setting of the UX switch flag.
[0118] In a possible implementation of the sixth aspect, when the above-mentioned computer instructions are executed by the processor, the electronic device further performs the following steps: when the power mode is DC mode, the intelligent refresh rate module and the UX interface display module both ignore the IPC message, and the intelligent refresh rate module does not change the setting of the HDR switch flag; and the UX interface display module does not change the setting of the UX switch state.
[0119] In a possible implementation of the sixth aspect, when the above-mentioned computer instructions are executed by the processor, the electronic device further performs the following steps: at a second moment, obtaining the screen refresh rate corresponding to the second application from a preset file to obtain a second value; based on the HDR function of the electronic device being turned off, adjusting the screen refresh rate and setting the screen refresh rate to the second value.
[0120] In a possible implementation of the sixth aspect, when the above-mentioned computer instructions are executed by the processor, the electronic device further performs the following steps: at the fifth moment, obtaining the screen refresh rate corresponding to the second application from the preset file to obtain a second value; based on the HDR function of the electronic device being turned on, the screen refresh rate is not adjusted, and the screen refresh rate is the first value.
[0121] In a possible implementation of the sixth aspect, when the above-mentioned computer instructions are executed by the processor, the electronic device further performs the following steps: obtaining a focus window change event; when the focus window change event is not a focus window change event of a preset application scenario, determining that the application scenario of the second application is different from the application scenario of the first application based on the focus change event, setting the screen refresh rate to a second value based on the window of the second application being changed to the focus window; when the focus window change event is a focus window change event of a preset application scenario, setting the screen refresh rate to a second value based on the window of the second application being changed to the focus window; the second value corresponds to the screen refresh rate of the preset application scenario.
[0122] It should be noted that the beneficial effects that can be achieved in the sixth aspect can be referred to the second aspect mentioned above, and no further details will be given.
[0123] In a seventh aspect, the present application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor in an electronic device, causes the electronic device to perform the refresh rate switching method of the first aspect and any possible implementation thereof. Alternatively, when the computer program is executed by a processor in an electronic device, causes the electronic device to perform the refresh rate switching method of the second aspect and any possible implementation thereof.
[0124] In an eighth aspect, the present application provides a computer program product that, when executed on a computer, causes the computer to perform the method of the first aspect and any possible implementation thereof. Alternatively, when executed on a computer, causes the computer to perform the method of the second aspect and any possible implementation thereof. The computer may be the electronic device described above.
[0125] It can be understood that the beneficial effects that can be achieved by the computer-readable storage medium of the seventh aspect and the computer program product of the eighth aspect can be referred to the beneficial effects in the first aspect and any possible implementation thereof, and the second aspect and any possible implementation thereof, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0126] Figure 1 A schematic diagram of an interface for advanced display settings provided in an embodiment of the present application;
[0127] Figure 2 A schematic diagram of a scenario in which a brief black screen occurs in a scenario where a dedicated graphics card is directly connected, provided in an embodiment of the present application;
[0128] Figure 3 A schematic diagram of an interface for a management display mode provided in an embodiment of the present application;
[0129] Figure 4A schematic diagram of a screen setting interface provided in an embodiment of the present application;
[0130] Figure 5 A schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present application;
[0131] Figure 6 A block diagram of the software and hardware system structure of an electronic device provided in an embodiment of the present application;
[0132] Figure 7 A schematic diagram of a refresh rate switching method provided in an embodiment of the present application Figure 1 ;
[0133] Figure 8 A user interface diagram of a focus window change provided in an embodiment of the present application Figure 1 ;
[0134] Figure 9 A user interface diagram of a focus window change provided in an embodiment of the present application Figure 2 ;
[0135] Figure 10 A user interface diagram of a focus window change provided in an embodiment of the present application Figure 3 ;
[0136] Figure 11 A user interface diagram of a focus window change provided in an embodiment of the present application Figure 4 ;
[0137] Figure 12 A schematic diagram of a process for obtaining a focus window change event provided in an embodiment of the present application;
[0138] Figure 13 A schematic diagram of a process for obtaining a focus window change event provided in an embodiment of the present application;
[0139] Figure 14 A flowchart of a method for setting a UX switch flag in a power-on scenario provided by an embodiment of the present application;
[0140] Figure 15 A schematic diagram of a process for setting a discrete graphics state flag and a UX switch flag in a graphics card state switching scenario provided in an embodiment of the present application;
[0141] Figure 16 A schematic diagram of a process for setting an HDR switch flag and a UX switch flag provided in an embodiment of the present application;
[0142] Figure 17 A diagram showing the relationship between the UX switch state, independent display state, and HDR switch state provided in an embodiment of the present application;
[0143] Figure 18 A communication diagram for setting a flag bit provided in an embodiment of the present application;
[0144] Figure 19 A schematic diagram of a refresh rate switching method provided in an embodiment of the present application Figure 2 ;
[0145] Figure 20 A schematic diagram of a refresh rate switching method provided in an embodiment of the present application Figure 3 ;
[0146] Figure 21 This is a structural block diagram of a chip system provided in an embodiment of the present application. DETAILED DESCRIPTION
[0147] The technical solutions of the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Among them, in the description of the embodiments of the present application, the terms used in the following embodiments are only for the purpose of describing specific embodiments, and are not intended to limit the present application. In addition, in order to facilitate the clear description of the technical solutions of the embodiments of the present application, in the embodiments of the present application, if the words "first", "second" and the like are used to distinguish between the same items or similar items with substantially the same functions and effects. Those skilled in the art will understand that the words "first", "second" and the like do not limit the quantity and execution order, and the words "first", "second" and the like do not necessarily limit them to be different. And, in the description of the embodiments of the present application, unless otherwise specified, the meaning of "multiple" means two or more.
[0148] The following first introduces relevant technical concepts that may be involved in the embodiments of this application:
[0149] 1. Discrete graphics card (DGPU): This integrates the display chip, video memory, and related components onto a separate circuit board, creating a self-contained, independent card that typically occupies an expansion slot on the motherboard. Simply put, a discrete graphics card is a graphics card with its own dedicated video memory and graphics processing unit (GPU).
[0150] 2. Integrated graphics (IGGPU): A graphics card device with only a GPU and no dedicated video memory. For example, an integrated graphics card typically refers to a GPU built into the same package as the central processing unit (CPU). Therefore, an integrated graphics card typically requires the system's main memory as video memory, resulting in higher performance than a dedicated graphics card.
[0151] 3. Dual display and three modes: Use independent graphics and integrated graphics to provide three display modes, including independent graphics mode, integrated graphics mode and hybrid mode. For example, under high performance requirements, you can turn on the independent graphics and select independent graphics mode (display by the independent graphics card alone). When low performance or battery life is required, you can turn off the independent graphics and select integrated graphics mode (display by the integrated graphics card alone). Turning on hybrid mode means turning on automatic switching of dual graphics cards (that is, the independent graphics card and integrated graphics card can handle different tasks respectively).
[0152] 4. Graphics card refresh rate: The frequency of the signal output by the graphics card (such as display driver) to the screen, measured in Hz.
[0153] 5. Screen refresh rate: The number of times the screen is refreshed per second, measured in Hz. The higher the screen refresh rate, the smoother the image displayed on the monitor will be.
[0154] It is understandable that based on different designs and actual needs, the screen refresh rate and the graphics card refresh rate can be called differently. For example, taking the Windows operating system as an example, Figure 1 A schematic diagram of an interface for advanced display settings is shown.
[0155] like Figure 1 As shown in the figure, in the Windows operating system, the screen refresh rate can be the refresh rate in desktop mode, and the graphics card refresh rate can be the refresh rate in active signal mode. In addition to the refresh rate, the desktop mode and active signal mode can also include resolution. In other words, it is understandable that the refresh rate in desktop mode refers to the screen refresh rate, while the refresh rate in active signal mode refers to the graphics card refresh rate.
[0156] 6. Smart refresh rate function: The screen refresh rate is adaptively adjusted according to the application scenario, but the graphics card refresh rate will not be adjusted. For example, in a game application scenario with a relatively high refresh rate requirement, the screen refresh rate can be set to a high refresh rate, such as setting the screen refresh rate to 120Hz, 90Hz, etc., to ensure the smoothness and smoothness of the game screen. In application scenarios such as files or web pages, a low screen refresh rate will not affect the user's browsing and operation, so the screen refresh rate can be set to a low refresh rate, for example, setting the screen refresh rate to 60Hz. That is, the smart refresh rate function can achieve the effect of reducing screen power consumption while ensuring user experience. For example, in the Windows operating system, the smart refresh rate function is to adaptively adjust the refresh rate in desktop mode according to the application scenario, but will not change the refresh rate in active signal mode.
[0157] 7. High Dynamic Range Imaging (HDR): HDR technology is a processing technique that enhances image brightness and contrast. Compared to standard images, HDR provides greater dynamic range and image detail, better reflecting the visual effects of real-world environments. Specifically, HDR technology can enhance brightness and contrast, resulting in richer, more realistic colors and details.
[0158] 8. Alternating current (AC) mode: The operating mode in which the electronic device is plugged into a power adapter and powered by the power adapter. Direct current (DC) mode: The operating mode in which the electronic device (such as a laptop) is powered by a battery when the power adapter is unplugged. It should be noted that the operating systems of current electronic devices (such as laptops) can only support HDR technology in AC mode. In other words, the above-mentioned HDR technology is currently only effective in AC mode. That is, HDR in DC mode is turned off and is in an unusable state.
[0159] 9. Focus window.
[0160] The focused window is the window with focus. The focused window is the window that receives keyboard input. The determination of the focused window is tied to the system's focus mode. The topmost window of the focused window is called the active window. Optionally, only one window can be active at a time; that is, at any given moment, there is only one focused window. The focused window is most likely the window the user is currently working on.
[0161] A process consists of multiple threads, and windows can be created through threads. The focus process is the process to which the thread that created the focus window belongs. It can also be understood that the focus process is the process corresponding to the focus window.
[0162] Because the Smart Refresh Rate feature only adjusts the screen refresh rate and not the graphics card refresh rate—that is, it doesn't change the refresh rate in the graphics card's output signal—the refresh rate adjusted by the Smart Refresh Rate feature can be considered a virtual refresh rate. Therefore, the implementation of the Smart Refresh Rate feature currently relies primarily on the operating system's virtual refresh rate feature. It can be understood that the operating system of an electronic device (such as Windows 11) has a virtual display feature, and the Smart Refresh Rate feature relies on this virtual display feature.
[0163] However, the virtual refresh rate function is currently only supported in the discrete graphics mode or the hybrid mode, that is, in the discrete graphics mode, the operating system currently does not support the virtual refresh rate. Therefore, if the interface for switching the screen refresh rate is called in the discrete graphics direct connection scenario, the graphics card refresh rate may be switched.
[0164] For example, in the windows operating system, if the interface for switching the refresh rate in the desktop mode is called in the discrete graphics direct connection scenario, the refresh rate in the active signal mode may be switched. The discrete graphics direct connection refers to that the independent graphics card directly sends graphics to the screen, which can be referred to as only discrete graphics, that is, the display mode of the electronic device is the discrete graphics mode.
[0165] If the graphics card refresh rate is adjusted, the configuration of the graphics card is changed, and the graphics card usually needs to be restarted for reconfiguration. During the restart of the graphics card, the display service of the electronic device is stopped, so the display will appear a short black screen phenomenon due to the restart. Therefore, if the intelligent refresh rate function is enabled in the discrete graphics direct connection scenario, the short black screen (or flashing screen) phenomenon will occur. The more frequent the application scenario of the electronic device changes, the more frequent the short black screen phenomenon occurs, thereby affecting the user experience.
[0166] For example, Figure 2 A scenario diagram of a short black screen phenomenon in a discrete graphics direct connection scenario is shown.
[0167] As Figure 2 shown, after entering the game application, the current screen refresh rate is 60 Hz. However, because the game application has a relatively high requirement for picture smoothness and operation smoothness, the screen refresh rate needs to be improved, which can be improved to 120 Hz. However, because the electronic device is currently in the discrete graphics direct connection, the graphics card refresh rate will be adjusted during the improvement of the screen refresh rate, thereby causing a short black screen phenomenon of the display.
[0168] Therefore, in order to avoid the intelligent refresh rate function from affecting the user experience due to the short black screen phenomenon caused by the discrete graphics direct connection, an embodiment of the present application provides a refresh rate switching method (hereinafter referred to as the first refresh rate switching method). The first refresh rate switching method provided by the embodiment of the present application can be applied to an electronic device (such as a first electronic device) including an independent graphics card and an integrated graphics card.
[0169] In the first refresh rate switching method, when the electronic device determines that the current display mode is a direct connection to a separate graphics card (i.e., a separate graphics mode), the electronic device turns off the smart refresh rate function. That is, in the scenario of direct connection to a separate graphics card, the electronic device turns off the adjustment of the screen refresh rate. That is, the electronic device will not adjust the screen refresh rate according to the adaptability of the application scenario in the scenario of direct connection to a separate graphics card. As a result, the electronic device can avoid adjusting the screen refresh rate according to the adaptability of the application scenario in the scenario of direct connection to a separate graphics card, that is, the smart refresh rate is not turned on in the scenario of direct connection to a separate graphics card, and either the smart refresh rate function or the direct connection to a separate graphics card is turned on, so as to avoid conflicts between the direct connection to a separate graphics card and the smart refresh rate function, causing a temporary black screen phenomenon, and ensure that the user experience is not affected.
[0170] For example, Figure 3 This is an interface diagram of a management display mode disclosed exemplarily in an embodiment of the present application.
[0171] like Figure 3 As shown, the electronic device may display a window interface for managing the display mode. The window interface for managing the display mode may include a display mode setting window 301, in which the option "Only independent graphics card" is displayed. When the option "Only independent graphics card" is selected, as shown in FIG. Figure 3 As shown, it means that the electronic device is currently in a scenario where the independent display is directly connected, that is, the current display mode of the electronic device is independent display only.
[0172] In addition, in addition to the above-mentioned scenario where the independent display is directly connected, the display screen may easily go black for a short time. Because the HDR technology itself conflicts with the smart refresh rate function, electronic devices may also easily go black for a short time when the smart refresh rate function is enabled in the HDR-enabled scenario. In other words, if the electronic device uses the interface to adaptively adjust the screen refresh rate according to the application scenario in the HDR-enabled scenario, it may also cause the display screen to go black for a short time (such as Figure 2 The user experience will also be affected.
[0173] Based on this, in order to avoid the smart refresh rate function causing a temporary black screen phenomenon on the display screen due to HDR, which affects the user experience, this application provides another refresh rate switching method (hereinafter referred to as the second refresh rate switching method). The second refresh rate switching method provided in the embodiment of the present application can be applied to an electronic device (i.e., a second electronic device) that includes a discrete graphics card, an integrated graphics card, and also includes an HDR function, and the electronic device (the second electronic device) supports AC mode and DC mode.
[0174] In the second refresh rate switching method, if the electronic device determines that HDR is currently turned on, the electronic device turns off the smart refresh rate. That is, in the scenario where HDR is turned on, the electronic device will turn off the smart refresh rate function, so that the screen refresh rate will not be adjusted. That is, the electronic device will not adjust the screen refresh rate according to the adaptability of the application scenario in the scenario where HDR is turned on. As a result, the electronic device can avoid adjusting the screen refresh rate according to the adaptability of the application scenario in the scenario where HDR is turned on, and either the smart refresh rate function or HDR is turned on, so as to avoid conflicts between HDR and the smart refresh rate function and cause a temporary black screen phenomenon, ensuring that the user experience is not affected.
[0175] For example, Figure 4 This is a schematic diagram of an interface of a screen setting disclosed exemplarily in an embodiment of the present application.
[0176] like Figure 4 As shown, the electronic device can display a window interface of System>Screen Settings. Among them, the "Use HDR" option is displayed in the window interface of System>Screen Settings. At the same time, the "Use HDR" option corresponds to a control switch. For the sake of distinction, the embodiment of the present application is referred to as an HDR switch. When the HDR switch state is "off", it means that the HDR function is in the off state, that is, the electronic device is currently in a scene where HDR is off. And when the HDR switch state is "on", it means that the HDR function is in the on state, that is, the electronic device is currently in a scene where HDR is on. Figure 4 Shown is a scenario where the electronic device is in HDR-off state.
[0177] In general, in the above two refresh rate switching methods, as long as the electronic device enters the scene of direct connection to the independent graphics card or the scene of HDR being turned on, the electronic device will stop adjusting the screen refresh rate (i.e., turn off the smart refresh rate function). It can be understood that for an electronic device that includes both an independent graphics card and HDR function (i.e., the third electronic device), as long as the electronic device enters the scene of direct connection to the independent graphics card or the scene of HDR being turned on, the electronic device will stop adjusting the screen refresh rate (i.e., turn off the smart refresh rate function).
[0178] In other embodiments, if the electronic device provides the user with a user experience (UX) switch that can trigger the activation of the smart refresh rate function, then after the electronic device enters a scenario where the independent graphics card is directly connected or a scenario where HDR is enabled, the electronic device will also turn off and gray out the UX switch. By turning off and graying out the UX switch, the electronic device prevents the user from triggering the activation of the smart refresh rate function through the UX switch in scenarios where the independent graphics card is directly connected or HDR is enabled, thereby avoiding the conflict between the smart refresh rate function and the independent graphics card directly connected or HDR, which may cause a temporary black screen phenomenon, and ensuring that the user experience is not affected.
[0179] The electronic devices in the embodiments of the present application (including the above-mentioned first electronic device, second electronic device and third electronic device) can be laptop computers, desktop computers, tablet computers, desktop computers, handheld computers, ultra-mobile personal computers (UMPCs), netbooks, mobile phones, smart bracelets, personal phones, personal data assistants, augmented reality (AR), virtual reality (VR) and other devices. The present application does not limit the specific form of the electronic devices.
[0180] For example, Figure 5 A schematic diagram of the hardware structure of an electronic device shown in an embodiment of the present application.
[0181] like Figure 5 As shown, the electronic device may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) connector 130, a charging management module 140, a power management module 141, a battery 142, a wireless communication module 150, a display screen 160, etc.
[0182] It is understandable that the structure illustrated in the embodiment of the present application does not constitute a specific limitation on the electronic device. In other embodiments of the present application, the electronic device may include more or fewer components than shown in the figure, or combine certain components, or split certain components, or arrange the components differently. The illustrated components can be implemented in hardware, software, or a combination of software and hardware. For example, in other embodiments, the electronic device may also include a mouse, a keyboard, an audio module, a speaker, a receiver, a microphone, a headphone jack, and a camera module, etc.
[0183] The processor 110 may include one or more processing units. For example, the processor 110 may include an application processor (AP), a modem processor, a graphics processor (GPU), an image signal processor (ISP), a controller, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU).
[0184] The different processing units may be independent devices or integrated into one or more processors. For example, in an embodiment of the present application, the processor 110 may include an independent GPU, i.e., the aforementioned independent graphics card. The processor 110 may also include a GPU integrated with other processing units, i.e., the aforementioned integrated graphics card.
[0185] The processor 110 can generate an operation control signal based on the instruction opcode and the timing signal to complete the control of instruction fetching and execution. For example, in an embodiment of the present application, the processor 110 can implement an intelligent refresh rate function. That is, the processor 110 can adaptively adjust the screen refresh rate according to the application scenario. For another example, in a scenario where the independent display is directly connected or HDR is turned on, the processor 110 can stop adjusting the screen refresh rate, that is, in a scenario where the independent display is directly connected or HDR is turned on, the processor 110 can no longer adaptively adjust the screen refresh rate according to the application scenario.
[0186] Processor 110 may also include a memory for storing instructions and data. In some embodiments, the memory in processor 110 may be a cache memory. This memory can store instructions or data that have been used or are frequently used by processor 110. When processor 110 needs to use the instruction or data, it can directly access it from this memory. This avoids duplicate accesses, reduces processor 110 latency, and thus improves system efficiency.
[0187] In some embodiments, the processor 110 may include one or more interfaces. The interfaces may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, and / or a universal serial bus (USB) interface. The processor 110 may be connected to modules such as a wireless communication module and a display screen through at least one of the above interfaces.
[0188] It is understood that the interface connection relationship between the modules illustrated in the embodiments of the present application is only for illustrative purposes and does not constitute a structural limitation on the electronic device. In other embodiments of the present application, the electronic device may also adopt different interface connection methods from the above embodiments, or a combination of multiple interface connection methods.
[0189] The external memory interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device. The external memory card communicates with the processor 110 via the external memory interface 120 to implement data storage. For example, files such as music and videos can be stored on the external memory card or transferred from the electronic device to the external memory card.
[0190] The internal memory 121 can be used to store computer executable program code, which includes instructions. The internal memory 121 may include a program storage area and a data storage area. Among them, the program storage area can store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc. The data storage area can store data created during the use of the electronic device (such as audio data, video data, etc.), etc. In addition, the internal memory 121 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, a universal flash storage (UFS), etc. The processor 110 executes various functional methods or data processing of the electronic device by running instructions stored in the internal memory 121, and / or instructions stored in a memory provided in the processor.
[0191] The USB connector 130 is an interface that complies with USB standards and can be used to connect the electronic device 100 and peripheral devices. Specifically, it can be a Mini USB connector, a Micro USB connector, a USB Type C connector, etc. The charging management module 140 is used to receive charging input from the charger. The power management module 141 is used to connect the battery 142, the charging management module 140, and the processor 110. The wireless communication module 160 can provide wireless communication solutions for the electronic device, including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks) and Bluetooth (BT).
[0192] The electronic device can implement display functions through a GPU, a display screen 160, and an application processor. The GPU is a microprocessor for image processing, which connects the display screen 160 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 120 may include one or more GPUs that execute program instructions to generate or change display information. For example, in an embodiment of the present application, the processor 120 includes at least one independent GPU (i.e., an independent graphics card) and an integrated GPU (a GPU integrated with other processing units, i.e., an integrated graphics card).
[0193] Display screen 160 is used to display images, videos, etc. Display screen 160 includes a display panel. The display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), a MiniLED, a MicroLED, a Micro-oLED, or a quantum dot light-emitting diode (QLED).
[0194] Figure 6 This is a block diagram of the software and hardware system structure of an electronic device shown in an embodiment of the present application.
[0195] The software and hardware systems of electronic devices can adopt a layered architecture, an event-driven architecture, a microkernel architecture, a microservice architecture, or a cloud architecture. The embodiments of this application use a layered Windows operating system as an example to illustrate the software and hardware structure of an electronic device. In some embodiments, the software and hardware systems of an electronic device can be divided into four layers: the application layer, the subsystem dynamic link library, the operating system (OS) layer, and the hardware layer.
[0196] In other embodiments, the software and hardware systems can be divided into user state and kernel state. The user state includes the application layer and the subsystem dynamic link library, and the kernel state includes the OS layer and the hardware layer.
[0197] like Figure 6As shown, the application layer includes applications such as video, office software (for example, conference, document application, email, etc.), XX games, browsers and computer managers. Among them, in the embodiment of the present application, the screen refresh rate adjustment process in the embodiment of the present application can be performed by the computer manager, that is, the intelligent refresh rate function is implemented by the computer manager. It should be noted that, Figure 6 Only some applications are shown in the figure. The application layer can also include more applications, and the embodiments of the present application do not impose any limitations on this.
[0198] like Figure 6 As shown, the computer manager can include a dual-display triple-mode function module, an intelligent refresh rate module, a UX interface display module, an HDR monitor, and a probe module, etc.
[0199] Among them, the dual-display three-mode function module is used to obtain the graphics card status and determine whether the current graphics card status is a direct connection to a separate graphics card.
[0200] The smart refresh rate module is used to implement the smart refresh rate function, which can adaptively adjust the screen refresh rate according to the application scenario.
[0201] The UX interface display module is used to manage the UX switch of the smart refresh rate function. For example, in the scenario where the independent display is directly connected, the UX interface display module turns off the UX switch and grays it out (prohibiting the user from turning on the UX switch), so that the user cannot turn on the UX switch to trigger the electronic device to turn on the smart refresh rate function. However, if it is not in a scenario where the independent display is directly connected, the UX interface display module can ungray the UX switch (allowing the user to turn on the UX switch). Through the UX switch, the user can choose whether to turn on the UX switch according to their actual needs to trigger whether the electronic device turns on the smart refresh rate function. Furthermore, the smart refresh rate module can decide whether to turn on the smart refresh rate function based on the status of the UX switch.
[0202] The probe module is used to monitor the changes in the focus window of the electronic device, so that the intelligent refresh rate module can determine whether the application scenario of the electronic device has changed based on the focus window change event identified by the probe module, and then decide whether to adjust the screen refresh rate based on the screen refresh rate corresponding to the application scenario.
[0203] The HDR monitor is used to monitor and check changes in the HDR switch status, and the smart refresh rate module then decides whether to turn on the smart refresh rate function based on the HDR switch status.
[0204] The subsystem dynamic link library includes an application programming interface (API) module, which can provide system call entry and internal function support for the application.
[0205] The OS layer includes an integrated graphics driver (IGPU driver), a discrete graphics driver (DGPU driver), etc. The hardware layer includes a discrete graphics card (DGPU), an integrated graphics driver (IGPU), and a display. In some embodiments, the OS layer and the hardware layer may include more or fewer components, which is not limited in this embodiment of the present application. For example, the OS layer may also include a sound card driver, a keyboard driver, a mouse driver, etc. The hardware layer may also include hardware such as a sound card, a keyboard, and a mouse.
[0206] Hereinafter, in combination with the first refresh rate switching method and the second refresh rate switching method described above, the refresh rate switching method proposed in the embodiment of the present application will be described in detail with reference to the accompanying drawings. It should be noted that the refresh rate switching methods in the following embodiments can all be implemented in electronic devices having the above hardware structure.
[0207] Figure 7 A schematic flow chart of a refresh rate switching method is shown.
[0208] Combine Figure 6 The intelligent refresh rate module in the refresh rate controller may include a refresh rate matching module, a refresh rate adjustment thread (refresh rate scheduler) and a message monitor. Among them, the message monitor is used to notify the refresh rate adjustment thread of the independent display status, UX switch status and HDR switch status. The refresh rate matching module is used to match the corresponding screen refresh rate based on the application scenario when the application scenario of the electronic device changes. Then, the refresh rate matching module sends the matched screen refresh rate to the refresh rate adjustment thread, and the refresh rate adjustment thread decides whether to switch the screen refresh rate based on the received screen refresh rate, as well as the independent display status, UX switch status and HDR switch status.
[0209] like Figure 7 As shown, the refresh rate switching method may include the following steps:
[0210] S701: After the application scenario of the electronic device changes, the refresh rate matching module matches the corresponding screen refresh rate according to the application scenario.
[0211] The application scenario can reflect the user's current usage needs, and different application scenarios correspond to different screen refresh rates. In some embodiments, the refresh rate matching module can obtain the screen refresh rate corresponding to the application scenario from a preset file.
[0212] Exemplarily, the application scenarios can include a game application and an office application (which can include word, ppt or excel), etc. The screen refresh rate corresponding to the game application is higher than that corresponding to the office application. For example, in the preset file, the screen refresh rate corresponding to the game application can be 120 Hz, 90 Hz, etc. The screen refresh rate corresponding to the office application can be 60 Hz, 30 Hz, etc.
[0213] It should be noted that the application scenarios can include more or less scenarios in addition to the game application and the office application, such as a video application, etc. In addition, the screen refresh rates corresponding to different application scenarios in the preset file can be configured according to actual needs, and the embodiments of the present application do not make any limitation in this regard. For example, the screen refresh rate corresponding to the game application > the screen refresh rate corresponding to the video application > the screen refresh rate corresponding to the office application. Or, the screen refresh rate corresponding to the game application > the screen refresh rate corresponding to the video application = the screen refresh rate corresponding to the office application.
[0214] In S702, the refresh rate matching module sends the screen refresh rate to the refresh rate adjustment thread.
[0215] The screen refresh rate received by the refresh rate adjustment thread from the refresh rate matching module is the refresh rate corresponding to the current application scenario of the electronic device sent by the refresh rate matching module.
[0216] If the screen refresh rate sent by the refresh rate matching module is the same as the current screen refresh rate, it indicates that even if the application scenario has changed, the screen refresh rate has not changed. In this case, the screen refresh rate does not need to be adjusted again. Then, the refresh rate adjustment thread performs S704. If the screen refresh rate sent by the refresh rate matching module is different from the current screen refresh rate, it indicates that both the application scenario and the screen refresh rate have changed, and in order to match the application scenario, the refresh rate adjustment thread needs to adjust the screen refresh rate. Then, the refresh rate adjustment thread performs S705.
[0217] In some embodiments, the refresh rate adjustment thread can obtain the current screen refresh rate from the configuration file of the electronic device. Then, the screen refresh rate sent by the refresh rate matching module is compared with the screen refresh rate in the configuration file to determine whether the screen refresh rate has changed.
[0218] Exemplarily, if the application scenario changes from a video application to an office application, the screen refresh rate corresponding to the video application is 60 Hz, and the screen refresh rate corresponding to the office application is also 60 Hz. Because the screen refresh rates corresponding to the two application scenarios of the video application and the office application are the same, the refresh rate adjustment thread does not need to adjust the screen refresh rate, thereby ensuring that the screen refresh rate remains 60 Hz.
[0219] For example, if the application scenario changes from a game application to an office application, and the screen refresh rate corresponding to the game application is 120Hz, but the screen refresh rate corresponding to the office application is 60Hz, then because the change in the application scenario requires adjustment of the screen refresh rate, the refresh rate adjustment thread needs to reduce the screen refresh rate from 120Hz to 60Hz.
[0220] S703, the message monitor notifies the refresh rate adjustment thread of the recorded independent display status flag, UX switch flag, and HDR switch flag.
[0221] The discrete graphics status flag is used to indicate the current graphics card status of the electronic device, including discrete graphics direct connection and non-discrete graphics direct connection. A discrete graphics direct connection indicates that the electronic device's current display mode is discrete graphics mode (i.e., discrete graphics only). A non-discrete graphics direct connection indicates that the electronic device's current display mode is not discrete graphics mode (i.e., not discrete graphics only), and the current display mode may be integrated graphics mode or hybrid mode.
[0222] Among them, since the independent graphics card direct connection conflicts with the smart refresh rate function and will cause a black screen phenomenon, the non-independent graphics card direct connection does not conflict with the smart refresh rate function and will not cause a black screen phenomenon. Therefore, if the independent graphics card status flag corresponds to the independent graphics card direct connection, the refresh rate adjustment thread can directly determine that the electronic device is currently in the independent graphics card direct connection scenario, that is, it can be determined that if the screen refresh rate is switched at the moment, a black screen phenomenon may be caused. If the independent graphics card status flag corresponds to the non-independent graphics card direct connection, the refresh rate adjustment thread can directly determine that the electronic device is not currently in the independent graphics card direct connection scenario, that is, it can be determined that if the screen refresh rate is switched at the moment, a black screen phenomenon will not be caused by a conflict.
[0223] The UX switch flag is used to represent the current UX switch state. The UX switch state includes UX switch on and UX switch off. When the UX switch is on, it indicates that the user needs to turn on the smart refresh rate function. When the UX switch is off, it indicates that the user does not need to turn on the smart refresh rate function. Therefore, when the UX switch state corresponding to the UX switch flag is UX switch on, the refresh rate adjustment thread can directly determine that the user currently needs to turn on the smart refresh rate function. When the UX switch state corresponding to the UX switch flag is UX switch off, the refresh rate adjustment thread can directly determine that the user currently does not need to turn on the smart refresh rate function.
[0224] The HDR switch flag is used to characterize the current HDR switch state. The HDR switch states include HDR switch on and HDR switch off. When the HDR switch is on, it indicates that the electronic device is currently in a scenario where HDR is on. When the HDR switch is off, it indicates that the electronic device is currently in a scenario where HDR is off. Among them, turning on HDR will conflict with the smart refresh rate function and cause a black screen phenomenon. Therefore, if the HDR switch flag corresponds to when the HDR switch is on, the refresh rate adjustment thread can directly determine that the electronic device is currently in a scenario where HDR is on, that is, it can be determined that switching the screen refresh rate at the moment may cause a black screen phenomenon. If the HDR switch flag corresponds to when the HDR switch is off, the refresh rate adjustment thread can directly determine that the electronic device is currently in a scenario where HDR is off, that is, it can be determined that switching the screen refresh rate at the moment will not cause a black screen phenomenon.
[0225] Therefore, if the refresh rate adjustment thread determines based on the above three flags (including the independent display status flag, the UX switch flag, and the HDR switch flag) that the electronic device is directly connected to the independent display, or the UX switch is turned off, or the electronic device is in the HDR-enabled scenario, in order to meet user needs or avoid switching the screen refresh rate and causing a black screen phenomenon, the refresh rate adjustment thread does not adjust the screen refresh rate, that is, does not switch the screen refresh rate of the display. Therefore, after S703, the refresh rate adjustment thread executes S704 and does not send a screen refresh rate switching instruction to the IGPU driver.
[0226] And if it is determined according to the above three flags that the electronic device is not directly connected to the independent display, the UX switch is turned on, and the HDR switch is turned off, it indicates that the user needs to turn on the intelligent refresh rate function, and switching the screen refresh rate will not conflict with the independent display direct connection and HDR and cause a black screen phenomenon. Then, in the case of non-independent direct connection, UX switch is turned on, and HDR switch is turned off, if the screen refresh rate changes, the refresh rate adjustment thread adjusts the screen refresh rate, that is, switches the screen refresh rate of the display. Then, after S703, the refresh rate adjustment thread executes S705. In this way, the intelligent refresh rate module in the electronic device can adaptively adjust the screen refresh rate according to the application scenario to reduce screen power consumption.
[0227] S705, the refresh rate adjustment thread sends a screen refresh rate switching instruction to the IGPU driver (IGPU driver).
[0228] S706: The IGPU driver switches the screen refresh rate of the display by driving the IGPU.
[0229] After receiving the driving instruction of the IGPU driver, the IGPU controls the display to switch the screen refresh rate. It should be noted that in the embodiments of the present application, the refresh rate adjustment thread only switches the screen refresh rate (i.e. the virtual refresh rate, for example, corresponding to the refresh rate in the desktop mode in the windows operating system) of the display through the IGPU driver, and does not drive the switching of the refresh rate of the graphics card (for example, corresponding to the refresh rate in the active signal mode in the windows operating system).
[0230] In some embodiments, whether the application scenario of the electronic device has changed can be determined through the focus window change event of the electronic device. When the focus window of the electronic device changes, the scene type of the changed focus window can be used to determine whether the application scenario has changed.
[0231] Specifically, if the focus window before the change and the focus window after the change belong to the same scene type, i.e. the scene type before and after the change of the focus window has not changed, it indicates that the application scenario of the electronic device has not changed. Further, even if the focus window changes, because it belongs to the same scene type, and the screen refresh rate corresponding to the same scene type is generally the same, the screen refresh rate of the display can not be adjusted.
[0232] If the focus window before the change and the focus window after the change do not belong to the same scene type, i.e. the scene type before and after the change of the focus window has changed, it indicates that the application scenario of the electronic device has changed. Further, because the screen refresh rates corresponding to different scene types are different, in order to adaptively adjust the screen refresh rate of the display according to the application scenario, the screen refresh rate of the display can be switched. That is, when the application scenario changes, the refresh rate matching module can match the corresponding screen refresh rate according to the application scenario in which the electronic device is currently located, and then send it to the refresh rate adjustment thread, and the refresh rate adjustment thread determines whether to switch the screen refresh rate. The switching process of the screen refresh rate can be specifically referred to the flow shown in the foregoing Figure 7 The embodiments of the present application will not be described here.
[0233] Exemplarily, the scene type of the focus window may include games and office. When the scene type of the focus window is games, the application scene of the electronic device is a game application. When the scene type of the focus window is office, the application scene of the electronic device is an office application. Therefore, if the scene type of the focus window before the change is games and the scene type of the focus window after the change is office, or if the scene type of the focus window before the change is office and the scene type of the focus window after the change is games, it indicates that the application scene of the electronic device has changed. If the scene type of the focus window before the change is games and the scene type of the focus window after the change is games, or if the scene type of the focus window before the change is office and the scene type of the focus window after the change is office, it indicates that the application scene of the electronic device has not changed. It will be understood that the above-mentioned game and office categories are merely examples of scene types in the embodiments of the present application. Depending on actual needs and settings, the scene types may include more or fewer. For example, the scene type may also include video. Correspondingly, if the scene type of the focus window is video, the application scene of the electronic device is a video application.
[0234] In some embodiments, the scene type of the focus window can be determined by the name of the focus process (the application process corresponding to the focus window). For example, if the name of the focus process carries the characters "game", such as the name of the focus process is game.exe, then the scene type of the focus window can be determined to be a game class. In this way, it can be determined that the application scene of the electronic device is a game application. For another example, if the name of the focus process carries characters such as "word", "ppt" or "excel", such as the name of the focus process is word.exe, ppt.exe or excel.exe, then the scene type of the focus window can be determined to be an office class. In this way, it can be determined that the application scene of the electronic device is an office application.
[0235] Furthermore, for example, when the focus window changes from xx game.exe to yy game.exe, or when the focus window changes from word.exe to excel.exe, since the scene type before and after the focus window change is the same, that is, the application scenario of the electronic device has not changed, it can be determined that the application scenario has not changed, and the screen refresh rate does not need to be adjusted accordingly.
[0236] For another example, when the focus window changes from word.exe to yy game.exe, or when the focus window changes from xxgame.exe to excel.exe, since the scene types before and after the focus window change are different, that is, the application scenario of the electronic device has changed, the corresponding screen refresh rate can be matched according to the current application scenario and the screen refresh rate can be switched.
[0237] For example, the electronic device takes a laptop as an example, and the embodiment of the present application Figures 8-11 A user interface diagram showing a group of focus window changes.
[0238] The focus window may be changed in three situations: opening a new window, setting a window, and exiting the current window. The following uses these three situations as examples to explain the focus window change.
[0239] Case 1, open a new window:
[0240] The user opens the laptop, and the laptop's display shows the desktop. Figure 8 This is a diagram of the user's desktop on a laptop computer. Figure 8 As shown in FIG, the laptop computer can display icons of applications such as slides, videos, browsers, music, XX games, and emails. The user can double-click the application icon of XX game, and the laptop computer will launch the window of XX game in response to the operation of double-clicking the icon of XX game. Figure 9 As shown, in response to the double-clicking of the XX game icon, the laptop computer can display the XX game window. After the new window is opened, the laptop computer's focus window changes to the XX game window. At this point, the focus window's scene type is game, and the electronic device's current application scene is a game application.
[0241] Case 2, setting window:
[0242] like Figure 10 As shown, the user interface of the laptop computer may include a browser application window 1001 and a taskbar 1002. The taskbar 1002 may display all currently opened window icons, and may include window icons for Word, Excel, a browser, and a game. At this time, the focus window is the browser window (in the taskbar 1002, the browser window is displayed as selected). Figure 10 As shown, the user can click the window icon of the XX game in the taskbar 1002. Then the laptop can respond to the operation of clicking the window icon of the XX game and switch to display the window screen of the XX game (the interface after switching is as shown above). Figure 9(As shown). At this point, the laptop's focus window changes from the browser window to the window of XX game. That is, the scene type of the focus window before the change was web browsing, and the scene type of the focus window after the change is game. In other words, the application scene of the electronic device has changed from web browsing to game application, and the current application scene of the electronic device is game application.
[0243] Case 3, exit the current window:
[0244] In the case where the opened windows of the laptop computer include windows of word, excel, browser and XX game, and the user interface of the electronic device currently displays the window of XX game, such as Figure 9 As shown, the current focus window of the laptop is the window of the XX game. The user can click the exit control 901, and the laptop can respond to the user clicking the exit control 901 by not displaying the window of the XX game and switching to display Figure 11 The browser window 1101 is shown. At the same time, because the user has exited the XX game window, the XX game window icon is no longer included in the taskbar 1102. At this point, the laptop's focus window changes from the XX game window to the browser window 1101. This means that the electronic device's application scenario has changed from gaming to web browsing, and the electronic device's current application scenario is web browsing.
[0245] It can be understood that after the user clicks to exit the control of an application (or minimizes a window), the electronic device can respond to this operation and select a new window as the focus window. The embodiment of the present application does not impose any restrictions on the window selected by the electronic device, and the specific selection may depend on the actual execution logic of the electronic device.
[0246] In a specific embodiment, the intelligent refresh rate module may further include a scene filter. The focus window change event can be obtained by the probe module through the kernel state to subscribe to various events of the electronic device and sent to the scene filter, and the scene filter determines whether the application scene of the electronic device has changed. If the application scene changes, the scene filter notifies the refresh rate matching module to match the corresponding screen refresh rate based on the application scene. Then, the refresh rate matching module notifies the refresh rate adjustment thread of the matched screen refresh rate, and the refresh rate adjustment thread decides whether to switch the screen refresh rate.
[0247] For example, the embodiment of this application Figure 12 FIG. 1 shows a flow chart of obtaining a focus window change event. Figure 12 As shown, the process of obtaining the focus window change event may include the following steps:
[0248] S1201, the probe module subscribes to the API module for a focus change event.
[0249] S1202, in response to a user opening an operation of a target application, the API creates a target application window.
[0250] The operation of opening the target application (the target application includes the first application and the second application) can be an operation of clicking the target application icon, for example, the operation of double-clicking the XX game icon shown in the above Figure 8 The operation of opening the target application can also be other operation modes, which are not limited by the present application. The target application can be a game application, an office application, a web browser, a video application, a music application, etc. The specific application type of the target application is not limited by the present application.
[0251] After receiving the operation of opening the target application by the user, the process manager in the electronic device can create a target application process. The process of creating the process by the process manager can include that the process manager can query the binary file of the target application program through the storage address, and by loading the binary file of the target application program, the process running environment can be created, and the target application process is started. In addition, the target application process can include a thread 1 for creating a target application window. Therefore, after the target application process is created, the API module can create a window of the target application in response to the calling request of the thread 1.
[0252] S1203, the API module sends a focus window change event to the probe module, and the probe module sends the focus window change event to the scene filter.
[0253] The focus window change event can carry the name of the target application process (i.e. the focus process), so that the scene filter can determine the scene type of the focus window according to the name of the target application process (i.e. the focus process), thereby determining whether the application scene of the electronic device has changed.
[0254] S1204, the scene filter determines whether the scene type of the focus window changes based on the focus window change event.
[0255] The scene filter can determine the scene type of the current focus window of the electronic device based on the name of the target application process (i.e. the focus process) corresponding to the focus window change event. For example, the name of the target application process (i.e. the focus process) is game.exe, and it can be determined that the application scene of the electronic device is a game application. For another example, the name of the target application process (i.e. the focus process) is word.exe, and it can be determined that the application scene of the electronic device is an office application.
[0256] Then, the scene filter compares the scene type of the focus window with the scene type of the previous focus window to determine whether the scene type of the focus window has changed. If the scene type of the focus window has changed, it indicates that the application scene in which the electronic device is located has changed. At this time, because the application scene has changed, it may be necessary to adjust the screen refresh rate, so the scene filter executes S1205. If the scene type of the focus window has not changed, it indicates that the application scene in which the electronic device is located has not changed, and the scene filter does not execute S1205. Figure 12 As shown, when the scene type of the focus window does not change, the scene filter does not send the current application scene of the electronic device to the refresh rate matching module.
[0257] S1205, the scene filter sends the current application scene of the electronic device to the refresh rate matching module. The process after S1205 can refer to the above Figure 7 The refresh rate switching process shown is not described in detail in the embodiment of the present application.
[0258] It should be noted that the above Figure 12 The process shown is case 1 in the focus window change (i.e. Figure 8-Figure 9 For cases 2 and 3 of the focus window change, corresponding window processing can also be performed based on the user's relevant operations. The API module can also send a focus window change event to the probe module based on the specific circumstances of the window processing, so that the scene filter in the intelligent refresh rate module can further determine whether the scene type of the focus window has changed. The principle is the same, and this embodiment of the application will not be repeated.
[0259] In other embodiments, for some preset application scenarios that require fast switching of refresh rates, focus window change events can be subscribed to and processed separately. Taking game applications as an example, that is, in order to increase the switching rate of the screen refresh rate under game applications and ensure the user's gaming experience. The focus window change event under the game application can be subscribed to and processed separately from the focus window change event under non-game applications (such as office applications, video applications, and web browsing scenarios). It can be understood that the above-mentioned first application and second application can be game applications or non-game applications.
[0260] It should be noted that the above-mentioned game applications are only used as examples. According to actual needs, the preset application scenarios can also include more applications, and the embodiments of the present application do not impose any limitations on this.
[0261] For example, Figure 13 FIG. 1 shows another flow chart of obtaining the focus window change event. Figure 13As shown, the probe module may include a scene probe module and a game probe module. The scene probe module is used to subscribe to and process focus window change events of non-game applications, and the game probe module is dedicated to subscribing to and processing focus window change events of game applications.
[0262] like Figure 13 As shown, the process of obtaining a focus window change event in the embodiment of the present application may include the following steps:
[0263] S1301: The scene probe module subscribes to the focus window change event of the non-game application from the API module.
[0264] S1302: The game probe module subscribes to the API module for a focus window change event of the game application.
[0265] Non-game applications can be office applications, web browsers, video applications, music applications, etc. Game applications can be various types of game applications, such as shooting game applications, competitive game applications, puzzle game applications, music game applications, etc., and this application does not impose any restrictions on this.
[0266] S1303, in response to the user's operation of opening the game application, the API module creates a game application window. For the specific implementation of S1303, reference can be made to the description of S1202 above, and the principles are the same, so no further details will be given.
[0267] S1304: The API module sends a focus window change event of the game application to the game probe module, and the game probe module sends the focus window change event of the game application to the refresh rate matching module.
[0268] S1305: The refresh rate matching module sends the screen refresh rate of the game application to the refresh rate adjustment thread.
[0269] When the user opens a game application, the game probe module receives the focus window change event from the API module and directly forwards it to the refresh rate matching module. After the refresh rate matching module receives the focus window change event sent by the game probe module, it can directly determine that the current application scenario of the electronic device has changed to a game application, and thus directly send the screen refresh rate corresponding to the game application to the refresh rate adjustment thread. The process after S1305 can refer to the above Figure 7 The refresh rate switching process shown in the figure can be referred to in detail. Figure 7 The specific implementation of S703-S706 will not be described in detail in this embodiment of the application.
[0270] In this way, the embodiment of the present application can save a certain amount of processing time by directly interacting with the refresh rate matching module through an independent game probe module, such as saving the processing time required for the scene filter, thereby improving the switching rate of the screen refresh rate under the game application, ensuring that the screen refresh rate can be quickly adjusted to the high refresh rate required by the game application after the game application is started, ensuring that the game screen is smooth and smooth, thereby ensuring the user's gaming experience.
[0271] S1306, in response to the user's operation of opening the non-game application, the API module creates a non-game application window. Wherein, the specific implementation of S1306 can refer to the description of S1202 above, the principle is the same, and no further details are given.
[0272] S1307: The API module sends a focus window change event of the non-game application to the scene probe module, and the scene probe module sends the focus window change event of the non-game application to the scene filter.
[0273] S1308: The scene filter determines whether the scene type of the focus window has changed based on the focus window change event of the non-game application.
[0274] S1309: The scene filter sends the current application scene of the electronic device to the refresh rate matching module.
[0275] For the specific implementation of S1306-S1309, please refer to the above Figure 12 The principle is the same as that of the description above, and the present embodiment will not be repeated here. Similarly, the process after S1309 can be specifically referred to above. Figure 7 The refresh rate switching process shown has the same principle and will not be repeated in the embodiments of this application.
[0276] In some embodiments, the three flags (the independent display status flag, the UX switch flag, and the HDR switch flag) can all be recorded and updated by the intelligent refresh rate module. For example, the intelligent refresh rate module can use a registry to record and update these three flags. In a specific embodiment, the three flags can be recorded and updated by a message monitor in the intelligent refresh rate module.
[0277] The message monitor can interact with the dual-display three-mode function module to obtain the graphics card status. The message monitor then records the independent graphics card status flag according to the obtained graphics card status. That is, if the graphics card status is independent graphics card direct connection, the independent graphics card status flag recorded by the message monitor corresponds to independent graphics card direct connection. If the graphics card status is non-independent graphics card direct connection, the independent graphics card flag recorded by the message monitor corresponds to non-independent graphics card direct connection. Exemplarily, 0 and 1 can be used as independent graphics card status flags to respectively represent independent graphics card direct connection and non-independent graphics card direct connection. Alternatively, true and false can be used as independent graphics card status flags to respectively represent independent graphics card direct connection and non-independent graphics card direct connection.
[0278] The message monitor can interact with the UX interface display module to obtain the UX switch status. The message monitor then records the UX switch flag based on the obtained UX switch status. That is, if the UX switch status is UX switch on, the UX switch flag recorded by the message monitor corresponds to UX switch on. If the UX switch status is UX switch off, the UX switch status recorded by the message monitor corresponds to UX switch off. For example, the message monitor can also use 0 and 1, or true and false, as the UX switch flag to represent UX switch off and UX switch on, respectively.
[0279] The message monitor can interact with the HDR monitor to obtain the HDR switch status, and then record the HDR switch flag according to the obtained HDR switch status. That is, if the HDR switch status is HDR switch on, the HDR switch flag recorded by the message monitor corresponds to HDR switch on. If the HDR switch status is HDR switch off, the HDR switch status recorded by the message monitor corresponds to HDR switch off. Exemplarily, the message monitor can also use 0 and 1, or true and false as HDR switch flags to represent UX switch off and UX switch on, respectively.
[0280] Then, the message monitor can notify the refresh rate adjustment thread of the recorded independent display status flag, UX switch flag and HDR switch flag, so that the refresh rate adjustment thread can decide whether to switch the screen refresh rate based on these three flags.
[0281] For example, Figure 14-16 The following are flow charts showing the method of setting the flag bit in different scenarios. Figure 14-16 The setting (recording and updating) process of the independent display status flag, UX switch flag, and HDR switch flag is explained.
[0282] Figure 14 A flowchart of a method for setting a UX switch flag in a power-on scenario is shown.
[0283] After the electronic device is powered on, the message monitor first requests the UX interface display module to obtain the UX switch status to complete the initialization of the UX switch flag.
[0284] like Figure 14 As shown, the message monitor can request the UX interface display module to obtain the UX switch status from the UI configuration file through the getUIconfig() function. If the UX interface display module returns the UX switch on status to the message monitor, the UX switch flag recorded by the message monitor corresponds to the UX switch on status. If the UX interface display module returns the UX switch off status to the message monitor, the UX switch flag recorded by the message monitor corresponds to the UX switch off status. In this way, the message monitor completes the initialization of the UX switch flag.
[0285] At the same time, in order to ensure the accuracy of the UX switch status and the graphics card status, after the user opens the UI interface of the computer manager, the UX interface display module can request the dual-display triple-mode function module to obtain the graphics card status.
[0286] like Figure 14 As shown, after the electronic device is turned on, the dual display triple mode function module can obtain the stored graphics card status. The stored graphics card status can be stored when the electronic device is turned off. Figure 14 As shown, when the electronic device is turned off, the dual display three-mode function will store the current graphics card status when the device is turned off. In this way, if the user opens the UI interface of the computer manager after the electronic device is turned on, the UX interface display module can initialize the UX switch status according to the graphics card status stored by the dual display three-mode function module. It can be understood that in other embodiments, according to actual business needs, in addition to the power-on scenario, during operation, the UX interface display module can also request the dual display three-mode function module to obtain the graphics card status at any time based on business needs to update the UX switch status to ensure the accuracy of the UX switch status.
[0287] like Figure 14 As shown, the UX interface display module can request the dual-display triple-mode function module to obtain the graphics card status through the getGPUmode() function, and the dual-display triple-mode function module returns the current graphics card status to the UX interface display module.
[0288] If the dual-display triple-mode function module returns the graphics card status as a dedicated graphics card, the UX interface display module needs to turn off the UX switch and gray it out. That is, if the UX switch is on, the UX interface display module turns off the UX switch and grays it out. If the UX switch is off but not grayed out, gray it out. If the UX switch is off and grayed out, no action is taken and the status quo is maintained.
[0289] If the graphics card status returned by the dual display triple mode function module is non-independent graphics card direct connection (this scenario Figure 15 (not shown), the UX interface display module needs to un-grey out the UX switch. That is, if the UX switch is on or the UX switch is off but not greyed out, no action is taken to maintain the status quo. If the UX switch is off and greyed out, the UX interface display module un-greys out the UX switch.
[0290] In addition, if the UX interface display module modifies the UX switch state based on the graphics card status. For example, the UX interface display module changes the UX switch from on to off, or vice versa. To ensure the accuracy of the UX switch flag maintained by the message monitor in the intelligent refresh rate module, the UX interface display module can notify the message monitor of the UX switch state so that the message monitor can update the UX switch state.
[0291] like Figure 14 As shown, the UX interface display module can send an inter-process communication (IPC) message to the message monitor to notify the message monitor that the UX switch is turned off. After receiving the IPC message from the UX interface display module, the message monitor updates the UX switch flag accordingly.
[0292] In other embodiments, after the electronic device is turned on, the message monitor may also request the dual display three-mode function module to obtain the graphics card status, thereby completing the initialization setting of the independent graphics card status flag. For example, after turning on the computer, the message monitor requests the dual display three-mode function module to obtain the graphics card status through the getGPUmode() function, and the dual display three-mode function module returns the current graphics card status to the message monitor. If the returned graphics card status is a direct connection to an independent graphics card, the message monitor sets the independent graphics card status flag to correspond to a direct connection to an independent graphics card. If the returned graphics card status is a non-direct connection to an independent graphics card, the message monitor sets the independent graphics card status flag to correspond to a non-direct connection to an independent graphics card.
[0293] Figure 15 The figure shows a flow chart for setting the discrete graphics state flag and the UX switch flag in a graphics card state switching scenario. The graphics card state switching scenarios include switching to a direct connection of a discrete graphics card (i.e., the display mode is set to discrete graphics only) and switching to a direct connection of a non-discrete graphics card (i.e., the display mode is set to something other than discrete graphics only).
[0294] The following, combined Figure 15 The following describes two scenarios: switching to a dedicated graphics card for direct connection and switching to a non-dedicated graphics card for direct connection.
[0295] Switch to the scenario of direct connection of independent graphics card (only independent graphics card):
[0296] like Figure 15As shown in the figure, when the graphics card status switches to direct connection to the independent graphics card, the dual-display tri-mode function module can receive a basic input and output system (BIOS) notification. After receiving the BIOS notification that the graphics card status has switched to direct connection to the independent graphics card, the dual-display tri-mode function module notifies the message monitor in the smart refresh rate module and the UX interface display module via IPC messages, informing them that the graphics card status has been switched to direct connection to the independent graphics card.
[0297] After the message monitor receives the IPC message from the dual-display triple-mode function module, it first determines whether the IPC message carries the corresponding parsing flag. If the IPC message carries the parsing flag, the message monitor parses the IPC message and determines that the graphics card status is a direct independent graphics card connection. It then records the independent graphics card status flag. At this point, since the graphics card status is a direct independent graphics card connection, the recorded independent graphics card status flag corresponds to a direct independent graphics card connection (i.e., indicating that the electronic device's display mode is independent graphics only).
[0298] The parsing identifier is used to indicate that the IPC message is a message related to the graphics card status. The parsing identifier can be used to determine that the IPC message is related to the graphics card status, thereby determining that the received IPC message needs to be parsed.
[0299] After the UX interface display module receives the IPC message from the dual-display triple-mode function module, if it determines that the UX switch status is currently on, the UX interface display module will turn off the UX switch and gray it out, because the direct connection of the independent display and the smart refresh rate function will conflict and cause a black screen phenomenon, thereby prohibiting the user from triggering the smart refresh rate function of the electronic device. In addition, because the UX interface display module sets the UX switch from on to off, that is, the UX switch status has changed, the UX interface display module can notify the message monitor through the IPC message so that the message monitor can update the UX switch flag.
[0300] Switch to the scenario of direct connection of non-independent graphics card (not only independent graphics card):
[0301] like Figure 15As shown, when the graphics card status is switched to a non-independent graphics direct connection, the dual-display three-mode function module can also receive a BIOS notification. After the dual-display three-mode function module receives the BIOS notification that the graphics card status is switched to a non-independent graphics direct connection, the dual-display three-mode function module also notifies the message monitor and the UX interface display module through an IPC message, respectively, to inform that the graphics card status has currently switched to a non-independent graphics direct connection. Similarly, after the message monitor receives the IPC message, if it is determined that the IPC message carries a parsing identifier, it parses the IPC message to obtain the information that the graphics card status is a non-independent graphics direct connection. Afterwards, the message monitor records the independent graphics status flag. At this time, since the graphics card status is a non-independent graphics direct connection, the independent graphics status flag recorded by the message monitor corresponds to the non-independent graphics direct connection (i.e., indicating that the display mode of the electronic device is not only an independent display).
[0302] At the same time, after the UX interface display module receives the IPC message from the dual-display three-mode function module, if it is determined that the UX switch status is currently UX switch off and grayed out, because the direct connection of the non-independent graphics card will not conflict with the smart refresh rate function and cause a black screen phenomenon, the UX interface display module can ungray the UX switch, thereby allowing the user to trigger the smart refresh rate function of the electronic device under the direct connection of the non-independent graphics card.
[0303] At this time, because the UX interface display module only cancels the graying out of the UX switch, the UX switch is still in the off state, that is, the UX switch state has not changed. Therefore, the UX interface display module does not need to notify the message monitor.
[0304] However, if Figure 15 As shown, if the user subsequently turns on the UX switch, the UX interface display module needs to notify the message monitor through an IPC message after turning on the UX switch so that the message monitor can update the UX switch flag. In some embodiments, the UX switch can be ungrayed by modifying the flag. For example, a gray flag can be configured when the UX switch is designed. Then, the UX switch can be grayed out and ungrayed by switching the gray flag. In the grayed state, it corresponds to a state that prohibits opening, and in the ungrayed state, it corresponds to a state that allows the user to open.
[0305] In other embodiments, based on actual needs, the UX interface display module can also cancel the graying out of the UX switch in the non-dedicated graphics card direct connection scenario, set the UX switch state to UX switch on, and notify the message monitor to update the UX switch flag, thereby automatically enabling the smart refresh rate function for the user. The specific settings can be based on actual needs and are not limited in this application.
[0306] Figure 16The following is a flow chart of setting the HDR switch flag and the UX switch flag. The scenarios for setting the HDR switch flag mainly include power on, turning on HDR in AC mode, turning off HDR in AC mode, and switching to DC mode. Figure 16 These four scenarios are explained separately.
[0307] Boot scene:
[0308] like Figure 16 As shown, after the electronic device (such as a laptop) is turned on, the message monitor first reads the last recorded (recorded before shutdown) HDR switch status from the registry, and then records the corresponding HDR switch flag to complete the initialization setting of the HDR switch flag. At the same time, the UX interface display module can also read the HDR switch status recorded before shutdown from the registry. Then, because the conflict between HDR and the smart refresh rate function will cause a black screen phenomenon, the UX interface display module can set the UX switch status accordingly according to the HDR switch status, thereby avoiding the user turning on the smart refresh rate function and causing a conflict with HDR and causing a black screen. In this scenario, the settings of the UX switch are mainly divided into the following six situations:
[0309] The first is when the HDR switch is turned on and the UX switch is turned on. In this case, the UX interface display module turns off the UX switch and grays it out, thereby turning off the smart refresh rate function and prohibiting the user from turning on the smart refresh rate function.
[0310] The second type: The HDR switch is turned on and the UX switch is turned off but not grayed out. In this case, the UX interface display module grays out the UX switch, thereby prohibiting the user from turning on the smart refresh rate function when the smart refresh rate function is already turned off.
[0311] The third type: The HDR switch is turned on, and the UX switch is turned off and grayed out. In this case, the UX switch is already turned off and grayed out, so the UX switch remains in its current state, that is, the UX interface display module does not need to process the UX switch.
[0312] Fourth: HDR switch is off and UX switch is on.
[0313] Type 5: The HDR switch is off, and the UX switch is off but not grayed out.
[0314] The sixth option: HDR is turned off, and the UX switch is turned off and grayed out. In the fourth, fifth, and sixth cases, because HDR is not enabled, it does not conflict with the Smart Refresh Rate function, so the UX switch can remain as it is, meaning the UX interface display module does not need to process the UX switch.
[0315] Scenes with HDR turned on in AC mode:
[0316] like Figure 16 As shown, the HDR monitor can perceive the change of HDR switch status by subscribing to the display change (displaychange) message. Therefore, when the HDR switch status changes, the HDR monitor can receive the displaychange message. At the same time, since not all displaychange messages are sent because of the change of HDR switch status, in order to accurately determine whether the HDR switch status has changed, the HDR monitor needs to further check the HDR switch status on its own when receiving the displaychange message, so as to determine whether the HDR switch status has changed. In a specific embodiment, the HDR monitor can Figure 4 Compare the HDR switch status you recorded with the HDR switch status to determine whether the HDR switch status has changed.
[0317] When it is determined that the HDR switch state has changed (in this scenario, the HDR switch changes from off to on), the HDR monitor notifies the message monitor and the UX interface display module respectively through an IPC message to inform them that the HDR switch is turned on.
[0318] After receiving the IPC message from the HDR monitor notifying it that the HDR switch is on, the message monitor first obtains the power mode of the electronic device to determine whether it is currently in AC mode or DC mode (AC / DC mode). If it is in AC mode, the message monitor parses the IPC message to determine the HDR switch status and then records the corresponding HDR switch flag bit based on the HDR switch status.
[0319] Specifically, because the HDR switch is turned on in this scenario (i.e., HDR is turned on in AC mode), Figure 16 As shown, the HDR switch flag recorded by the message monitor corresponds to the HDR switch being turned on.
[0320] After the UX interface display module receives the IPC message notified by the HDR monitor that the HDR switch is turned on, since HDR conflicts with the smart refresh rate function, if the UX switch status is UX switch on at this time, such as Figure 16As shown, the UX interface display module needs to turn off the UX switch and gray it out. Then, the UX interface display module notifies the message monitor through an IPC message that the UX switch is turned off so that the message monitor updates the UX switch flag. Of course, the UX switch state may already be that the UX switch is turned off and grayed out. In this case, the UX switch is consistent with the HDR switch being turned on, and the UX switch continues to maintain this state. That is, the UX interface display module does not need to do anything with the UX switch. At the same time, because the UX interface display module does not change the UX switch state, the UX interface display module does not need to notify the smart refresh rate module.
[0321] Scenes where HDR is turned off in AC mode:
[0322] like Figure 16 As shown in the figure, in this scenario, the HDR monitor also checks to determine whether the HDR switch status has changed by sensing the displaychange message. If the HDR switch status changes (in this scenario, the HDR switch changes from on to off), the HDR monitor notifies the message monitor and UX interface display module through an IPC message to tell them to turn off the HDR switch.
[0323] After the message monitor receives the IPC message notifying the HDR monitor that the HDR switch is turned off, it also first obtains the power mode of the electronic device to determine whether it is currently in AC mode or DC mode (AC / DC mode). If it is in AC mode, the message monitor will parse the IPC message to determine the HDR switch status, and then record the corresponding HDR switch flag according to the HDR switch status. Specifically, because the HDR switch is turned off in this scenario (turning off HDR in AC mode), Figure 16 As shown, the HDR switch flag recorded by the message monitor corresponds to the HDR switch being off.
[0324] After the UX interface display module receives the IPC message of HDR switch off from the HDR monitor, since HDR conflicts with the smart refresh rate function, if the UX switch status is UX switch on at this time, in this case, the UX switch status is consistent with the HDR switch off, so the status quo can be maintained without change. Figure 16 As shown, the UX interface display module needs to cancel the UX switch. At this time, because it is just canceled and the UX switch is not turned on, the UX interface display module does not need to notify the message monitor.
[0325] Scenarios for switching to DC mode:
[0326] like Figure 16As shown in the figure, after the HDR monitor detects and checks that the HDR switch is off through the displaychange message, it notifies the message monitor and the UX interface display module through an IPC message. Understandably, because DC mode does not support HDR implementation, whether switching from AC mode with HDR on to DC mode, or from AC mode with HDR off to DC mode, the HDR switch status will change to HDR off.
[0327] After the message monitor receives the IPC message notifying the HDR monitor that the HDR switch is turned off, it also first obtains the power mode of the electronic device to determine whether it is currently in AC mode or DC mode (AC / DC mode). In this scenario, the message monitor will determine that it is in DC mode. Based on the problem that the conflict between HDR and the smart refresh rate function will cause a black screen phenomenon, according to conventional practice, at this time, the message monitor and the UX interface display module should update the recorded HDR switch flag and modify the UX switch status based on the IPC message that the HDR switch is turned off.
[0328] However, after actual testing of the embodiments of the present application, it was found that even if electronic devices (such as laptops) are switched to DC mode and HDR is turned off, a black screen phenomenon may still occur when the electronic device subsequently switches the screen refresh rate according to the application scenario. In summary, the scenarios in which the black screen phenomenon still occurs after switching to DC mode and HDR is turned off are mainly the following situation A, while the following situation B is a scenario in which the black screen phenomenon does not occur after switching to DC mode and HDR is turned off.
[0329] Case A: HDR switch on in AC mode → power off → unplug the adapter → power on in DC mode with HDR switch off. Or, HDR switch on in AC mode → unplug the adapter to enter DC mode with HDR switch off.
[0330] Case B: In AC mode, turn on the HDR switch → turn off the HDR switch → unplug the adapter to enter DC mode, and turn off the HDR switch. Alternatively, turn on the HDR switch in AC mode → turn off the HDR switch → unplug the adapter → turn on the device in DC mode, and turn off the HDR switch.
[0331] It can be seen from this that if the electronic device is not triggered to turn off HDR before unplugging the power adapter, switching to DC mode and entering the HDR off scenario, but the power adapter is turned off and unplugged directly from the HDR on scenario, or the power adapter is unplugged without shutting down the device, even if the HDR switch state has been switched to HDR switch off at this time, there will still be a black screen phenomenon.
[0332] It is found through actual tests and analysis that the above situation A can cause the black screen phenomenon to exist because the system background can not completely prohibit the HDR function in time. For example, because the electronic device is powered off before the power adapter is unplugged, the system background can not respond to the action of the power adapter being unplugged, so that although the HDR switch is closed, the background can actually still run the HDR, that is, the background can not completely prohibit the running of the HDR, so that the subsequent screen refresh rate switching in the DC mode still has the black screen phenomenon.
[0333] Therefore, in order to avoid the black screen phenomenon caused by the above situation A, in the embodiments of the present application, after the message monitor and the UX interface display module receive the IPC message of the HDR switch opening notified by the HDR monitor, both of them select to ignore the IPC message. That is, after the message monitor receives the IPC message to determine the DC mode, it ignores the change of the current HDR switch state and does not update the recorded HDR switch flag. At the same time, the UX interface display module also does not process the UX switch state in any way.
[0334] Specifically, if it is switched from the AC mode with the HDR enabled scene to the DC mode, because the HDR switch state in the AC mode with the HDR enabled scene is that the HDR switch is opened, and the UX switch state is that the UX switch is closed and grayed out, if the message monitor updates the recorded HDR switch flag according to the conventional method, the updated HDR switch flag corresponds to the state that the HDR switch is closed, but this will allow the screen refresh rate to be adjusted and cause the black screen phenomenon described in the above situation A. Therefore, in the embodiments of the present application, in order to avoid the black screen phenomenon caused by the above situation A, the message monitor ignores the change of the current HDR switch state and does not modify the recorded HDR switch flag. Therefore, after being switched to the DC mode, the HDR switch flag recorded by the message monitor still corresponds to the state that the HDR switch is opened. Similarly, according to the conventional method, the UX interface display module will ungray the UX switch to facilitate the user to open the intelligent refresh rate function. However, in the embodiments of the present application, the UX interface display module does not ungray the UX switch, so that the user cannot open the UX switch, and the UX switch flag maintained by the message monitor is also not changed to the UX opening. In this way, even if the electronic device is switched to the DC mode and the HDR switch is closed, because the flag maintained by the message monitor is not changed, the HDR switch flag and the UX switch flag maintained by the message monitor still correspond to the states that the HDR switch is opened and the UX switch is closed, so the refresh rate adjustment thread does not switch the screen refresh rate, and thus the black screen phenomenon does not occur.
[0335] In addition, if the switch is from the HDR off scene in AC mode to the DC mode (corresponding to the above case B), because the corresponding HDR switch state in the HDR off scene in AC mode is already HDR switch off, and the UX switch state is already UX switch on. Therefore, even if the message monitor and UX interface display module ignore this IPC message and do not modify the HDR switch flag and UX switch state, the unchanged HDR switch flag and UX switch state happen to be consistent with the DC mode. Therefore, in the switching scenario where the HDR off scene in AC mode switches to the DC mode, it is reasonable to ignore the IPC message and do not do any processing, and it will not cause additional problems.
[0336] It should be noted that Figure 14-15 The main description is the setting of the independent display status flag and the UX switch flag. Figure 16 The main explanation is the setting of the UX switch flag and the HDR switch flag. However, it is understandable that if the actual application does not consider the conflict between the independent display direct connection and the smart refresh rate function alone, or the conflict between the HDR function and the smart refresh rate function alone. That is, if the actual application considers the conflict between the independent display direct connection, the HDR function and the smart refresh rate function at the same time, because the independent display state and the HDR switch state will cause the UX switch state to change at the same time. Therefore, whether the UX interface display module needs to change the UX switch state and send an IPC message to the message monitor needs to be determined according to the current UX switch state.
[0337] For example, turning on the HDR switch should trigger the UX switch to turn off and gray it out. However, because the independent graphics card may be directly connected, the UX switch is already off and grayed out at this time. If the UX interface display module receives an IPC message informing it that the HDR switch is turned on, the UX interface display module can maintain the status quo without modifying the UX switch state.
[0338] For example, Figure 17 A diagram showing the relationship between the UX switch state, the independent display state and the HDR switch state is shown. Figure 17 As shown in the figure, as long as the HDR switch status is HDR on, or the graphics card status is directly connected to the independent graphics card, the UX switch status should be UX off and grayed out. In the case of non-independent graphics card direct connection and HDR off, the UX switch is ungrayed out, and whether the UX switch is turned on is up to the user.
[0339] Figure 18 A communication schematic diagram for setting a flag bit is shown.
[0340] like Figure 18As shown, the modules involved in setting the flag include the dual-display three-mode function module, the UX interface display module, the HDR monitor, and the message monitor in the intelligent refresh rate module.
[0341] For UX interface display module and message monitor, such as Figure 18 As shown, when the electronic device is powered on, the message monitor obtains the UX switch status from the UX interface display module, completing the initialization of the UX switch flag. Then, during the operation of the electronic device, if the UX switch status changes, that is, the UX switch is turned on / off, the UX interface display module will notify the message monitor so that the message monitor can promptly update the UX switch flag.
[0342] For dual display triple mode function module and message monitor, such as Figure 18 As shown, if the dual-display triple-mode function module determines that the graphics card status has changed, it will notify the message monitor so that the message monitor can record the latest independent graphics status flag in time.
[0343] For HDR monitor and message monitor, such as Figure 18 As shown, if the HDR function is turned on / off, that is, if the HDR switch is turned on / off, the HDR monitor will also notify the message monitor so that the message monitor can record the latest HDR switch flag in time.
[0344] In addition, because the UX switch will change the UX switch state based on the graphics card status and whether the HDR function is turned on, for the UX interface display module and the dual display and three-mode function module, the UX interface display module and the HDR monitor, such as Figure 18 As shown, when the electronic device is turned on, the UX interface display module will obtain the graphics card status from the dual display three-mode function module, and obtain the HDR switch status from the HDR monitor. Then, the UX interface display module will initialize the UX switch status according to the obtained graphics card status and HDR switch status. In addition, during the operation of the electronic device, if the graphics card status and HDR switch status change, the dual display three-mode function module and the HDR monitor will respectively send notifications to the UX interface display module so that the UX interface display module can change the UX switch status in time. Among them, the relationship between the UX switch status and the graphics card status and the HDR switch status can be specifically referred to the relevant Figure 17 What has been recorded will not be repeated here.
[0345] Combine Figure 7 The process shown and Figures 8-11 The focus window (application scenario) shown changes, Figure 19 A flow chart of another refresh rate switching method is shown.
[0346] like Figure 19As shown, at the first moment, the electronic device currently displays the window of the XX game (i.e., the window of the first application). At this time, the window of the XX game is the focus window, and the screen refresh rate corresponding to the XX game is 120Hz (corresponding to the first value of 120), so the screen refresh rate at this time = 120Hz.
[0347] At a second moment after the first moment, a first operation of the user opening a browser window (i.e., a window of the second application) is received. Then, in response to this first operation, the electronic device displays the browser window. After the second moment, the browser window (i.e., the window of the second application) changes to the focus window. Because after the second moment, the browser window changes to the focus window (i.e., the application scenario has changed), and the screen refresh rate corresponding to the browser window is 60Hz, that is, the screen refresh rate changes with the change of the application scenario, so the screen refresh rate needs to be adjusted, such as Figure 19 As shown in the figure, the screen refresh rate is 60Hz (corresponding to the second value of 60). In addition, because at the second moment, the electronic device is not directly connected to the independent display (i.e., not only the independent display) and the HDR function is turned off, in this case, there will be no conflict with the adjustment of the screen refresh rate and cause a black screen phenomenon. Therefore, between the first moment and the second moment, as shown in the figure, the screen refresh rate is 60Hz (corresponding to the second value of 60). Figure 19 As shown, there is no short black screen phenomenon.
[0348] That is, at the second moment, the browser-based window (i.e., the window of the second application) is changed to the focused window, and based on the display mode of the electronic device not being the independent display only, the screen refresh rate is adjusted, and the adjusted screen refresh rate is 60Hz. Alternatively, at the second moment, the browser-based window (i.e., the window of the second application) is changed to the focused window, and based on the HDR function of the electronic device being turned off, the screen refresh rate is adjusted, and the adjusted screen refresh rate is 60Hz.
[0349] At a third moment after the second moment, a second operation of the user reopening the window of the XX game (i.e., the window of the first application) is received. Then, in response to this second operation, the electronic device will redisplay the window of the XX game. Similarly, after the third moment, the window of the XX game (i.e., the window of the first application) is changed to the focus window again. Because after the third moment, the window of the XX game is changed to the focus window, and the screen refresh rate corresponding to the window of the XX game is 120Hz, the screen refresh rate needs to be adjusted again, such as Figure 19 As shown in the figure, the screen refresh rate is 120Hz at this time. And, similar to the second moment, at the third moment, the electronic device is still directly connected to the non-independent graphics card (that is, not only the independent graphics card) and the HDR function is turned off, so between the second moment and the third moment, as shown in the figure, the screen refresh rate is 120Hz. Figure 19As shown, even if the screen refresh rate is switched, there is still no short black screen phenomenon. That is to say, at the third moment, the window based on the XX game (i.e., the window of the first application) is changed back to the focus window, and the display mode of the electronic device is not based on the independent display only, the screen refresh rate is adjusted, and the adjusted screen refresh rate is 120Hz. Or, at the third moment, the window based on the XX game (i.e., the window of the first application) is changed back to the focus window, and the HDR function of the electronic device is turned off, the screen refresh rate is adjusted, and the adjusted screen refresh rate is 120Hz.
[0350] Then, at the fourth moment after the third moment, the graphics card state of the electronic device is set to be directly connected to the independent graphics card (i.e., set to be only independent graphics card) or the HDR function of the electronic device is turned on. At this time, there is no change in the application scene (focus window), so after the fourth moment, if Figure 19 As shown, the window of XX game is still displayed, and the screen refresh rate is still 120Hz.
[0351] However, at the fifth moment after the fourth moment, if the user receives a third operation to reopen the browser window (i.e., the window of the second application), the electronic device will respond to the third operation and redisplay the browser window. Therefore, after the fifth moment, the focus window is changed to the browser window again, as shown in FIG. Figure 19 shown.
[0352] However, the screen refresh rate corresponding to the browser window is 60Hz. According to conventional practice, the electronic device will switch the screen refresh rate from 120Hz to 60Hz. However, because the graphics card status of the electronic device has been set to direct connection to the independent display or the HDR function has been turned on at the fourth moment, if the screen refresh rate is adjusted at the fifth moment according to conventional practice, a brief black screen phenomenon will be caused due to the conflict. After the fourth moment, the black screen phenomenon may be temporarily caused by adjusting the screen refresh rate. Figure 20 As shown (or as above Figure 2 shown).
[0353] In the embodiment of the present application, in order to avoid Figure 20 (or Figure 2 ) appears, even if the screen refresh rate corresponding to the browser window is 60Hz, the embodiment of the present application will not adjust the screen refresh rate. In this way, after the fifth moment, even if the focus window changes to the browser window, the screen refresh rate will still be 120Hz, such as Figure 19 As shown. Because the embodiment of the present application does not adjust the screen refresh rate when the independent display is directly connected or the HDR function is turned on, by comparing Figure 19 and Figure 20It can be seen that after the fourth moment, the embodiment of the present application can avoid the brief black screen phenomenon, thereby ensuring the user experience. That is, at the fifth moment, the display mode of the electronic device is based on the independent display only, and the screen refresh rate is not adjusted, so that the screen refresh rate is still 120Hz. Alternatively, at the fifth moment, the HDR function of the electronic device is turned on, and the screen refresh rate is not adjusted, so that the screen refresh rate is still 120Hz.
[0354] In some embodiments, whether the display mode of the electronic device is independent display only can be determined by reading the independent display status flag. The independent display status flag can be set based on the graphics card status of the electronic device. For example, when the graphics card status is independent display directly connected, the independent display status flag indicates that the display mode is independent display only. If the graphics card status is not independent display directly connected, the independent display status flag indicates that the display mode is not independent display only. The specific setting of the independent display status flag can be referred to the above-mentioned Figure 15 , so I will not go into details about this.
[0355] In some embodiments, whether the HDR function of the electronic device is turned on can be determined by reading the HDR switch flag. The setting of the HDR switch flag can refer to the above-mentioned Figure 16 , so I will not go into details about this.
[0356] In some embodiments, the UX switch can also be used to determine whether to allow the screen refresh rate to be adjusted. Different UX switch states correspond to different UX switch flags. The setting of the UX switch flag can be specifically referred to the above-mentioned Figure 14-15 For example, Figure 19 Taking the process shown as an example, between the first and third moments, the UX switch state should correspond to the UX switch being on because the screen refresh rate is adjusted. After the fourth moment, because the electronic device's display mode is independent display only or the electronic device's HDR function is enabled, the UX switch state is off and grayed out, setting it to a state where the user is prohibited from turning it on.
[0357] In some embodiments, whether the application scenario has changed, that is, whether the application scenario of the first application (such as XX game) and the second application (such as a browser) is the same, can be determined through the focus window change event. For details, please refer to the relevant Figure 12 and Figure 13 , so I will not go into details about this.
[0358] In other embodiments, the solutions described in the above embodiments are that the intelligent refresh rate module (such as a message monitor) interacts with the dual-display three-mode function module, the HDR monitor, and the UX interface display module to obtain the independent display status, the HDR switch status, and the UX switch status, and then decides whether to switch the screen refresh rate by maintaining the corresponding flag bit. In other words, the screen refresh rate adjustment (task 1 performed by the intelligent refresh rate module) and the acquisition of the independent display status, the HDR switch status, and the UX switch status (task 2 performed by the intelligent refresh rate module) are performed asynchronously. However, without considering the switching rate, Task 1 and Task 2 can be performed synchronously. That is, when the intelligent refresh rate module determines that the screen refresh rate needs to be switched, that is, when the intelligent refresh rate module determines that the screen refresh rate has changed and the screen refresh rate needs to be switched, it communicates with the dual-display three-mode function module, the HDR monitor, and the UX interface display module to obtain the independent display status, the HDR switch status, and the UX switch status to decide whether to switch the screen refresh rate. This synchronous method is slower because the acquisition status is taken when the screen refresh rate needs to be switched, but it can also avoid causing a black screen phenomenon.
[0359] Another embodiment of the present application provides an electronic device comprising: one or more processors and a memory. The memory is coupled to each of the processors; the processors include an independent graphics card and an integrated graphics card; the memory stores one or more computer program codes, each of which includes computer instructions; when the processor executes the computer instructions, the electronic device implements the refresh rate switching method described in any of the above embodiments, such as the first refresh rate switching method described in any of the above embodiments.
[0360] Another embodiment of the present application provides an electronic device comprising: a battery, one or more processors, and a memory. The battery and the memory are each coupled to the processor; the processor comprises an independent graphics card and an integrated graphics card; the memory stores one or more computer program codes, each comprising computer instructions; when the processor executes the computer instructions, the electronic device implements the refresh rate switching method described in any of the above embodiments, such as the first refresh rate switching method and the second refresh rate switching method described in any of the above embodiments.
[0361] Another embodiment of the present application provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor in an electronic device, the electronic device implements the refresh rate switching method described in any of the above embodiments, such as the first refresh rate switching method and the second refresh rate switching method described in any of the above embodiments.
[0362] The embodiment of the present application further provides a computer program product, which, when running on a computer, causes the computer to execute the functions or steps in the above method embodiment.
[0363] The embodiment of the present application further provides a chip system, as shown in the figure, the chip system 210 comprises at least one processor 2101 and at least one interface circuit 2102. The processor 2101 and the interface circuit 2102 can be interconnected through a line. For example, the interface circuit 2102 can be used to receive signals from other devices (such as the memory of a computer). For another example, the interface circuit 2102 can be used to send signals to other devices (such as the processor 2101). Figure 21
[0364] Illustratively, the interface circuit 2102 can read the instructions stored in the memory and send the instructions to the processor 2101. When the instructions are executed by the processor 2101, the computer can execute the steps in the above embodiment. Of course, the chip system can also include other discrete devices, and the embodiment of the present application does not make specific limitations thereto.
[0365] Through the description of the above embodiments, those skilled in the art can clearly understand that, for the convenience and brevity of description, only the division of the above functional modules is taken as an example for illustration, and in actual application, the above functions can be completed by different functional modules according to needs, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above.
[0366] In several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiment described above is only illustrative, for example, the division of the module or unit is only a logical function division, and actual implementation can have another division way, for example, a plurality of units or components can be combined or integrated into another device, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between the displayed or discussed ones can be through some interface, indirect coupling or communication connection between the devices or units, which can be electrical, mechanical or other forms.
[0367] The units described as separate components can or can not be physically separated, and the components shown as units can be one physical unit or multiple physical units, that is, can be located in one place, or can be distributed to multiple different places. Part or all of the units can be selected according to actual needs to achieve the purpose of the embodiment.
[0368] In addition, each function unit in each embodiment of the present application can be integrated in one processing unit, or each unit can be physically present separately, or two or more units can be integrated in one unit. The integrated unit can be realized in the form of hardware or in the form of a software function unit.
[0369] When the integrated unit is realized in the form of a software function unit and sold or used as an independent product, it can be stored in a readable storage medium. Based on such understanding, the technical solutions of the embodiments of the present application essentially or the part that contributes to the prior art or the whole or part of the technical solutions can be embodied in the form of a software product. The software product is stored in a storage medium, including a plurality of instructions to make a device (which can be a single-chip microcomputer, a chip, etc.) or a processor execute all or part of the steps of the method of each embodiment of the present application. The foregoing storage medium includes: a U disk, a mobile hard disk, a read only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and various media that can store program codes.
[0370] The above is only a specific embodiment of the present application, but the protection scope of the present application is not limited thereto. Any change or replacement within the technical scope disclosed in the present application should be covered in the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.
Claims
1. A refresh rate switching method, characterized in that: Applied to an electronic device, the electronic device includes an independent graphics card and an integrated graphics card, and the display mode of the electronic device includes only independent graphics card, the method includes: At a first moment, a window of a first application is displayed. At the first moment, the window of the first application is a focus window, and a screen refresh rate is a first value. At a second moment, the first operation is received, and a window of a second application is displayed. After the second moment, the window of the second application is a focus window, and the screen refresh rate is a second value, which is different from the first value. At a third moment, a second operation is received, and the window of the first application is displayed. After the third moment, the window of the first application is a focus window, the screen refresh rate is a first value, and between the first moment and the third moment, the display mode of the electronic device is not independent display only. At a fourth moment, the display mode of the electronic device is set to independent display only; At a fifth moment, a third operation is received and the window of the second application is displayed. After the fifth moment, the window of the second application is the focus window, and the screen refresh rate is the first value; wherein the fifth moment is after the fourth moment.
2. The method according to claim 1, characterized in that The method further comprises: At the second moment, based on the display mode of the electronic device not being independent display only, adjusting the screen refresh rate to set the screen refresh rate to the second value; At the third moment, based on the fact that the display mode of the electronic device is not independent display only, the screen refresh rate is adjusted and the screen refresh rate is set to the first value.
3. The method according to claim 1 or 2, characterized in that The method further comprises: At the fifth moment, based on the display mode of the electronic device being independent display only, the screen refresh rate is not adjusted, and the screen refresh rate is the first value.
4. The method according to any one of claims 1 to 3, characterized in that The method further comprises: At the second moment, based on the window of the second application being changed to the focus window, setting the screen refresh rate to the second value; At the third moment, based on the window of the first application being changed to the focus window, the screen refresh rate is set to the first value.
5. The method according to any one of claims 1 to 4, characterized in that The electronic device includes a user experience (UX) switch, wherein the UX switch is used to control on / off adjustment of the screen refresh rate; the method further includes: Between the first moment and the third moment, the UX switch state is UX switch open; After the fourth moment, the UX switch state is a state where the UX switch is closed and is prohibited from being opened by the user.
6. The method according to any one of claims 1 to 5, characterized in that The method further comprises: Read the independent display status flag; Determining whether the display mode of the electronic device is independent display only according to the independent display state flag; Among them, the independent display status flag is set based on the graphics card status of the electronic device. When the graphics card status is independent display direct connection, the independent display status flag indicates that the display mode is independent display only. When the graphics card status is not independent display direct connection, the independent display status flag indicates that the display mode is not independent display only.
7. The method according to claim 5 or 6, characterized in that The method further comprises: Read the UX switch flag; Determine the UX switch state according to the UX switch flag; The UX switch flag is set based on the UX switch state. When the UX switch state is UX switch off, the UX switch flag indicates that the UX switch is off. When the UX switch state is UX switch on, the UX switch flag indicates that the UX switch is on. The UX switch state is set based on the graphics card state of the electronic device. When the graphics card state is a direct connection with an independent graphics card, the UX switch state is a state in which the UX switch is closed and is set to a state in which the user is prohibited from turning it on. When the graphics card state is a non-direct connection with an independent graphics card and the UX switch state is already a state in which the user is prohibited from turning it on, the UX switch state is set to a state in which the user is allowed to turn it on.
8. The method according to any one of claims 5 to 7, characterized in that The method further comprises: After the electronic device is powered on, the UX switch state when the device was last powered off is obtained from the configuration file, as well as the graphics card state stored when the device was last powered off is obtained; Initializing and setting the UX switch flag bit according to the UX switch state at the last shutdown; wherein, when the UX switch state at the last shutdown is that the UX switch is on, the UX switch flag bit indicates that the UX switch is on; and when the UX switch state at the last shutdown is that the UX switch is off, the UX switch flag bit indicates that the UX switch is off; The UX switch state is set according to the graphics card state stored at the last shutdown; wherein, when the graphics card state stored at the last shutdown is a dedicated graphics card directly connected, and the UX switch state is the UX switch on, the UX switch state is set to the UX switch off state and the state in which the user is prohibited from turning it on; When the graphics card state stored at the last shutdown is a dedicated graphics card directly connected, and the UX switch state is a state where the UX switch is off but not set to a state where the user is prohibited from turning it on, setting the UX switch state to a state where the user is prohibited from turning it on; If the graphics card status stored at the last shutdown is non-independent graphics direct connection, or if the graphics card status stored at the last shutdown is independent graphics direct connection but the UX switch status is UX switch off and is already in a state where the user is prohibited from turning it on, the UX switch status is not changed.
9. The method according to any one of claims 6 to 8, characterized in that The electronic device includes a dual-display triple-mode function module, an intelligent refresh rate module, and a UX interface display module; the method further includes: The dual-display triple-mode function module receives a basic input and output system BIOS notification, wherein the BIOS notification indicates a current graphics card status of the electronic device; The dual-display triple-mode function module sends an inter-process communication (IPC) message to the intelligent refresh rate module and the UX interface display module according to the BIOS notification, wherein the IPC message indicates the current graphics card status of the electronic device; When the IPC message carries a parsing identifier, the intelligent refresh rate module parses the IPC message to obtain a current graphics card status of the electronic device, and sets the independent graphics card status flag according to the current graphics card status of the electronic device; wherein, when the current graphics card status of the electronic device is independent graphics card direct connection, the independent graphics card status flag indicates that the display mode is independent graphics card only; when the graphics card status is not independent graphics card direct connection, the independent graphics card status flag indicates that the display mode is not independent graphics card only; The UX interface display module parses the IPC to obtain the current graphics card status of the electronic device, and sets the UX switch status according to the current graphics card status of the electronic device; wherein, when the current graphics card status of the electronic device is a direct connection to an independent graphics card, the UX switch status is a UX switch closed state and is set to a state in which the user is prohibited from turning it on; when the current graphics card status of the electronic device is a non-direct connection to an independent graphics card and the UX switch status is already a state in which the user is prohibited from turning it on, the UX switch status is set to a state in which the user is allowed to turn it on; After the UX interface display module changes the UX switch state, the UX interface display module notifies the intelligent refresh rate module to change the setting of the UX switch flag.
10. The method according to any one of claims 2 to 9, characterized in that The adjusting the screen refresh rate at the second moment based on the display mode of the electronic device not being a standalone display only display, and setting the screen refresh rate to the second value includes: At the second moment, obtaining a screen refresh rate corresponding to the second application from a preset file to obtain the second value; Based on the fact that the display mode of the electronic device is not independent display only, the screen refresh rate is adjusted and the screen refresh rate is set to the second value.
11. A refresh rate switching method, characterized in that: Applied to an electronic device, the electronic device includes an independent graphics card and an integrated graphics card; the electronic device includes a high dynamic range (HDR) function, the HDR function can be enabled in an alternating current (AC) power supply mode, but not in a direct current (DC) power supply mode; the method includes: At a first moment, a window of a first application is displayed. At the first moment, the window of the first application is a focus window, and a screen refresh rate is a first value. At a second moment, the first operation is received, and a window of a second application is displayed. After the second moment, the window of the second application is a focus window, and the screen refresh rate is a second value, which is different from the first value. At a third moment, a second operation is received, and the window of the first application is displayed. After the third moment, the window of the first application is a focus window, the screen refresh rate is a first value, and between the first moment and the third moment, the HDR function of the electronic device is disabled. At a fourth moment, turning on the HDR function of the electronic device; At a fifth moment, a third operation is received and the window of the second application is displayed. After the fifth moment, the window of the second application is the focus window, and the screen refresh rate is the first value; wherein the fifth moment is after the fourth moment.
12. The method according to claim 11, characterized in that The method further comprises: At the second moment, based on that the HDR function of the electronic device is disabled, adjusting the screen refresh rate to set the screen refresh rate to the second value; At the third moment, based on the fact that the HDR function of the electronic device is turned off, the screen refresh rate is adjusted and the screen refresh rate is set to the first value.
13. The method according to claim 11 or 12, characterized in that The method further comprises: At the fifth moment, based on that the HDR function of the electronic device is turned on, the screen refresh rate is not adjusted, and the screen refresh rate is the first value.
14. The method according to any one of claims 11 to 13, characterized in that The electronic device includes a user experience (UX) switch, wherein the UX switch is used to control on / off adjustment of the screen refresh rate; the method further includes: Between the first moment and the third moment, the UX switch state is UX switch open; After the fourth moment, the UX switch state is a state where the UX switch is closed and is prohibited from being opened by the user.
15. The method according to any one of claims 11 to 14, characterized in that The method further comprises: Read the HDR switch flag; Determine the state of the HDR function according to the HDR switch flag; The HDR switch flag is set based on the HDR switch state and the power mode of the electronic device. When the HDR switch state is that the HDR switch is off and the power mode is the AC mode, the HDR switch flag indicates that the HDR function is off; when the HDR switch state is that the HDR switch is on and the power mode is the AC mode, the HDR switch flag indicates that the HDR function is on; when the power mode is the DC mode, the setting of the HDR switch flag is not changed.
16. The method according to claim 14 or 15, characterized in that The method further comprises: Read the UX switch flag; Determine the UX switch state according to the UX switch flag; The UX switch flag is set based on the UX switch state. If the UX switch state is UX switch off, the UX switch flag indicates that the UX switch is off. If the UX switch state is UX switch on, the UX switch flag indicates that the UX switch is on. The UX switch state is set based on the state of the HDR function and the power mode of the electronic device. When the state of the HDR function is that the HDR function is turned on and the power mode is in the AC mode, the UX switch state is that the UX switch is turned off and is set to a state that prohibits the user from turning it on; when the state of the HDR function is that the HDR function is turned off, the UX switch state is already a state that prohibits the user from turning it on and the power mode is in the AC mode, the UX switch state is set to a state that allows the user to turn it on; when the power mode is in the DC mode, the setting of the HDR switch state is not changed.
17. The method according to claim 15 or 16, characterized in that The method further comprises: After the electronic device is powered on, obtaining the HDR switch state stored when the electronic device was last powered off; Initializing the HDR switch flag according to the HDR switch state stored at the last shutdown; wherein, when the HDR switch state stored at the last shutdown is that the HDR switch is on, the HDR switch flag indicates that the HDR function is on; and when the HDR switch state stored at the last shutdown is that the HDR switch is off, the HDR switch flag indicates that the HDR function is off; Initializing the UX switch state according to the HDR switch state stored at the last shutdown; wherein, if the HDR switch state stored at the last shutdown is that the HDR switch is on, and the UX switch state is that the UX switch is on, setting the UX switch state to a state where the UX switch is off and the user is prohibited from turning it on; When the HDR switch state stored at the last shutdown is that the HDR switch is on, and the UX switch state is that the UX switch is off but not set to a state where the user is prohibited from turning it on, setting the UX switch state to a state where the user is prohibited from turning it on; When the HDR switch state stored at the last shutdown is HDR switch off, or when the HDR switch state stored at the last shutdown is HDR switch on but the UX switch state is UX switch off and is already in a state where the user is prohibited from turning it on, the UX switch state is not changed.
18. The method according to any one of claims 15 to 17, characterized in that The electronic device includes an HDR monitor, an intelligent refresh rate module, and a UX interface display module; the method further includes: The HDR monitor receives a display change message, checks the HDR switch state according to the display change message, and sends an inter-process communication (IPC) message to the smart refresh rate module and the UX interface display module, wherein the IPC message indicates the current HDR switch state; After receiving the IPC message, the intelligent refresh rate module obtains the power mode of the electronic device. When the power mode is the AC mode, the intelligent refresh rate module sets the HDR switch flag according to the HDR switch state indicated by the IPC message; wherein, when the HDR switch state is HDR switch on, the HDR switch flag indicates that the HDR function is on; when the HDR switch state is HDR switch off, the HDR switch flag indicates that the HDR function is off; The UX interface display module sets the UX switch state according to the HDR switch state indicated by the IPC message when the power mode is the AC mode; wherein, when the HDR switch state is HDR switch on, the UX switch state is UX switch off and is set to a state in which the user is prohibited from turning on; when the HDR switch state is HDR switch off and the UX switch state is already a state in which the user is prohibited from turning on, the UX switch state is set to a state in which the user is allowed to turn on; After the UX interface display module changes the UX switch state, the UX interface display module notifies the intelligent refresh rate module to change the setting of the UX switch flag.
19. The method according to claim 18, characterized in that The method further comprises: When the power mode is the DC mode, the intelligent refresh rate module and the UX interface display module both ignore the IPC message, the intelligent refresh rate module does not change the setting of the HDR switch flag; and the UX interface display module does not change the setting of the UX switch state.
20. A software program product comprising a software program, characterized in that When the software program is executed by a processor in an electronic device, the electronic device performs a refresh rate switching method, the method comprising: At a first moment, when the window of the first application becomes the focus window, setting the screen refresh rate to a first value; At a second moment, when the window of the second application becomes the focus window, the screen refresh rate is set to a second value; wherein, between the first moment and the second moment, the display mode of the electronic device is not independent display only, and the HDR function of the electronic device is turned off; the first value and the second value are different; At a third moment, when the window of the first application becomes the focus window, the screen refresh rate is not adjusted, and the screen refresh rate is the second value; the third moment is after the second moment; after the second moment, the display mode of the electronic device is independent display only or the HDR function of the electronic device is turned on.
21. The software program product according to claim 20, wherein: The electronic device further includes a UX switch, wherein the UX switch is used to control on / off adjustment of the screen refresh rate; the method further includes: Between the first moment and the second moment, the UX switch state is UX switch open; After the second moment, the UX switch state is a state where the UX switch is closed and is prohibited from being opened by the user.
22. An electronic device, characterized in that: include: One or more processors and memories, the processors including independent graphics cards and integrated graphics cards; the memory coupled to the processors; the memory storing one or more computer program codes, the computer program codes including computer instructions; when the processor executes the computer instructions, causing the electronic device to perform the refresh rate switching method according to any one of claims 1 to 10; Alternatively, the device comprises: a battery, one or more processors and a memory, wherein the processor comprises an independent graphics card and an integrated graphics card; the battery and the memory are respectively coupled to the processor; One or more computer program codes are stored in the memory, and the computer program codes include computer instructions. When the processor executes the computer instructions, the electronic device executes the refresh rate switching method according to any one of claims 11 to 19.
23. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor of an electronic device, the electronic device executes the refresh rate switching method as described in any one of claims 1 to 10; or, when the computer program is executed by a processor of an electronic device, the electronic device executes the refresh rate switching method as described in any one of claims 11 to 19.
Citation Information
Patent Citations
Method for controlling dynamic change of screen refresh rate and electronic equipment
CN114648951A
Frame data display method, electronic equipment and storage medium
CN116704926A
Screen refresh rate setting method and electronic equipment
CN117234319A
Picture processing method and device, electronic equipment and readable storage medium
CN117850729A
Dynamic screen refresh rate for an electronic device
US20210201731A1