Information processing method and electronic device
By detecting and reducing the display data processing volume of target applications, the problem of insufficient performance of electronic devices when running high-performance applications is solved, the user experience is improved, and the efficient utilization of resources is achieved.
Patent Information
- Application Number
- CN201810277368.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2018-03-30
- Publication Date
- 2024-11-26
- Estimated Expiration
- 2038-03-30
AI Technical Summary
When existing electronic devices run high-performance applications, they are prone to screen lag caused by insufficient performance, which affects the user experience.
By detecting the running status of the target application, obtaining status information. When the status information meets the preset conditions, the data processing amount per unit time of the target application is reduced, for example, receiving the number of calls to display data processing functions through the detection module or setting the detection module To determine the display data processing amount and skip drawing of some frames in the drawing function.
It effectively reduces the demand for electronic device resources of the target application, improves the user experience, and uses less resources to meet the operation of the application, reducing performance requirements.
Smart Images

Figure CN108509318B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of information processing technology, and more specifically to an information processing method and electronic equipment. Background Art
[0002] Currently, electronic devices are very powerful and can run various types of applications. However, some applications have very high performance requirements for electronic devices. For example, in the case of game apps, since the game screens of current mainstream game apps are very gorgeous and realistic, the processor of the electronic device needs to have high processing power and the electronic device needs to have a large memory in order for the game app to run smoothly on the electronic device.
[0003] Then, during the operation of the above-mentioned applications, problems may occur due to the performance of the electronic device not meeting the requirements, such as screen freezes in the operation of a game APP, thus affecting the user experience. Summary of the invention
[0004] In view of this, the present application provides an information processing method and an electronic device to solve the above technical problems.
[0005] To achieve the above objectives, this application provides the following technical solutions:
[0006] An information processing method, comprising:
[0007] Detect the operation of the target application;
[0008] When it is determined that the target application is running, obtaining status information;
[0009] If at least the state information satisfies a preset condition, the display data processing amount per unit time of the target application is reduced.
[0010] Preferably, the state information includes: the processing capability of the electronic device for displaying data per unit time and / or the processing amount of display data per unit time of the target application;
[0011] The processing capacity of the display data per unit time reaches a first threshold, and / or the display data processing volume per unit time of the target application reaches a preset display data processing volume per unit time, which is used to indicate that the status information meets preset conditions.
[0012] Preferably, obtaining the display data processing amount per unit time of the target application includes:
[0013] The display data processing function in the process of the target application is detected by a detection module to determine the display data processing amount per unit time of the target application.
[0014] Preferably, detecting the display data processing function in the process of the target application by a detection module to determine the display data processing amount per unit time comprises:
[0015] Receiving, by a detection module, a display data processing amount per unit time sent by a display data processing function in a process of the target application program;
[0016] Alternatively, determine a detection module set at a display data processing function in the process of the target application, detect the number of times the detection module is called by the display data processing function within a preset time period, and determine the display data processing amount per unit time of the target application based at least on the preset time period and the number of calls.
[0017] Preferably, the display processing function refers to a drawing function for drawing a display screen output by the target application, and reducing the display data processing amount per unit time of the target application includes:
[0018] After the drawing function draws a frame, when preparing to draw the next adjacent frame, the detection module is used to directly return a drawing success message to the display data processing function, so that the drawing function skips drawing the next adjacent frame.
[0019] Preferably, the display data processing amount per unit time of the target application is the current display frame rate of the target application. Then, reducing the current display frame rate of the target application includes:
[0020] When the target application displays pictures at a first display frame rate, deleting N frames every M frames, so that the target application displays pictures at a second display frame rate;
[0021] Wherein, M and N are both any positive integers.
[0022] 7. The method according to claim 1, wherein:
[0023] The target application is an application whose operating parameters satisfy preset operating parameters.
[0024] 8. The method according to claim 7, wherein the target application is determined in at least one of the following ways:
[0025] Determine whether the current process has loaded a resource file, and if so, determine that the application to which the current process belongs is the target application;
[0026] Determine whether the usage rate of the processing capacity of the electronic device for displaying images per unit time is greater than a second threshold after the new process is created, and if so, determine that the application to which the created new process belongs is the target application;
[0027] Determine whether the processing capacity of the electronic device for storing data per unit time is greater than a third threshold after the new process is created, and if so, determine that the application to which the created new process belongs is the target application;
[0028] Obtaining a directory of a current process, determining whether a storage processing volume corresponding to the directory is greater than a fourth threshold, and if so, determining that an application to which the current process belongs is a target application;
[0029] An application identifier of a currently running application is obtained, and it is determined whether the application identifier is an identifier in a pre-established application identifier list. If so, the application is determined to be a target application.
[0030] An electronic device, comprising:
[0031] A processor, configured to detect the operation of a target application, and when it is determined that the target application is operating, obtain state information, and if at least the state information satisfies a preset condition, reduce the display data processing amount per unit time of the target application;
[0032] A memory is used to store programs running on the processor.
[0033] An electronic device, comprising:
[0034] A detection unit, used to detect the operation of the target application;
[0035] an acquisition unit, configured to acquire status information when the detection unit determines that the target application is running;
[0036] The processing unit is used to reduce the display data processing amount per unit time of the target application program if at least the state satisfies a preset condition.
[0037] It can be seen from the above technical solution that, compared with the prior art, the embodiment of the present application discloses an information processing method, which detects the operation of a target application, and obtains status information when it is determined that a target application is running, thereby reducing the display data processing volume per unit time of the target application when at least the status information meets a preset condition. The reduction in the display data processing volume per unit time of the target application reduces the performance requirements of the electronic device during the operation of the target application, that is, the operation of the target application can be met by utilizing relatively fewer resources of the electronic device, thereby improving the user experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying any creative work.
[0039] Figure 1 A flowchart of an information processing method disclosed in Embodiment 1 of the present application;
[0040] Figure 2 A flowchart of an information processing method disclosed in Embodiment 2 of the present application;
[0041] Figure 3 This is a schematic diagram of the structure of an electronic device disclosed in the first embodiment of the device of the present application;
[0042] Figure 4 This is a schematic diagram of the structure of an electronic device disclosed in Embodiment 5 of the device of the present application. DETAILED DESCRIPTION
[0043] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0044] The first embodiment of the present application discloses an information processing method, such as Figure 1 As shown, the method comprises the following steps:
[0045] Step 101: Detect the operation of the target application;
[0046] The information processing method disclosed in the present application can be applied to electronic devices, and the electronic devices can be various terminals that are loaded with or can be loaded with application programs, such as mobile phones, tablet computers, and notebooks.
[0047] The target application is an application that has high performance requirements on the electronic device during operation. Then, if it is determined whether the application running in the electronic device is the target application, it can be determined whether the newly started application is the target application when a new application is started on the electronic device. When an application is started, the process of the application is created accordingly. Then, it can be determined whether a new application is running by monitoring whether a new process is currently created on the electronic device.
[0048] If the operating system of the electronic device is Windows, then the Windows management instruction WMI can be used to monitor whether a new process is currently being created.
[0049] When a new application is running on the electronic device, the operating parameters of the currently running application can be obtained to determine whether the operating parameters of the currently running application meet the preset operating parameters. If yes, the currently running application is determined to be the target application. That is, the target application is an application whose operating parameters meet the preset operating parameters.
[0050] The target application may be determined in at least one of the following ways:
[0051] (1) Determine whether the current process has loaded a resource file, and if so, determine that the application to which the current process belongs is the target application.
[0052] The application loaded with the resource file is the target application, and the resource file can be a dynamic link library, and more specifically, a dynamic link library of a multimedia editing interface type, which is abbreviated as DLL, which is the abbreviation of Dynamic Link Library. The multimedia interface can be Direct X, for example.
[0053] (2) determining whether the usage rate of the processing capacity of the electronic device for displaying images per unit time is greater than a second threshold after the new process is created; if so, determining that the application to which the newly created process belongs is the target application.
[0054] In this way, the second threshold can be preset based on actual conditions. After creating a new process, if the processing capability of the electronic device to display images per unit time is greater than the second threshold, it means that the application to which the newly created process belongs is the target application.
[0055] The processing capability of the electronic device for displaying an image per unit time may include the usage rate of a graphics processor of the electronic device.
[0056] (3) After the new process is created, it is determined whether the processing capacity of the electronic device for storing data per unit time is greater than a third threshold; if so, the application to which the newly created process belongs is determined to be the target application.
[0057] In this way, the third threshold value can be preset based on actual conditions. After the new process is created, if the unit time of the electronic device is greater than the third threshold value, it means that the application to which the newly created process belongs is the target application.
[0058] The processing capability of the electronic device for storing data per unit time may include the occupancy rate of the video memory of the electronic device.
[0059] That is to say, the target application will use more resources of the graphics processor or use a larger video memory when running. For example, since the pictures of large games are very realistic and gorgeous, the graphics processor or video memory needs to provide more resources.
[0060] (4) Obtain a directory of the current process, determine whether the storage processing volume corresponding to the directory is greater than a fourth threshold, and if so, determine that the application to which the current process belongs is the target application.
[0061] In the electronic device, each process has a directory corresponding to it. If the storage processing volume corresponding to the directory is greater than the fourth threshold, it means that the application to which the process belongs is the target application. The specific value of the fourth threshold can be preset based on actual conditions.
[0062] It should be noted that, since the target application is determined by at least one of the above methods, that is to say, the target application may only meet one of the above conditions, or meet at least two of the above conditions. Taking the case where the target application meets two conditions as an example, it can be determined that the current process has loaded a resource file, and the directory of the current process is obtained, and the application to which the current process belongs whose storage processing volume corresponding to the directory is greater than the fourth threshold is the target application.
[0063] Step 102: When it is determined that the target application is running, obtaining status information;
[0064] The status information may include status information of the electronic device itself and / or status information of the target application.
[0065] Step 103: If at least the state information satisfies a preset condition, the display data processing amount per unit time of the target application is reduced.
[0066] When the status information meets the preset condition, it indicates that the target application currently occupies too many resources of the electronic device, so the display data processing amount per unit time of the target application is reduced.
[0067] In the present application, the display data processing amount per unit time of the target application includes at least the processed display data amount per unit time and the display data to be processed amount per unit time. The processed display data amount per unit time refers to the display data processing amount per unit time of the target application that has been processed, and the display data to be processed amount per unit time refers to the display data processing amount per unit time of the target application that has not been processed but is about to be processed. The current processing performance of the electronic device is generally affected by the display data to be processed per unit time, so preferably, reducing the display data processing amount per unit time of the target application may include: reducing the display data to be processed per unit time of the target application.
[0068] It can be seen that in this embodiment, by detecting the operation of the target application, when it is determined that the target application is running, status information is obtained, thereby reducing the display data processing volume per unit time of the target application when at least the status information meets the preset conditions. The reduction in the display data processing volume per unit time of the target application reduces the performance requirements of the electronic device during the operation of the target application, that is, the operation of the target application can be met by utilizing relatively fewer resources of the electronic device, thereby improving the user experience.
[0069] In the present application, the above-mentioned status information may include: the processing capability of the electronic device for displaying data per unit time, and / or the display data processing volume per unit time of the target application.
[0070] Specifically, the electronic device's display data processing capacity per unit time reaches a first threshold value, which is used to characterize that the status information meets the preset conditions; and / or the display data processing volume per unit time of the target application reaches a preset display data processing volume per unit time, which is used to characterize that the status information meets the preset conditions.
[0071] The processing capability of the electronic device to display data per unit time includes the utilization rate of the hardware resources of the electronic device. Specifically, the utilization rate of the hardware resources may include the utilization rate of the central processing unit CPU and / or the utilization rate of the graphics processing unit GPU.
[0072] The display data processing amount per unit time of the target application may refer to the processed amount per unit time of the target application. Among them, the display data processing amount per unit time of the target application may refer to the display frame rate of the output display screen of the target application. Then, as a specific example, by detecting the operation of the target application, when it is determined that the target application is running, the processing capacity of the electronic device for display data per unit time is obtained, and when the display processing capacity per unit time of the electronic device reaches a first threshold, the display frame rate of the output display screen of the target application is reduced.
[0073] As another specific example, the operation of the target application can be detected, and when it is determined that the target application is running, the display frame rate of the display picture output by the target application is obtained, so that when the display frame rate of the output display picture reaches the preset display frame rate, the display frame rate of the display picture to be output by the target application is reduced.
[0074] The second embodiment of the present application discloses an information processing method, such as Figure 2 The information processing method comprises the following steps:
[0075] Step 201: Detect the operation of the target application;
[0076] Step 202: when it is determined that the target application is running, a detection module is used to detect a display data processing function in the process of the target application to determine a display data processing amount per unit time of the target application;
[0077] The display data processing function is used to process the display data of the target application. Optionally, if the display data processing amount of the target application refers to the display frame rate of the display screen output by the target application, then the display data processing function can specifically be a drawing function for drawing the display screen output by the target application, such as a Present drawing function.
[0078] The detection module is specifically a detection program for detecting the display data processing amount per unit time of the target application program, and can be specifically a hook program module, also called a Hook program module.
[0079] In one method, a detection module is used to detect the display data processing function in the process of the target application, and determining the display data processing amount per unit time includes: receiving the display data processing amount per unit time sent by the display data processing function in the process of the target application through the detection module.
[0080] That is, the display data processing function may send its display data processing amount per unit time to the detection module.
[0081] In another manner, the display data processing function in the process of the target application is detected by a detection module, and the display data processing amount per unit time is determined, including: determining the detection module set at the display data processing function in the process of the target application, detecting the number of times the detection module is called by the display data processing function within a preset time period, and determining the display data processing amount per unit time of the target application based at least on the preset time period and the number of calls.
[0082] A detection module is provided at the display data processing function. Specifically, the detection module may be a detection module originally provided at the display data processing function in the target application, or the detection module may be a display data processing function added to the process of the target application through a management application.
[0083] Regarding adding a monitoring module to the display data processing function in the process of the target application through the management application, the detection module can be injected at the target position of the display data processing function in the process of the target application to detect the display data processing volume per unit time of the target application.
[0084] Among them, the detection module can be injected into the target position of the display data processing function by using the Hook injection technology. Generally, the detection module only needs to be injected into the display data processing function before processing the display, such as injecting the detection module into the starting position of the display data processing function.
[0085] Due to the addition of the detection module, the display data processing function will first call the detection module before processing the display, so the number of times the detection module is called by the drawing function within a preset time period can be detected. For example, the number of times the display data processing function is called in 1 second. Therefore, the display data processing amount per unit time is calculated based on at least the preset time period and the number of calls, that is, the display data processing amount per unit time is obtained by dividing the number of calls by the preset time period.
[0086] Step 203: If at least the display data processing amount per unit time of the target application reaches a preset display data processing amount per unit time, reduce the display data processing amount per unit time of the target application.
[0087] It can be seen that in this embodiment, by detecting the operation of the target application, when it is determined that the target application is running, status information is obtained, thereby reducing the display data processing volume per unit time of the target application when at least the status information meets the preset conditions. The reduction in the display data processing volume per unit time of the target application reduces the performance requirements of the electronic device during the operation of the target application, that is, the operation of the target application can be met by utilizing relatively fewer resources of the electronic device, thereby improving the user experience.
[0088] Embodiment 3 of the method of the present application discloses an information processing method, which, when a display processing function refers to a drawing function used to draw a display screen output by the target application, reduces the display data processing amount per unit time of the target application, including: after the drawing function draws a frame of screen, when preparing to draw the next adjacent frame of screen, using the detection module to directly return a drawing success message to the drawing function, so that the drawing function skips the drawing of the next adjacent frame of screen.
[0089] It should be noted that although the drawing function skips the drawing of the next frame after drawing a frame, for the drawing function itself, as long as it receives a message of successful drawing, the drawing function determines that it has achieved the drawing of the next frame. In the present application, the drawing function can be controlled to skip the drawing of multiple frames continuously, that is, the drawing function can be controlled to skip the drawing of N frames every time M frames are drawn, and M and N are both positive integers greater than or equal to 1.
[0090] The fourth embodiment of the method of the present application further discloses an information processing method, wherein when the display data processing amount per unit time of the target application is the current display frame rate of the target application, reducing the current display frame rate of the target application includes:
[0091] When the target application displays pictures at the first display frame rate, N frames are deleted every M frames, so that the target application displays pictures at the second display frame rate.
[0092] Wherein, both M and N are positive integers.
[0093] Since the second display frame rate is determined on the basis of the first display frame rate after deleting N frames every M frames, the second display frame rate is lower than the first display frame rate.
[0094] Corresponding to the above-mentioned information processing method, the present application also discloses an electronic device. Specifically, the first embodiment of the present application discloses an electronic device, such as Figure 3 The electronic device comprises: a processor 100 and a memory 200, wherein:
[0095] The processor 100 is used to detect the operation of the target application, and when it is determined that the target application is running, obtain status information, and if at least the status information meets a preset condition, reduce the display data processing amount per unit time of the target application.
[0096] The target application is an application that has high performance requirements on the electronic device during operation. When a new application is started on the electronic device, the processor can be used to determine whether the newly started application is the target application. When an application is started, the process of the application is also created accordingly. Then, the processor can determine whether a new application is running by monitoring whether a new process is currently created on the electronic device.
[0097] If the operating system of the electronic device is a Windows system, the processor can monitor whether a new process is currently created through the Windows management instruction WMI.
[0098] Specifically, the processor can be used to obtain the operating parameters of the currently running application when a new application is running on the electronic device, so as to determine whether the operating parameters of the currently running application meet the preset operating parameters, and if so, determine that the currently running application is the target application. That is, the target application is an application whose operating parameters meet the preset operating parameters.
[0099] (1) The processor is used to determine whether the current process has loaded a resource file, and if so, determine that the application to which the current process belongs is the target application.
[0100] The application loaded with the resource file is the target application, and the resource file can be a dynamic link library, and more specifically, a dynamic link library of a multimedia editing interface type, which is abbreviated as DLL, which is the abbreviation of Dynamic Link Library. The multimedia interface can be Direct X, for example.
[0101] (2) The processor is used to determine whether the usage rate of the processing capacity of the electronic device for displaying images per unit time is greater than a second threshold after the new process is created. If so, determine that the application to which the newly created process belongs is the target application.
[0102] In this way, the second threshold can be preset based on actual conditions. After creating a new process, if the processing capability of the electronic device to display images per unit time is greater than the second threshold, it means that the application to which the newly created process belongs is the target application.
[0103] The processing capability of the electronic device for displaying an image per unit time may include the usage rate of a graphics processor of the electronic device.
[0104] (3) The processor is used to determine whether the processing capacity of the electronic device for storing data per unit time is greater than a third threshold after the new process is created. If so, determine that the application to which the newly created process belongs is the target application.
[0105] In this way, the third threshold value can be preset based on actual conditions. After the new process is created, if the unit time of the electronic device is greater than the third threshold value, it means that the application to which the newly created process belongs is the target application.
[0106] The processing capability of the electronic device for storing data per unit time may include the occupancy rate of the video memory of the electronic device.
[0107] That is to say, the target application will use more resources of the graphics processor or use a larger video memory when running. For example, since the pictures of large-scale games are very realistic and gorgeous, they need the resources provided by the graphics processor or video memory.
[0108] (4) The processor is used to obtain a directory of the current process, determine whether the storage processing volume corresponding to the directory is greater than a fourth threshold, and if so, determine that the application to which the current process belongs is the target application.
[0109] In the electronic device, each process has a directory corresponding to it. If the storage processing volume corresponding to the directory is greater than the fourth threshold, it means that the application to which the process belongs is the target application. The specific value of the fourth threshold can be preset based on actual conditions.
[0110] It should be noted that, since the target application is determined using at least one of the above methods, that is to say, the target application may satisfy only one of the above conditions, or satisfy at least two of the above conditions.
[0111] In the present application, the display data processing amount per unit time of the target application includes at least the processed display data amount per unit time and the display data to be processed amount per unit time. The processed display data amount per unit time refers to the display data processing amount per unit time of the target application that has been processed, and the display data to be processed amount per unit time refers to the display data processing amount per unit time of the target application that has not been processed but is about to be processed. The current processing performance of the electronic device is generally affected by the display data to be processed amount per unit time, so preferably, the processor is used to reduce the display data processing amount per unit time of the target application, specifically, the processor is used to reduce the display data to be processed amount per unit time of the target application.
[0112] The memory 200 is used to store programs running on the processor 100 .
[0113] It can be seen that in this embodiment, by detecting the operation of the target application, when it is determined that the target application is running, status information is obtained, thereby reducing the display data processing volume per unit time of the target application when at least the status information meets the preset conditions. The reduction in the display data processing volume per unit time of the target application reduces the performance requirements of the electronic device during the operation of the target application, that is, the operation of the target application can be met by utilizing relatively fewer resources of the electronic device, thereby improving the user experience.
[0114] In the present application, the above-mentioned status information may include: the processing capability of the electronic device for displaying data per unit time, and / or the display data processing volume per unit time of the target application.
[0115] Specifically, the electronic device's display data processing capacity per unit time reaches a first threshold value, which is used to characterize that the status information meets the preset conditions; and / or the display data processing volume per unit time of the target application reaches a preset display data processing volume per unit time, which is used to characterize that the status information meets the preset conditions.
[0116] The processing capability of the electronic device to display data per unit time includes the utilization rate of the hardware resources of the electronic device. Specifically, the utilization rate of the hardware resources may include the utilization rate of the central processing unit CPU and / or the utilization rate of the graphics processing unit GPU.
[0117] The display data processing amount per unit time of the target application may be referred to as the processed amount per unit time of the target application.
[0118] The display data processing amount per unit time of the target application may refer to the display frame rate of the output display screen of the target application. Then, as a specific example, the processor is used to detect the operation of the target application, and when it is determined that the target application is running, obtain the processing capacity of the electronic device for display data per unit time, and when the display processing capacity per unit time of the electronic device reaches a first threshold, reduce the display frame rate of the output display screen of the target application.
[0119] As another specific example, the processor is used to detect the operation of the target application, and when it is determined that the target application is running, obtain the display frame rate of the display picture output by the target application, so that when the display frame rate of the output display picture reaches the preset display frame rate, the display frame rate of the display picture to be output by the target application is reduced.
[0120] In the second embodiment of the device of the present application, the processor is used to obtain the display data processing volume per unit time of the target application. Specifically, the processor is used to detect the display data processing function in the process of the target application through a detection module to determine the display data processing volume per unit time of the target application.
[0121] Optionally, if the display data processing amount of the target application refers to a display frame rate of a display screen output by the target application, then the display data processing function may specifically be a drawing function for drawing the display screen output by the target application.
[0122] The detection module is specifically a detection program for detecting the display data processing amount per unit time of the target application program.
[0123] In one embodiment, the processor is specifically configured to receive, through the detection module, a display data processing amount per unit time sent by a display data processing function in a process of the target application.
[0124] In another embodiment, the processor is specifically used to determine a detection module set at a display data processing function in the process of the target application, detect the number of times the detection module is called by the display data processing function within a preset time period, and determine the display data processing amount per unit time of the target application based at least on the preset time period and the number of calls.
[0125] A detection module is provided at the display data processing function. Specifically, the detection module may be a detection module originally provided at the display data processing function in the target application, or the detection module may be a display data processing function added to the process of the target application through a management application.
[0126] Regarding adding a monitoring module to the display data processing function in the process of the target application through the management application, specifically, the processor can inject the detection module at the target position of the display data processing function in the process of the target application to detect the display data processing volume per unit time of the target application.
[0127] In the third embodiment of the device of the present application, when the display processing function refers to a drawing function for drawing the display screen output by the target application, the processor is used to reduce the display data processing amount per unit time of the target application, including: after the drawing function draws a frame of screen and prepares to draw the next adjacent frame of screen, the processor uses the detection module to directly return a drawing success message to the display data processing function, so that the drawing function skips the drawing of the next adjacent frame of screen.
[0128] In embodiment 4 of the device of the present application, when the display data processing amount per unit time of the target application is the current display frame rate of the target application, the processor is used to reduce the current display frame rate of the target application, including: when the target application displays the picture at a first display frame rate, the processor is used to delete N frames every M frames, so that the target application displays the picture at a second display frame rate.
[0129] Wherein, M and N are both any positive integers.
[0130] Corresponding to the above-mentioned information processing method, the present application also discloses another electronic device. Specifically, the fifth embodiment of the present invention discloses an electronic device, such as Figure 4 As shown, the electronic device includes a detection unit 401, an acquisition unit 402 and a processing unit 403, wherein:
[0131] A detection unit 401, used to detect the operation of a target application;
[0132] Specifically, the detection unit 401 can be used to determine whether a new application is a target application when a new application is started and run on the electronic device. When an application is started and run, the process of the application is also created accordingly. Then, the detection unit 401 can determine whether a new application is running by monitoring whether a new process is currently created on the electronic device.
[0133] When a new application is running on the electronic device, the detection unit 401 can be used to obtain the operating parameters of the currently running application, so as to determine whether the operating parameters of the currently running application meet the preset operating parameters, and if so, determine that the currently running application is the target application. That is, the target application is an application whose operating parameters meet the preset operating parameters.
[0134] The target application may be determined in at least one of the following ways:
[0135] (1) The detection unit 401 is used to determine whether the current process has loaded a resource file, and if so, determine that the application to which the current process belongs is the target application.
[0136] (2) The detection unit 401 is used to determine whether the usage rate of the processing capacity of the electronic device for displaying images per unit time is greater than a second threshold after the new process is created. If so, determine that the application to which the newly created process belongs is the target application.
[0137] (3) The detection unit 401 is used to determine whether the processing capacity of the electronic device for storing data per unit time is greater than a third threshold after the new process is created. If so, determine that the application to which the newly created process belongs is the target application.
[0138] (4) The detection unit 401 is used to obtain a directory of the current process, determine whether the storage processing volume corresponding to the directory is greater than a fourth threshold, and if so, determine that the application to which the current process belongs is the target application.
[0139] The acquisition unit 402 is used to acquire the status information when the detection unit 401 determines that the target application is running;
[0140] The status information may include status information of the electronic device itself and / or status information of the target application.
[0141] The processing unit 403 is configured to reduce the display data processing amount per unit time of the target application program if at least the state satisfies a preset condition.
[0142] When the status information meets the preset condition, it indicates that the target application currently occupies too many resources of the electronic device, so the display data processing amount per unit time of the target application is reduced.
[0143] In the present application, the display data processing amount per unit time of the target application includes at least the processed display data amount per unit time and the display data to be processed amount per unit time. The processed display data amount per unit time refers to the display data processing amount per unit time of the target application that has been processed, and the display data to be processed amount per unit time refers to the display data processing amount per unit time of the target application that has not been processed but is about to be processed. The current processing performance of the electronic device is generally affected by the display data to be processed per unit time, so preferably, the processing unit 403 can be specifically used to reduce the display data to be processed per unit time of the target application if at least the state meets the preset conditions.
[0144] In the present application, the above-mentioned status information may include: the processing capability of the electronic device for displaying data per unit time, and / or the display data processing volume per unit time of the target application.
[0145] Specifically, the electronic device's display data processing capacity per unit time reaches a first threshold value, which is used to characterize that the status information meets the preset conditions; and / or the display data processing volume per unit time of the target application reaches a preset display data processing volume per unit time, which is used to characterize that the status information meets the preset conditions.
[0146] The display data processing amount per unit time of the target application may refer to the processed amount per unit time of the target application. The display data processing amount per unit time of the target application may refer to the display frame rate of the display screen output by the target application.
[0147] In embodiment six of the device of the present application, the electronic device also includes a detection module, and the acquisition unit is used to obtain the display data processing volume per unit time of the target application, including: the acquisition unit is used to detect the display data processing function in the process of the target application through a detection module to determine the display data processing volume per unit time of the target application.
[0148] The display data processing function is used to process the display data of the target application. Optionally, if the display data processing amount of the target application refers to the display frame rate of the display screen output by the target application, then the display data processing function can specifically be a drawing function for drawing the display screen output by the target application.
[0149] The detection module is specifically a detection program for detecting the display data processing amount per unit time of the target application program.
[0150] In one embodiment, the acquisition unit is used to receive the display data processing amount per unit time sent by the display data processing function in the process of the target application through the detection module.
[0151] That is, the display data processing function may send its display data processing amount per unit time to the detection module.
[0152] In another manner, the acquisition unit is used to determine a detection module set at a display data processing function in the process of the target application, detect the number of times the detection module is called by the display data processing function within a preset time period, and determine the display data processing amount per unit time of the target application based at least on the preset time period and the number of calls.
[0153] A detection module is provided at the display data processing function. Specifically, the detection module may be a detection module originally provided at the display data processing function in the target application, or the detection module may be a display data processing function added to the process of the target application through a management application.
[0154] Regarding adding a monitoring module to the display data processing function in the process of the target application through the management application, the detection module can be injected at the target position of the display data processing function in the process of the target application to detect the display data processing volume per unit time of the target application.
[0155] Among them, the detection module can be injected into the target position of the display data processing function by using the Hook injection technology. Generally, the detection module only needs to be injected into the display data processing function before processing the display, such as injecting the detection module into the starting position of the display data processing function.
[0156] In Embodiment 7 of the device of the present application, when the display processing function refers to a drawing function for drawing a display screen output by the target application, the processing unit is used to reduce the display data processing amount per unit time of the target application, including: the processing unit is used to use the detection module to directly return a drawing success message to the display data processing function when the drawing function draws a frame and prepares to draw the next adjacent frame, so that the drawing function skips the drawing of the next adjacent frame.
[0157] In embodiment eight of the device of the present application, when the display data processing amount per unit time of the target application is the current display frame rate of the target application, the processing unit is used to reduce the current display frame rate of the target application, including: the processing unit is used to delete N frames every M frames when the target application displays the picture at a first display frame rate, so that the target application displays the picture at a second display frame rate.
[0158] Wherein, M and N are both any positive integers.
[0159] In this specification, each embodiment is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part.
[0160] The above description of the disclosed embodiments enables those skilled in the art to implement or use the present application. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to the embodiments shown herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. An information processing method, in, include: Detect the operation of the target application; When it is determined that the target application is running, obtaining status information; The state information includes: the processing volume of display data per unit time of the target application; If at least the state information satisfies a preset condition, reducing the display data processing amount per unit time of the target application; reducing the display data processing amount per unit time of the target application includes: reducing the display frame rate of the target application; Wherein, a detection module is used to detect the display data processing function in the process of the target application program to determine the display data processing amount per unit time of the target application program; The detecting the display data processing function in the process of the target application by a detection module to determine the display data processing amount per unit time of the target application includes: Determine a detection module set at a display data processing function in the process of the target application, detect the number of times the detection module is called by the display data processing function within a preset time period, and determine the display data processing amount per unit time of the target application based at least on the preset time period and the number of calls.
2. The method according to claim 1, in, The display data processing amount per unit time of the target application reaches a preset display data processing amount per unit time, which is used to indicate that the status information meets a preset condition; and / or, The state information also includes a processing capability of the electronic device to display data per unit time. The processing capability to display data per unit time reaching a first threshold is used to indicate that the state information meets a preset condition.
3. The method according to claim 1, in, The display data processing amount per unit time of the target application is the current display frame rate of the target application. Then, reducing the current display frame rate of the target application includes: When the target application displays pictures at a first display frame rate, deleting N frames every M frames, so that the target application displays pictures at a second display frame rate; Wherein, M and N are both any positive integers.
4. The method according to claim 1, in, The target application is an application whose operating parameters satisfy preset operating parameters.
5. The method according to claim 4, in, The target application is determined in at least one of the following ways: Determine whether the current process has loaded a resource file, and if so, determine that the application to which the current process belongs is the target application; Determine whether the usage rate of the processing capacity of the electronic device for displaying images per unit time is greater than a second threshold after the new process is created, and if so, determine that the application to which the created new process belongs is the target application; Determine whether the processing capacity of the electronic device for storing data per unit time is greater than a third threshold after the new process is created, and if so, determine that the application to which the created new process belongs is the target application; Obtaining a directory of a current process, determining whether a storage processing volume corresponding to the directory is greater than a fourth threshold, and if so, determining that an application to which the current process belongs is a target application; An application identifier of a currently running application is obtained, and it is determined whether the application identifier is an identifier in a pre-established application identifier list. If so, the application is determined to be a target application.
6. An electronic device, in, include: A processor, configured to detect the operation of a target application, and when it is determined that the target application is operating, obtain state information, and if at least the state information satisfies a preset condition, reduce the display data processing amount per unit time of the target application; The state information includes: the processing amount of display data per unit time of the target application; reducing the processing amount of display data per unit time of the target application includes: reducing the display frame rate of the target application; A memory for storing programs running on the processor; The processor detects the display data processing function in the process of the target application through a detection module to determine the display data processing amount per unit time of the target application; The detecting the display data processing function in the process of the target application by a detection module to determine the display data processing amount per unit time of the target application includes: Determine a detection module set at a display data processing function in the process of the target application, detect the number of times the detection module is called by the display data processing function within a preset time period, and determine the display data processing amount per unit time of the target application based at least on the preset time period and the number of calls.
7. An electronic device, in, include: A detection unit, used to detect the operation of the target application; an acquisition unit, configured to acquire status information when the detection unit determines that the target application is running; The state information includes: the processing volume of display data per unit time of the target application; A processing unit, configured to reduce the display data processing amount per unit time of the target application if at least the state information satisfies a preset condition; the reducing the display data processing amount per unit time of the target application comprises: reducing the display frame rate of the target application; Wherein, a detection module is used to detect the display data processing function in the process of the target application program to determine the display data processing amount per unit time of the target application program; The detecting the display data processing function in the process of the target application by a detection module to determine the display data processing amount per unit time of the target application includes: Determine a detection module set at a display data processing function in the process of the target application, detect the number of times the detection module is called by the display data processing function within a preset time period, and determine the display data processing amount per unit time of the target application based at least on the preset time period and the number of calls.
Citation Information
Patent Citations
Method and system for achieving visual presentation of client side
CN103297393A
Information processing method and electronic device
CN103777889A
Resource management method for 3D game rendering engine
CN105183566A
Data processing method and electronic equipment
CN106201482A
Method and system for grading game qualities based on mobile terminal hardware
CN106815130A
