Frame rate control method, apparatus and device

By combining real-time calculation and software caching at the front end of the terminal device with timer locks, the problem of stable frame rate transmission in small terminal control scenarios is solved, thereby reducing costs and improving user service quality.

CN119071278BActive Publication Date: 2026-03-20CHINA UNITED NETWORK COMM GRP CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310632656.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-05-30
Publication Date
2026-03-20
Estimated Expiration
2043-05-30

AI Technical Summary

Technical Problem

Existing technologies are costly, labor-intensive, and complex to implement when maintaining stable frame rate transmission in small terminal control scenarios.

Method used

By using real-time calculations and software caching at the terminal device front end, combined with timer locks, stable frame rate transmission is achieved, reducing the pressure on the backend server. Keyframe caching is used to avoid information loss.

Benefits of technology

While ensuring stable frame rates, we reduce operating costs, simplify engineering implementation, reduce manpower and learning time, and improve the quality of user service.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119071278B_ABST
    Figure CN119071278B_ABST
Patent Text Reader

Abstract

The application provides a frame rate control method, device and equipment. The application caches a graphical user interface snapshot of an application in real time in response to a user operation on the application, acquires an operation instruction, determines a type of the operation instruction, determines whether an operation duration of the operation instruction exceeds an instruction sending period if the operation instruction type is continuous multiple operations, sends the latest snapshot in the local cache to a server as response information of the operation instruction after a target time delay if the sending period is not exceeded. Thus, stable transmission of the frame rate is achieved, real-time calculation of a front end of a terminal device is reduced, the pressure on the server is reduced, and the operation cost is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of terminal, in particular to a frame rate control method, device and equipment. BACKGROUND

[0002] With the continuous development of network, people's life is more and more inseparable from intelligent electronic products, such as mobile phones, televisions, tablets and other intelligent devices used in people's daily life, which are realized by continuously sending frames according to the frame rate agreed by the background server in response to user operation, data transmission and control, and finally the picture is displayed on the display screen. It is just with more and more people using intelligent devices, and the background server lag and death make people's experience worse.

[0003] In the prior art, the frame rate control method is usually negotiated in real time by the front end and the back end, or calculated in real time by the terminal, or based on hardware cache, and the frame rate of the fixed picture is reduced.

[0004] However, most of the intelligent devices used in life belong to small terminal devices. Under the premise of stable transmission of frame rate, the maintenance cost of the prior art is high, the manpower is consumed, the engineering implementation is complex, and it is not suitable for small terminal control scene. SUMMARY

[0005] The present application provides a frame rate control method, device and equipment to solve the problem of high maintenance cost, high manpower consumption and complex engineering implementation of the prior art under the premise of ensuring stable frame rate in the small terminal control scene of daily life.

[0006] In a first aspect, the present application provides a frame rate control method applied to a terminal device, comprising:

[0007] In response to user operation on an application, the snapshot of the graphical user interface of the application is cached in real time;

[0008] After the user operation is completed, an operation instruction is obtained, and it is determined that the type of the operation instruction is single operation or continuous multiple operations;

[0009] If the type of the operation instruction is continuous multiple operation instructions, it is determined whether the operation time length of the operation instruction exceeds the instruction sending period, and the instruction sending period is calculated according to the frame rate of the application;

[0010] If the operation time length of the operation instruction does not exceed the instruction sending period, the latest snapshot in the local cache is taken out as the response information of the operation instruction and sent to the server after the target time delay, wherein the target time delay is the difference between the instruction sending period and the operation time length of the operation instruction.

[0011] In conjunction with the first aspect, in some embodiments, the method further includes:

[0012] If the operation duration of the operation instruction exceeds the instruction sending period, the latest frame snapshot in the local cache will be retrieved and sent to the server as the response information of the operation instruction.

[0013] In conjunction with the first aspect, in some embodiments, the method further includes:

[0014] If the instruction is a single operation, the latest frame snapshot in the local cache is retrieved and sent to the server as the response information for the operation instruction.

[0015] In conjunction with the first aspect, in some embodiments, the method further includes:

[0016] If at least one of the following conditions is detected: network fluctuation, network frame loss, or network resource exhaustion, the latest frame snapshot in the local cache is retrieved and sent to the server as the response information for the operation command.

[0017] In conjunction with the first aspect, in some embodiments, the method further includes:

[0018] After sending the response information of the operation instruction to the server, a timer lock is set with the duration of the instruction sending period and locked. The timer lock is unlocked after the duration of the instruction sending period has elapsed. During the timer lock is locked, no response information of the operation instruction is sent to the server.

[0019] In conjunction with the first aspect, in some embodiments, the method further includes:

[0020] The instruction sending cycle for the application to send instructions to the server is calculated based on the frame rate set by the application.

[0021] Secondly, this application provides a frame rate control device, comprising:

[0022] The response caching module is used to cache snapshots of the application's graphical user interface in real time in response to user operations on the application.

[0023] The instruction determination module is used to obtain the operation instruction after the user operation is completed, and determine whether the operation instruction is a single operation or multiple operations in succession;

[0024] The duration determination module is used to determine whether the operation duration of the operation instruction exceeds the instruction sending cycle if the type of the operation instruction is multiple consecutive operation instructions. The instruction sending cycle is calculated in advance based on the frame rate set by the application.

[0025] The first sending module is configured to, if the operation duration of the operation instruction does not exceed the instruction sending period, retrieve the latest frame snapshot from the local cache as the response information of the operation instruction and send it to the server after a target delay, wherein the target delay is the difference between the instruction sending period and the operation duration of the operation instruction.

[0026] In conjunction with the second aspect, in some embodiments, the apparatus further includes:

[0027] The second sending module is used to retrieve the latest frame snapshot from the local cache and send it to the server as the response information of the operation instruction if the operation time of the operation instruction exceeds the instruction sending period.

[0028] In conjunction with the second aspect, in some embodiments, the apparatus further includes:

[0029] The third sending module is used to retrieve the latest frame snapshot from the local cache and send it to the server as the response information of the operation instruction if the type of the instruction is a single operation.

[0030] In conjunction with the second aspect, in some embodiments, the apparatus further includes:

[0031] The fourth sending module is used to retrieve the latest frame snapshot from the local cache and send it to the server as response information for the operation command if at least one of the following conditions is detected: network fluctuation, network frame loss, or network resource exhaustion.

[0032] In conjunction with the second aspect, in some embodiments, the apparatus further includes:

[0033] The timing setting module is used to set and lock a timer lock with the timing period of the instruction sending cycle after sending the response information of the operation instruction to the server, and to unlock the timer lock after the timing period reaches the instruction sending cycle; during the timer lock locking period, no response information of the operation instruction is sent to the server.

[0034] In conjunction with the second aspect, in some embodiments, the apparatus further includes:

[0035] The period calculation module is used to calculate the instruction sending period of the application sending instructions to the server based on the frame rate set by the application.

[0036] Thirdly, this application provides a terminal device, including: a memory, a processor,

[0037] The memory stores computer-executed instructions;

[0038] The processor executes computer execution instructions stored in the memory to implement the method described in the first aspect.

[0039] Fourthly, this application also provides a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, are used to implement the frame rate control method described in the first aspect.

[0040] This application provides a frame rate control method, apparatus, and device. Utilizing front-end engineering methods, it encapsulates real-time front-end calculations and software caching into a single method that can stabilize the frame rate within a certain range. It incorporates time calibration, uses a timer lock to ensure stable frame rate transmission, establishes a waiting queue on the front end, and caches key frames to prevent the loss of critical information. Thus, while ensuring stable frame rate transmission, it reduces operating costs, simplifies engineering implementation, and minimizes manpower and learning time. Attached Figure Description

[0041] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.

[0042] Figure 1 This is an application scenario diagram of the frame rate control method provided in the embodiments of this application;

[0043] Figure 2 A flowchart illustrating an embodiment of the frame rate control method provided in this application;

[0044] Figure 3 A flowchart illustrating a second embodiment of the frame rate control method provided in this application;

[0045] Figure 4 A flowchart illustrating a specific example of the frame rate control method provided in this application embodiment;

[0046] Figure 5 A schematic diagram of the frame rate control device according to an embodiment of this application;

[0047] Figure 6 A schematic diagram of the structure of the frame rate control device according to Embodiment 2 of this application;

[0048] Figure 7This is a schematic diagram of the structure of a terminal device provided in an embodiment of this application.

[0049] The accompanying drawings illustrate specific embodiments of this application, which will be described in more detail below. These drawings and descriptions are not intended to limit the scope of the concept in any way, but rather to illustrate the concept of this application to those skilled in the art through reference to particular embodiments. Detailed Implementation

[0050] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims.

[0051] In today's internet age, network data transmission is crucial in fields such as gaming, communication, and control. However, different scenarios have different requirements for network data transmission. In small terminal control scenarios, such as game controllers, mobile phone screen swipes, and VR devices, each swipe operation may generate tens of thousands of control messages. Due to server processing capacity limitations, the front end cannot send messages to the back end indiscriminately; otherwise, the server will experience lag, freezes, and other problems, affecting the user experience. In the video field, the human eye perceives static images exceeding 24 frames per second as continuous motion video. Typically, transmitted video operates at 24-30 frames per second, while control message transmission requires a lower frame rate, usually 5-10 frames per second. Existing technologies for frame rate control typically involve real-time negotiation between the front end and back end, real-time calculation by the terminal, or hardware caching to reduce the frame rate of frozen frames. While these methods can achieve stable frame rate transmission, they are relatively expensive to develop and implement in small terminal control scenarios, requiring high-end hardware, increasing costs, manpower, and learning time, and complicating engineering implementation.

[0052] To address the aforementioned issues, this application provides a frame rate control method, apparatus, and device. While ensuring stable frame rate transmission, it alleviates the workload of the backend server and guarantees user service quality while reducing operating costs. Specifically, traditional frame rate control methods involve real-time negotiation between the front-end and back-end, real-time calculation by the terminal, or hardware caching to reduce the frame rate of frozen frames. During their research, the inventors discovered that while these traditional methods can achieve stable frame rate transmission in small terminal control scenarios, they are costly to develop and require high-end hardware, increasing costs, manpower, and learning time, and complicating engineering implementation. Considering these issues, the inventors investigated whether real-time calculation could be implemented at the terminal device front-end, using a timer lock to stabilize the frame rate, thereby reducing the load on the backend server. Based on this, the technical solution of this application is proposed.

[0053] Figure 1 This diagram illustrates an application scenario of the frame rate control method provided in this application. The frame rate control method provided in this application is mainly applied to small terminal control scenarios, such as game controllers, mobile phones, VR devices, etc. Small terminal control scenarios include at least a user and a terminal device. The terminal device is configured with controls that can be operated by the user, a backend server, and a frontend. The controls that can be operated by the user can be a mobile phone screen, a game controller, or a joystick in a VR device, etc. There are no specific limitations on the type of terminal device, the type of user, or the controls configured on the terminal device. This solution does not limit the specific form of the above devices.

[0054] The technical solution of this application and how the technical solution of this application solves the above-mentioned technical problems are described in detail below with specific embodiments. These specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments. The embodiments of this application will now be described with reference to the accompanying drawings.

[0055] Figure 2 A flowchart illustrating an embodiment of the frame rate control method provided in this application is shown below. Figure 2 As shown, the frame rate control method provided in this embodiment is applied to a terminal device and specifically includes the following steps:

[0056] S101: In response to user actions on the application, cache a snapshot of the application's graphical user interface in real time.

[0057] In this step, to avoid frame drops, the terminal device caches a snapshot of the application's graphical user interface when the user interacts with the application and updates it in real time based on the user's actions. Specifically, the terminal device activates controls when the user interacts with the application.

[0058] S102: After the user completes the operation, obtain the operation instruction and determine whether the operation instruction is a single operation or multiple operations in succession.

[0059] In this step, in order to update the cache in real time, the operation instructions entered by the user are obtained in real time after the user operation is completed, and the operation instructions are converted into control instructions. In order to better control the frame rate later, the type of operation instruction is determined as a single operation or multiple operations in succession.

[0060] Specifically, the system acquires user operation commands. When the user starts an operation, it captures the user's touch action. When the user moves, it captures the movement distance after the touch. Finally, when the user ends the operation, it captures the action of the user ending the touch. If the user only touches or momentarily touches the application control, it is determined as a single operation. If the user swipes or touches the application control continuously, it is determined as multiple consecutive operations.

[0061] S103: If the type of operation instruction is multiple consecutive operation instructions, determine whether the operation duration of the operation instruction exceeds the instruction sending cycle.

[0062] In this step, if it is determined that the user is swiping or continuously touching the application control based on the operations in the above steps, then it is determined that the user's operation command is a series of consecutive operation commands. In order to ensure stable frame rate transmission, after determining that the operation command type is a series of consecutive operation commands, it is determined whether the operation duration of the operation command exceeds the command sending cycle.

[0063] Specifically, the command sending period is calculated in advance based on the frame rate set by the application. The specific calculation formula is as follows:

[0064]

[0065] Here, 1000 represents 1000 milliseconds, and the frame rate is a preset frame rate.

[0066] S104: If the operation duration of the operation instruction does not exceed the instruction sending cycle, then after the target delay, the latest frame snapshot in the local cache will be retrieved as the response information of the operation instruction and sent to the server.

[0067] In this step, the instruction sending period is calculated according to the formula in the above steps and compared with the operation duration of the operation instruction. If the operation duration of the operation instruction does not exceed the instruction sending period, in order to ensure stable service quality for users, a waiting queue is established and a target delay is set to send the response information of the operation instruction.

[0068] Specifically, if the operation duration of an operation command does not exceed the command sending cycle, the difference between the command sending cycle and the operation duration is used as the target delay for waiting and sending. After the target delay, the latest frame snapshot from the local cache is retrieved as the response information for the operation command and sent to the server. During the target delay, the local cache is updated in real time to avoid frame loss, and after the target delay, the historical cache is discarded, and the latest frame snapshot from the local cache is retrieved.

[0069] The frame rate control method provided in this embodiment responds to user operations on the application by caching a snapshot of the application's graphical user interface in real time, acquiring operation instructions, converting them into control instructions, and then determining whether the operation instructions are single or multiple consecutive operations. If the operation instructions are multiple consecutive operations, it is determined whether the operation duration of the operation instructions exceeds the instruction sending cycle. If it does not exceed the instruction sending cycle, a target delay is applied, and a waiting queue is established to send the response information for the operation instructions. Through the above operations, the terminal device's front-end calculation is realized, and the frame rate is ensured by establishing a waiting queue through time calibration, thereby avoiding frame loss by updating the local cache in real time.

[0070] Figure 3 A flowchart illustrating Embodiment 2 of the frame rate control method provided in this application is shown below. Figure 3 As shown, based on the above embodiments, the frame rate control method provided in this application further includes the following steps:

[0071] S105: Calculate the instruction sending cycle for the application to send instructions to the server based on the frame rate set by the application.

[0072] In this step, in order to adapt to different scenarios, the frame rate can be preset according to the specific scenario requirements, and the instruction sending cycle for sending instructions to the server can be calculated based on the preset frame rate.

[0073] Specifically, the formula for calculating the instruction sending cycle is as follows:

[0074]

[0075] Here, 1000 represents 1000 milliseconds, and the frame rate is a preset frame rate.

[0076] S106: If the instruction type is a single operation, the latest frame snapshot in the local cache is retrieved and sent to the server as the response information for the operation instruction.

[0077] In this step, if the type of instruction is determined to be a single operation based on the captured user operation, then there is no need to analyze the response information of the operation instruction. Instead, the latest frame snapshot in the local cache is directly retrieved as the response information of the operation instruction and sent to the server.

[0078] S107: If the operation time of the operation instruction exceeds the instruction sending cycle, the latest frame snapshot in the local cache will be retrieved and sent to the server as the response information of the operation instruction.

[0079] In this step, the type of instruction is determined to be multiple consecutive operations based on the captured user operation, and the operation duration of the operation instruction is calculated to exceed the instruction sending cycle. In order to avoid frame loss, the latest frame snapshot in the local cache is taken out as the response information of the operation instruction and sent to the server.

[0080] S108: If at least one of the following conditions is detected: network fluctuation, network frame loss, or network resource exhaustion, the latest frame snapshot in the local cache is retrieved and sent to the server as the response information for the operation instruction.

[0081] In this step, if any unexpected situation such as network fluctuation, network frame loss, or network resource exhaustion is detected during user operation and frame rate transmission, in order to ensure user service quality and avoid frame loss in unexpected situations, the latest frame snapshot in the local cache is retrieved as the response information of the operation command and sent to the server.

[0082] S109: After sending the response information of the operation command to the server, a timer lock with a timeout period of command sending period is set and locked, and the timer lock is unlocked after the timeout period reaches the next command sending period.

[0083] In this step, after sending the response information of the operation command to the server according to the user's operation command, a timer lock is added to lock the frame rate in order to ensure stable transmission in real time.

[0084] Specifically, the timer lock's duration is the command sending cycle. In the above steps, if the command type is a single operation, an unexpected situation, or a series of consecutive operations and the operation duration of the operation command exceeds the command sending cycle, then the timer lock is added after the operation command's response information is sent, and unlocked after the timer duration is reached. If the command type is a series of consecutive operations and the operation duration of the operation command does not exceed the command sending cycle, then the timer lock is added after the target delay is sent. In this case, the timer lock duration is set to the target delay duration, and unlocked after the timer duration is reached.

[0085] The frame rate control method provided in this embodiment analyzes and determines different user operation commands and sends response information for those commands. If the operation command is a single operation or encounters unexpected situations such as network frame drops, it is sent immediately. If the operation command consists of multiple consecutive operations, a time calibration is set. The response information for the operation command is sent according to the relationship between the duration of the operation command and the command sending cycle. A timer lock is added after the response information is sent, which realizes real-time front-end calculation, reduces server pressure, and controls the frame rate within a certain range. The addition of time calibration and timer lock achieves stable frame rate transmission. Furthermore, by establishing a waiting queue to update the local cache in real time, frame drops are avoided.

[0086] The following section uses the UE4 joystick controller as a specific example to explain in detail the frame rate control method provided in this application. Figure 4 A flowchart illustrating a specific example of the frame rate control method provided in this application embodiment is shown below. Figure 4 As shown, the specific steps include:

[0087] S201: Capture user operation commands, convert them into control commands, and calculate the command sending cycle.

[0088] In this step, the user moves the joystick control of the UE4 joystick controller to activate the joystick control. The operation command is obtained by capturing the user's action and converted into software control command. In order to adapt to different scenarios, the required frame rate for the specific scenario is preset according to the specific scenario, and the command sending cycle is calculated according to the preset frame rate. A cache is built locally, and the snapshot of the joystick controller's graphical user interface is updated in real time in the local cache.

[0089] Specifically, the formula for calculating the command sending cycle based on the preset frame rate is as follows:

[0090]

[0091] Here, 1000 represents 1000 milliseconds, and the frame rate is a preset frame rate.

[0092] S202: Determine whether the operation instruction is a start, stop, or move operation.

[0093] In this step, the type of operation instruction is determined based on the user actions captured in the previous steps. The types mainly include single operations and multiple consecutive operations.

[0094] Specifically, a single operation includes start and stop operations, while multiple consecutive operations include movement operations. The system captures user touch actions to obtain the start command; when it captures continuous user tapping and movement a certain distance, it obtains the movement command; and when the user ends the tapping action, it obtains the stop command.

[0095] S203: If the instruction type is a start or stop operation, the latest frame snapshot in the local cache will be retrieved and sent to the server as the response information of the operation instruction.

[0096] In this step, the type of operation instruction is determined according to the above steps. If the type of instruction is a start or stop operation, it is a single operation. Therefore, it is not necessary to analyze the response information of the operation instruction. The latest frame snapshot in the local cache is directly taken out as the response information of the operation instruction and sent to the server.

[0097] S204: If the type of operation instruction is a move operation, then confirm whether the operation duration of the move operation instruction exceeds the instruction sending cycle.

[0098] In this step, the type of operation instruction is determined according to the above steps. If the type of operation instruction is a movement operation, it is a series of consecutive operations. In order to reduce the server pressure while stabilizing the frame rate, it is necessary to determine whether the operation duration of the movement operation instruction exceeds the instruction sending cycle.

[0099] S205: If the operation time of the movement operation command does not exceed the command sending cycle, then after the target delay, the latest frame snapshot in the local cache will be retrieved as the response information of the operation command and sent to the server.

[0100] In this step, the operation command type is determined to be a movement operation based on the above steps. The operation duration of the movement operation command is compared with the command sending period. If the operation duration does not exceed the command sending period, a waiting queue is established to ensure stable frame rate transmission. A target delay is set. After the target delay, the latest frame snapshot from the local cache is retrieved as the response information for the operation command and sent to the server. The target delay is the difference between the command sending period and the operation duration of the operation command. During the target delay, the local cache is updated in real time to avoid frame loss. After the target delay, the historical cache is discarded, and the latest frame snapshot from the local cache is retrieved.

[0101] S206: If the operation time of the movement operation command exceeds the command sending cycle, the latest frame snapshot in the local cache will be retrieved and sent to the server as the response information of the operation command.

[0102] In this step, if the operation time of the movement operation command exceeds the command sending cycle, in order to avoid frame loss, the latest frame snapshot in the local cache is retrieved as the response information of the operation command and sent to the server.

[0103] S207: If an unexpected situation is detected, the latest frame snapshot in the local cache will be retrieved and sent to the server as the response information for the operation instruction.

[0104] In this step, network transmission may encounter unexpected situations. To ensure service quality and avoid frame loss, the latest frame snapshot from the local cache is retrieved and sent to the server as the response information for the operation command. These unexpected situations include common network problems such as network fluctuations, network frame drops, or network resource exhaustion.

[0105] S208: Set timer lock.

[0106] In this step, in order to control the frame rate and make the frame rate transmission more stable, after sending the response information of the operation command to the server, a timer lock is set to lock it and prevent the sending of information to the background. When the timer duration is reached, the lock is opened to send information.

[0107] Specifically, for single operations with the instruction type of start or stop, unexpected situations, and multiple consecutive operations with the instruction type of move, where the operation duration of the operation instruction exceeds the instruction sending cycle, a timer lock with the instruction sending cycle of the specified duration is applied after the response information of the operation instruction is sent, and the lock is released after the specified duration is reached. For multiple consecutive operations with the instruction type of move, where the operation duration of the operation instruction does not exceed the instruction sending cycle, a timer lock is applied after the target delay is sent. In this case, the timer lock duration is set to the target delay duration, and the lock is released after the specified duration is reached.

[0108] The frame rate control method provided in this embodiment encapsulates the method into a general function through real-time front-end calculation and software caching, reducing server pressure. At the same time, it achieves stable frame rate transmission through time calibration and timer lock, avoiding frame loss, reducing complexity, and lowering operating costs.

[0109] Figure 5 A schematic diagram of the frame rate control device according to an embodiment of this application is shown below. Figure 5 As shown, the frame rate control device 300 includes:

[0110] The response caching module 301 is used to cache snapshots of the application's graphical user interface in real time in response to user operations on the application.

[0111] The instruction determination module 302 is used to obtain the operation instruction after the user operation is completed, and determine whether the operation instruction is a single operation or multiple operations in succession.

[0112] The duration determination module 303 is used to determine whether the operation duration of the operation instruction exceeds the instruction sending cycle if the type of the operation instruction is multiple consecutive operation instructions. The instruction sending cycle is calculated in advance based on the frame rate set by the application.

[0113] The first sending module 304 is used to retrieve the latest frame snapshot from the local cache as the response information of the operation instruction and send it to the server after the target delay if the operation duration of the operation instruction does not exceed the instruction sending period. The target delay is the difference between the instruction sending period and the operation duration of the operation instruction.

[0114] Figure 6 A schematic diagram of the structure of the frame rate control device according to Embodiment 2 of this application is shown below. Figure 6 As shown, the frame rate control device 300 also includes:

[0115] The second sending module 305 is used to retrieve the latest frame snapshot from the local cache and send it to the server as the response information of the operation instruction if the operation time of the operation instruction exceeds the instruction sending period.

[0116] The third sending module 306 is used to retrieve the latest frame snapshot from the local cache and send it to the server as the response information of the operation instruction if the instruction type is a single operation.

[0117] The fourth sending module 307 is used to send the latest frame snapshot from the local cache as response information to the operation command to the server if at least one of the following situations is detected: network fluctuation, network frame loss, or network resource exhaustion.

[0118] The timing setting module 308 is used to set and lock a timer lock with a timing period equal to the instruction sending cycle after sending the response information of the operation instruction to the server, and to unlock the timer lock after the timing period reaches the instruction sending cycle; during the timer lock locking period, no response information of the operation instruction is sent to the server.

[0119] The period calculation module 309 is used to calculate the instruction sending period for the application to send instructions to the server based on the frame rate set by the application.

[0120] The frame rate control device provided in this embodiment is used to execute the frame rate control method in any of the aforementioned method embodiments. Its implementation principle and technical effect are similar, and will not be described again here.

[0121] This application also provides a terminal device. Figure 7This is a schematic diagram of the structure of the terminal device provided in the embodiments of this application, such as... Figure 7 As shown, the terminal device 400 includes: a memory 401, a processor 402, and a control 403;

[0122] Memory 401 stores computer-executed instructions.

[0123] Processor 402 executes computer execution instructions stored in memory to implement the method in any of the embodiments.

[0124] Control 403 is used for user operation.

[0125] Optionally, the various devices of the terminal device 400 can be connected to each other via a system bus.

[0126] The memory 401 can be a separate memory unit or a memory unit integrated into the processor 402. The number of processors 402 can be one or more.

[0127] Optionally, the terminal device 400 may further include a display, which can be used to display the processing results of the processor and for human-computer interaction. In some embodiments, the display may be the front panel of the terminal device; in other embodiments, the display may be a flexible display screen disposed on a curved or folded surface of the terminal device. Furthermore, the display may be configured as a non-rectangular, irregularly shaped display screen, i.e., a non-rectangular screen. The display may be made of materials such as Liquid Crystal Display (LCD) or Organic Light-Emitting Diode (OLED).

[0128] It should be understood that the processor can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), etc. A general-purpose processor can be a microprocessor or any conventional processor. The steps of the method disclosed in this application can be directly manifested as being executed by a hardware processor, or executed by a combination of hardware and software modules within the processor.

[0129] The system bus can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The system bus can be divided into address bus, data bus, control bus, etc. For ease of representation, only one thick line is used in the diagram, but this does not indicate that there is only one bus or one type of bus. Memory may include random access memory (RAM) and may also include non-volatile memory (NVM), such as at least one disk storage device.

[0130] All or part of the steps in the above-described method embodiments can be implemented by hardware related to program instructions. The aforementioned program can be stored in a readable memory. When the program is executed, it performs the steps of the above-described method embodiments; and the aforementioned memory (storage medium) includes: read-only memory (ROM), RAM, flash memory, hard disk, solid-state drive, magnetic tape, floppy disk, optical disk, and any combination thereof.

[0131] The terminal device provided in this embodiment is used to execute the technical solutions in any of the foregoing method embodiments. Its implementation principle and technical effect are similar, and will not be described again here.

[0132] This application also provides a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, are used to implement the method in any of the embodiments.

[0133] The aforementioned computer-readable storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory, electrically erasable programmable read-only memory, erasable programmable read-only memory, programmable read-only memory, read-only memory, magnetic storage, flash memory, magnetic disk, or optical disk. The readable storage medium can be any available medium accessible to a general-purpose or special-purpose computer.

[0134] Optionally, a readable storage medium can be coupled to a processor, enabling the processor to read information from and write information to the readable storage medium. Alternatively, the readable storage medium can be an integral part of the processor. Both the processor and the readable storage medium can reside in an Application Specific Integrated Circuit (ASIC). Alternatively, the processor and the readable storage medium can exist as discrete components within the device.

[0135] This application also provides a computer program product, which includes a computer program stored in a computer-readable storage medium. At least one processor can read the computer program from the computer-readable storage medium, and when the at least one processor executes the computer program, it can implement the technical solutions provided in any of the above method embodiments.

[0136] Other embodiments of this application will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of this application that follow the general principles of this application and include common knowledge or customary techniques in the art not disclosed herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of this application are indicated by the following claims.

[0137] Other embodiments of this application will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of this application that follow the general principles of this application and include common knowledge or customary techniques in the art not disclosed herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of this application are indicated by the following claims.

[0138] It should be understood that this application is not limited to the precise structure described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this application is limited only by the appended claims.

Claims

1. A frame rate control method, characterized in that, Applied to terminal devices, including: In response to user actions on the application, a snapshot of the application's graphical user interface is cached in real time; After the user completes the operation, the operation instruction is obtained, and the type of the operation instruction is determined to be a single operation or multiple operations in succession; If the type of the operation instruction is multiple consecutive operation instructions, then determine whether the operation duration of the operation instruction exceeds the instruction sending period, which is calculated in advance based on the frame rate set by the application. If the operation duration of the operation instruction does not exceed the instruction sending period, then after the target delay, the latest frame snapshot in the local cache is retrieved as the response information of the operation instruction and sent to the server, wherein the target delay is the difference between the instruction sending period and the operation duration of the operation instruction.

2. The method according to claim 1, characterized in that, The method further includes: If the operation duration of the operation instruction exceeds the instruction sending period, the latest frame snapshot in the local cache will be retrieved and sent to the server as the response information of the operation instruction.

3. The method according to claim 2, characterized in that, The method further includes: If the instruction is a single operation, the latest frame snapshot in the local cache is retrieved and sent to the server as the response information for the operation instruction.

4. The method according to claim 1, characterized in that, The method further includes: If at least one of the following conditions is detected: network fluctuation, network frame loss, or network resource exhaustion, the latest frame snapshot in the local cache is retrieved and sent to the server as the response information for the operation command.

5. The method according to any one of claims 1 to 4, characterized in that, The method further includes: After sending the response information of the operation instruction to the server, a timer lock is set and locked with the time interval of the instruction sending period as the time duration, and the timer lock is unlocked after the time interval reaches the instruction sending period; during the timer lock locking period, no response information of the operation instruction is sent to the server.

6. The method according to any one of claims 1 to 4, characterized in that, The method further includes: The instruction sending cycle for the application to send instructions to the server is calculated based on the frame rate set by the application.

7. A frame rate control device, characterized in that, include: The response caching module is used to cache snapshots of the application's graphical user interface in real time in response to user operations on the application. The instruction determination module is used to obtain the operation instruction after the user operation is completed, and determine whether the operation instruction is a single operation or multiple operations in succession; The duration determination module is used to determine whether the operation duration of the operation instruction exceeds the instruction sending cycle if the type of the operation instruction is multiple consecutive operation instructions. The instruction sending cycle is calculated in advance based on the frame rate set by the application. The first sending module is configured to, if the operation duration of the operation instruction does not exceed the instruction sending period, retrieve the latest frame snapshot from the local cache as the response information of the operation instruction and send it to the server after a target delay, wherein the target delay is the difference between the instruction sending period and the operation duration of the operation instruction.

8. The apparatus according to claim 7, characterized in that, The device further includes: The second sending module is used to retrieve the latest frame snapshot from the local cache and send it to the server as the response information of the operation instruction if the operation time of the operation instruction exceeds the instruction sending period.

9. The apparatus according to claim 8, characterized in that, The device further includes: The third sending module is used to retrieve the latest frame snapshot from the local cache and send it to the server as the response information of the operation instruction if the type of the instruction is a single operation.

10. The apparatus according to claim 7, characterized in that, The device further includes: The fourth sending module is used to retrieve the latest frame snapshot from the local cache and send it to the server as response information for the operation command if at least one of the following conditions is detected: network fluctuation, network frame loss, or network resource exhaustion.

11. The apparatus according to any one of claims 7 to 10, characterized in that, The device further includes: The timing setting module is used to set and lock a timer lock with the timing period of the instruction sending cycle after sending the response information of the operation instruction to the server, and to unlock the timer lock after the timing period reaches the instruction sending cycle; during the timer lock locking period, no response information of the operation instruction is sent to the server.

12. The apparatus according to any one of claims 7 to 10, characterized in that, The device further includes: The period calculation module is used to calculate the instruction sending period of the application sending instructions to the server based on the frame rate set by the application.

13. A terminal device, comprising: Memory, processor, control; The memory stores computer-executed instructions; The processor executes computer execution instructions stored in the memory to implement the method as described in any one of claims 1 to 6.

14. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions, which, when executed by a processor, are used to implement the frame rate control method as described in any one of claims 1 to 6.

Citation Information

Patent Citations

  • Webpage frame acquisition method, server and storage medium

    CN110457623A

  • Video generation method and device, server and storage medium

    CN110457624A