Game control method, mobile terminal and computer-readable storage medium

By monitoring and adjusting the graphical user interface refresh frequency of mobile terminal game applications, the problem of game smoothness is solved, ensuring the smooth operation and user experience of the game.

CN113975796BActive Publication Date: 2025-07-08NUBIA TECHNOLOGY CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111249793.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-10-26
Publication Date
2025-07-08
Estimated Expiration
2041-10-26

AI Technical Summary

Technical Problem

The existing technology cannot timely monitor and adjust the smoothness of mobile terminal game applications, resulting in game screen stuttering and affecting user experience.

Method used

By monitoring the refresh frequency of the target window of the mobile terminal's graphical user interface, determine the actual frame rate of the game application, and compare it with the preset refresh frequency, adjust the terminal's operating parameters according to the comparison results to ensure smooth operation.

Benefits of technology

Real-time monitoring and smooth operation of game applications are achieved, improving user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113975796B_ABST
    Figure CN113975796B_ABST
Patent Text Reader

Abstract

The present application provides a game control method. The method is applied to a mobile terminal and includes: running a game application program through the mobile terminal; obtaining the refresh frequency of a target window of the graphical user interface of the mobile terminal, where the target window is the window in the graphical user interface that displays the game application program; determining the operating parameters of the mobile terminal according to the comparison result between the refresh frequency and a preset refresh frequency; and controlling the mobile terminal to run the game application program according to the operating parameters. The present application also provides a mobile terminal and a computer-readable storage medium. Through the above method, the running condition of the game application program can be directly and objectively determined, and then the operating parameters of the mobile terminal can be adjusted in a timely manner so that the mobile terminal can run the game application program smoothly, thereby improving the user experience.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of network communication technologies, and particularly to a game control method, a mobile terminal, and a computer-readable storage medium. Background Art

[0002] With the rapid development of mobile terminals, the configuration of mobile terminals is getting higher and higher, which can support the demand for high data processing. Therefore, mobile terminals have become one of the important devices for e-sports. It has become a very common phenomenon to run game applications through mobile terminals to meet the growing entertainment needs. However, for real-time games, whether the game runs smoothly greatly affects the user experience. Therefore, improving the smoothness of game operation is not only the goal of game manufacturers, but also the goal of mobile terminal manufacturers.

[0003] There are many factors that affect the smoothness of game operation, including both network-side reasons and terminal-side reasons. At present, mobile terminal manufacturers have many methods to improve the game operation environment. For example, the optimization scheme for the network side is to determine whether the network environment meets the preset requirements by monitoring the network situation during game operation, and if not, improve the network environment; the optimization scheme for the terminal side is mainly to reduce the power consumption of the mobile terminal, thereby avoiding screen stuttering caused by excessive heat generation. However, in this method, it is necessary to monitor the temperature of the mobile terminal. However, when the temperature is too high and then cooling is carried out, the game screen may already start to run smoothly at this time. Therefore, in this way, it is impossible to avoid the occurrence of smoothness in a timely manner. Summary of the Invention

[0004] The main purpose of this application is to propose a game control method, a mobile terminal, and a computer-readable storage medium, aiming to be able to timely and objectively monitor the running situation of game applications, so as to control the mobile terminal to make the game application run smoothly before the user has significantly detected the occurrence of stuttering.

[0005] To achieve the above object, this application provides a game control method, which is applied to a mobile terminal, and the method includes:

[0006] Run a game application through the mobile terminal;

[0007] Obtain the refresh frequency of the target window of the graphical user interface of the mobile terminal, where the target window is the window in the graphical user interface that displays the game application;

[0008] Determine the running parameters of the mobile terminal according to the comparison result between the refresh frequency and the preset refresh frequency;

[0009] Control the mobile terminal to run the game application according to the operating parameters.

[0010] Optionally, the step of obtaining the refresh frequency of the target window of the graphical user interface of the mobile terminal includes:

[0011] Obtain the window manager of the operating system of the mobile terminal;

[0012] Determine the target layer corresponding to the game application through the window manager;

[0013] Obtain the refresh frequency of the target layer to determine the refresh frequency of the target window of the graphical user interface of the mobile terminal.

[0014] Optionally, the step of determining the target layer corresponding to the game application through the window manager includes;

[0015] Obtain the layer identifier of at least one layer included in the graphical user interface through the window manager;

[0016] Determine that the layer corresponding to the target layer identifier among the layer identifiers of the at least one layer is the target layer corresponding to the game application.

[0017] Optionally, the step of obtaining the refresh frequency of the target layer to determine the refresh frequency of the target window of the graphical user interface of the mobile terminal includes:

[0018] Obtain the time of the previous frame of each frame in the target layer;

[0019] Count the number of previous frames corresponding to each second according to the time of the previous frame of each frame;

[0020] Determine the refresh frequency of the target layer according to the number of previous frames to determine the refresh frequency of the target window of the graphical user interface of the mobile terminal.

[0021] Optionally, the target layer identifier is the layer identifier corresponding to the layer of the game application.

[0022] Optionally, the preset refresh frequency is the expected frame rate when the game application runs.

[0023] Optionally, the step of determining the operating parameters of the mobile terminal according to the comparison result between the refresh frequency and the preset refresh frequency includes:

[0024] Compare the refresh frequency with the expected frame rate when the game application runs;

[0025] When the refresh frequency matches the expected frame rate during the operation of the game application, maintain the current operating parameters of the mobile terminal;

[0026] When the refresh frequency does not match the expected frame rate during the operation of the game application, determine the corresponding operating parameters according to the game scenario corresponding to the game application.

[0027] Optionally, the step of determining the corresponding operating parameters according to the game scenario corresponding to the game application is:

[0028] Determine the current processor policy according to the game scenario corresponding to the game application and the pre-stored processor policies;

[0029] Adjust the frame rate of the processor and / or the target sub-processor corresponding to the frame-up thread according to the processor policy, where the processor includes at least two sub-processors.

[0030] This application also provides a mobile terminal, which includes: a touch screen; a processor;

[0031] A memory, connected to the processor, the memory contains control instructions, and when the processor reads the control instructions, it controls the mobile terminal to implement the above game control method.

[0032] This application also provides a computer-readable storage medium, which has one or more programs, and the one or more programs are executed by one or more processors to implement the above game control method.

[0033] The game control method, mobile terminal and computer-readable storage medium provided by this application run the game application through the mobile terminal; obtain the refresh frequency of the target window of the graphical user interface of the mobile terminal, and the target window is the window in the graphical user interface that displays the game application; according to the comparison result between the refresh frequency and the preset refresh frequency, determine the operating parameters of the mobile terminal; control the mobile terminal to run the game application according to the operating parameters. In the above manner, the refresh frequency of the window corresponding to the game application can be monitored in real time as the actual frame rate of the game application. By comparing the real-time frame rate with the preset refresh frequency for running the game application, it can be determined whether the current game application is running smoothly, and then the running situation of the game application can be directly and objectively determined. Furthermore, the operating parameters of the mobile terminal can be adjusted in time so that the mobile terminal can run the game application smoothly, thereby improving the user experience.

[0034] The above description is only an overview of the technical solution of the present invention. In order to understand the technical means of the present invention more clearly, it can be implemented according to the content of the description. And in order to make the above and other purposes, features and advantages of the present invention more obvious and understandable, the specific embodiments of the present invention are specifically given below. BRIEF DESCRIPTION OF THE DRAWINGS

[0035] Figure 1 FIG. is a schematic diagram of the hardware structure of an optional mobile terminal for implementing various embodiments of the present application;

[0036] Figure 2 As shown in Figure 1 FIG. is a schematic diagram of the communication network system of the mobile terminal shown;

[0037] Figure 3 FIG. is a flowchart of a game control method provided by an embodiment of the present application;

[0038] Figure 4 FIG. is a schematic diagram of obtaining layer information provided by an embodiment of the present application;

[0039] Figure 5 FIG. is a schematic diagram of the previous frame time column in the obtained layer provided by an embodiment of the present application;

[0040] Figure 6 FIG. is a schematic diagram of the structure of a mobile terminal provided by an embodiment of the present application.

[0041] The realization, functional features and advantages of the present application will be further described with reference to the embodiments and the accompanying drawings. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0042] It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.

[0043] In the following description, suffixes such as "module", "component" or "unit" used to represent elements are only for the convenience of description of the present invention, and have no specific meaning in themselves. Therefore, "module", "component" or "unit" can be used interchangeably.

[0044] The terminal can be implemented in various forms. For example, the terminal described in the present invention may include mobile terminals such as mobile phones, tablet computers, notebook computers, palmtop computers, personal digital assistants (PDAs), portable media players (PMPs), navigation devices, wearable devices, smart bracelets, pedometers, etc., and fixed terminals such as digital TVs, desktop computers, etc.

[0045] In the following description, a mobile terminal will be taken as an example for illustration. Those skilled in the art will understand that, except for the components specifically for mobile purposes, the structure according to the embodiments of the present invention can also be applied to fixed-type terminals.

[0046] Please refer to Figure 1 , which is a schematic diagram of the hardware structure of a mobile terminal for implementing various embodiments of the present invention. The mobile terminal 100 may include: an RF (Radio Frequency) unit 101, a WiFi module 102, an audio output unit 103, an A / V (audio / video) input unit 104, a sensor 105, a display unit 106, a user input unit 107, an interface unit 108, a memory 109, a processor 110, and a power supply 111, etc. Those skilled in the art can understand that Figure 1 the mobile terminal structure shown in

[0047] does not constitute a limitation to the mobile terminal. The mobile terminal may include more or fewer components than those shown in the figure, or combine some components, or have different component arrangements. Figure 1 The following will specifically introduce each component of the mobile terminal:

[0048] The radio frequency unit 101 can be used for receiving and sending information or signals during a call. Specifically, after receiving the downlink information from the base station, it is sent to the processor 110 for processing; in addition, the uplink data is sent to the base station. Generally, the radio frequency unit 101 includes, but is not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a low-noise amplifier, a duplexer, etc. In addition, the radio frequency unit 101 can also communicate with the network and other devices through wireless communication. The above wireless communication can use any communication standard or protocol, including but not limited to GSM (Global System of Mobile communication), GPRS (General Packet Radio Service), CDMA2000 (Code Division Multiple Access 2000), WCDMA (Wideband Code Division Multiple Access), TD-SCDMA (Time Division-Synchronous Code Division Multiple Access), FDD-LTE (Frequency Division Duplexing-Long Term Evolution), and TDD-LTE (Time Division Duplexing-Long Term Evolution), etc.

[0049] WiFi belongs to short-range wireless transmission technology. The mobile terminal can help users send and receive emails, browse the web, and access streaming media through the WiFi module 102, which provides users with wireless broadband Internet access. Although Figure 1 the WiFi module 102 is shown, it can be understood that it is not an essential component of the mobile terminal and can be omitted entirely within the scope of not changing the essence of the invention according to needs.

[0050] The audio output unit 103 can convert the audio data received by the radio frequency unit 101 or the WiFi module 102 or stored in the memory 109 into an audio signal and output it as sound when the mobile terminal 100 is in a call signal reception mode, a call mode, a recording mode, a voice recognition mode, a broadcast reception mode, etc. Moreover, the audio output unit 103 can also provide an audio output related to the specific functions executed by the mobile terminal 100 (such as a call signal reception sound, a message reception sound, etc.). The audio output unit 103 can include a speaker, a buzzer, etc.

[0051] The A / V input unit 104 is used to receive audio or video signals. The A / V input unit 104 may include a Graphics Processing Unit (GPU) 1041 and a microphone 1042. The GPU 1041 processes the image data of still pictures or videos obtained by an image capturing device (such as a camera) in a video capture mode or an image capture mode. The processed image frames can be displayed on the display unit 106. The image frames processed by the GPU 1041 can be stored in the memory 109 (or other storage media) or transmitted via the radio frequency unit 101 or the WiFi module 102. The microphone 1042 can receive sounds (audio data) via the microphone 1042 in operating modes such as a phone call mode, a recording mode, a voice recognition mode, etc., and can process such sounds into audio data. The processed audio (voice) data can be output in a format that can be transmitted to a mobile communication base station via the radio frequency unit 101 in the case of the phone call mode. The microphone 1042 can implement various types of noise cancellation (or suppression) algorithms to cancel (or suppress) the noise or interference generated during the reception and transmission of audio signals.

[0052] The mobile terminal 100 further includes at least one sensor 105, such as a light sensor, a motion sensor, and other sensors. Specifically, the light sensor includes an ambient light sensor and a proximity sensor. Among them, the ambient light sensor can adjust the brightness of the display panel 1061 according to the brightness of the ambient light, and the proximity sensor can turn off the display panel 1061 and / or the backlight when the mobile terminal 100 is moved to the ear. As a kind of motion sensor, the accelerometer sensor can detect the magnitude of acceleration in all directions (generally three axes), and can detect the magnitude and direction of gravity when stationary, and can be used in applications for identifying the posture of the mobile phone (such as horizontal and vertical screen switching, related games, magnetometer posture calibration), vibration recognition related functions (such as a pedometer, tapping), etc.; as for other sensors that the mobile phone can also be configured with, such as a fingerprint sensor, a pressure sensor, an iris sensor, a molecular sensor, a gyroscope, a barometer, a hygrometer, a thermometer, an infrared sensor, etc., they will not be elaborated here.

[0053] The display unit 106 is used to display information input by the user or information provided to the user. The display unit 106 may include a display panel 1061, and the display panel 1061 can be configured in the form of a Liquid Crystal Display (LCD), an Organic Light-Emitting Diode (OLED), etc.

[0054] The user input unit 107 can be used to receive input numerical or character information and generate key signal inputs related to the user settings and function control of the mobile terminal. Specifically, the user input unit 107 can include a touch panel 1071 and other input devices 1072. The touch panel 1071, also known as a touch screen, can collect touch operations of the user thereon or nearby (such as operations of the user using a finger, a stylus or any suitable object or accessory on or near the touch panel 1071), and drive the corresponding connection device according to a preset program. The touch panel 1071 can include two parts: a touch detection device and a touch controller. Among them, the touch detection device detects the touch position of the user and detects the signal brought by the touch operation, and transmits the signal to the touch controller; the touch controller receives the touch information from the touch detection device, converts it into contact coordinates, and then sends it to the processor 110, and can receive and execute the commands sent by the processor 110. In addition, the touch panel 1071 can be implemented in multiple types such as resistive, capacitive, infrared, and surface acoustic wave. In addition to the touch panel 1071, the user input unit 107 can also include other input devices 1072. Specifically, the other input devices 1072 can include but are not limited to one or more of a physical keyboard, function keys (such as volume control keys, power on / off keys, etc.), a trackball, a mouse, a joystick, etc., and specific details are not limited here.

[0055] Furthermore, the touch panel 1071 can cover the display panel 1061. After the touch panel 1071 detects a touch operation thereon or nearby, it transmits the operation to the processor 110 to determine the type of touch event. Subsequently, the processor 110 provides a corresponding visual output on the display panel 1061 according to the type of touch event. Although in Figure 1 the touch panel 1071 and the display panel 1061 are implemented as two independent components to realize the input and output functions of the mobile terminal, in some embodiments, the touch panel 1071 and the display panel 1061 can be integrated to realize the input and output functions of the mobile terminal, and specific details are not limited here.

[0056] The interface unit 108 serves as an interface through which at least one external device can be connected to the mobile terminal 100. For example, the external device can include a wired or wireless headset port, an external power supply (or battery charger) port, a wired or wireless data port, a memory card port, a port for connecting a device with an identification module, an audio input / output (I / O) port, a video I / O port, a headset port, and so on. The interface unit 108 can be used to receive inputs from external devices (such as data information, power, etc.) and transmit the received inputs to one or more components within the mobile terminal 100 or can be used to transmit data between the mobile terminal 100 and external devices.

[0057] The memory 109 can be used to store software programs and various data. The memory 109 mainly includes a program storage area and a data storage area. Among them, the program storage area can store the operating system, application programs required for at least one function (such as the sound playback function, the image playback function, etc.); the data storage area can store data created according to the use of the mobile phone (such as audio data, phone book, etc.). In addition, the memory 109 may include high-speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid-state storage devices.

[0058] The processor 110 is the control center of the mobile terminal, connecting various parts of the entire mobile terminal through various interfaces and lines. By running or executing the software programs and / or modules stored in the memory 109, and calling the data stored in the memory 109, it executes various functions of the mobile terminal and processes data, thereby monitoring the mobile terminal as a whole. The processor 110 may include one or more processing units; preferably, the processor 110 may integrate an application processor and a modulation and demodulation processor. Among them, the application processor mainly processes the operating system, user interface, and application programs, etc., and the modulation and demodulation processor mainly processes wireless communication. It can be understood that the above modulation and demodulation processor may not be integrated into the processor 110 either.

[0059] The mobile terminal 100 may also include a power supply 111 (such as a battery) for supplying power to each component. Preferably, the power supply 111 can be logically connected to the processor 110 through a power management system, so as to realize functions such as management of charging, discharging, and power consumption management through the power management system.

[0060] Although Figure 1 not shown, the mobile terminal 100 may also include a Bluetooth module, etc., which will not be elaborated here.

[0061] To facilitate the understanding of the embodiments of the present invention, the communication network system on which the mobile terminal of the present invention is based will be described below.

[0062] Please refer to Figure 2 , Figure 2 which is an architecture diagram of a communication network system provided by an embodiment of the present invention. This communication network system is an LTE system of the Universal Mobile Telecommunications Technology. The LTE system includes a UE (User Equipment) 201, an E-UTRAN (Evolved UMTS Terrestrial Radio Access Network) 202, an EPC (Evolved Packet Core) 203, and an operator's IP service 204 that are sequentially communicatively connected.

[0063] Specifically, the UE 201 may be the aforementioned terminal 100, which will not be elaborated here.

[0064] The E-UTRAN 202 includes an eNodeB 2021 and other eNodeBs 2022, etc. Among them, the eNodeB 2021 can be connected to other eNodeBs 2022 through a backhaul (such as the X2 interface), the eNodeB 2021 is connected to the EPC 203, and the eNodeB 2021 can provide access for the UE 201 to the EPC 203.

[0065] The EPC 203 may include an MME (Mobility Management Entity) 2031, an HSS (Home Subscriber Server) 2032, other MMEs 2033, an SGW (Serving Gate Way) 2034, a PGW (PDN Gate Way) 2035, a PCRF (Policy and Charging Rules Function) 2036, etc. Among them, the MME 2031 is a control node that processes the signaling between the UE 201 and the EPC 203 and provides bearer and connection management. The HSS 2032 is used to provide some registers to manage functions such as a home location register (not shown in the figure) and stores some user-specific information such as service characteristics and data rates. All user data can be sent through the SGW 2034. The PGW 2035 can provide IP address allocation for the UE 201 and other functions. The PCRF 2036 is a policy and charging control policy decision point for service data flows and IP bearer resources, and it selects and provides available policy and charging control decisions for a policy and charging enforcement functional unit (not shown in the figure).

[0066] The IP service 204 may include the Internet, an intranet, an IMS (IP Multimedia Subsystem), or other IP services, etc.

[0067] Although the above has been introduced by taking the LTE system as an example, those skilled in the art should be aware that the present invention is not only applicable to the LTE system, but also applicable to other wireless communication systems, such as GSM, CDMA2000, WCDMA, TD-SCDMA, and future new network systems, etc., which are not limited here.

[0068] Based on the above mobile terminal hardware structure and communication network system, various embodiments of the method of the present invention are proposed.

[0069] Current mobile terminals usually support dual-SIM dual standby, that is, the mobile terminal includes a first user identification card and a second user identification card, and both are registered for 4G. The two user identification cards of the mobile terminal are in permanent online mode, so that data can be quickly switched between the dual cards. However, when playing games, there are often freezes and 460 delays, and the game is set to reconnect. By analyzing a large number of user logs, many of them are because the secondary card, that is, the non-data service card, has some data packet paging from the server. At present, many mobile terminals are dual-SIM dual standby single-pass. If the second user identification card as the secondary card has data paging, it will grab resources, causing the main card to be the application on the data service card, such as the game freezes for a period of time, and the user experience is poor. Based on this, the present application provides a game control method.

[0070] Figure 3 This is a flowchart of an embodiment of a game control method provided by the present application. Once the method of this embodiment is triggered by the user, the process in this embodiment is automatically executed by the mobile terminal, wherein each step can be executed in the order shown in the flowchart, or multiple steps can be executed simultaneously according to the actual situation, which is not limited here. The game control method provided by the present application includes the following steps:

[0071] Step S310, running a game application via the mobile terminal;

[0072] Step S320, obtaining a refresh frequency of a target window of a graphical user interface of the mobile terminal, wherein the target window is a window in the graphical user interface that displays the game application;

[0073] Step S330, determining the operating parameters of the mobile terminal according to the comparison result between the refresh frequency and the preset refresh frequency;

[0074] Step S340: Control the mobile terminal to run the game application according to the running parameters.

[0075] Through the above implementation, the refresh frequency of the window corresponding to the game application can be monitored in real time as the actual frame rate of the game application. By comparing the real-time frame rate with the preset refresh frequency of the game application, it can be determined whether the current game application is running smoothly, and then the running status of the game application can be determined directly and objectively, and then the running parameters of the mobile terminal can be adjusted in time so that the mobile terminal can run the game application smoothly, thereby improving the user experience.

[0076] The above steps will be described in detail below in conjunction with specific embodiments.

[0077] Step S310: running a game application via the mobile terminal.

[0078] Specifically, the mobile terminal runs an operating system, and the operating system runs different applications, wherein the applications include applications that come with the operating system and may include third-party applications. A user can install different applications on the operating system to implement different functions. In this embodiment, the application is a game application, and the mobile terminal runs the game application by responding to a trigger instruction for the game application.

[0079] Step S320, obtaining a refresh frequency of a target window of a graphical user interface of the mobile terminal, wherein the target window is a window in the graphical user interface that displays the game application;

[0080] Specifically, the mobile terminal displays a graphical user interface on the display screen by running an operating system. The graphical user interface refers to a computer operation user interface displayed in a graphical manner. The operating system generates different windows on the graphical user interface to provide interactive windows corresponding to different applications, so that users can view the content provided by the application through different windows. Since the operating system of the mobile terminal can run multiple applications at the same time, the graphical user interface can provide multiple windows to display the interfaces of different applications.

[0081] In an optional implementation, step S320 may include the following steps:

[0082] Step S3201, obtaining a window manager of the operating system of the mobile terminal;

[0083] Step S3202, determining a target layer corresponding to the game application through the window manager;

[0084] Step S3203: Acquire the refresh frequency of the target layer to determine the refresh frequency of the target window of the graphical user interface of the mobile terminal.

[0085] Specifically, in the operating system of a mobile terminal, the window of the graphical user interface implements processes such as window creation, generation, and drawing of the graphical user interface at least through the window manager provided by the system, so as to finally display the final presentation content on the screen. Window management can be said to be the most complex part of the Android system, including but not limited to the window ManagerService, the SurfaceFlinger service, the shared memory of Linux, and the tmpfs file system, etc. Among them, the window ManagerService controls the addition and order of the Surface canvases, animations, and touch events; the SurfaceFlinger is used to control the blending of layers and transmit the results to the hardware display; in this process, each application is responsible for drawing the corresponding layer.

[0086] In an optional implementation manner, the steps of step S3202 may include the following steps:

[0087] Step S32021, obtaining, through the window manager, the layer identifier of at least one layer included in the graphical user interface;

[0088] Step S32022, determining that the layer corresponding to the target layer identifier in the layer identifiers of the at least one layer is the target layer corresponding to the game application.

[0089] Specifically, the target layer identifier corresponds to the layer identifier of the layer of the game application. When the operating system displays a window, it is implemented by means of layers. Different layers are arranged in different ways by calculating the hierarchical relationship between each other. Layers corresponding to different application types have specific identifiers. In game applications, the identifiers of the corresponding layers are usually identified by surfaceview. In specific implementation, SurfaceFlinger is an independent Service. It receives the Surface of all windows as input, calculates the position of each Surface in the final composite image according to parameters such as ZOrder, transparency, size, and position, and then hands it over to HWComposer or OpenGL to generate the final display Buffer, and then displays it on a specific display device. In Android, a window corresponds to a Surface one by one. The content of the window is changing, and the Surface needs space to record the content of the window at each moment. In the implementation of Android's SurfaceFlinger, usually a Surface has two Buffers, one for painting and one for display. The two Buffers are exchanged at a fixed frequency to achieve dynamic refreshing of the window. A layer is the basic operation unit for SurfaceFlinger to perform composition. Layers are created inside SurfaceFlinger when an application requests to create a Surface. Therefore, one Surface corresponds to one layer. When multiple layers are composed, not the entire space of the layer will be fully displayed. According to the final display effect of this layer, a layer can be divided into many regions. For example: a completely transparent region, and the region below it will be displayed; a completely opaque region, whether it is displayed depends on whether there is an occlusion or transparency above it; a visible region, including a completely opaque and unoccluded region or a semi-transparent region; an occluded region, above which there is an opaque or semi-transparent region; a region where the visible part changes, including a new occluded region and a new exposed region.

[0090] In specific implementation, the layer information included in the current graphical user interface can be retrieved through internal instructions. For example, by executing the command adb shell dumpsys SurfaceFlinger --list, the layer information as shown in Figure 4 can be obtained. Taking Figure 4 as an example, the topLayer of this game is: SurfaceView-com.tencent.tmgp.pubgmhd / com.epicgames.ue4.GameActivity#0

[0091] Therefore, the target layer corresponding to the game application is

[0092] com.tencent.tmgp.pubgmhd / com.epicgames.ue4.GameActivity#0

[0093] In step S3203, the update frequency of the content in the target window can be determined by obtaining the refresh frequency of the target layer. Since the content displayed in the target window is the content of the game application, for example, the game scene in the in-game state, therefore, by calculating and obtaining the refresh frequency of the target layer, the real-time refresh frequency of the game application, that is, the real-time frame rate, can be determined. In an optional embodiment, step S3203 may include the following steps:

[0094] Step S32031, obtain the previous frame time of each frame in the target layer;

[0095] Step S32032, count the number of previous frames corresponding to each second according to the previous frame time of each frame;

[0096] Step S32033, determine the refresh frequency of the target layer according to the number of previous frames to determine the refresh frequency of the target window of the graphical user interface of the mobile terminal.

[0097] Specifically, the application communicates with surfaceFlinger in the operating system to draw the current frame image to be drawn by sending a frame drawing instruction to surfaceFlinger. Different frames have corresponding previous frame times. The refresh frequency of the target window can be determined by counting the number of previous frames within a period of time. For example, in step S32031, the previous frame time of each frame in the target layer is obtained through the dump instruction. For example, by viewing the command:

[0098] adb shell dumpsys SurfaceFlinger--latency SurfaceView-com.tencent.tmgp.pubgmhd / com.epicgames.ue4.GameActivity#0, and the final result is as Figure 5 shown, where each line is the previous frame time, processing time, and display time on the screen of this target layer.

[0099] In step S32032, after obtaining the previous frame times of a certain number of frames in step S32031, the refresh frequency per second can be determined by counting the number of previous frame times within one second. For example, using a timer, execute the dump command once every 1 second, and calculate the number of fences within this 1 second, which is the frame rate of this game application.

[0100] Through the above steps, the upper frame time of each frame in the target layer for displaying the content of the game application can be determined, which can objectively reflect the real-time frame rate of the target layer, and thus can be determined as the real-time frame rate of the game application.

[0101] Step S330: Determine the operating parameters of the mobile terminal according to the comparison result between the refresh frequency and the preset refresh frequency;

[0102] Specifically, the preset refresh frequency is the expected frame rate when the game application runs. Since the refresh frequency is the real-time frame rate of the game application calculated previously, by comparing the refresh frequency with the preset refresh frequency, it is possible to objectively, directly and accurately determine the current running smoothness of the current game application, whether there is a lag that the user may not be able to clearly perceive, etc., and thus it is possible to reflect the control of the mobile terminal to control the running of the game application.

[0103] In an optional embodiment, step S330 may include the following steps:

[0104] Step S3301: Compare the refresh frequency with the expected frame rate when the game application runs;

[0105] Step S3302: When the refresh frequency matches the expected frame rate when the game application runs, maintain the current operating parameters of the mobile terminal;

[0106] Step S3303: When the refresh frequency does not match the expected frame rate when the game application runs, determine the corresponding operating parameters according to the game scene corresponding to the game application.

[0107] Specifically, in step S3301, by performing mathematical calculations such as taking the difference or ratio between the refresh frequency and the numerical value of the expected frame rate when the game application runs, the relationship between the refresh frequency and the expected frame rate when the game application runs can be determined. In step S3302, a matching threshold is determined in advance. For example, a range of differences between the refresh frequency and the expected frame rate is set, and as long as it is within this range of differences, it can be considered that the refresh frequency and the expected frame rate match. In this embodiment, when the refresh frequency and the expected frame rate match, it is considered that the current real-time running situation of the game application is in a smooth state. At this time, as long as the operating parameters used by the mobile terminal when currently running the game application are continued. For example, if the difference range corresponding to the matching threshold and the frame rate value is less than 5, then, if the real-time frame rate is 86, but the expected frame rate is 90, then, since the difference between the two is 4, within the range of differences, it is considered that the refresh frequency and the expected frame rate match.

[0108] In step S3303, if the refresh rate does not match the expected frame rate during the operation of the game application, it is considered that the operation of the game application is stuck at this time, and it is necessary to adjust the operation parameters of the mobile terminal to make the operation of the game application smooth. The operation parameters refer to the specific processing resource conditions of the mobile terminal when running the game application. For example, the memory of the processor, network broadband resources, etc.

[0109] In an optional implementation manner, step S3303 may include the following steps:

[0110] Step S33031, determine the current processor policy according to the game scene corresponding to the game application and the pre-stored processor policies;

[0111] Step S33032, adjust the frame rate of the processor and / or the target sub-processor corresponding to the frame-up thread according to the processor policy, where the processor includes at least two sub-processors.

[0112] Specifically, in this implementation manner, if it is determined that the real-time frame rate of the game application does not match the expected frame rate, the corresponding processor policy will be determined according to the current game scene of the game application. Because, the requirements for game smoothness are also different in different game scenes. For example, in the driving scene, a relatively smooth operation effect is required. Otherwise, when driving, it is easy to cause the vehicle to collide. In the game scene, since the running speed of the virtual character is not very fast, at the same time, in this scene, there is no need for overly complex game operations. Because, the requirements for game smoothness are not very high. Thus, it can be seen that different game scenes have different requirements for game smoothness, that is, the real-time frame rate of the game. Therefore, in this implementation manner, the corresponding relationship between different game scenes and processor policies is pre-stored, and the current processor policy can be determined through the game scene corresponding to the game application and the pre-stored processor policies. In this implementation scheme, the processor policy is the adjustment of the frame rate of the processor and / or the deployment scheme of specific processor cores.

[0113] In step S33032, when it is considered that it is necessary to improve the running fluency of the game application by adjusting the running parameters, the processing capacity for the game application can be improved by increasing the frame rate of the processor. At the same time, the processor core of the thread that processes and draws the screen content in the drawing layer can also be adjusted. Specifically, the processor has different cores, and different cores are different sub-processors. For example, in an octa-core processor, there are two groups of quad-core processors, namely: the large quad-core and the small quad-core. Among them, the large quad-core is a group with stronger performance and higher main frequency, and the small quad-core is a group with weaker performance, lower main frequency, but lower power consumption. For example, according to the interface provided by the system framework, the frequency of the CPU is adjusted in real time, as well as the CPU on which the current game frame-up thread runs. If the frame-up thread runs on the medium and small cores, arrange the frame-up thread to run on the large core, and allocate more hardware resources to the game, so as to dynamically solve the problem of user game lag.

[0114] Step S340, control the mobile terminal to run the game application according to the running parameters.

[0115] Through the game control method provided above, the refresh frequency of the window corresponding to the game application can be monitored in real time as the actual frame rate of the game application. By comparing the real-time frame rate with the preset refresh frequency of running the game application, it can be determined whether the current game application is running smoothly. Furthermore, the running situation of the game application can be directly and objectively determined, and then the running parameters of the mobile terminal can be adjusted in time so that the mobile terminal can run the game application smoothly, thereby improving the user experience.

[0116] Figure 6 FIG. 100 is a schematic structural diagram of a mobile terminal 100 provided in an embodiment of the present application. The mobile terminal 100 includes: a touch panel 1071; a processor 110; a memory 109 connected to the processor 110. The memory 109 contains control instructions. When the processor 110 reads the control instructions, it controls the mobile terminal 100 to implement the following steps:

[0117] Run a game application through the mobile terminal;

[0118] Obtain the refresh frequency of the target window of the graphical user interface of the mobile terminal, where the target window is the window that displays the game application in the graphical user interface;

[0119] Determine the running parameters of the mobile terminal according to the comparison result between the refresh frequency and the preset refresh frequency;

[0120] Control the mobile terminal to run the game application according to the running parameters.

[0121] Optionally, the step of obtaining the refresh frequency of the target window of the graphical user interface of the mobile terminal includes:

[0122] Obtain the window manager of the operating system of the mobile terminal;

[0123] Determine the target layer corresponding to the game application through the window manager;

[0124] Obtain the refresh frequency of the target layer to determine the refresh frequency of the target window of the graphical user interface of the mobile terminal.

[0125] Optionally, the step of determining the target layer corresponding to the game application through the window manager includes;

[0126] Obtain the layer identifier of at least one layer included in the graphical user interface through the window manager;

[0127] Determine the layer corresponding to the target layer identifier in the layer identifiers of the at least one layer as the target layer corresponding to the game application.

[0128] Optionally, the step of obtaining the refresh frequency of the target layer to determine the refresh frequency of the target window of the graphical user interface of the mobile terminal includes:

[0129] Obtain the previous frame time of each frame in the target layer;

[0130] Statistically count the number of previous frames corresponding to each second according to the previous frame time of each frame;

[0131] Determine the refresh frequency of the target layer according to the number of previous frames to determine the refresh frequency of the target window of the graphical user interface of the mobile terminal.

[0132] Optionally, the target layer identifier is the layer identifier corresponding to the layer of the game application.

[0133] Optionally, the preset refresh frequency is the expected frame rate when the game application is running.

[0134] Optionally, the step of determining the operating parameters of the mobile terminal according to the comparison result between the refresh frequency and the preset refresh frequency includes:

[0135] Compare the refresh frequency with the expected frame rate when the game application is running;

[0136] When the refresh frequency matches the expected frame rate when the game application is running, maintain the current operating parameters of the mobile terminal;

[0137] When the refresh frequency does not match the expected frame rate during the operation of the game application, corresponding operating parameters are determined according to the game scene corresponding to the game application.

[0138] Optionally, the step of determining corresponding operating parameters according to the game scene corresponding to the game application is as follows:

[0139] Determine the current processor policy according to the game scene corresponding to the game application and the pre-stored processor policies;

[0140] Adjust the frame rate of the processor and / or the target sub-processor corresponding to the frame-up thread according to the processor policy, where the processor includes at least two sub-processors.

[0141] Through the above-mentioned mobile terminal, in the above-mentioned manner, the refresh frequency of the window corresponding to the game application can be monitored in real time as the actual frame rate of the game application. By comparing the real-time frame rate with the preset refresh frequency for running the game application, it can be determined whether the current game application is running smoothly. Furthermore, the running situation of the game application can be directly and objectively determined, and then the operating parameters of the mobile terminal can be adjusted in a timely manner so that the mobile terminal can run the game application smoothly, thereby improving the user experience.

[0142] The embodiment of the present application further provides a computer-readable storage medium. The computer-readable storage medium has one or more programs, and the one or more programs are executed by one or more processors to implement the following steps:

[0143] Run the game application through the mobile terminal;

[0144] Obtain the refresh frequency of the target window of the graphical user interface of the mobile terminal, where the target window is the window in the graphical user interface that displays the game application;

[0145] Determine the operating parameters of the mobile terminal according to the comparison result between the refresh frequency and the preset refresh frequency;

[0146] Control the mobile terminal to run the game application according to the operating parameters.

[0147] Optionally, the step of obtaining the refresh frequency of the target window of the graphical user interface of the mobile terminal includes:

[0148] Obtain the window manager of the operating system of the mobile terminal;

[0149] Determine the target layer corresponding to the game application through the window manager;

[0150] Obtain the refresh frequency of the target layer to determine the refresh frequency of the target window of the graphical user interface of the mobile terminal.

[0151] Optionally, the step of determining the target layer corresponding to the game application through the window manager includes:

[0152] Obtain the layer identifier of at least one layer included in the graphical user interface through the window manager;

[0153] Determine that the layer corresponding to the target layer identifier in the layer identifiers of the at least one layer is the target layer corresponding to the game application.

[0154] Optionally, the step of obtaining the refresh frequency of the target layer to determine the refresh frequency of the target window of the graphical user interface of the mobile terminal includes:

[0155] Obtain the previous frame time of each frame in the target layer;

[0156] Statistically count the number of previous frames corresponding to each second according to the previous frame time of each frame;

[0157] Determine the refresh frequency of the target layer to determine the refresh frequency of the target window of the graphical user interface of the mobile terminal according to the number of previous frames.

[0158] Optionally, the target layer identifier is the layer identifier corresponding to the layer of the game application.

[0159] Optionally, the preset refresh frequency is the expected frame rate when the game application is running.

[0160] Optionally, the step of determining the operating parameters of the mobile terminal according to the comparison result between the refresh frequency and the preset refresh frequency includes:

[0161] Compare the refresh frequency with the expected frame rate when the game application is running;

[0162] When the refresh frequency matches the expected frame rate when the game application is running, maintain the current operating parameters of the mobile terminal;

[0163] When the refresh frequency does not match the expected frame rate when the game application is running, determine the corresponding operating parameters according to the game scenario corresponding to the game application.

[0164] Optionally, the step of determining the corresponding operating parameters according to the game scenario corresponding to the game application is:

[0165] Determine the current processor policy according to the game scenario corresponding to the game application and the pre-stored processor policies;

[0166] Adjust the frame rate of the processor and / or the target sub-processor corresponding to the frame-up thread according to the processor policy, where the processor includes at least two sub-processors.

[0167] Through the above computer-readable storage medium, in the above manner, the refresh frequency of the window corresponding to the game application can be monitored in real time as the actual frame rate of the game application. By comparing the real-time frame rate with the preset refresh frequency for running the game application, it can be determined whether the current game application is running smoothly. Furthermore, the running situation of the game application can be directly and objectively determined, and then the running parameters of the mobile terminal can be adjusted in time so that the mobile terminal can run the game application smoothly, thereby improving the user experience.

[0168] The embodiment of the present application also provides a computer-readable storage medium. The computer-readable storage medium stores one or more programs. Among them, the computer-readable storage medium may include a volatile memory, such as a random access memory; the memory may also include a non-volatile memory, such as a read-only memory, a flash memory, a hard disk or a solid-state drive; the memory may also include a combination of the above types of memories.

[0169] The corresponding technical features in the above embodiments can be used with each other on the premise that the solutions are not contradictory or unimplementable.

[0170] It should be noted that in this article, the term "comprising", "including" or any other variant thereof is intended to cover a non-exclusive inclusion, so that a process, method, article or device including a series of elements not only includes those elements, but also includes other elements not expressly listed, or further includes elements inherent to such process, method, article or device. Without further limitation, an element defined by the statement "including a..." does not exclude the existence of additional identical elements in the process, method, article or device including that element.

[0171] The serial numbers of the embodiments of the present application above are only for description and do not represent the superiority or inferiority of the embodiments.

[0172] Through the description of the above embodiments, those skilled in the art can clearly understand that the above-described embodiment methods can be implemented by means of software plus a necessary general hardware platform. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation. Based on such an understanding, the technical solution of the present application, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions for causing a terminal (which can be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in various embodiments of the present application.

[0173] The embodiments of the present application have been described above in conjunction with the accompanying drawings. However, the present application is not limited to the above specific embodiments. The above specific embodiments are merely illustrative and not restrictive. Under the inspiration of the present application, those of ordinary skill in the art can also make many forms without departing from the purpose of the present application and the scope protected by the claims. All of these are within the protection scope of the present application.

Claims

1. A game control method, characterized in that The method is applied to a mobile terminal, and the method includes: Running a game application through the mobile terminal; Obtaining the refresh frequency of a target window of the graphical user interface of the mobile terminal, where the target window is the window in the graphical user interface that displays the game application; Determining the operating parameters of the mobile terminal according to the comparison result between the refresh frequency and a preset refresh frequency; Controlling the mobile terminal to run the game application according to the operating parameters; The step of obtaining the refresh frequency of the target window of the graphical user interface of the mobile terminal includes: Obtaining the window manager of the operating system of the mobile terminal; Determining a target layer corresponding to the game application through the window manager; Obtaining the refresh frequency of the target layer to determine the refresh frequency of the target window of the graphical user interface of the mobile terminal; The step of determining a target layer corresponding to the game application through the window manager includes: Obtaining the layer identifier of at least one layer included in the graphical user interface through the window manager; Determining the layer corresponding to the target layer identifier in the layer identifiers of the at least one layer as the target layer corresponding to the game application; The step of obtaining the refresh frequency of the target layer to determine the refresh frequency of the target window of the graphical user interface of the mobile terminal includes: Obtaining the previous frame time of each frame in the target layer; Counting the number of previous frames corresponding to each second according to the previous frame time of each frame; Determining the refresh frequency of the target layer according to the number of previous frames to determine the refresh frequency of the target window of the graphical user interface of the mobile terminal; The target layer identifier is the layer identifier corresponding to the layer of game applications; The preset refresh frequency is the expected frame rate when the game application runs; The step of determining the operating parameters of the mobile terminal according to the comparison result between the refresh frequency and the preset refresh frequency includes: Comparing the refresh frequency with the expected frame rate when the game application runs; When the refresh frequency matches the expected frame rate when the game application runs, maintaining the current operating parameters of the mobile terminal; When the refresh frequency does not match the expected frame rate when the game application runs, determining corresponding operating parameters according to the game scenario corresponding to the game application; The step of determining corresponding operating parameters according to the game scenario corresponding to the game application is: Determining the current processor policy according to the game scenario corresponding to the game application and a pre-stored processor policy; Adjusting the frame rate of the processor and / or the target sub-processor corresponding to the previous frame thread according to the processor policy, where the processor includes at least two sub-processors.

2. A mobile terminal, characterized in that, The mobile terminal includes: A touch screen; A processor; A memory, connected to the processor, where the memory contains control instructions, and when the processor reads the control instructions, it controls the mobile terminal to implement the game control method described in claim 1.

3. A computer-readable storage medium, characterized in that, The computer-readable storage medium has one or more programs, and the one or more programs are executed by one or more processors to implement the game control method described in claim 1.

Citation Information

Patent Citations

  • Method and device for displaying screen refresh rate

    CN104731543A

  • Game optimizing method, game optimizing device and mobile terminal

    CN110681155A