WO2018161584A1 - 应用程序的控制方法、装置、介质及电子设备 - Google Patents

应用程序的控制方法、装置、介质及电子设备 Download PDF

Info

Publication number
WO2018161584A1
WO2018161584A1 PCT/CN2017/106939 CN2017106939W WO2018161584A1 WO 2018161584 A1 WO2018161584 A1 WO 2018161584A1 CN 2017106939 W CN2017106939 W CN 2017106939W WO 2018161584 A1 WO2018161584 A1 WO 2018161584A1
Authority
WO
WIPO (PCT)
Prior art keywords
parameter
application
threshold
resolution
frequency
Prior art date
Application number
PCT/CN2017/106939
Other languages
English (en)
French (fr)
Inventor
袁晓日
易永鹏
苟生俊
郑志勇
甘高亭
杨海
彭德良
Original Assignee
广东欧珀移动通信有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 广东欧珀移动通信有限公司 filed Critical 广东欧珀移动通信有限公司
Publication of WO2018161584A1 publication Critical patent/WO2018161584A1/zh

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F1/00Details not covered by groups G06F3/00 - G06F13/00 and G06F21/00
    • G06F1/26Power supply means, e.g. regulation thereof
    • G06F1/32Means for saving power
    • G06F1/3203Power management, i.e. event-based initiation of a power-saving mode
    • G06F1/3234Power saving characterised by the action undertaken
    • G06F1/325Power saving in peripheral device
    • G06F1/3265Power saving in display device
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F1/00Details not covered by groups G06F3/00 - G06F13/00 and G06F21/00
    • G06F1/26Power supply means, e.g. regulation thereof
    • G06F1/32Means for saving power
    • G06F1/3203Power management, i.e. event-based initiation of a power-saving mode
    • G06F1/3234Power saving characterised by the action undertaken
    • G06F1/329Power saving characterised by the action undertaken by task scheduling
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/14Digital output to display device ; Cooperation and interconnection of the display device with other functional units
    • G06F3/147Digital output to display device ; Cooperation and interconnection of the display device with other functional units using display panels
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/72Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
    • H04M1/724User interfaces specially adapted for cordless or mobile telephones
    • H04M1/72403User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality
    • H04M1/72406User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality by software upgrading or downloading
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/72Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
    • H04M1/724User interfaces specially adapted for cordless or mobile telephones
    • H04M1/72403User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality
    • H04M1/7243User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality with interactive means for internal management of messages
    • H04M1/72439User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality with interactive means for internal management of messages for image or video messaging
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/72Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
    • H04M1/724User interfaces specially adapted for cordless or mobile telephones
    • H04M1/72448User interfaces specially adapted for cordless or mobile telephones with means for adapting the functionality of the device according to specific conditions
    • H04M1/72454User interfaces specially adapted for cordless or mobile telephones with means for adapting the functionality of the device according to specific conditions according to context-related or environment-related conditions
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Definitions

  • the embodiments of the present invention relate to mobile terminal technologies, and in particular, to a method, an apparatus, a medium, and an electronic device for controlling an application.
  • mobile terminals provide communication services, living services and entertainment services for more and more users.
  • a user installs an application such as a video player on a mobile terminal to meet the need to watch video anytime, anywhere.
  • both the central processing unit CPU and the graphics processing processor GPU operate with a high load, and the brightness of the display screen is large, and these factors all lead to high power consumption of the mobile terminal, and the endurance time. Shorter.
  • the embodiment of the present application provides a method, a device, and a mobile terminal for controlling an application, which can reduce power consumption of a terminal and extend battery life.
  • an embodiment of the present application provides a method for controlling an application, including:
  • the application belongs to a preset whitelist
  • the first parameter that affects the user's viewing experience is acquired according to the set period
  • the first parameter is compared with a set threshold, and the resolution of the application is adjusted according to the comparison result.
  • the embodiment of the present application further provides an application control device, where the device includes:
  • An application determining module configured to determine whether the application belongs to a preset whitelist when detecting that the application is running
  • a first parameter obtaining module configured to acquire, when the application belongs to a preset white list, a first parameter that affects a user viewing experience according to a set period
  • a resolution adjustment module configured to compare the first parameter with the set threshold, and adjust a resolution of the application according to the comparison result.
  • the embodiment of the present application further provides a storage medium, where a computer program is stored thereon, and when the computer program runs on a computer, the computer is caused to perform the following operations:
  • the application belongs to a preset whitelist
  • the first parameter that affects the user's viewing experience is acquired according to the set period
  • the first parameter is compared with a set threshold, and the resolution of the application is adjusted according to the comparison result.
  • an embodiment of the present application further provides a mobile terminal, including a memory, a processor, and a computer program stored on the memory and operable on the processor, where the processor implements the following steps when executing the computer program :
  • the application belongs to a preset whitelist
  • the first parameter that affects the user's viewing experience is acquired according to the set period
  • the first parameter is compared with a set threshold, and the resolution of the application is adjusted according to the comparison result.
  • the embodiment of the present application provides a method, a device, and a mobile terminal for controlling an application, which can reduce power consumption of a terminal and extend battery life.
  • FIG. 1 is a flowchart of a method for controlling an application according to an embodiment of the present application.
  • FIG. 2 is a schematic diagram of a display process according to an embodiment of the present application.
  • FIG. 3 is a schematic diagram of a Vsync display refresh mechanism provided by an embodiment of the present application.
  • FIG. 4 is a flowchart of another method for controlling an application according to an embodiment of the present application.
  • FIG. 5 is a flowchart of another method for controlling an application according to an embodiment of the present application.
  • FIG. 6 is a structural block diagram of an apparatus for controlling an application according to an embodiment of the present application.
  • FIG. 7 is a structural block diagram of a resolution adjustment module according to an embodiment of the present application.
  • FIG. 8 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
  • the embodiment of the present application provides a method for controlling an application, including:
  • the application belongs to a preset whitelist
  • the first parameter that affects the user's viewing experience is acquired according to the set period
  • the first parameter is compared with a set threshold, and the resolution of the application is adjusted according to the comparison result.
  • the first parameter comprises at least one of backlight brightness, ambient light brightness, and gray level.
  • the acquiring, by the set period, a first parameter that affects a user viewing experience includes:
  • the screen capture process is performed according to the set period, and a screenshot corresponding to the application screen is obtained, and the gray value of the pixel point in the screenshot is determined.
  • the comparing the first parameter with the set threshold, and adjusting the resolution of the application according to the comparison result including:
  • the gray value is compared with a set threshold, and the resolution of the application is adjusted according to the comparison result.
  • the comparing the first parameter with the set threshold, and adjusting the resolution of the application according to the comparison result including:
  • the resolution of the application is adjusted to a second resolution, otherwise, the resolution of the application is maintained to be the first resolution; wherein the first resolution is greater than the second resolution rate.
  • the comparing the first parameter with the set parameter threshold to determine a frequency that the first parameter is lower than the set parameter threshold for a set length of time comprises:
  • the first parameter is the backlight brightness
  • the number of times the backlight brightness value occurring within the set time length is lower than the set backlight brightness threshold
  • the frequency of the backlight backlight threshold is the number of times the backlight brightness value occurring within the set time length.
  • the comparing the first parameter with the set parameter threshold to determine a frequency that the first parameter is lower than the set parameter threshold for a set length of time comprises:
  • the first parameter is the ambient light brightness
  • determining the ambient light brightness value within a set time length according to the number of times the ambient light brightness value is lower than the set ambient light brightness threshold value within the set time length. A frequency below the set ambient light threshold.
  • the comparing the first parameter with the set parameter threshold to determine a frequency that the first parameter is lower than the set parameter threshold for a set length of time comprises:
  • the first parameter is grayscale, determining, according to the number of night scene images appearing within the set time length, a target composed of gray values whose number of pixel points exceeds a set number threshold value within a set time length
  • the interval belongs to the frequency of the set gray value threshold interval.
  • the method further includes:
  • the resolution of the application is adjusted to the first resolution.
  • FIG. 1 is a flowchart of a method for controlling an application program according to an embodiment of the present application.
  • the embodiment may be applicable to a method for adjusting a resolution of an application, where the method may be performed by a control device of an application, where The device may be implemented by software and/or hardware.
  • the device may be integrated into an electronic device, and the electronic device may be a mobile terminal such as a smart phone or a tablet computer.
  • the method includes:
  • Step 110 When detecting that the application is running, determine whether the application belongs to a preset whitelist.
  • the whitelist is a mode for controlling the application according to actual conditions, and the application that is classified into the whitelist is permitted to have certain permissions.
  • the application in the preset whitelist can be the default of the system, or it can be an application added by the late user according to his own needs.
  • the whitelist mode is used to determine an application that can adjust the resolution. For example, an application identifier of an application such as a video application or a game application may be stored through a preset whitelist.
  • the application running in the foreground can be obtained by the method provided by Android. For example, determine the application running in the foreground through Process.myPid() and RunningAppProcessInfo. Further, the application identifier of the application running in the foreground is obtained.
  • the application identifier is a unique identifier of an application difference from other applications.
  • the application identifier may be an identifier of an application package name, a process name, or other settings different from other applications.
  • the preset whitelist is queried according to the application identifier of the application running in the foreground, and it can be determined whether the application inputs the preset whitelist.
  • Step 120 When the application belongs to a preset whitelist, obtain a first parameter that affects a user viewing experience according to a set period.
  • the first parameter may be a parameter that affects a user's viewing experience in the current display state of the application, and may be, for example, display brightness or the like.
  • the acquisition period of the first parameter can be set according to actual needs, for example, it can be 1 minute or the like.
  • the first parameter comprises at least one of backlight brightness, ambient light brightness, and gray level.
  • the backlight brightness may be the brightness value of the light emitted by the backlight source of the display screen of the mobile terminal, and the backlight brightness of the display screen may be obtained by a method provided by Android, for example, obtaining the backlight brightness by the getBrightness method.
  • the ambient light brightness may be a brightness value of ambient light around the mobile terminal, and may be measured using an ambient light detecting sensor of the mobile terminal.
  • the gray scale (ie gray scale or color scale) may be the gray value of the currently displayed picture.
  • the gray value refers to the color depth of the pixel in the black and white image, and the range is generally from 0 to 255, white is 255, and black is 0.
  • a gray histogram of the color image may be determined, and the gray value distribution of the pixel points in the color image is analyzed according to the gray histogram. Thereby, it can be determined whether the image displayed on the screen is a night scene image.
  • Step 130 Compare the first parameter with a set threshold, and adjust a resolution of the application according to the comparison result.
  • the set threshold may be an ambient light brightness threshold, a backlight brightness threshold, and a gray value threshold interval.
  • the backlight brightness can be automatically reduced to reduce the screen brightness, thereby providing a comfortable viewing experience for the user. Since the human eye's ability to recognize the details of the picture in a darker environment is lower than that in the normal environment, at this time, if the resolution of the screen display screen is appropriately reduced, the display effect is not affected.
  • the backlight brightness is lower than the backlight brightness threshold, the picture details of the image displayed on the screen are not easily observed by the user. At this time, if the resolution of the screen display screen is appropriately reduced, the display effect is not affected.
  • the gray value range and the pixel distribution corresponding to the night scene image are determined, and the gray value threshold interval is determined according to the gray value range and the pixel distribution.
  • the gray value threshold interval is determined according to the gray value range and the pixel distribution.
  • the first parameter can be compared with the set threshold, and the resolution of the application can be adjusted according to the comparison result. For example, when the first parameter is ambient light brightness, when the value of the first parameter is less than a set threshold (for example, the user may be in a dimly lit room), it may be determined that the current ambient light is dark, and the user's resolution of the image at this time is If the requirements are reduced, the resolution of the application can be appropriately reduced. Similarly, if the value of the first parameter is greater than the set threshold (the user may enter a well-lit room by a dimly lit room), the backlight brightness of the mobile terminal will adaptively increase, resulting in some details of the currently displayed picture. The information is easily observed by the user.
  • a set threshold for example, the user may be in a dimly lit room
  • the backlight brightness of the mobile terminal will adaptively increase, resulting in some details of the currently displayed picture. The information is easily observed by the user.
  • the currently set resolution may not meet the resolution requirements of the current display screen, and the resolution of the application needs to be appropriately increased, and the current resolution of the application may be adjusted to be original.
  • Resolution operation Illustratively, when the user plays a game or watches a video in a dark environment, if the current picture is a night scene picture, the user's display details of the picture are relatively low, and the resolution of the application can be appropriately reduced. In order to achieve the purpose of reducing the power consumption of the terminal.
  • FIG. 2 is a schematic diagram of a display process according to an embodiment of the present application.
  • each application (hereinafter referred to as an application or APP) contains one or more layers, and each application APP1, APP2...APPN is designed according to its own application (generally by the corresponding installation package APK) Decided to perform a layer rendering operation (that is, drawing an image on the layer), and after the drawing operation is completed, each application sends all the layers drawn to the layer composition that performs the layer composition operation.
  • Module Surface Flinger
  • the layer composition module selects the visible layer from ListAll to form a visible layer list, which is defined as DisplayList.
  • the layer synthesis module from the system three recyclable frame buffers (Frame Buffer, referred to as BF or buffer, finds an idle FB, and on the free FB, according to the application configuration information, for example, which layer should be bottomed, which layer should be topped, which area is visible, and which The area is a transparent area, etc., and the layers contained in the DisplayList are superimposed by a Compose operation to obtain a final picture to be displayed.
  • BF recyclable frame buffer
  • the picture to be displayed can be transmitted to the display hardware (including the display controller and the display screen, so that the picture to be displayed is finally displayed on the display screen.
  • the type of the display screen is not limited, for example, Is a liquid crystal display (Liquid Crystal Display, LCD).
  • FIG. 3 is a schematic diagram of a Vsync display refresh mechanism provided by an embodiment of the present application.
  • the Vsync refresh mechanism actually inserts a "heartbeat" or system synchronization (Vsync) signal in the entire display process, and is sent by the display controller to the CPU for generating a Vsync interrupt to control each layer drawing operation and graph.
  • Layer synthesis operations need to be done in accordance with the heartbeat, so that the key steps in the entire display process are incorporated into the unified management mechanism of Vsync.
  • the frequency of the Vsync signal is currently commonly 60 Hz. As shown in FIG.
  • the CPU forwards the second Vsync signal Vsync2 to the layer synthesizing module, and the layer synthesizing module starts performing a layer synthesizing operation, and synthesizes the multiple layers drawn by each application to generate The screen to be displayed.
  • the third Vsync signal Vsync3 reaches the CPU, the system starts to perform display refresh and finally displays the to-be-displayed screen on the display.
  • the frequency of the Vsync signal received by the application, the layer synthesis module, and the display screen is consistent, and is a fixed value set in advance.
  • the drawing frame rate In the process of drawing, synthesizing, and refreshing the display of the mobile terminal layer, there are three kinds of frame rates: the drawing frame rate, the composite frame rate, and the refresh rate.
  • the drawing frame rate is a frame rate that triggers the layer synthesis module to perform layer composition after the drawing of the layer is completed, and can be understood as the number of layer frames drawn per unit time (for example, 1 second).
  • the drawing frame rate includes a drawing frame rate of the application and a drawing frame rate of the layer.
  • a video player application generally includes three layers: a layer that displays video content, which can be defined as U1; Two SurfaceView type layers, one for displaying the barrage content, which can be defined as U2 and the other for displaying the user interface (User Interface, UI) controls (such as playback progress bar, volume control bar, and various control buttons) and advertisements can be defined as U3.
  • UI User Interface
  • the drawing frame rate of the application is the number of times the drawing operation is performed in the application unit time, and one or more layers may be drawn when performing a drawing operation.
  • the drawing frame rate of the layer is the number of times the layer is triggered to be drawn in the unit time of the same number or name (such as U1, U2, or U3 in the previous section).
  • the composite frame rate is a frame rate in which the layers drawn by each application are combined into one picture to be displayed, which can be understood as the number of picture frames synthesized per unit time.
  • the refresh rate is the frame rate at which the display screen of the mobile terminal is refreshed. Typically, the display will refresh at a 60Hz refresh rate.
  • the resolution of the image may be reduced when the application performs the layer drawing operation, and the resolution of each layer may be lowered before the synthesis processing by the layer composition module.
  • the resolution can be reduced by image processing related means.
  • the embodiment of the present application determines whether the application belongs to a preset whitelist when detecting that the application is running; and when the application belongs to a preset whitelist, acquires a user's viewing experience according to a set period.
  • the first parameter is compared with the set threshold, and the resolution of the application is adjusted according to the comparison result to dynamically adjust the resolution of the application.
  • FIG. 4 is a flowchart of another method for controlling an application according to an embodiment of the present application, where the method includes:
  • Step 210 When detecting that the application is running, determine whether the application belongs to a preset whitelist.
  • Step 220 When the application belongs to the preset white list, perform screen capture processing according to the set period, obtain a screenshot corresponding to the application screen, and determine a gray value of the pixel point in the screenshot.
  • the screen capture processing can be understood as reading the frame.
  • the data in the Buffer save the data as an image. Since the Frame Buffer provides an interface to abstract the display device into a frame buffer, the synthesized display frame is written to the Frame. Buffer, the display frame can be displayed. By reading the Frame The data in the Buffer can be used to process the screenshot of the application.
  • the screenshot thread may be an execution unit for acquiring the content currently displayed or to be displayed by the application, and the startup of the screenshot thread may implement the screenshot processing.
  • a period you can take a screenshot of the application at intervals, get a screenshot of the application, determine the gray histogram of the screenshot, analyze the gray histogram of the screenshot, and determine the gray value in the screenshot.
  • Step 230 Compare the gray value with a set threshold, and adjust a resolution of the application according to the comparison result.
  • the obtained screenshot is used to determine the gray value of the screenshot, and the gray value is used to determine whether the resolution of the application needs to be compared.
  • the method is simple and easy to implement, and can more accurately determine the current display state of the application, and can reduce the resolution when the display pixels are concentrated in the left region of the histogram, thereby reducing the power consumption of the terminal.
  • the resolution can be increased to achieve the effect of both display effect and power consumption, and the terminal life time is improved.
  • FIG. 5 is a flowchart of another method for controlling an application according to an embodiment of the present application, where the method includes:
  • Step 310 When detecting that the application is running, determine whether the application belongs to a preset whitelist.
  • Step 320 When the application belongs to a preset whitelist, obtain a first parameter that affects a user viewing experience according to a set period.
  • Step 330 Determine whether the first parameter is lower than a set parameter threshold. Specifically, the first parameter is compared with a set parameter threshold.
  • the acquired backlight brightness value is compared with a set backlight brightness threshold. If the backlight brightness value is lower than the backlight brightness threshold, the first counter and the first timer are started, and the count value of the first counter is incremented by one. If it is detected again that the backlight brightness value is lower than the backlight brightness threshold, the count value of the first timer is acquired. When the count value does not exceed the set time length, the count value of the first counter is incremented by one. Until, it is detected again that the backlight brightness value is lower than the backlight brightness threshold, and when the count value of the first timer exceeds the set time length, the accumulation operation of the first counter is stopped. Thereby, it is possible to determine the number of times the backlight luminance value occurring within the set time length is lower than the set backlight luminance threshold.
  • the number of times the ambient light brightness value is lower than the set ambient light brightness threshold within the set time length can be determined in a similar manner.
  • the grayscale value of each pixel in the screenshot of the acquired application is determined.
  • a target section composed of gray values whose number of pixel points exceeds the set number threshold is determined.
  • the screenshot is regarded as a night scene image, and the second counter and the second timer are started, and the second counter and the second timer are started.
  • the count value of the second counter is incremented by one. If the night scene image is detected again, the count value of the second timer is acquired. When the count value does not exceed the set time length, the count value of the second counter is incremented by one.
  • the accumulation operation of the second counter is stopped. Thereby, the number of times of the night scene image appearing within the set length of time can be determined.
  • Step 340 Start a timer. The start of the timer determines the frequency at which the first parameter is lower than the set parameter threshold for a set length of time.
  • the frequency of the first parameter being lower than the set parameter threshold may be determined within the set time length.
  • the backlight brightness value when the first parameter is the backlight brightness, according to the number of times the backlight brightness value occurring within the set time length is lower than the set backlight brightness threshold, the backlight brightness value may be determined to be lower than the set time length.
  • the frequency of the backlight brightness threshold when the first parameter is the backlight brightness, according to the number of times the backlight brightness value occurring within the set time length is lower than the set backlight brightness threshold, the backlight brightness value may be determined to be lower than the set time length.
  • the frequency of the backlight brightness threshold when the first parameter is the backlight brightness, according to the number of times the backlight brightness value occurring within the set time length is lower than the set backlight brightness threshold.
  • the first parameter is the ambient light brightness
  • the number of times the ambient light brightness value is lower than the set ambient light brightness threshold value within the set time length it can be determined that the ambient light brightness value is lower than the set time within the set time length.
  • the frequency of the ambient light threshold is the ambient light brightness
  • the first parameter is gradation
  • the target interval formed by the gradation value of the pixel number exceeding the set number threshold value within the set time length belongs to the setting.
  • the frequency of the grayscale threshold interval is a value formed by the gradation value of the pixel number exceeding the set number threshold value within the set time length.
  • Step 350 Determine whether the frequency of the first parameter lower than the set parameter threshold in the set time length exceeds a preset frequency threshold. If yes, go to step 360; otherwise, go to step 370.
  • Step 360 Adjust the resolution of the application to the second resolution, and disable the timer.
  • Step 370 Maintain the resolution of the application to be the same as the first resolution.
  • first resolution is greater than the second resolution.
  • a method for calculating a frequency in which the first parameter is lower than the set parameter threshold in the set time length is used to determine whether the resolution needs to be adjusted, so that the resolution can be adjusted according to the basis. If the frequency of the first parameter lower than the set parameter threshold exceeds the preset frequency threshold, the resolution can be lowered, and the power consumption of the terminal can be reduced. If it is not exceeded, the higher resolution is maintained, and the effect of both display effect and power consumption is achieved, and the terminal life time is improved.
  • the method further includes:
  • the resolution of the application is adjusted to the first resolution.
  • the second resolution is low, if the frequency that the first parameter is lower than the set parameter threshold in the set time length is lower than the preset frequency threshold, the second resolution may not be guaranteed.
  • the display of the application at which point the resolution can be increased to the first resolution.
  • the frequency of the backlight brightness is less than the set parameter threshold exceeds the preset frequency threshold, and the resolution of the game application is adjusted to the second resolution. (The second resolution is lower than the first resolution).
  • the frequency of the backlight brightness lower than the set parameter threshold is lower than the preset frequency threshold, and the resolution of the game application is adjusted to the first resolution. Rate to ensure a good display.
  • the embodiment of the present application further provides a control device for an application, including:
  • An application determining module configured to determine whether the application belongs to a preset whitelist when detecting that the application is running
  • a first parameter obtaining module configured to acquire, when the application belongs to a preset white list, a first parameter that affects a user viewing experience according to a set period
  • a resolution adjustment module configured to compare the first parameter with the set threshold, and adjust a resolution of the application according to the comparison result.
  • the first parameter comprises at least one of backlight brightness, ambient light brightness, and gray level.
  • the first parameter obtaining module is specifically configured to:
  • the screen capture processing is performed according to the set period, and a screenshot corresponding to the application screen is obtained, and the gray value of the pixel point in the screenshot is determined.
  • the resolution adjustment module is specifically configured to:
  • the gray value is compared with a set threshold, and the resolution of the application is adjusted according to the comparison result.
  • the resolution adjustment module includes:
  • Determining a sub-module configured to compare the first parameter with a set parameter threshold to determine a frequency of the first parameter being lower than a set parameter threshold within a set time length;
  • a determining submodule configured to determine whether the frequency exceeds a preset frequency threshold
  • Adjusting a submodule if the frequency exceeds a preset frequency threshold, adjusting a resolution of the application to a second resolution, and if the frequency does not exceed a preset frequency threshold, maintaining the application
  • the resolution of the program is the same as the first resolution; wherein the first resolution is greater than the second resolution.
  • the determining submodule is configured to determine, according to the number of times that the backlight brightness value occurring within the set time length is lower than the set backlight brightness threshold, when the first parameter is the backlight brightness The backlight brightness value is lower than the set backlight brightness threshold for a set length of time.
  • the determining submodule is configured to: when the first parameter is the ambient light brightness, according to the number of times the ambient light brightness value is lower than the set ambient light brightness threshold within the set time length And determining a frequency at which the ambient light brightness value is lower than a set ambient light brightness threshold for a set length of time.
  • the determining submodule is configured to determine, according to the number of night scene images that appear within a set time length, that the pixel is within a set length of time when the first parameter is grayscale
  • the target section formed by the gradation value whose number of points exceeds the set number threshold belongs to the frequency of the set gradation value threshold section.
  • the adjustment submodule is further configured to:
  • the resolution of the application After adjusting the resolution of the application to the second resolution, if it is detected that the frequency of the first parameter is lower than the preset parameter threshold in the set time length, the frequency is lower than the preset frequency threshold, The resolution of the application is adjusted to the first resolution.
  • FIG. 6 is a structural block diagram of a control device for an application program according to an embodiment of the present disclosure.
  • the device may be implemented by software and/or hardware, and may be integrated into a mobile terminal, and may be implemented by a method for controlling an application program. Take control.
  • the apparatus includes an application determining module 410, a first parameter obtaining module 420, and a resolution adjusting module 430.
  • the application determining module 410 is configured to determine, when the application is running, whether the application belongs to a preset whitelist
  • the first parameter obtaining module 420 is configured to acquire, when the application belongs to the preset white list, the first parameter that affects the user viewing experience according to the set period;
  • the resolution adjustment module 430 is configured to compare the first parameter with the set threshold, and adjust the resolution of the application according to the comparison result.
  • the first parameter comprises at least one of backlight brightness, ambient light brightness, and gray level.
  • the first parameter obtaining module 420 is specifically configured to:
  • the screen capture processing is performed according to the set period, and a screenshot corresponding to the application screen is obtained, and the gray value of the pixel point in the screenshot is determined.
  • the resolution adjustment module is specifically configured to:
  • the gray value is compared with a set threshold, and the resolution of the application is adjusted according to the comparison result.
  • FIG. 7 is a structural block diagram of a resolution adjustment module according to an embodiment of the present application.
  • the resolution adjustment module 430 includes a determination submodule 431, a determination submodule 432, and an adjustment submodule 433.
  • the determining sub-module 431 is configured to compare the first parameter with a set parameter threshold to determine a frequency that the first parameter is lower than a set parameter threshold within a set time length;
  • the determining sub-module 432 is configured to determine whether the frequency exceeds a preset frequency threshold
  • the adjusting submodule 433 is configured to adjust a resolution of the application to a second resolution if the frequency exceeds a preset frequency threshold, and if the frequency does not exceed a preset frequency threshold, maintain The resolution of the application is the same as the first resolution; wherein the first resolution is greater than the second resolution.
  • the determining submodule 431 is configured to determine whether the first parameter is lower than a set parameter threshold, and when detecting that the first parameter is lower than a set parameter threshold, start a timer to determine Within a set length of time, the first parameter is lower than a frequency of the set parameter threshold;
  • the determining sub-module 432 is configured to determine whether the frequency of the first parameter is lower than the preset parameter threshold exceeds a preset frequency threshold within a set time length;
  • the adjusting submodule 433 is configured to adjust the resolution of the application to the second resolution and disable the timing if the frequency of the first parameter lower than the set parameter threshold exceeds a preset frequency threshold And maintaining the resolution of the application as the first resolution if the frequency of the first parameter is lower than the preset parameter threshold does not exceed the preset frequency threshold; wherein the first resolution is Greater than the second resolution.
  • the determining sub-module 431 is configured to: when the first parameter is the backlight brightness, according to the number of times the backlight brightness value occurring within the set time length is lower than the set backlight brightness threshold, Determines the frequency at which the backlight brightness value is below the set backlight brightness threshold for a set length of time.
  • the determining sub-module 431 is configured to: when the first parameter is the ambient light brightness, according to the ambient light brightness value that is lower than the set ambient light brightness threshold within a set time length The number of times determines the frequency at which the ambient light level value is lower than the set ambient light brightness threshold for a set length of time.
  • the determining submodule 431 is configured to determine, when the first parameter is grayscale, according to the number of night scene images that appear within a set time length. Within a predetermined length of time, the target interval formed by the gray value of the number of pixels exceeding the set number threshold belongs to the frequency of the set gray value threshold interval.
  • the adjustment submodule 433 is further configured to:
  • the resolution of the application After adjusting the resolution of the application to the second resolution, if it is detected that the frequency of the first parameter is lower than the preset parameter threshold in the set time length, the frequency is lower than the preset frequency threshold, The resolution of the application is adjusted to the first resolution.
  • the control device of the application program can execute the control method of the application program provided by any embodiment of the present application, and has the corresponding functional modules and beneficial effects of the execution method.
  • the control method of the application program provided by any embodiment of the present application can execute the control method of the application program provided by any embodiment of the present application, and has the corresponding functional modules and beneficial effects of the execution method.
  • the control method of the application program provided by any embodiment of the present application can execute the control method of the application program provided by any embodiment of the present application, and has the corresponding functional modules and beneficial effects of the execution method.
  • FIG. 8 is a schematic structural diagram of an electronic device according to an embodiment of the present disclosure.
  • the electronic device may include: a housing (not shown), a memory 501, and a central processing unit (Central). Processing Unit, CPU) 502 (also referred to as a processor, hereinafter referred to as CPU), a computer program, a circuit board (not shown), and a power supply circuit stored on the memory 501 and operable on the processor 502 (not shown) Out).
  • CPU Central
  • CPU 502 also referred to as a processor, hereinafter referred to as CPU
  • CPU central processing unit
  • the circuit board is disposed inside a space enclosed by the casing; the CPU 502 and the memory 501 are disposed on the circuit board; and the power circuit is configured to supply power to each circuit or device of the terminal;
  • the memory 501 is configured to store a computer program executable on a processor; the CPU 502 reads and executes a computer program stored in the memory 501.
  • the terminal further includes: a peripheral interface 503, RF (Radio) Frequency, RF circuit 505, audio circuit 506, speaker 511, power management chip 508, input/output (I/O) subsystem 509, touch screen 512, other input/control devices 510, and external port 504, these components are passed through one or A plurality of communication buses or signal lines 507 are in communication.
  • RF Radio
  • the illustrated terminal 500 is merely one example of a terminal, and that the terminal 500 may have more or fewer components than those shown in the figures, two or more components may be combined, or may have Different component configurations.
  • the various components shown in the figures can be implemented in hardware, software, or a combination of hardware and software, including one or more signal processing and/or application specific integrated circuits.
  • the electronic device 500 for controlling the application provided by the embodiment is described in detail below.
  • the electronic device 500 takes a mobile phone as an example.
  • the memory 501 can be accessed by the CPU 502, the peripheral interface 503, etc., and the memory 501 can include a high speed random access memory, and can also include a non-volatile memory, such as one or more magnetic disk storage devices, flash memory devices. Or other volatile solid-state storage devices.
  • a non-volatile memory such as one or more magnetic disk storage devices, flash memory devices. Or other volatile solid-state storage devices.
  • Peripheral interface 503 which can connect the input and output peripherals of the device to CPU 502 and memory 501.
  • the I/O subsystem 509 which can connect input and output peripherals on the device, such as touch screen 502 (equivalent to the screen in the above embodiment) and other input/control devices 510, to peripherals Interface 503.
  • the I/O subsystem 509 can include a display controller 5091 and one or more input controllers 5092 for controlling other input/control devices 510.
  • one or more input controllers 5092 receive electrical signals from other input/control devices 510 or transmit electrical signals to other input/control devices 510, and other input/control devices 510 may include physical buttons (press buttons, rocker buttons, etc.) ), dial, slide switch, joystick, click wheel.
  • the input controller 5092 can be connected to any of the following: a keyboard, an infrared port, a USB interface, and a pointing device such as a mouse.
  • the touch screen 512 is an input interface and an output interface between the user terminal and the user, and displays the visual output to the user.
  • the visual output may include graphics, text, icons, videos, and the like.
  • Display controller 5091 in I/O subsystem 509 receives electrical signals from touch screen 512 or transmits electrical signals to touch screen 512.
  • the touch screen 512 detects the contact on the touch screen, and the display controller 5091 converts the detected contact into an interaction with the user interface object displayed on the touch screen 512, that is, realizes human-computer interaction, and the user interface object displayed on the touch screen 512 can be operated.
  • the icon of the game, the icon of the network to the corresponding network, and the like.
  • the device may also include a light mouse, which is a touch sensitive surface that does not display a visual output, or an extension of a touch sensitive surface formed by the touch screen.
  • the RF circuit 505 is mainly used for establishing communication between the mobile phone and the wireless network (ie, the network side), and realizing data reception and transmission between the mobile phone and the wireless network. For example, sending and receiving short messages, emails, and the like. Specifically, the RF circuit 505 receives and transmits an RF signal, which is also referred to as an electromagnetic signal, and the RF circuit 505 converts the electrical signal into an electromagnetic signal or converts the electromagnetic signal into an electrical signal, and through the electromagnetic signal and communication network and other devices Communicate.
  • an RF signal which is also referred to as an electromagnetic signal
  • RF circuitry 505 may include known circuitry for performing these functions including, but not limited to, an antenna system, an RF transceiver, one or more amplifiers, a tuner, one or more oscillators, a digital signal processor, a CODEC ( COder-DECoder, codec) chipset, user identification module (Subscriber Identity Module, SIM) and more.
  • CODEC COder-DECoder, codec
  • the audio circuit 506 is mainly used to receive audio data from the peripheral interface 503, convert the audio data into an electrical signal, and transmit the electrical signal to the speaker 511.
  • the speaker 511 is configured to restore the voice signal received by the mobile phone from the wireless network through the RF circuit 505 to sound and play the sound to the user.
  • the power management chip 508 is used for power supply and power management of the hardware connected to the CPU 502, the I/O subsystem, and the peripheral interface.
  • the CPU 502 provided by the embodiment of the present application implements the following steps when executing the computer program stored in the memory 501:
  • the application belongs to a preset whitelist
  • the first parameter that affects the user's viewing experience is acquired according to the set period
  • the first parameter is compared with a set threshold, and the resolution of the application is adjusted according to the comparison result.
  • the CPU 502 in the electronic device loads the executable program code corresponding to the process of one or more applications into the memory 501 according to the corresponding instruction, and is stored in the memory 501 by the CPU 502.
  • the application thereby performing the above-described method of dynamically adjusting the energy saving level of the terminal, thereby implementing corresponding functions.
  • the above electronic device can execute the control method of the application program provided by any embodiment of the present application, and has the corresponding functional modules and beneficial effects of the execution method.
  • the control method of the application program provided by any embodiment of the present application can execute the control method of the application program provided by any embodiment of the present application, and has the corresponding functional modules and beneficial effects of the execution method.
  • the control method of the application program provided by any embodiment of the present application can execute the control method of the application program provided by any embodiment of the present application.
  • the embodiment of the present application further provides a storage medium on which a computer program is stored, and when the computer program runs on a computer, the computer is caused to perform the following operations:
  • the application belongs to a preset whitelist
  • the first parameter that affects the user's viewing experience is acquired according to the set period
  • the first parameter is compared with a set threshold, and the resolution of the application is adjusted according to the comparison result.
  • a common tester in the field can understand all or part of the process of implementing the data uploading method in the embodiment of the present application, and the related hardware can be controlled by a computer program.
  • the computer program may be stored in a computer readable storage medium, such as in a memory of the electronic device, and executed by at least one processor in the electronic device, and may include The flow of an embodiment of the method of uploading data.
  • the storage medium may be a magnetic disk, an optical disk, a read only memory (ROM, Read) Only Memory), random access memory (RAM, Random Access Memory), etc.
  • each functional module may be integrated into one processing chip, or each module may exist physically separately, or two or more modules may be integrated into one module.
  • the above integrated modules can be implemented in the form of hardware or in the form of software functional modules.
  • the integrated module if implemented in the form of a software functional module and sold or used as a standalone product, may also be stored in a computer readable storage medium, such as a read only memory, a magnetic disk or an optical disk, etc. .

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Environmental & Geological Engineering (AREA)
  • Multimedia (AREA)
  • Business, Economics & Management (AREA)
  • General Business, Economics & Management (AREA)
  • Control Of Indicators Other Than Cathode Ray Tubes (AREA)
  • Controls And Circuits For Display Device (AREA)
  • Liquid Crystal Display Device Control (AREA)
  • Telephone Function (AREA)

Abstract

一种应用程序的控制方法、控制装置、介质及电子设备。该方法包括:在检测到应用程序运行时,确定所述应用程序是否属于预设的白名单(S110);在所述应用程序属于预设的白名单时,按照设定的周期获取影响用户观看体验的第一参数(S120);将所述第一参数与设定的阈值进行比较,根据比较结果调整所述应用程序的分辨率(S130)。

Description

应用程序的控制方法、装置、介质及电子设备
本申请要求于2017年03月10日提交中国专利局、申请号为2017101428458、发明名称为“一种应用程序的控制方法、装置及移动终端”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请实施例涉及移动终端技术,尤其涉及一种应用程序的控制方法、装置、介质及电子设备。
背景技术
目前,移动终端为越来越多的用户提供通信服务、生活服务及娱乐服务等。例如,用户在移动终端上安装视频播放器等应用程序,以满足随时随地观看视频的需求。然而,移动终端在播放视频时,中央处理器CPU和图形处理器GPU均以很高的负载来运行,且显示屏的亮度较大,这些因素均会导致移动终端的功耗较高,续航时间较短。
技术问题
本申请实施例提供一种应用程序的控制方法、装置及移动终端,可以降低终端功耗,延长续航时间。
技术解决方案
第一方面,本申请实施例提供一种应用程序的控制方法,包括:
在检测到应用程序运行时,确定所述应用程序是否属于预设的白名单;
在所述应用程序属于预设的白名单时,按照设定的周期获取影响用户观看体验的第一参数;
将所述第一参数与设定的阈值进行比较,根据比较结果调整所述应用程序的分辨率。
第二方面,本申请实施例还提供了一种应用程序的控制装置,该装置包括:
应用程序确定模块,用于在检测到应用程序运行时,确定所述应用程序是否属于预设的白名单;
第一参数获取模块,用于在所述应用程序属于预设的白名单时,按照设定的周期获取影响用户观看体验的第一参数;
分辨率调整模块,用于将所述第一参数与设定的阈值进行比较,根据比较结果调整所述应用程序的分辨率。
第三方面,本申请实施例还提供了一种存储介质,其上存储有计算机程序,当所述计算机程序在计算机上运行时,使得所述计算机执行如下操作:
在检测到应用程序运行时,确定所述应用程序是否属于预设的白名单;
在所述应用程序属于预设的白名单时,按照设定的周期获取影响用户观看体验的第一参数;
将所述第一参数与设定的阈值进行比较,根据比较结果调整所述应用程序的分辨率。
第四方面,本申请实施例还提供了一种移动终端,包括存储器、处理器及存储在存储器上并可在处理器上运行的计算机程序,所述处理器执行所述计算机程序时实现以下步骤:
在检测到应用程序运行时,确定所述应用程序是否属于预设的白名单;
在所述应用程序属于预设的白名单时,按照设定的周期获取影响用户观看体验的第一参数;
将所述第一参数与设定的阈值进行比较,根据比较结果调整所述应用程序的分辨率。
有益效果
本申请实施例提供一种应用程序的控制方法、装置及移动终端,可以降低终端功耗,延长续航时间。
附图说明
图1为本申请实施例提供的一种应用程序的控制方法的流程图。
图2为本申请实施例提供的一种显示过程示意图。
图3为本申请实施例提供的Vsync显示刷新机制的示意图。
图4为本申请实施例提供的另一种应用程序的控制方法的流程图。
图5为本申请实施例提供的另一种应用程序的控制方法的流程图。
图6为本申请实施例提供的一种应用程序的控制装置的结构框图。
图7为本申请实施例提供的分辨率调整模块的结构框图。
图8为本申请实施例提供的一种电子设备的结构示意图。
本发明的最佳实施方式
下面结合附图和实施例对本申请作在一些实施例中详细说明。可以理解的是,此处所描述的具体实施例仅仅用于解释本申请,而非对本申请的限定。另外还需要说明的是,为了便于描述,附图中仅示出了与本申请相关的部分而非全部结构。
在更加详细地讨论示例性实施例之前应当提到的是,一些示例性实施例被描述成作为流程图描绘的处理或方法。虽然流程图将各步骤描述成顺序的处理,但是其中的许多步骤可以被并行地、并发地或者同时实施。此外,各步骤的顺序可以被重新安排。当其操作完成时所述处理可以被终止,但是还可以具有未包括在附图中的附加步骤。所述处理可以对应于方法、函数、规程、子例程、子程序等等。
以下将分别进行详细说明。
本申请实施例提供一种应用程序的控制方法,包括:
在检测到应用程序运行时,确定所述应用程序是否属于预设的白名单;
在所述应用程序属于预设的白名单时,按照设定的周期获取影响用户观看体验的第一参数;
将所述第一参数与设定的阈值进行比较,根据比较结果调整所述应用程序的分辨率。
在一些实施例中,所述第一参数包括:背光亮度、环境光亮度、灰度中的至少一种。
在一些实施例中,在所述第一参数为灰度时,所述按照设定的周期获取影响用户观看体验的第一参数,包括:
按照设定的周期进行截屏处理,得到对应于应用程序画面的截图,确定所述截图中的像素点的灰度值。
在一些实施例中,所述将所述第一参数与设定的阈值进行比较,根据比较结果调整所述应用程序的分辨率,包括:
将所述灰度值与设定的阈值进行比较,根据比较结果调整所述应用程序的分辨率。
在一些实施例中,所述将所述第一参数与设定的阈值进行比较,根据比较结果调整所述应用程序的分辨率,包括:
将所述第一参数与设定的参数阈值进行比较,确定在设定的时间长度内,所述第一参数低于设定的参数阈值的频率;
判断所述频率是否超过预设的频率阈值;
若是,则将所述应用程序的分辨率调整为第二分辨率,否则,维持所述应用程序的分辨率为第一分辨率不变;其中,所述第一分辨率大于所述第二分辨率。
在一些实施例中,所述将所述第一参数与设定的参数阈值进行比较,确定在设定的时间长度内,所述第一参数低于设定的参数阈值的频率,包括:
在所述第一参数为背光亮度时,根据在设定的时间长度内出现的背光亮度值低于设定的背光亮度阈值的次数,确定在设定的时间长度内,背光亮度值低于设定的背光亮度阈值的频率。
在一些实施例中,所述将所述第一参数与设定的参数阈值进行比较,确定在设定的时间长度内,所述第一参数低于设定的参数阈值的频率,包括:
在所述第一参数为环境光亮度时,根据在设定的时间长度内出现环境光亮度值低于设定的环境光亮度阈值的次数,确定在设定的时间长度内,环境光亮度值低于设定的环境光亮度阈值的频率。
在一些实施例中,所述将所述第一参数与设定的参数阈值进行比较,确定在设定的时间长度内,所述第一参数低于设定的参数阈值的频率,包括:
在所述第一参数为灰度时,根据在设定的时间长度内出现的夜景图像的次数,确定在设定的时间长度内,像素点数量超过设定数量阈值的灰度值构成的目标区间属于设定的灰度值阈值区间的频率。
在一些实施例中,在将所述应用程序的分辨率调整为第二分辨率之后,还包括:
若检测到所述设定时间长度内所述第一参数低于设定的参数阈值的频率低于预设的频率阈值,则将所述应用程序的分辨率调整为第一分辨率。
图1为本申请实施例提供的一种应用程序的控制方法的流程图,本实施例可适用于对应用程序的分辨率进行调整的情况,该方法可以由应用程序的控制装置来执行,该装置可由软件和/或硬件来实现,一般该装置可集成于电子设备中,该电子设备可以是智能手机、平板电脑等移动终端,该方法包括:
步骤110、在检测到应用程序运行时,确定所述应用程序是否属于预设的白名单。
本申请实施例中,白名单是一种按照实际情况对应用程序进行控制的模式,被划入白名单的应用程序会被许可某些权限。预设白名单中的应用程序可以是系统默认的,也可以是后期用户根据自身需求补充添加的应用程序。本申请实施例中则采用白名单的模式确定可以进行调整分辨率的应用程序,例如可以通过预设的白名单存储视频应用、游戏应用等应用程序的应用标识。
对于基于安卓Android系统的终端,可以通过Android提供的方法获取前台运行的应用程序。例如,通过Process.myPid()和RunningAppProcessInfo确定前台运行的应用程序。进而,获取前台运行的应用程序的应用标识。其中,应用标识是一个应用程序区别与其它应用程序的唯一标识,例如,应用标识可以是应用包名、进程名或其它设定的区别于其它应用程序的标识符。根据该前台运行的应用程序的应用标识查询预设的白名单,可以确定该应用程序是否输入该预设的白名单。
步骤120、在所述应用程序属于预设的白名单时,按照设定的周期获取影响用户观看体验的第一参数。
本申请实施例中,第一参数可以是关于应用程序当前显示状态中影响用户观看体验的参数,例如可以是显示亮度等。第一参数的获取周期可根据实际需求进行设定,例如可以是1分钟等。
在一些实施例中,所述第一参数包括:背光亮度、环境光亮度、灰度中的至少一种。
其中,背光亮度可以是移动终端的显示屏的背光光源发出的光的亮度值,可以通过Android提供的方法获取显示屏的背光亮度,例如,通过getBrightness方法获取背光亮度等。环境光亮度可以是移动终端周围的环境光的亮度值,可以采用移动终端的环境光检测传感器进行测量。灰度(即灰阶或色阶)可以是当前显示画面的灰度值。灰度值是指黑白图像中像素点的颜色深度,范围一般从0到255,白色为255,黑色为0。对于屏幕中显示的彩色图像,可以确定该彩色图像的灰度直方图,根据该灰度直方图分析该彩色图像中像素点的灰度值分布情况。从而,可以确定屏幕中显示的图像是否为夜景图像。
步骤130、将所述第一参数与设定的阈值进行比较,根据比较结果调整所述应用程序的分辨率。
其中,设定阈值可以是环境光亮度阈值、背光亮度阈值和灰度值阈值区间。其中,在检测到移动终端周围的环境光低于环境光亮度阈值时,可以自动降低背光亮度以减小屏幕亮度,从而为用户提供舒适的观看体验。由于人眼在较暗的环境中对画面细节的识别能力低于正常环境中的识别能力,此时,若适当地减低屏幕显示画面的分辨率,不会影响显示效果。
在背光亮度低于背光亮度阈值时,屏幕中显示的图像的画面细节不容易被用户观察到,此时,若适当地减低屏幕显示画面的分辨率,也不会影响显示效果。
通过统计多幅夜景图像的灰度直方图,确定夜景图像对应的灰度值范围和像素分布情况,根据该灰度值范围和像素分布情况确定灰度值阈值区间。在屏幕中显示的图像的灰度值范围属于该灰度值阈值区间,且像素分布情况满足夜景图像对应的像素分布情况时,认为当前显示的图像是夜景图像,由于夜景图像的细节信息不容易被用户观察到,此时,若适当地减低屏幕显示画面的分辨率,也不会影响显示效果。
基于上述特性,可以将第一参数与设定的阈值进行比较,根据比较结果调整所述应用程序的分辨率。例如当第一参数为环境光亮度时,当第一参数的值小于设定阈值(例如,用户可能处于灯光昏暗的房间),则可以确定当前环境光偏暗,此时用户对图像分辨率的要求会降低,就可以适当地降低应用程序的分辨率。同样,若第一参数的值大于设定阈值(用户可能由灯光昏暗的房间进入照明充足的房间),此时,移动终端的背光亮度会适应性地增加,从而使得当前显示的画面的一些细节信息容易被用户观察到,因此,当前设定的分辨率可能无法满足当前显示画面对分辨率的要求,就需要适当地提高应用程序的分辨率,可以执行将应用程序的当前分辨率调整为原始分辨率的操作。示例性地,当用户在光线暗的环境下玩游戏或观看视频时,若当前画面为夜景画面,用户对画面的显示细节要求会相对低一些,此时可以将应用程序的分辨率适当降低,以达到降低终端功耗的目的。
为了便于理解,下面以Android系统为例,对Android系统中显示画面从生成到显示的过程进行简单的说明。图2为本申请实施例提供的一种显示过程示意图。
首先,在应用(Application)层,每个应用程序(以下简称应用或APP)包含1个或多个图层,各个应用APP1、APP2…APPN按照自己的应用设计情况(一般由对应的安装包APK决定)各自单独执行图层绘制(Render)操作(即绘制图层上的图像),并在绘制操作处理完成后,各应用将所绘制的所有图层发送给执行图层合成操作的图层合成模块(Surface flinger)。
然后,在应用框架(Framework)层,所有图层(包括可见图层和不可见图层)组成一个图层列表,定义为ListAll。图层合成模块从ListAll中挑选出可见图层组成可见图层列表,定义为DisplayList。随后,图层合成模块从系统中三个可循环使用的帧缓冲器(Frame Buffer,简称BF或buffer)中,找出一个空闲的FB,并在该空闲的FB上,根据应用配置信息,例如哪个图层应该置底、哪个图层应该置顶、哪个区域为可见区以及哪个区域为透明区等等,通过合成(Compose)操作,将DisplayList中包含的图层叠加在一起,得到最终的待显示画面。
最后,在内核(Kernel)层,可以将待显示画面传输给显示硬件(包括显示控制器和显示屏,使待显示画面最终显示在显示屏上。这里对显示屏的类型不做限定,例如可以是液晶显示器(Liquid Crystal Display, LCD)。
另外,Android系统在显示刷新的过程中引入了同步(Vsync)刷新机制。图3为本申请实施例提供的Vsync显示刷新机制的示意图。具体地,Vsync刷新机制其实就是在整个显示流程中,插入“心跳”即系统同步(Vsync)信号,由显示控制器发送给CPU,用于产生Vsync中断,以控制每次图层绘制操作和图层合成操作都需要按照心跳来完成,从而将整个显示过程中的关键步骤都纳入到Vsync的统一管理机制。Vsync信号的频率目前常见为60Hz。如图1c所示,假设Vsync信号周期为T,不考虑信号的传输延迟,第一个Vsync信号Vsync1到达CPU后,CPU向各应用转发该第一个Vsync信号Vsync1,各应用响应用户在显示屏上的触摸滑动等操作,开始执行绘制操作;在各应用完成绘制操作后,得到各应用所绘制的多个图层。第二个Vsync信号Vsync2到达CPU后,CPU向图层合成模块转发该第二个Vsync信号Vsync2,图层合成模块开始执行图层合成操作,将各应用所绘制的多个图层进行合成,生成待显示画面。第三个Vsync信号Vsync3到达CPU后,系统开始执行显示刷新,并将该待显示画面最终显示在显示屏上。由上述描述可知,应用程序、图层合成模块和显示屏接收到的Vsync信号的频率是一致的,且是预先设置好的固定值。
在移动终端图层绘制、合成和刷新显示的流程中,存在3种帧率:绘制帧率、合成帧率和刷新率。
其中,绘制帧率为图层绘制完成后,触发图层合成模块进行图层合成的帧率,可以理解为单位时间(例如,1秒钟)绘制的图层帧数。所述绘制帧率包括应用程序的绘制帧率和图层的绘制帧率。系统中运行的应用程序可能有多个,每个应用程序可能包括多个图层,例如,视频播放器应用程序下一般包括三个图层:一个显示视频内容的图层,可定义为U1;两个SurfaceView类型的图层,一个用于显示弹幕内容,可定义为U2,另一个用于显示用户界面(User Interface,UI)控件(如播放进度条、音量控制条以及各种控制按钮等)和广告,可定义为U3。所述应用程序的绘制帧率为应用程序单位时间内执行绘制操作的次数,其中,执行一次绘制操作时可能绘制了一个或者多个图层。所述图层的绘制帧率为同一编号或名称(如前面的U1、U2或U3)的图层单位时间内被触发绘制的次数。
合成帧率为把各个应用程序绘制的图层合成为一个待显示画面的帧率,可以理解为单位时间合成的画面帧数。
刷新率为移动终端显示屏画面刷新的帧率。一般,显示屏会以60Hz的刷新率刷新。
本实施例中可以在应用程序执行图层绘制操作时降低图像的分辨率,还可以通过图层合成模块在进行合成处理前将各图层的分辨率调低。其中,调低分辨率可通过图像处理相关手段实现。
本申请实施例通过在检测到应用程序运行时,确定所述应用程序是否属于预设的白名单;在所述应用程序属于预设的白名单时,按照设定的周期获取影响用户观看体验的第一参数;将所述第一参数与设定的阈值进行比较,根据比较结果调整所述应用程序的分辨率,实现动态调整应用程序的分辨率。通过采用上述技术方案可以避免在用户对应用程序的画面要求不高时,仍然采用较高的分辨率导致的终端功耗较高的问题,降低了终端的功耗,延长了终端的续航时间。
图4为本申请实施例提供的另一种应用程序的控制方法的流程图,该方法包括:
步骤210、在检测到应用程序运行时,确定所述应用程序是否属于预设的白名单。
步骤220、在所述应用程序属于预设的白名单时,按照设定的周期进行截屏处理,得到对应于应用程序画面的截图,确定该截图中的像素点的灰度值。
本申请实施例中,截屏处理可以理解为读取Frame Buffer中的数据,将数据保存为一张图片。由于Frame Buffer提供接口将显示设备抽象为帧缓冲区,因此,将合成后的显示帧写入Frame Buffer,即可显示该显示帧。通过读取Frame Buffer中的数据,可以实现对应用程序的截图处理。当确定到当前启动的应用程序属于预设的白名单时,触发截图线程启动,截图线程可以是用于获取应用程序当前显示或待显示的内容的执行单元,启动截图线程可实现截图处理。预设一个周期,可以每间隔一段时间对应用程序进行截屏处理,得到应用程序的截图,确定该截图的灰度直方图,对该截图的灰度直方图进行分析,确定截图中各个灰度值对应的像素数量及灰度值范围。
步骤230、将所述灰度值与设定的阈值进行比较,根据比较结果调整所述应用程序的分辨率。
将该灰度值范围与设定的灰度值阈值区间进行比较,若该属于该设定的灰度值阈值区间,则判断像素分布情况是否与夜景图像(像素点集中分布于直方图左侧区域)对应的像素分布情况匹配,若是,则认为当前屏幕显示画面是夜景图像,将所述应用程序的分辨率调整为第二分辨率,其中,第二分辨率低于该应用程序的原始分辨率。
本申请实施例通过对应用程序进行周期性截屏处理,利用获得的截图确定截图的灰度值,通过灰度值确定是否需要对应用程序的分辨率进行比较。该方法简单易实现,能够更加准确地判断应用程序当前的显示画面状况,可以在显示像素点集中分布于直方图左侧区域的画面时将分辨率降低,可以降低终端的功耗,在显示像素点未集中分布于直方图左侧区域的画面时可以将分辨率调高,达到兼顾显示效果和降低功耗的效果,提高了终端的续航时间。
图5为本申请实施例提供的另一种应用程序的控制方法的流程图,该方法包括:
步骤310、在检测到应用程序运行时,确定所述应用程序是否属于预设的白名单。
步骤320、在所述应用程序属于预设的白名单时,按照设定的周期获取影响用户观看体验的第一参数。
步骤330、判断所述第一参数是否低于设定的参数阈值。具体为将所述第一参数与设定的参数阈值进行比较。
示例性的,在该第一参数是背光亮度时,将所获取的背光亮度值与设定的背光亮度阈值进行比较。若该背光亮度值低于背光亮度阈值,则启动第一计数器和第一计时器,将该第一计数器的计数值加1。若再次检测到背光亮度值低于背光亮度阈值,则获取第一计时器的计数值。在该计数值未超过设定的时间长度时,将第一计数器的计数值加1。直至,再次检测到背光亮度值低于背光亮度阈值,当第一计时器的计数值超过设定的时间长度,停止执行第一计数器的累加操作。从而,可以确定设定时间长度内出现的背光亮度值低于设定的背光亮度阈值的次数。
可以理解的是,在第一参数是环境光亮度时,可以采用相似的方式确定设定时间长度内出现环境光亮度值低于设定的环境光亮度阈值的次数。
在第一参数是灰度时,确定所获取的应用程序的截图中各个像素点的灰度值。从而,确定出像素点数量超过设定数量阈值的灰度值构成的目标区间。将该目标区间与设定的灰度值阈值区间进行匹配,若该目标区间属于设定的灰度值阈值区间,则认为该截图为夜景图像,启动第二计数器和第二计时器,将该第二计数器的计数值加1。若再次检测到夜景图像,则获取第二计时器的计数值。在该计数值未超过设定的时间长度时,将第二计数器的计数值加1。直至,再次检测到背光亮度值低于背光亮度阈值,当第二计时器的计数值超过设定的时间长度,停止执行第二计数器的累加操作。从而,可以确定设定时间长度内出现的夜景图像的次数。
步骤340、启动计时器。其中通过启动计时器,确定在设定的时间长度内,所述第一参数低于设定的参数阈值的频率。
根据设定时间长度内出现的第一参数低于设定的参数阈值的次数,可以确定设定时间长度内,第一参数低于设定的参数阈值的频率。
示例性的,在第一参数是背光亮度时,根据设定时间长度内出现的背光亮度值低于设定的背光亮度阈值的次数,可以确定设定时间长度内,背光亮度值低于设定的背光亮度阈值的频率。
在第一参数是环境光亮度时,根据设定时间长度内出现环境光亮度值低于设定的环境光亮度阈值的次数,可以确定在设定时间长度内,环境光亮度值低于设定的环境光亮度阈值的频率。
在第一参数是灰度时,根据设定时间长度内出现的夜景图像的次数,可以确定在设定时间长度内,像素点数量超过设定数量阈值的灰度值构成的目标区间属于设定的灰度值阈值区间的频率。
步骤350、判断设定时间长度内第一参数低于设定的参数阈值的频率是否超过预设频率阈值。若是,执行步骤360;否则执行步骤370。
步骤360、将所述应用程序的分辨率调整为第二分辨率,并禁用计时器。
步骤370、维持所述应用程序的分辨率为第一分辨率不变。
其中,所述第一分辨率大于所述第二分辨率。
本申请实施例采用计算设定时间长度内第一参数低于设定的参数阈值的频率的方法,确定分辨率是否需要进行调整,使分辨率可以实现有依据的调整。若第一参数低于设定的参数阈值的频率超过预设的频率阈值,则可以将分辨率降低,可以降低终端的功耗。若未超过,则保持较高分辨率不变,达到兼顾显示效果和降低功耗的效果,提高了终端的续航时间。
可选的,在将所述应用程序的分辨率调整为第二分辨率之后,还包括:
若检测到所述设定时间长度内所述第一参数低于设定的参数阈值的频率低于预设的频率阈值,则将所述应用程序的分辨率调整为第一分辨率。
其中,由于第二分辨率较低,若检测到所述设定时间长度内所述第一参数低于设定的参数阈值的频率低于预设的频率阈值,认为第二分辨率可能无法保证应用程序的显示效果,此时可将分辨率调高至第一分辨率。示例性地,假设一个场景为用户在昏暗的房间看玩游戏,此时,背光亮度小于设定的参数阈值的频率超过预设的频率阈值,将该游戏应用的分辨率调整为第二分辨率(第二分辨率低于第一分辨率)。若经过一段时间后,用户到光线充足的房间玩该游戏,此时,背光亮度低于设定的参数阈值的频率低于预设的频率阈值,将该游戏应用的分辨率调整为第一分辨率,保证良好的显示效果。
本申请实施例还提供一种应用程序的控制装置,包括:
应用程序确定模块,用于在检测到应用程序运行时,确定所述应用程序是否属于预设的白名单;
第一参数获取模块,用于在所述应用程序属于预设的白名单时,按照设定的周期获取影响用户观看体验的第一参数;
分辨率调整模块,用于将所述第一参数与设定的阈值进行比较,根据比较结果调整所述应用程序的分辨率。
在一些实施例中,所述第一参数包括:背光亮度、环境光亮度、灰度中的至少一种。
在一些实施例中,所述第一参数获取模块具体用于:
在所述第一参数为灰度时,按照设定的周期进行截屏处理,得到对应于应用程序画面的截图,确定所述截图中的像素点的灰度值。
在一些实施例中,所述分辨率调整模块具体用于:
将所述灰度值与设定的阈值进行比较,根据比较结果调整所述应用程序的分辨率。
在一些实施例中,所述分辨率调整模块,包括:
确定子模块,用于将所述第一参数与设定的参数阈值进行比较,确定在设定的时间长度内,所述第一参数低于设定的参数阈值的频率;
判断子模块,用于判断所述频率是否超过预设的频率阈值;
调整子模块,用于若所述频率超过预设的频率阈值,则将所述应用程序的分辨率调整为第二分辨率,若所述频率未超过预设的频率阈值,则维持所述应用程序的分辨率为第一分辨率不变;其中,所述第一分辨率大于所述第二分辨率。
在一些实施例中,所述确定子模块,用于在所述第一参数为背光亮度时,根据在设定的时间长度内出现的背光亮度值低于设定的背光亮度阈值的次数,确定在设定的时间长度内,背光亮度值低于设定的背光亮度阈值的频率。
在一些实施例中,所述确定子模块,用于在所述第一参数为环境光亮度时,根据在设定的时间长度内出现环境光亮度值低于设定的环境光亮度阈值的次数,确定在设定的时间长度内,环境光亮度值低于设定的环境光亮度阈值的频率。
在一些实施例中,所述确定子模块,用于在所述第一参数为灰度时,根据在设定的时间长度内出现的夜景图像的次数,确定在设定的时间长度内,像素点数量超过设定数量阈值的灰度值构成的目标区间属于设定的灰度值阈值区间的频率。
在一些实施例中,所述调整子模块还用于:
在将所述应用程序的分辨率调整为第二分辨率之后,若检测到所述设定时间长度内所述第一参数低于设定的参数阈值的频率低于预设的频率阈值,则将所述应用程序的分辨率调整为第一分辨率。
图6为本申请实施例提供的一种应用程序的控制装置的结构框图,该装置可由软件和/或硬件实现,一般可集成在移动终端中,可通过执行应用程序的控制的方法对移动终端进行控制。如图6所示,该装置包括应用程序确定模块410、第一参数获取模块420和分辨率调整模块430。
应用程序确定模块410,用于在检测到应用程序运行时,确定所述应用程序是否属于预设的白名单;
第一参数获取模块420,用于在所述应用程序属于预设的白名单时,按照设定的周期获取影响用户观看体验的第一参数;
分辨率调整模块430,用于将所述第一参数与设定的阈值进行比较,根据比较结果调整所述应用程序的分辨率。
在一些实施例中,所述第一参数包括:背光亮度、环境光亮度、灰度中的至少一种。
在一些实施例中,所述第一参数获取模块420具体用于:
在所述第一参数为灰度时,按照设定的周期进行截屏处理,得到对应于应用程序画面的截图,确定所述截图中的像素点的灰度值。
在一些实施例中,所述分辨率调整模块具体用于:
将所述灰度值与设定的阈值进行比较,根据比较结果调整所述应用程序的分辨率。
图7为本申请实施例提供的分辨率调整模块的结构框图。
所述分辨率调整模块430包括确定子模块431,判断子模块432和调整子模块433。
所述确定子模块431,用于将所述第一参数与设定的参数阈值进行比较,确定在设定的时间长度内,所述第一参数低于设定的参数阈值的频率;
所述判断子模块432,用于判断所述频率是否超过预设的频率阈值;
所述调整子模块433,用于若所述频率超过预设的频率阈值,则将所述应用程序的分辨率调整为第二分辨率,若所述频率未超过预设的频率阈值,则维持所述应用程序的分辨率为第一分辨率不变;其中,所述第一分辨率大于所述第二分辨率。
具体的,所述确定子模块431用于判断所述第一参数是否低于设定的参数阈值,在检测到所述第一参数低于设定的参数阈值时,启动计时器,以确定在设定的时间长度内,所述第一参数低于设定的参数阈值的频率;
所述判断子模块432用于判断在设定的时间长度内,所述第一参数低于设定的参数阈值的频率是否超过预设的频率阈值;
所述调整子模块433,用于若所述第一参数低于设定的参数阈值的频率超过预设的频率阈值,则将所述应用程序的分辨率调整为第二分辨率,并禁用计时器,若所述第一参数低于设定的参数阈值的频率未超过预设的频率阈值,则维持所述应用程序的分辨率为第一分辨率不变;其中,所述第一分辨率大于所述第二分辨率。
在一些实施例中,所述确定子模块431,用于在所述第一参数为背光亮度时,根据在设定的时间长度内出现的背光亮度值低于设定的背光亮度阈值的次数,确定在设定的时间长度内,背光亮度值低于设定的背光亮度阈值的频率。
在一些实施例中,所述确定子模块431,用于在所述第一参数为环境光亮度时,根据在设定的时间长度内出现环境光亮度值低于设定的环境光亮度阈值的次数,确定在设定的时间长度内,环境光亮度值低于设定的环境光亮度阈值的频率。
在一些实施例中,所述确定子模块431,所述确定子模块,用于在所述第一参数为灰度时,根据在设定的时间长度内出现的夜景图像的次数,确定在设定的时间长度内,像素点数量超过设定数量阈值的灰度值构成的目标区间属于设定的灰度值阈值区间的频率。
在一些实施例中,所述调整子模块433还用于:
在将所述应用程序的分辨率调整为第二分辨率之后,若检测到所述设定时间长度内所述第一参数低于设定的参数阈值的频率低于预设的频率阈值,则将所述应用程序的分辨率调整为第一分辨率。
上述应用程序的控制装置可执行本申请任意实施例所提供的应用程序的控制方法,具备执行方法相应的功能模块和有益效果。未在本实施例中详尽描述的技术细节,可参见本申请任意实施例提供的应用程序的控制方法。
本申请实施例还提供了一种电子设备,该电子设备可以包括本申请任意实施例提供的应用程序的控制装置。图8为本申请实施例提供的一种电子设备的结构示意图,如图8所示,该电子设备可以包括:壳体(图中未示出)、存储器501、中央处理器(Central Processing Unit,CPU)502(又称处理器,以下简称CPU)、存储在存储器501上并可在处理器502上运行的计算机程序、电路板(图中未示出)和电源电路(图中未示出)。所述电路板安置在所述壳体围成的空间内部;所述CPU502和所述存储器501设置在所述电路板上;所述电源电路,用于为所述终端的各个电路或器件供电;所述存储器501,用于存储可在处理器上运行的计算机程序;所述CPU502通过读取并执行所述存储器501中存储的计算机程序。
该终端还包括:外设接口503、RF(Radio Frequency,射频)电路505、音频电路506、扬声器511、电源管理芯片508、输入/输出(I/O)子系统509、触摸屏512、其他输入/控制设备510以及外部端口504,这些部件通过一个或多个通信总线或信号线507来通信。
应该理解的是,图示终端500仅仅是终端的一个范例,并且终端500可以具有比图中所示出的更多的或者更少的部件,可以组合两个或更多的部件,或者可以具有不同的部件配置。图中所示出的各种部件可以在包括一个或多个信号处理和/或专用集成电路在内的硬件、软件、或硬件和软件的组合中实现。
下面就本实施例提供的用于应用程序的控制的电子设备500进行详细的描述,该电子设备500以手机为例。
存储器501,所述存储器501可以被CPU502、外设接口503等访问,所述存储器501可以包括高速随机存取存储器,还可以包括非易失性存储器,例如一个或多个磁盘存储器件、闪存器件、或其他易失性固态存储器件。
外设接口503,所述外设接口503可以将设备的输入和输出外设连接到CPU502和存储器501。
I/O子系统509,所述I/O子系统509可以将设备上的输入输出外设,例如触摸屏502(相当于上述实施例中的屏幕)和其他输入/控制设备510,连接到外设接口503。I/O子系统509可以包括显示控制器5091和用于控制其他输入/控制设备510的一个或多个输入控制器5092。其中,一个或多个输入控制器5092从其他输入/控制设备510接收电信号或者向其他输入/控制设备510发送电信号,其他输入/控制设备510可以包括物理按钮(按压按钮、摇臂按钮等)、拨号盘、滑动开关、操纵杆、点击滚轮。值得说明的是,输入控制器5092可以与以下任一个连接:键盘、红外端口、USB接口以及诸如鼠标的指示设备。
触摸屏512,所述触摸屏512是用户终端与用户之间的输入接口和输出接口,将可视输出显示给用户,可视输出可以包括图形、文本、图标、视频等。
I/O子系统509中的显示控制器5091从触摸屏512接收电信号或者向触摸屏512发送电信号。触摸屏512检测触摸屏上的接触,显示控制器5091将检测到的接触转换为与显示在触摸屏512上的用户界面对象的交互,即实现人机交互,显示在触摸屏512上的用户界面对象可以是运行游戏的图标、联网到相应网络的图标等。值得说明的是,设备还可以包括光鼠,光鼠是不显示可视输出的触摸敏感表面,或者是由触摸屏形成的触摸敏感表面的延伸。
RF电路505,主要用于建立手机与无线网络(即网络侧)的通信,实现手机与无线网络的数据接收和发送。例如收发短信息、电子邮件等。具体地,RF电路505接收并发送RF信号,RF信号也称为电磁信号,RF电路505将电信号转换为电磁信号或将电磁信号转换为电信号,并且通过该电磁信号与通信网络以及其他设备进行通信。RF电路505可以包括用于执行这些功能的已知电路,其包括但不限于天线系统、RF收发机、一个或多个放大器、调谐器、一个或多个振荡器、数字信号处理器、CODEC(COder-DECoder,编译码器)芯片组、用户标识模块(Subscriber Identity Module,SIM)等等。
音频电路506,主要用于从外设接口503接收音频数据,将该音频数据转换为电信号,并且将该电信号发送给扬声器511。
扬声器511,用于将手机通过RF电路505从无线网络接收的语音信号,还原为声音并向用户播放该声音。
电源管理芯片508,用于为CPU502、I/O子系统及外设接口所连接的硬件进行供电及电源管理。
本申请实施例提供的CPU502在执行所述存储器501中存储的计算机程序时实现以下步骤:
在检测到应用程序运行时,确定所述应用程序是否属于预设的白名单;
在所述应用程序属于预设的白名单时,按照设定的周期获取影响用户观看体验的第一参数;
将所述第一参数与设定的阈值进行比较,根据比较结果调整所述应用程序的分辨率。
具体在本实施例中,电子设备中的CPU502会按照相应的指令,将一个或一个以上的应用程序的进程对应的可执行程序代码加载到存储器501中,并由CPU502来运行存储在存储器501中的应用程序,从而执行上述动态调节终端的节能等级的方法,进而实现对应的各种功能。
上述操作具体可参见前面的方法实施例,在此不再赘述。
上述电子设备可执行本申请任意实施例所提供的应用程序的控制方法,具备执行方法相应的功能模块和有益效果。未在本实施例中详尽描述的技术细节,可参见本申请任意实施例提供的应用程序的控制方法。
本申请实施例还提供一种存储介质,其上存储有计算机程序,当所述计算机程序在计算机上运行时,使得所述计算机执行如下操作:
在检测到应用程序运行时,确定所述应用程序是否属于预设的白名单;
在所述应用程序属于预设的白名单时,按照设定的周期获取影响用户观看体验的第一参数;
将所述第一参数与设定的阈值进行比较,根据比较结果调整所述应用程序的分辨率。
需要说明的是,对本申请所述数据的上传方法而言,本领域普通测试人员可以理解实现本申请实施例所述数据的上传方法的全部或部分流程,是可以通过计算机程序来控制相关的硬件来完成,所述计算机程序可存储于一计算机可读取存储介质中,如存储在电子设备的存储器中,并被该电子设备内的至少一个处理器执行,在执行过程中可包括如所述数据的上传方法的实施例的流程。其中,所述的存储介质可为磁碟、光盘、只读存储器(ROM,Read Only Memory)、随机存取记忆体(RAM,Random Access Memory)等。
对本申请实施例的所述数据的上传装置而言,其各功能模块可以集成在一个处理芯片中,也可以是各个模块单独物理存在,也可以两个或两个以上模块集成在一个模块中。上述集成的模块既可以采用硬件的形式实现,也可以采用软件功能模块的形式实现。所述集成的模块如果以软件功能模块的形式实现并作为独立的产品销售或使用时,也可以存储在一个计算机可读取存储介质中,所述存储介质譬如为只读存储器,磁盘或光盘等。
注意,上述仅为本申请的较佳实施例及所运用技术原理。本领域技术人员会理解,本申请不限于这里所述的特定实施例,对本领域技术人员来说能够进行各种明显的变化、重新调整和替代而不会脱离本申请的保护范围。因此,虽然通过以上实施例对本申请进行了较为详细的说明,但是本申请不仅仅限于以上实施例,在不脱离本申请构思的情况下,还可以包括更多其他等效实施例,而本申请的范围由所附的权利要求范围决定。

Claims (20)

  1. 一种应用程序的控制方法,其包括:
    在检测到应用程序运行时,确定所述应用程序是否属于预设的白名单;
    在所述应用程序属于预设的白名单时,按照设定的周期获取影响用户观看体验的第一参数;
    将所述第一参数与设定的阈值进行比较,根据比较结果调整所述应用程序的分辨率。
  2. 根据权利要求1所述的方法,其中,所述第一参数包括:背光亮度、环境光亮度、灰度中的至少一种。
  3. 根据权利要求1所述的方法,其中,在所述第一参数为灰度时,所述按照设定的周期获取影响用户观看体验的第一参数,包括:
    按照设定的周期进行截屏处理,得到对应于应用程序画面的截图,确定所述截图中的像素点的灰度值。
  4. 根据权利要求3所述的方法,其中,所述将所述第一参数与设定的阈值进行比较,根据比较结果调整所述应用程序的分辨率,包括:
    将所述灰度值与设定的阈值进行比较,根据比较结果调整所述应用程序的分辨率。
  5. 根据权利要求1所述的方法,其中,所述将所述第一参数与设定的阈值进行比较,根据比较结果调整所述应用程序的分辨率,包括:
    将所述第一参数与设定的参数阈值进行比较,确定在设定的时间长度内,所述第一参数低于设定的参数阈值的频率;
    判断所述频率是否超过预设的频率阈值;
    若是,则将所述应用程序的分辨率调整为第二分辨率,否则,维持所述应用程序的分辨率为第一分辨率不变;其中,所述第一分辨率大于所述第二分辨率。
  6. 根据权利要求5所述的方法,其中,所述将所述第一参数与设定的参数阈值进行比较,确定在设定的时间长度内,所述第一参数低于设定的参数阈值的频率,包括:
    在所述第一参数为背光亮度时,根据在设定的时间长度内出现的背光亮度值低于设定的背光亮度阈值的次数,确定在设定的时间长度内,背光亮度值低于设定的背光亮度阈值的频率。
  7. 根据权利要求5所述的方法,其中,所述将所述第一参数与设定的参数阈值进行比较,确定在设定的时间长度内,所述第一参数低于设定的参数阈值的频率,包括:
    在所述第一参数为环境光亮度时,根据在设定的时间长度内出现环境光亮度值低于设定的环境光亮度阈值的次数,确定在设定的时间长度内,环境光亮度值低于设定的环境光亮度阈值的频率。
  8. 根据权利要求5所述的方法,其中,所述将所述第一参数与设定的参数阈值进行比较,确定在设定的时间长度内,所述第一参数低于设定的参数阈值的频率,包括:
    在所述第一参数为灰度时,根据在设定的时间长度内出现的夜景图像的次数,确定在设定的时间长度内,像素点数量超过设定数量阈值的灰度值构成的目标区间属于设定的灰度值阈值区间的频率。
  9. 根据权利要求4所述的方法,其中,在将所述应用程序的分辨率调整为第二分辨率之后,还包括:
    若检测到所述设定时间长度内所述第一参数低于设定的参数阈值的频率低于预设的频率阈值,则将所述应用程序的分辨率调整为第一分辨率。
  10. 一种应用程序的控制装置,其包括:
    应用程序确定模块,用于在检测到应用程序运行时,确定所述应用程序是否属于预设的白名单;
    第一参数获取模块,用于在所述应用程序属于预设的白名单时,按照设定的周期获取影响用户观看体验的第一参数;
    分辨率调整模块,用于将所述第一参数与设定的阈值进行比较,根据比较结果调整所述应用程序的分辨率。
  11. 根据权利要求10所述的装置,其中,所述第一参数包括:背光亮度、环境光亮度、灰度中的至少一种。
  12. 根据权利要求10所述的装置,其中,所述第一参数获取模块具体用于:
    在所述第一参数为灰度时,按照设定的周期进行截屏处理,得到对应于应用程序画面的截图,确定所述截图中的像素点的灰度值。
  13. 根据权利要求12所述的装置,其中,所述分辨率调整模块具体用于:
    将所述灰度值与设定的阈值进行比较,根据比较结果调整所述应用程序的分辨率。
  14. 根据权利要求10所述的装置,其中,所述分辨率调整模块,包括:
    确定子模块,用于将所述第一参数与设定的参数阈值进行比较,确定在设定的时间长度内,所述第一参数低于设定的参数阈值的频率;
    判断子模块,用于判断所述频率是否超过预设的频率阈值;
    调整子模块,用于若所述频率超过预设的频率阈值,则将所述应用程序的分辨率调整为第二分辨率,若所述频率未超过预设的频率阈值,则维持所述应用程序的分辨率为第一分辨率不变;其中,所述第一分辨率大于所述第二分辨率。
  15. 根据权利要求14所述的装置,其中,所述确定子模块,用于在所述第一参数为背光亮度时,根据在设定的时间长度内出现的背光亮度值低于设定的背光亮度阈值的次数,确定在设定的时间长度内,背光亮度值低于设定的背光亮度阈值的频率。
  16. 根据权利要求14所述的装置,其中,所述确定子模块,用于在所述第一参数为环境光亮度时,根据在设定的时间长度内出现环境光亮度值低于设定的环境光亮度阈值的次数,确定在设定的时间长度内,环境光亮度值低于设定的环境光亮度阈值的频率。
  17. 根据权利要求14所述的装置,其中,所述确定子模块,用于在所述第一参数为灰度时,根据在设定的时间长度内出现的夜景图像的次数,确定在设定的时间长度内,像素点数量超过设定数量阈值的灰度值构成的目标区间属于设定的灰度值阈值区间的频率。
  18. 根据权利要求9所述的装置,其中,所述调整子模块还用于:
    在将所述应用程序的分辨率调整为第二分辨率之后,若检测到所述设定时间长度内所述第一参数低于设定的参数阈值的频率低于预设的频率阈值,则将所述应用程序的分辨率调整为第一分辨率。
  19. 一种存储介质,其上存储有计算机程序,其中,当所述计算机程序在计算机上运行时,使得所述计算机执行如下操作:
    在检测到应用程序运行时,确定所述应用程序是否属于预设的白名单;
    在所述应用程序属于预设的白名单时,按照设定的周期获取影响用户观看体验的第一参数;
    将所述第一参数与设定的阈值进行比较,根据比较结果调整所述应用程序的分辨率。
  20. 一种电子设备,包括存储器、处理器及存储在存储器上并可在处理器上运行的计算机程序,其中,所述处理器执行所述计算机程序时实现以下步骤:
    在检测到应用程序运行时,确定所述应用程序是否属于预设的白名单;
    在所述应用程序属于预设的白名单时,按照设定的周期获取影响用户观看体验的第一参数;
    将所述第一参数与设定的阈值进行比较,根据比较结果调整所述应用程序的分辨率。
PCT/CN2017/106939 2017-03-10 2017-10-19 应用程序的控制方法、装置、介质及电子设备 WO2018161584A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201710142845.8 2017-03-10
CN201710142845.8A CN106951054B (zh) 2017-03-10 2017-03-10 一种应用程序的控制方法、装置及移动终端

Publications (1)

Publication Number Publication Date
WO2018161584A1 true WO2018161584A1 (zh) 2018-09-13

Family

ID=59467250

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2017/106939 WO2018161584A1 (zh) 2017-03-10 2017-10-19 应用程序的控制方法、装置、介质及电子设备

Country Status (2)

Country Link
CN (1) CN106951054B (zh)
WO (1) WO2018161584A1 (zh)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112612507A (zh) * 2020-12-23 2021-04-06 中国工商银行股份有限公司 灰度验证方法、装置、电子设备和存储介质
CN115915543A (zh) * 2022-11-25 2023-04-04 深圳市爱图仕影像器材有限公司 一种智能灯具的光效实现方法、装置、设备和介质
CN117579887A (zh) * 2023-11-23 2024-02-20 南月(广州)机器人科技有限公司 一种用于物联网竞技的终端智能控制系统

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106951054B (zh) * 2017-03-10 2020-03-10 Oppo广东移动通信有限公司 一种应用程序的控制方法、装置及移动终端
CN108154853A (zh) * 2017-11-27 2018-06-12 国网北京市电力公司 硅基液晶显示设备的控制方法
CN108648259B (zh) * 2018-03-27 2022-07-15 Oppo广东移动通信有限公司 图像绘制方法、装置、存储介质及智能终端
CN109147715A (zh) * 2018-08-28 2019-01-04 武汉华星光电技术有限公司 用于降低显示面板功耗的方法及低功耗的显示装置
CN113051010B (zh) * 2019-12-28 2023-04-28 Oppo(重庆)智能科技有限公司 一种穿戴设备中应用画面调整方法及相关装置
CN112631140B (zh) * 2020-12-15 2022-08-26 重庆电子工程职业学院 家居用电管理控制系统

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050270283A1 (en) * 2003-07-16 2005-12-08 Plut William J Methods for spatial-based power savings
CN103593155A (zh) * 2013-11-06 2014-02-19 华为终端有限公司 显示帧生成方法和终端设备
CN103956145A (zh) * 2014-03-27 2014-07-30 深圳市中兴移动通信有限公司 一种终端显示模式确定方法及装置
CN104820537A (zh) * 2015-04-22 2015-08-05 广东欧珀移动通信有限公司 一种调整终端显示效果的方法及装置
CN106951054A (zh) * 2017-03-10 2017-07-14 广东欧珀移动通信有限公司 一种应用程序的控制方法、装置及移动终端

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9158358B2 (en) * 2013-06-04 2015-10-13 Qualcomm Incorporated System and method for intelligent multimedia-based thermal power management in a portable computing device
CN104243720A (zh) * 2013-06-24 2014-12-24 中兴通讯股份有限公司 一种终端设备的节电方法及终端设备
CN103631359A (zh) * 2013-11-15 2014-03-12 联想(北京)有限公司 一种信息处理方法及电子设备
CN104777980B (zh) * 2015-04-22 2017-08-11 广东欧珀移动通信有限公司 一种高分辨率终端的省电方法和装置
CN104978947B (zh) * 2015-07-17 2018-06-05 京东方科技集团股份有限公司 显示状态的调节方法、显示状态调节装置及显示装置
CN106097952B (zh) * 2016-06-29 2019-12-27 深圳市富优镁科技有限公司 一种终端显示屏分辨率调整方法和终端

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050270283A1 (en) * 2003-07-16 2005-12-08 Plut William J Methods for spatial-based power savings
CN103593155A (zh) * 2013-11-06 2014-02-19 华为终端有限公司 显示帧生成方法和终端设备
CN103956145A (zh) * 2014-03-27 2014-07-30 深圳市中兴移动通信有限公司 一种终端显示模式确定方法及装置
CN104820537A (zh) * 2015-04-22 2015-08-05 广东欧珀移动通信有限公司 一种调整终端显示效果的方法及装置
CN106951054A (zh) * 2017-03-10 2017-07-14 广东欧珀移动通信有限公司 一种应用程序的控制方法、装置及移动终端

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112612507A (zh) * 2020-12-23 2021-04-06 中国工商银行股份有限公司 灰度验证方法、装置、电子设备和存储介质
CN115915543A (zh) * 2022-11-25 2023-04-04 深圳市爱图仕影像器材有限公司 一种智能灯具的光效实现方法、装置、设备和介质
CN117579887A (zh) * 2023-11-23 2024-02-20 南月(广州)机器人科技有限公司 一种用于物联网竞技的终端智能控制系统

Also Published As

Publication number Publication date
CN106951054A (zh) 2017-07-14
CN106951054B (zh) 2020-03-10

Similar Documents

Publication Publication Date Title
WO2018161584A1 (zh) 应用程序的控制方法、装置、介质及电子设备
WO2018161571A1 (zh) 动态调节终端的节能等级的方法、装置、介质及电子设备
AU2017306385B2 (en) Display driving method, display driver integrated circuit for supporting the same, electronic device including the display driver integrated circuit
WO2018161585A1 (zh) 电子设备帧率的控制方法、装置、存储介质及电子设备
WO2020256460A1 (en) Apparatus and method for driving display based on frequency operation cycle set differently according to frequency
WO2018161578A1 (zh) 动态调节屏幕刷新率的方法、装置、存储介质及电子设备
WO2018182287A1 (ko) 디스플레이의 저전력 구동 방법 및 이를 수행하는 전자 장치
WO2021162436A1 (en) Electronic device including display and method for operating the same
WO2018182296A1 (ko) 전자 장치 및 전자 장치의 화면 공유 방법
WO2018161586A1 (zh) 移动终端的显示场景识别方法、装置、存储介质及电子设备
WO2016171433A1 (en) Display apparatus and method for controlling the same
WO2017155326A1 (en) Electronic device and method for driving display thereof
WO2018161602A1 (zh) 电子设备帧率的控制方法、装置、存储介质及电子设备
WO2018161601A1 (zh) 屏幕背光调节方法、装置、存储介质及电子设备
WO2022030996A1 (ko) 디스플레이를 포함하는 전자 장치 및 그의 동작 방법
WO2018161603A1 (zh) 移动终端图像绘制的控制方法、装置、介质及电子设备
WO2019124908A1 (ko) 영상 동기 신호에 기반하여 터치 센서 컨트롤러를 제어하기 위한 전자 장치 및 방법
WO2018161592A1 (zh) 切换背景灰阶进行省电的方法、装置、存储介质及电子设备
WO2018044052A1 (en) Method for displaying time information and electronic device supporting the same
WO2018161572A1 (zh) 移动终端帧率的控制方法、装置、存储介质及电子设备
EP3688747A1 (en) Electronic device and method for controlling output timing of signal corresponding to state in which content can be received based on display location of content displayed on display
WO2017078423A1 (en) Electronic device and method for controlling display thereof
WO2018161591A1 (zh) 切换背景灰阶进行省电的方法、装置、存储介质及电子设备
EP3479560A1 (en) Method for driving display including curved display area, display driving circuit supporting the same, and electronic device including the same
WO2018161580A1 (zh) 广播的控制方法、装置、存储介质及电子设备

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 17900174

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 17900174

Country of ref document: EP

Kind code of ref document: A1