A screen projection frame rate control method, apparatus, and computer-readable storage medium

By dynamically adjusting the screen casting frame rate and defining a scalar flag based on the frame rate of each layer of the phone, the stuttering problem caused by the screen casting frame rate being stable at 60Hz was solved, thus improving the user experience.

CN112905138BActive Publication Date: 2025-10-28NUBIA TECHNOLOGY CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202110290468.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-03-18
Publication Date
2025-10-28
Estimated Expiration
2041-03-18

AI Technical Summary

Technical Problem

Existing technology maintains a stable frame rate of 60Hz when projecting screens in poor network conditions, resulting in severe stuttering and impacting user experience.

Method used

By dynamically calculating the frame rate of each layer of the mobile phone, a scalar flag is defined to adjust the screen projection frame rate. The screen projection frame rate is dynamically adjusted according to the frame rate of each layer, decreasing when it is higher than 60Hz and increasing when it is lower than 60Hz.

Benefits of technology

It achieves the goal of avoiding lag in poor network conditions, improving user experience, and ensuring smoothness for both high and low frame rate applications.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112905138B_ABST
    Figure CN112905138B_ABST
Patent Text Reader

Abstract

This invention provides a screen casting frame rate control method, device, and computer-readable storage medium, belonging to the field of communication technology. The embodiments of this application dynamically calculate the previous frame rate of each layer on the mobile phone; a scalar flag is set to indicate this; based on the actual screen casting frame rate determined by the set flag value, the actual screen casting frame rate is continuously and dynamically adjusted. Thus, when the mobile application's refresh screen casting frame rate is higher than 60Hz, screen casting is controlled at a frame rate of 60Hz; when the mobile application's refresh screen casting frame rate is lower than 60Hz, screen casting is performed at the lower frame rate. The method described in this application can achieve high frame rate control for screen casting, while also taking into account screen casting scenarios with low refresh rates, resulting in smoother screen casting and avoiding lag even in poor network conditions, greatly improving the user experience.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of communication technology, and in particular to a screen projection frame rate control method, apparatus, and computer-readable storage medium. Background Technology

[0002] Currently, the highest screen mirroring frame rate of mobile phones can be controlled at 144Hz or 165Hz. When wirelessly mirroring, the mobile phone refresh rate can achieve a stable mirroring frame rate of 60Hz. When mirroring games, in order to meet the high mirroring frame rate requirements of the game scenario and provide gamers with a better gaming experience, the mirroring frame rate is required to be even higher. However, due to the limitations of Wi-Fi bandwidth, the best solution for screen mirroring is to reduce the mirroring frame rate and control it to a stable 60Hz.

[0003] Users don't necessarily use wireless screen mirroring for gaming; they may also use it for watching videos or reading novels. For these types of games, the current mobile phone screen mirroring frame rate requirement is very low. In this case, if the screen mirroring frame rate is still stable at 60Hz, it will cause serious lag when the network is poor, resulting in a very poor user experience. Summary of the Invention

[0004] In view of this, the purpose of the present invention is to provide a screen casting frame rate control method, device and computer-readable storage medium, which aims to solve the problem that when the existing screen casting frame rate is kept stable at 60Hz, screen casting will cause serious lag under poor network conditions, which seriously affects the user experience.

[0005] The technical solution adopted by the present invention to solve the above-mentioned technical problems is as follows:

[0006] A first aspect of the present invention provides a screen projection frame rate control method, comprising the following steps:

[0007] The mobile device dynamically calculates the previous frame information for each layer on the current mobile device.

[0008] Define a scalar flag in the surfaceflinger layer to indicate which layer's previous frame the screen should be projected from;

[0009] Based on the actual screen casting frame rate determined by the set flag value, the image is synthesized by dynamically controlling the previous frame of the screen casting frame rate.

[0010] In some embodiments, the dynamic calculation of the previous frame status of each layer on the mobile phone includes:

[0011] When the Vsync signal arrives, determine the layer where the small dot is located according to the small dot title. If the small dot had a frame in the previous frame, count it as numA++; when other layers have a frame, perform the count operation of numB++;

[0012] Among them, numA is marked within the statistical range. When this Vsync arrives and the small dot layer has a frame, mark the statistical value;

[0013] numB is marked within the statistical range. When this Vsync arrives and other layers have a frame, mark the statistical value.

[0014] In some embodiments, defining a scalar flag in the surfaceflinger layer, and using this scalar flag to mark which layer's frame situation to perform screen mirroring includes the steps:

[0015] Compare the statistical value numA of the frame data of the layer where the small dot is located and the statistical value numB of the frame data of other layers to determine the actual screen mirroring frame rate;

[0016] When numA > numB, it is determined that the frame rate of the layer where the small dot is located is faster than the frame rate of other layers. At this time, set flag to true, and the screen mirroring frame rate is projected according to the frame rate of other layers.

[0017] In some embodiments, the further includes the steps:

[0018] When numA < numB, it is determined that the frame rate of other layers is faster than the frame rate of the layer where the small dot is located. At this time, set flag to false, and project it according to the frame rate of the layer where the small dot is located.

[0019] In some embodiments, the screen mirroring frame rate of the layer where the small dot is located is 60HZ.

[0020] The second aspect of the present invention also provides a screen mirroring frame rate control device, including a frame situation calculation module, a screen mirroring frame rate determination module, and an actual screen mirroring output module that are connected to each other;

[0021] The frame situation calculation module is used to dynamically calculate the frame situation of each layer on the current mobile phone on the mobile phone side;

[0022] The screen mirroring frame rate determination module is used to define a scalar flag in the surfaceflinger layer, and use this scalar flag to mark and determine the screen mirroring frame rate;

[0023] The actual screen projection output module determines the actual screen projection frame rate based on the set flag value, and then controls the previous frame of the screen projection frame rate to perform image synthesis.

[0024] In some embodiments, the screen projection frame rate determination module includes a previous frame data statistics unit, a flag setting unit, and a screen projection frame rate determination unit;

[0025] The previous frame data statistics unit is used to count the previous frame data statistics value numA of the layer where the small dot is located and the previous frame data statistics value numB of other layers.

[0026] The flag setting unit is used to determine the flag setting based on comparing the size of numA data and numB data.

[0027] When the flag is set to true, the screen projection frame rate determination unit projects the screen according to the previous frame rate of other layers; when the flag is set to false, it projects the screen according to the previous frame rate of the layer where the small circle is located.

[0028] In some embodiments, the projection frame rate of the layer containing the small dot is 60Hz.

[0029] This application also provides a computer-readable storage medium, including a processor, a computer-readable storage medium, and a computer program stored on the computer-readable storage medium, wherein the computer program, when executed by the processor, implements the steps of the method described above.

[0030] Compared to existing technologies that can only stabilize the screen casting frame rate at 60Hz, leading to severe stuttering and a poor user experience in poor network conditions, the screen casting frame rate control method, device, and computer storage medium provided in this invention dynamically calculate the frame rate of each layer on the mobile phone and continuously adjust the actual screen casting frame rate. When the mobile application's refresh frame rate is higher than 60Hz, screen casting is controlled at 60Hz; when the refresh frame rate is lower than 60Hz, screen casting is controlled at the lower frame rate, and the projected image also has a correspondingly lower frame rate. Thus, the method described in this application can control the high frame rate of screen casting while also accommodating low-refresh-rate applications, resulting in smoother screen casting and avoiding stuttering even in poor network conditions, greatly improving the user experience. Attached Figure Description

[0031] Figure 1 This is a schematic diagram of the hardware structure of a mobile terminal according to the present invention;

[0032] Figure 2 A communication network system architecture diagram provided for an embodiment of the present invention;

[0033] Figure 3 This is a flowchart of one embodiment of the screen projection frame rate control method of the present invention;

[0034] Figure 4 This is a flowchart of another embodiment of the screen casting frame rate control method of the present invention;

[0035] Figure 5 This is a structural block diagram of an embodiment of a screen projection frame rate control device according to the present invention;

[0036] Figure 6 This is a structural block diagram of another embodiment of a screen projection frame rate control device according to an embodiment of the present invention. Detailed Implementation

[0037] To make the technical problems, solutions, and beneficial effects of this invention clearer and more understandable, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention.

[0038] In the following description, the use of suffixes such as "module," "part," or "unit" to denote elements is solely for the purpose of illustrative purposes and has no specific meaning in itself. Therefore, "module," "part," or "unit" may be used interchangeably.

[0039] Terminals can be implemented in various forms. For example, the terminals described in this invention may include mobile terminals such as mobile phones, tablets, laptops, handheld computers, personal digital assistants (PDAs), portable media players (PMPs), navigation devices, wearable devices, smart bracelets, pedometers, etc., as well as fixed terminals such as digital TVs and desktop computers.

[0040] The following description will use a mobile terminal as an example. Those skilled in the art will understand that, apart from elements specifically designed for mobile purposes, the construction according to embodiments of the present invention can also be applied to fixed-type terminals.

[0041] Please see Figure 1This is a schematic diagram of the hardware structure of a mobile terminal 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 will understand that... Figure 1 The mobile terminal structure shown does not constitute a limitation on the mobile terminal. The mobile terminal may include more or fewer components than shown, or combine certain components, or have different component arrangements.

[0042] The following is combined with Figure 1 A detailed introduction to each component of the mobile terminal:

[0043] The radio frequency unit 101 can be used for receiving and transmitting signals during information transmission or calls. Specifically, it receives downlink information from the base station and processes it with the processor 110; additionally, it transmits uplink data to the base station. Typically, 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, and a duplexer. Furthermore, the radio frequency unit 101 can also communicate wirelessly with networks and other devices. The aforementioned wireless communications may 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).

[0044] WiFi is a short-range wireless transmission technology. Mobile terminals, through the WiFi module 102, can help users send and receive emails, browse web pages, and access streaming media, providing users with wireless broadband internet access. Although Figure 1 WiFi module 102 is shown, but it is understood that it is not a necessary component of a mobile terminal and can be omitted as needed without changing the nature of the invention.

[0045] The audio output unit 103 can convert audio data received by the radio frequency unit 101 or the WiFi module 102 or stored in the memory 109 into audio signals and output them as sound when the mobile terminal 100 is in call signal receiving mode, call mode, recording mode, voice recognition mode, broadcast receiving mode, etc. Furthermore, the audio output unit 103 can also provide audio output related to specific functions performed by the mobile terminal 100 (e.g., call signal receiving sound, message receiving sound, etc.). The audio output unit 103 may include a speaker, a buzzer, etc.

[0046] 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 image data of still images or videos acquired by an image capture device (such as a camera) in video capture mode or 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 sound (audio data) in operating modes such as telephone call mode, recording mode, and voice recognition mode, and can process such sound into audio data. The processed audio (voice) data can be converted into a format that can be transmitted to a mobile communication base station via the radio frequency unit 101 in telephone call mode. The microphone 1042 can implement various types of noise cancellation (or suppression) algorithms to eliminate (or suppress) noise or interference generated during the reception and transmission of audio signals.

[0047] The mobile terminal 100 also 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. The ambient light sensor can adjust the brightness of the display panel 1061 according to the ambient light level, and the proximity sensor can turn off the display panel 1061 and / or backlight when the mobile terminal 100 is moved to the ear. As a type of motion sensor, the accelerometer sensor can detect the magnitude of acceleration in various directions (generally three axes). When stationary, it can detect the magnitude and direction of gravity and can be used for applications that recognize the phone's posture (such as landscape / portrait switching, related games, magnetometer posture calibration), vibration recognition-related functions (such as pedometer, tapping), etc. Other sensors that may be configured in the phone, such as fingerprint sensors, pressure sensors, iris sensors, molecular sensors, gyroscopes, barometers, hygrometers, thermometers, and infrared sensors, will not be described in detail here.

[0048] 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, which may be configured in the form of a liquid crystal display (LCD), an organic light-emitting diode (OLED), or the like.

[0049] User input unit 107 can be used to receive input numerical or character information, and generate key signal inputs related to user settings and function control of the mobile terminal. Specifically, user input unit 107 may include touch panel 1071 and other input devices 1072. Touch panel 1071, also known as touch screen, can collect touch operations on or near the user (such as operations performed by the user using a finger, stylus, or any suitable object or accessory on or near touch panel 1071), and drive corresponding connection devices according to a pre-set program. Touch panel 1071 may include two parts: a touch detection device and a touch controller. The touch detection device detects the user's touch position and the signal generated by the touch operation, and transmits the signal to the touch controller; the touch controller receives touch information from the touch detection device, converts it into touch point coordinates, sends it to processor 110, and can receive and execute commands from processor 110. In addition, touch panel 1071 can be implemented using various types such as resistive, capacitive, infrared, and surface acoustic wave. In addition to the touch panel 1071, the user input unit 107 may also include other input devices 1072. Specifically, other input devices 1072 may include, but are not limited to, one or more of the following: physical keyboard, function keys (such as volume control buttons, power buttons, etc.), trackball, mouse, joystick, etc., without being limited here.

[0050] Furthermore, the touch panel 1071 may cover the display panel 1061. When the touch panel 1071 detects a touch operation on or near it, it transmits the information to the processor 110 to determine the type of touch event. Subsequently, the processor 110 provides corresponding visual output on the display panel 1061 based on the type of touch event. Although in Figure 1 In this embodiment, the touch panel 1071 and the display panel 1061 are two independent components to realize the input and output functions of the mobile terminal. However, 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. The specific implementation is not limited here.

[0051] Interface unit 108 serves as an interface through which at least one external device can connect to mobile terminal 100. For example, the external device may 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 headphone port, and so on. Interface unit 108 may be used to receive input (e.g., data, power, etc.) from the external device and transmit the received input to one or more elements within mobile terminal 100, or it may be used to transmit data between mobile terminal 100 and the external device.

[0052] The memory 109 can be used to store software programs and various data. The memory 109 may primarily include a program storage area and a data storage area. The program storage area may store the operating system, applications required for at least one function (such as sound playback, image playback, etc.), etc.; the data storage area may store data created based on the use of the mobile phone (such as audio data, phonebook, etc.). Furthermore, the memory 109 may include high-speed random access memory, and may also include non-volatile memory, such as at least one disk storage device, flash memory device, or other volatile solid-state storage device.

[0053] The processor 110 is the control center of the mobile terminal. It connects various parts of the mobile terminal via various interfaces and lines. By running or executing software programs and / or modules stored in the memory 109, and by calling data stored in the memory 109, it performs various functions and processes data of the mobile terminal, thereby providing overall monitoring of the mobile terminal. The processor 110 may include one or more processing units; preferably, the processor 110 may integrate an application processor and a modem processor. The application processor mainly handles the operating system, user interface, and applications, while the modem processor mainly handles wireless communication. It is understood that the modem processor may not be integrated into the processor 110.

[0054] The mobile terminal 100 may also include a power supply 111 (such as a battery) that supplies power to various components. Preferably, the power supply 111 can be logically connected to the processor 110 through a power management system, thereby enabling functions such as charging, discharging, and power consumption management through the power management system.

[0055] although Figure 1 As not shown, the mobile terminal 100 may also include a Bluetooth module, etc., which will not be described in detail here.

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

[0057] Please see Figure 2 , Figure 2 This invention provides a communication network system architecture diagram. The communication network system is an LTE system based on the universal mobile communication 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, which are connected in sequence.

[0058] Specifically, UE201 can be the aforementioned terminal 100, which will not be elaborated here.

[0059] E-UTRAN202 includes eNodeB2021 and other eNodeB2022s. Among them, eNodeB2021 can connect to other eNodeB2022s through backhaul (e.g., X2 interface), and eNodeB2021 connects to EPC203. eNodeB2021 can provide UE201 with access to EPC203.

[0060] EPC203 may include MME (Mobility Management Entity) 2031, HSS (Home Subscriber Server) 2032, other MMEs 2033, SGW (Serving Gateway) 2034, PGW (Packet Data Network Gateway) 2035, and PCRF (Policy and Charging Rules Function) 2036, etc. Among them, MME2031 is the control node that handles signaling between UE201 and EPC203, providing bearer and connection management. HSS2032 provides registers to manage functions such as the Home Location Register (not shown in the diagram) and stores user-specific information such as service characteristics and data rates. All user data can be sent through SGW2034. PGW2035 can provide UE 201 IP address allocation and other functions. PCRF2036 is the policy and charging control decision point for service data flow and IP bearer resources. It selects and provides available policy and charging control decisions for the policy and charging enforcement function unit (not shown in the figure).

[0061] IP services 204 may include the Internet, intranet, IMS (IP Multimedia Subsystem), or other IP services.

[0062] Although the above description uses the LTE system as an example, those skilled in the art should understand that the present invention is not only applicable to the LTE system, but also to other wireless communication systems, such as GSM, CDMA2000, WCDMA, TD-SCDMA, and future new network systems, etc., which are not limited here.

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

[0064] Example 1:

[0065] This application provides a screen projection frame rate control method. Please refer to [link / reference]. Figure 3 and Figure 4 The screen projection frame rate control method specifically includes the following steps:

[0066] S301. Dynamically calculate the previous frame status of each layer on the current mobile phone.

[0067] Specifically, under normal circumstances, when screen mirroring starts on the mobile device, a small dot of one pixel will pop up. The title of this small dot is the window named A, and the upper-frame projection frame rate of the small dot is stabilized at 60HZ according to the Vsync (frame synchronization) signal of the current mobile device. In this embodiment, when the Vsync (frame synchronization) signal arrives, according to the title of the small dot, it is determined which layer the small dot is on. If the layer where the small dot is located has an upper frame, it is counted as numA++ (numA is marked within the statistical range. When this Vsync arrives, the layer where the small dot is located has an upper frame, and the marked statistical value is incremented). When other layers have an upper frame, the statistical operation of numB++ is implemented (numB is marked within the statistical range. When this Vsync arrives, other layers have an upper frame, and the marked statistical value is incremented).

[0068] S302. Define a scalar flag in the surfaceflinger layer, and use this scalar flag to mark which layer's upper frame situation is used for screen mirroring.

[0069] Specifically, it includes the following steps:

[0070] S3021. Compare the statistical value numA of the upper frame data of the layer where the small dot is located with the statistical value numB of the upper frame data of other layers to determine the actual screen mirroring frame rate;

[0071] S3022. When numA > numB, it is determined that the upper frame speed of the layer where the small dot is located is faster than the upper frame speed of other layers. At this time, set flag to true and execute step S3023;

[0072] S3023. Project the screen according to the upper frame scheme of other layers; that is, at this time, the screen mirroring frame rate is projected according to the upper frame speed of other layers;

[0073] S3024. When numA < numB, it is determined that the upper frame speed of other layers is faster than the upper frame speed of the layer where the small dot is located. At this time, set flag to false and execute step S3025;

[0074] S3025. Project the screen according to the upper frame speed (60HZ) of the layer where the small dot is located.

[0075] S303. During image synthesis, according to the actual screen mirroring frame rate determined by the set flag value, dynamically control the upper frame situation of the screen mirroring frame rate for image synthesis.

[0076] Specifically, the actual screen casting frame rate is determined based on the set flag value. When the flag is false, it means that the screen will be cast according to the frame rate (60HZ) of the layer where the small circle is located. When the flag is true, it means that the screen will be cast according to the frame rate scheme of other layers.

[0077] The screen casting frame rate control method described in this application dynamically calculates the frame rate of each layer on the current mobile phone, continuously adjusting the actual screen casting frame rate. When the mobile application's refresh frame rate is higher than 60Hz, screen casting is controlled at 60Hz; when the mobile application's refresh frame rate is lower than 60Hz, screen casting is controlled at the lower frame rate, and the projected image also has a correspondingly lower frame rate. Thus, the method described in this application can control the high frame rate of screen casting while also accommodating low-refresh-rate applications, resulting in smoother screen casting. Even in poor network conditions, it avoids lag and greatly improves the user experience.

[0078] Example 2:

[0079] This application provides a screen projection frame rate control device, which implements the screen projection frame rate control method described in Embodiment 1 above. Please refer to... Figure 5 and Figure 6 The screen projection frame rate control device includes an interconnected previous frame calculation module 51, a screen projection frame rate determination module 52, and an actual screen projection output module 53.

[0080] The previous frame status calculation module 51 is used to dynamically calculate the previous frame status of each layer on the current mobile phone.

[0081] The screen casting frame rate determination module 52 is used to define a scalar flag in the surfaceflinger layer, and use the scalar flag to indicate and determine the screen casting frame rate.

[0082] The screen projection frame rate determination module 52 includes a previous frame data statistics unit 521, a flag setting unit 522, and a screen projection frame rate determination unit 523.

[0083] The previous frame data statistics unit 521 is used to count the previous frame data statistics value numA of the layer where the small dot is located and the previous frame data statistics value numB of other layers.

[0084] The flag setting unit 522 is used to determine the flag setting based on comparing the size of numA data and numB data.

[0085] Specifically, when numA > numB, it is determined that the upper frame rate of the layer where the small dot is located is faster than that of other layers. At this time, flag is set to true;

[0086] When numA < numB, it is determined that the upper frame rate of other layers is faster than that of the layer where the small dot is located. At this time, flag is set to false.

[0087] When flag is set to true, the screen mirroring frame rate is projected according to the upper frame rate of other layers; when flag is set to false, it will be projected according to the upper frame rate (60HZ) of the layer where the small dot is located by the screen mirroring frame rate determination unit 523.

[0088] The actual screen mirroring output module 53 controls the upper frame situation of the screen mirroring frame rate for image synthesis according to the actual screen mirroring frame rate determined by the set flag value.

[0089] The screen mirroring frame rate control device described in the embodiment of the present application dynamically calculates the upper frame situation of each layer on the current mobile phone through the upper frame situation calculation module 51, realizes continuous dynamic adjustment of the actually projected screen mirroring frame rate, and realizes that when the screen mirroring frame rate refreshed by the mobile phone application is higher than 60HZ, it is controlled to project at a screen mirroring frame rate of 60HZ, and when the screen mirroring frame rate refreshed by the mobile phone application is lower than 60HZ, it is controlled to project at a low screen mirroring frame rate, and the projected screen also correspondingly reduces the screen mirroring frame rate. In this way, the method described in the embodiment of the present application can achieve high upper frame control of screen mirroring, and at the same time takes into account the screen mirroring scenarios of low-refresh applications, making the screen mirroring effect smoother. In this way, even in the case of poor network conditions, it can avoid the phenomenon of card卡顿, greatly improving the user experience.

[0090] Embodiment Three:

[0091] According to a computer-readable storage medium provided by an embodiment of the present invention, a computer program is stored thereon, and when the computer program is executed by a processor, the steps in the above broadcast sending method are implemented. The specific steps are as described in Embodiment One and will not be elaborated here.

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

[0093] According to one example of this embodiment, all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The program can be stored in a computer-readable storage medium. For example, in this embodiment, the program can be stored in the storage medium of a computer system and executed by at least one processor in the computer system to implement the processes of the embodiments of the methods described above. The storage medium includes, but is not limited to, magnetic disks, USB flash drives, optical disks, read-only memory (ROM), etc.

[0094] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.

[0095] The sequence numbers of the above embodiments of the present invention are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.

[0096] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present invention, 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 to cause a terminal (which may be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in the various embodiments of the present invention.

[0097] The embodiments of the present invention have been described above with reference to the accompanying drawings. However, the present invention is not limited to the specific embodiments described above. The specific embodiments described above are merely illustrative and not restrictive. Those skilled in the art can make many other forms under the guidance of the present invention without departing from the spirit and scope of the claims. All of these forms are within the protection scope of the present invention.

Claims

1. A method for controlling the frame rate during screen projection, characterized in that, It includes the following steps: The mobile phone dynamically calculates the frame situation of each layer on the current mobile phone; Define a scalar flag in the SurfaceFlinger layer, and use this scalar flag to indicate which layer's frame situation is used for screen mirroring; Statistically count the value numA of the frame data of the layer where the small dot appears when the screen mirroring starts on the mobile phone and the value numB of the frame data of other layers, compare the sizes of numA data and numB data, and determine the setting of the flag according to the sizes of numA data and numB data; When the flag is set to true, the screen mirroring frame rate is screen-mirrored at the frame rate of other layers; when the flag is set to false, the screen mirroring is performed according to the frame rate of the layer where the small dot is located; According to the actual screen mirroring frame rate determined by the set flag value, dynamically control the frame situation of the screen mirroring frame rate for image synthesis.

2. The screen projection frame rate control method according to claim 1, characterized in that, The mobile phone dynamically calculating the frame situation of each layer on the current mobile phone includes: When the Vsync signal arrives, judge the layer where the small dot is located according to the small dot name title. If the layer where the small dot is located has a frame, count it as numA++; when other layers have a frame, perform the statistical operation of numB++; Among them, numA marks within the statistical range. When this Vsync arrives, the small dot layer has a frame and marks the statistical value; numB marks within the statistical range. When this Vsync arrives, other layers have a frame and mark the statistical value.

3. The screen projection frame rate control method according to claim 2, characterized in that, The defining a scalar flag in the SurfaceFlinger layer and using this scalar flag to indicate which layer's frame situation is used for screen mirroring includes the steps: When numA>numB, it is judged that the frame rate of the layer where the small dot is located is faster than the frame rate of other layers. At this time, set the flag to true.

4. The screen projection frame rate control method according to claim 2, characterized in that, It further includes the steps: When numA<numB, it is judged that the frame rate of other layers is faster than the frame rate of the layer where the small dot is located. At this time, set the flag to false.

5. The screen projection frame rate control method according to claim 4, characterized in that, The screen mirroring frame rate of the layer where the small dot is located is 60HZ.

6. A screen projection frame rate control device, characterized in that, The screen mirroring frame rate control device includes a frame situation calculation module, a screen mirroring frame rate determination module, and an actual screen mirroring output module that are connected to each other; The frame situation calculation module is used for the mobile phone to dynamically calculate the frame situation of each layer on the current mobile phone; The screen mirroring frame rate determination module is used to define a scalar flag in the SurfaceFlinger layer and use this scalar flag to determine the screen mirroring frame rate; The actual screen mirroring output module controls the frame situation of the screen mirroring frame rate for image synthesis according to the actual screen mirroring frame rate determined by the set flag value; The screen mirroring frame rate determination module includes a frame data statistical unit, a flag setting unit, and a screen mirroring frame rate determination unit; The previous frame data statistics unit is used to count the previous frame data statistics value numA of the layer where the small dot is located and the previous frame data statistics value numB of other layers. The flag setting unit is used to determine the flag setting based on comparing the size of numA data and numB data. When the flag is set to true, the screen projection frame rate determination unit projects the screen according to the previous frame rate of other layers; when the flag is set to false, it projects the screen according to the previous frame rate of the layer where the small circle is located.

7. The screen projection frame rate control device according to claim 6, characterized in that, The projection frame rate of the layer containing the small dot is 60Hz.

8. A computer-readable storage medium, characterized in that, The method includes a processor, a computer-readable storage medium, and a computer program stored on the computer-readable storage medium, which, when executed by the processor, implements the steps of the method as claimed in any one of claims 1 to 5.

Citation Information

Patent Citations

  • Screen projection frame rate control method and device and computer readable storage medium

    CN112114767A