WO2021121142A1 - 动画刷新请求控制方法、装置、计算机设备和存储介质 - Google Patents

动画刷新请求控制方法、装置、计算机设备和存储介质 Download PDF

Info

Publication number
WO2021121142A1
WO2021121142A1 PCT/CN2020/135645 CN2020135645W WO2021121142A1 WO 2021121142 A1 WO2021121142 A1 WO 2021121142A1 CN 2020135645 W CN2020135645 W CN 2020135645W WO 2021121142 A1 WO2021121142 A1 WO 2021121142A1
Authority
WO
WIPO (PCT)
Prior art keywords
request
refresh
animation
refresh request
time
Prior art date
Application number
PCT/CN2020/135645
Other languages
English (en)
French (fr)
Inventor
孟占军
Original Assignee
深圳市万普拉斯科技有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 深圳市万普拉斯科技有限公司 filed Critical 深圳市万普拉斯科技有限公司
Publication of WO2021121142A1 publication Critical patent/WO2021121142A1/zh
Priority to US17/843,214 priority Critical patent/US20220319086A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T13/00Animation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F1/00Details not covered by groups G06F3/00 - G06F13/00 and G06F21/00
    • G06F1/26Power supply means, e.g. regulation thereof
    • G06F1/32Means for saving power
    • G06F1/3203Power management, i.e. event-based initiation of a power-saving mode
    • G06F1/3206Monitoring of events, devices or parameters that trigger a change in power modality
    • G06F1/3228Monitoring task completion, e.g. by use of idle timers, stop commands or wait commands
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F1/00Details not covered by groups G06F3/00 - G06F13/00 and G06F21/00
    • G06F1/26Power supply means, e.g. regulation thereof
    • G06F1/32Means for saving power
    • G06F1/3203Power management, i.e. event-based initiation of a power-saving mode
    • G06F1/3206Monitoring of events, devices or parameters that trigger a change in power modality
    • G06F1/3212Monitoring battery levels, e.g. power saving mode being initiated when battery voltage goes below a certain level
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F1/00Details not covered by groups G06F3/00 - G06F13/00 and G06F21/00
    • G06F1/26Power supply means, e.g. regulation thereof
    • G06F1/32Means for saving power
    • G06F1/3203Power management, i.e. event-based initiation of a power-saving mode
    • G06F1/3206Monitoring of events, devices or parameters that trigger a change in power modality
    • G06F1/3215Monitoring of peripheral devices
    • G06F1/3225Monitoring of peripheral devices of memory devices
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F1/00Details not covered by groups G06F3/00 - G06F13/00 and G06F21/00
    • G06F1/26Power supply means, e.g. regulation thereof
    • G06F1/32Means for saving power
    • G06F1/3203Power management, i.e. event-based initiation of a power-saving mode
    • G06F1/3234Power saving characterised by the action undertaken
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F1/00Details not covered by groups G06F3/00 - G06F13/00 and G06F21/00
    • G06F1/26Power supply means, e.g. regulation thereof
    • G06F1/32Means for saving power
    • G06F1/3203Power management, i.e. event-based initiation of a power-saving mode
    • G06F1/3234Power saving characterised by the action undertaken
    • G06F1/3243Power saving in microcontroller unit
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F1/00Details not covered by groups G06F3/00 - G06F13/00 and G06F21/00
    • G06F1/26Power supply means, e.g. regulation thereof
    • G06F1/32Means for saving power
    • G06F1/3203Power management, i.e. event-based initiation of a power-saving mode
    • G06F1/3234Power saving characterised by the action undertaken
    • G06F1/329Power saving characterised by the action undertaken by task scheduling
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T1/00General purpose image data processing
    • G06T1/20Processor architectures; Processor configuration, e.g. pipelining
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T1/00General purpose image data processing
    • G06T1/60Memory management

Definitions

  • This application relates to the field of computer technology, and in particular to an animation refresh request control method, device, computer equipment and storage medium.
  • each animation in the traditional mechanism handles the refresh operation of its own interface, and the continuous and complex animation is presented in one interface, which will cause the processor to be used frequently and cause the problem of fast power consumption.
  • An animation refresh request control method includes:
  • the target animation refresh request is sent to the processor, and the target animation refresh request is used to instruct the processor to perform a corresponding animation refresh operation.
  • the method before the receiving the animation refresh request of the animation to be refreshed, the method further includes:
  • the method also includes:
  • the processor is controlled to read the corresponding image resource from the local storage according to the target animation refresh request, and perform an animation refresh operation according to the image resource.
  • the method before the sending the target animation refresh request to the processor, the method further includes:
  • the method before the sending the target animation refresh request to the processor, the method further includes:
  • the step of sending the target animation refresh request corresponding to the request times threshold to the processor is performed.
  • the method before the sending the target animation refresh request to the processor, the method further includes:
  • the step of sending the target animation refresh request to the processor is performed.
  • the method when it is detected that the current time reaches the preset refresh time, the target in the time period formed by the current time and the last refresh time is obtained from the temporarily stored animation refresh request Before the animation refresh request, the method further includes:
  • the preset refresh time corresponding to the remaining power is obtained from the correspondence between the power and the preset refresh time.
  • the method further includes:
  • An animation refresh request control device comprising:
  • the receiving module is used to receive the animation refresh request of the animation to be refreshed, and store the animation refresh request in the cache;
  • the detection module is configured to obtain the target animation refresh request within the time period formed by the current moment and the last refresh moment from the temporarily stored animation refresh request when it is detected that the current moment reaches the preset refresh moment;
  • the sending module is configured to send the target animation refresh request to the processor, and the target animation refresh request is used to instruct the processor to perform a corresponding animation refresh operation.
  • a computer device includes a memory and a processor, the memory stores a computer program, and the processor implements the following steps when the processor executes the computer program:
  • the target animation refresh request is sent to the processor, and the target animation refresh request is used to instruct the processor to perform a corresponding animation refresh operation.
  • a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the following steps are implemented:
  • the target animation refresh request is sent to the processor, and the target animation refresh request is used to instruct the processor to perform a corresponding animation refresh operation.
  • the above animation refresh request control method, device, computer equipment and storage medium receive the animation refresh request of the animation to be refreshed and temporarily store the animation refresh request; when it is detected that the current time reaches the preset refresh time, refresh from the temporarily stored animation In the request, obtain the target animation refresh request within the time period formed by the current moment and the last refresh moment; and send the target animation refresh request to the processor, and the target animation refresh request is used to instruct the processor to perform the corresponding animation refresh operation; and It is not when an animation refresh request is received, the animation refresh request is immediately sent to the processor to complete the corresponding animation refresh operation; only when the refresh preset time is reached, the target animation in the time period is obtained from the temporarily stored animation refresh request Request to send the processor to complete the corresponding animation refresh operation, reduce the power consumption loss and reduce the power consumption of the processor by reducing the working time of the processor to execute the animation refresh request operation.
  • Figure 1 is a diagram of the internal structure of a computer device in an embodiment
  • FIG. 2 is a schematic flowchart of a method for controlling an animation refresh request in an embodiment
  • FIG. 3 is a schematic flowchart of an animation refresh request step in an embodiment
  • FIG. 4 is a schematic flowchart of an animation refresh request method in another embodiment
  • Figure 5 is a structural block diagram of an animation refresh request device in an embodiment
  • Fig. 6 is a structural block diagram of an animation refresh request device in another embodiment.
  • the animation refresh request control method provided in this application can be applied to computer equipment.
  • the computer device may be a terminal, and its internal structure diagram may be as shown in Figure 1.
  • the computer equipment includes a processor, a memory, a network interface, a display screen and an input device connected through a system bus.
  • the time and frequency control center receives the animation refresh request of the animation to be refreshed and temporarily stores the animation refresh request; when it detects that the current time reaches the preset refresh time, it obtains the current time and the last refresh time from the temporarily stored animation refresh request.
  • the processor of the computer device is used to provide calculation and control capabilities.
  • the memory of the computer device includes a non-volatile storage medium and an internal memory.
  • the non-volatile storage medium stores an operating system and a computer program.
  • the internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage medium.
  • the network interface of the computer device is used to communicate with an external terminal through a network connection.
  • an animation refresh request control method is realized.
  • the display screen of the computer equipment can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer equipment can be a touch layer covered on the display screen, or it can be a button, a trackball or a touchpad set on the housing of the computer equipment , It can also be an external keyboard, touchpad, or mouse.
  • FIG. 1 is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied.
  • the specific computer device may Including more or fewer parts than shown in the figure, or combining some parts, or having a different arrangement of parts.
  • a method for controlling an animation refresh request is provided. Taking the method applied to the terminal in FIG. 1 as an example for description, the method includes the following steps:
  • Step 202 Receive an animation refresh request of the animation to be refreshed, and temporarily store the animation refresh request.
  • the animation is realized by a series of images, and the moving image formed by shooting the subject frame by frame and continuously playing the series of images to form an animation.
  • the types of animations can include many, and the types of animations can include, but are not limited to, two-dimensional animations, three-dimensional animations, and so on.
  • Animation refresh refers to the process of processing images required for animation playback to achieve animation playback; for example, animation refresh can be video playback, and video playback is achieved by a series of processing such as loading, rendering, and displaying the images required by the video.
  • the animation refresh request is used to refresh the currently displayed screen of the animation.
  • An animation can include multiple sub-animations.
  • the refresh of an animation needs to be achieved through the refresh of each sub-animation; the corresponding image size of each sub-animation can be different, and each sub-animation
  • the refreshing time is also different; for example, an animation includes changes in the actions and expressions of different characters, and the changes in the actions and expressions of each character correspond to different frame data.
  • the time and frequency control center of the terminal receives the animation refresh request of each sub-animation in the animation to be refreshed, and each animation refresh request carries the request time of the refresh request, and the received animation refresh request is in the order of the request time.
  • Temporary storage is performed sequentially; optionally, the terminal receives the animation refresh request of the animation to be refreshed, and temporarily stores the received animation refresh request in the terminal's cache; wherein the cache mode can include but is not limited to memory cache, file cache, and database Cache, Memcache cache, etc.
  • Step 204 When it is detected that the current time reaches the preset refresh time, obtain the target animation refresh request within the time period formed by the current time and the last refresh time from the temporarily stored animation refresh request.
  • the preset refresh time refers to the preset animation refresh time
  • the preset refresh time set for the animation refresh may be set at equal time intervals, or may be set at unequal actual intervals.
  • the animation refresh can be set to set the preset refresh time every 60ms (milliseconds), or it can be set at a time interval of 10ms, 20ms, 40ms, 60ms.
  • the preset refresh time not limited.
  • the terminal receives the animation refresh request of the animation to be refreshed, the current time is obtained in real time by calling the time function, and the data type of the obtained current time value may be a string type; when the obtained time is equal to the preset refresh time
  • the last refresh time is obtained, the time interval between the current time and the last refresh time is calculated, and the target animation refresh request in the time period is obtained from the cache according to the last refresh time, the current time and the time interval.
  • the last refresh time is 9:30:00
  • the current refresh time is 9:30:30
  • the time period from 9:30:30 to 9:30:30 is obtained from the temporarily stored animation refresh request. All corresponding target animation refresh requests.
  • the terminal when the animation starts to play, receives the animation refresh request of the animation to be refreshed, and triggers the timer to start timing.
  • the timer duration is equal to the preset time interval, that is, the current time reaches the preset refresh time.
  • Get the last refresh time and get the target animation refresh request in the time period formed by the current time and the last refresh time from the cache.
  • Step 206 Send the target animation refresh request to the processor, and the target animation refresh request is used to instruct the processor to perform a corresponding animation refresh operation.
  • the time and frequency control center in the terminal sends a wake-up instruction to the processor to wake the processor from the idle state, and the processor executes the target animation after receiving the target refresh request in the wake-up state
  • the animation refresh operation corresponding to the refresh request can be, but is not limited to, a current pulse signal, and the current pulse signal includes a rising edge pulse signal and a falling edge pulse signal.
  • the animation refresh request of the animation to be refreshed is received, and the animation refresh request is stored in the cache; when it is detected that the current time reaches the preset refresh time, the current animation refresh request is obtained from the temporarily stored animation refresh request.
  • the animation refresh request is immediately sent to the processor to complete the corresponding animation refresh operation; only when the refresh preset time is reached, the target animation request within the time period obtained from the cache is sent to the processor to complete the corresponding
  • the animation refresh operation reduces the number of times the processor wakes up to reduce the working time of the processor to execute the animation refresh request operation, reduces power loss and reduces the power consumption of the processor.
  • the target animation refresh request is deleted from the temporarily stored animation refresh request.
  • the target animation refresh request in the cache is deleted to avoid the loss of the animation refresh request data due to insufficient storage space in the cache, resulting in the animation playback screen It is not smooth, which affects the animation effect and improves the efficiency of reading the target refresh animation request from the cache.
  • FIG. 3 a flow diagram of the animation refresh request control step is provided. Taking the method applied to the terminal in FIG. 1 as an example for description, the method includes the following steps:
  • Step 302 Receive an animation refresh request of the animation to be refreshed, and temporarily store the animation refresh request.
  • Step 304 When it is detected that the current time reaches the preset refresh time, obtain the target animation refresh request within the time period formed by the current time and the last refresh time from the temporarily stored animation refresh request.
  • Step 306 Obtain the request quantity of the target animation refresh request in the time period formed by the current time and the last refresh time.
  • the terminal can obtain the requested number of target animation refresh requests in the time period formed by the current moment and the last refresh moment according to, but not limited to, the result returned by the called counting function; for example, the counting function is the count() function .
  • step 308 it is determined whether the number of requests is equal to the threshold of the number of requests, if so, step 316 is executed, otherwise, step 310 is executed.
  • the request number threshold is the number of requests set in advance, and setting the request number threshold can be used to ensure that the working performance of the processor reaches the best state and the animation refresh effect is smooth.
  • step 310 it is determined whether the number of requests is less than the threshold of the number of requests, if yes, step 312 is executed, otherwise, step 314 is executed.
  • Step 312 Obtain the target animation refresh request from the temporarily stored animation refresh requests, until the number of acquired target animation refresh requests is equal to the request number threshold.
  • step 316 is executed.
  • Step 314 Obtain the priority of the target animation refresh request, and obtain the target animation refresh request corresponding to the request quantity threshold from the target animation refresh request in the time period formed by the current time and the last refresh time according to the priority.
  • the priority is used to indicate the order of the target animation refresh request, and the priority can be, but not limited to, indicated by numbers.
  • the processing sequence corresponding to priority 1, 2, and 3 is: priority 1>priority 2>priority 3.
  • the target animation refresh request corresponding to the request quantity threshold is obtained from the target animation refresh request in the time period formed by the current moment and the last refresh moment.
  • the number of requests threshold is 2, and the target animation refresh request is target animation refresh request A, target animation refresh request B, and target animation refresh request C; among them, target animation refresh request A corresponds to priority 1, and target animation refresh request
  • the priority corresponding to B is 2, and the priority corresponding to the target animation refresh request C is 3, priority 1>priority 2>priority 3. According to the priority, the target animation refresh request A and the target animation refresh request B are obtained.
  • the preset refresh time is updated to obtain the updated preset refresh time; when it is detected that the current time reaches the updated preset refresh time, the current time is obtained from the cache
  • the request quantity of the target animation refresh request in the time period formed by the last refresh moment is equal to the request quantity threshold, the target animation refresh request is sent to the processor.
  • the preset is updated Refresh time, that is, shorten the time interval between the current time and the preset refresh time; when it is detected that the current time reaches the updated preset refresh time, the time period formed by the current time and the last refresh time is obtained from the cache.
  • the target animation refresh request is sent to the processor to prevent the processor from receiving too many target animation refresh requests, resulting in a decrease in processor performance and unsmooth animation refresh screens.
  • Step 316 Send the target animation refresh request to the processor.
  • the terminal sends the target animation refresh request to the processor, and the processor completes the corresponding animation refresh operation according to the target animation refresh request to realize continuous playback of the animation.
  • the animation refresh request of the animation to be refreshed is received, and the animation refresh request is temporarily stored in the cache; when it is detected that the current time reaches the preset refresh time, the current time is obtained from the cached animation refresh request
  • the target animation refresh request within the time period formed by the last refresh moment; obtain the request quantity of the target animation refresh request within the time period formed by the current moment and the last refresh moment; determine whether the request quantity is equal to the request quantity threshold, when When the number of requests is equal to the request number threshold, the target animation refresh request is sent to the processor; when the number of requests is less than the request number threshold, the target animation refresh request is obtained from the cache until the requested number of the obtained target animation refresh request is equal to the request number threshold When the time, the target animation refresh request is sent to the processor; when the number of requests is greater than the request number threshold, the priority of the target animation refresh request is obtained.
  • the target animation in the time period formed from the current moment and the last refresh moment In the refresh request the target animation refresh request corresponding to the request quantity threshold is obtained, and the target animation refresh request is sent to the processor.
  • the request number of the target animation refresh request in the time period formed by the current time and the last refresh time is further judged to ensure that the processor receives the target animation refresh request corresponding to the request number threshold , which not only reduces the working time of the processor and power consumption, but also ensures the working performance of the processor and guarantees the animation effect of the animation refresh.
  • an animation refresh request control method is provided. Taking the method applied to the terminal in FIG. 1 as an example for description, the method includes the following steps:
  • Step 402 Obtain image resources of the animation to be refreshed, and store the image resources in a local memory.
  • the terminal can, but is not limited to, download the image resources of the animation to be refreshed from the server, and perform rendering processing on the acquired image resources through a graphics processing unit (Graphics Processing Uni, GPU) to obtain rendering data, and store the obtained rendering data In local storage.
  • a graphics processing unit Graphics Processing Uni, GPU
  • Step 404 Receive an animation refresh request of the animation to be refreshed, and temporarily store the animation refresh request.
  • the terminal receives the animation refresh request of the animation to be refreshed, and temporarily stores the received animation refresh request in the buffer of the terminal.
  • Step 406 Obtain the remaining power of the terminal corresponding to the animation refresh request; according to the remaining power, obtain the preset refresh time corresponding to the remaining power from the correspondence between the power and the preset refresh time.
  • the time and frequency control center obtains the remaining power of the terminal corresponding to the animation refresh request; obtains the time interval corresponding to the adjacent preset refresh time according to the remaining power; and obtains the current time, and resets the preset according to the current time and time interval Refresh moment.
  • the time interval corresponding to adjacent preset refresh moments is 20ms
  • the time interval corresponding to adjacent preset refresh moments is 30ms
  • the remaining power obtained is changed from 84% to 82%
  • the time interval corresponding to the adjacent preset refresh time is changed from 20ms to 30ms
  • the current time is 10:12:01, 00ms
  • the preset refresh time is changed from 10 Hour 12 minutes 01 seconds 20 milliseconds becomes 10 hours 12 minutes 01 seconds 30 milliseconds.
  • Step 408 When it is detected that the current time reaches the preset refresh time, obtain the target animation refresh request within the time period formed by the current time and the last refresh time from the temporarily stored animation refresh request.
  • Step 410 Send the target animation refresh request to the processor.
  • the terminal sends a wake-up instruction to the processor to wake the processor from the idle state, and the processor performs the animation refresh operation corresponding to the target animation refresh request after receiving the target refresh request in the wake-up state.
  • Step 412 Control the processor to read the corresponding image resource from the local storage according to the target animation refresh request, and perform an animation refresh operation according to the image resource.
  • the terminal controls the processor, and the processor reads the corresponding rendering data from the local memory according to the target animation refresh request, displays the rendering data on the display screen corresponding to the terminal, and completes the animation refresh operation.
  • Step 414 Delete the target animation refresh request from the temporarily stored animation refresh request.
  • the terminal detects that the processor has performed the corresponding animation refresh operation according to the target animation refresh request, it deletes the target animation refresh request from the cache.
  • the above animation refresh request control method before receiving the animation refresh request of the animation to be refreshed and temporarily storing the animation refresh request in the cache, first obtain the image resources of the animation to be refreshed from the server, and store the image resources in the local storage. ; Then obtain the remaining power of the terminal corresponding to the animation refresh request; according to the remaining power, obtain the preset refresh time corresponding to the remaining power from the corresponding relationship between the power and the preset refresh time, and change the preset according to the current remaining power settings of the terminal Refresh time; when it is detected that the current time reaches the preset refresh time, obtain the target animation refresh request within the time period formed by the current time and the last refresh time from the temporarily stored animation refresh request; send the target animation refresh request to Processor; control the processor, read the corresponding image resource from the local memory according to the target animation refresh request, and execute the animation refresh operation according to the image resource, when the terminal detects that the processor has performed the corresponding animation refresh operation according to the target animation refresh request After that, delete the target animation refresh request from the cache.
  • the terminal obtains the image resource of the animation to be refreshed, and stores the image resource in the local memory; receives the animation refresh request of the animation to be refreshed, and stores the animation refresh request in the cache; obtains the terminal corresponding to the animation refresh request According to the remaining power, obtain the preset refresh time corresponding to the remaining power from the corresponding relationship between the power and the preset refresh time; when it is detected that the current time reaches the preset refresh time, from the cached animation refresh request Get the target animation refresh request in the time period formed by the current moment and the last refresh moment; get the request quantity of the target animation refresh request in the time period formed by the current moment and the last refresh moment.
  • the target animation refresh request is sent to the processor, and the processor executes the corresponding animation refresh operation according to the target animation refresh request; After the animation refresh operation, the terminal deletes the target animation refresh request from the cache.
  • the terminal deletes the target animation refresh request from the cache.
  • the preset refresh time is updated to get the updated preset refresh time; when it is detected that the current time reaches the updated preset refresh time, the current time is obtained from the temporarily stored animation refresh request
  • the target animation refresh request is sent to the processor, and the processor executes the corresponding animation refresh operation according to the target animation refresh request; After detecting that the processor performs the corresponding animation refresh operation, the terminal deletes the target animation refresh request from the cache.
  • an animation refresh request control device 500 which includes: a receiving module 502, a detecting module 504, and a sending module 506, wherein:
  • the receiving module 502 is configured to receive an animation refresh request of the animation to be refreshed, and temporarily store the animation refresh request.
  • the detection module 504 is configured to obtain the target animation refresh request in the time period formed by the current time and the last refresh time from the temporarily stored animation refresh request when it is detected that the current time reaches the preset refresh time.
  • the sending module 506 is configured to send a target animation refresh request to the processor, and the target animation refresh request is used to instruct the processor to perform a corresponding animation refresh operation.
  • the animation refresh request of the animation to be refreshed is received, and the animation refresh request is temporarily stored in the cache; when it is detected that the current time reaches the preset refresh time, the current animation refresh request is obtained from the temporarily stored animation refresh request.
  • the target animation refresh request within the time period formed by the time and the last refresh time; and the target animation refresh request is sent to the processor, the target animation refresh request is used to instruct the processor to perform the corresponding animation refresh operation; by reducing the animation refresh direction
  • the number of requests sent by the processor reduces the working time for the processor to perform animation refresh request operations, reduces power loss and reduces the power consumption of the processor.
  • an animation refresh request control device 500 which includes an acquisition module 508, a control module 510, and an update module in addition to the receiving module 502, the detecting module 504, and the sending module 506.
  • Module 512, delete module 514 where:
  • the acquiring module 508 is used to acquire the image resource of the animation to be refreshed, and store the image resource in the local memory.
  • the obtaining module 508 is further configured to obtain the request quantity of the target animation refresh request in the time period formed by the current moment and the last refresh moment.
  • the obtaining module 508 is further configured to, when it is detected that the number of requests is less than the request number threshold, continue to obtain the target animation refresh request from the temporarily stored animation refresh request, until the number of the obtained target animation refresh request is equal to the request.
  • the number threshold When the number threshold.
  • the acquiring module 508 is also configured to acquire the priority of the target animation refresh request when it is detected that the number of requests is greater than the threshold of the number of requests; according to the priority, within the time period formed by the current moment and the last refresh moment The target animation refresh request corresponding to the request quantity threshold is obtained in the target animation refresh request.
  • the obtaining module 508 is also used to obtain the target in the time period formed by the current time and the last refresh time from the temporarily stored animation refresh request when it is detected that the current time has reached the updated preset refresh time.
  • the number of requests for animation refresh requests is equal to the number of requests threshold.
  • the obtaining module 508 is further configured to obtain the remaining power of the terminal corresponding to the animation refresh request; according to the remaining power, obtain the preset refresh time corresponding to the remaining power from the correspondence between the power and the preset refresh time.
  • the control module 510 is configured to control the processor, read the corresponding image resource from the local memory according to the target animation refresh request, and execute the animation refresh operation according to the image resource.
  • the update module 512 is configured to update the preset refresh time when it is detected that the number of requests is greater than the threshold of the number of requests to obtain the updated preset refresh time.
  • the deleting module 514 is used to delete the target animation refresh request from the cache.
  • the acquiring module 508 before the receiving module 502 receives the animation refresh request of the animation to be refreshed, and temporarily stores the animation refresh request in the cache, the acquiring module 508 first obtains the image resource of the animation to be refreshed from the server, and stores the image resource In the local memory; then obtain the remaining power of the terminal corresponding to the animation refresh request; according to the remaining power, obtain the preset refresh time corresponding to the remaining power from the correspondence between the power and the preset refresh time, and obtain the preset refresh time corresponding to the current remaining power of the terminal Set and change the preset refresh time; when the detection module 504 detects that the current time reaches the preset refresh time, it obtains the target animation refresh request in the time period formed by the current time and the last refresh time from the temporarily stored animation refresh request; The target animation refresh request is sent to the processor through the sending module 506; the processor is controlled by the control module 510 to read the corresponding image resource from the local memory according to the target animation refresh request, and after the processor performs the animation refresh operation according to the image resource,
  • Each module in the above-mentioned animation refresh request control device can be implemented in whole or in part by software, hardware and a combination thereof.
  • the above-mentioned modules may be embedded in the form of hardware or independent of the processor in the computer equipment, or may be stored in the memory of the computer equipment in the form of software, so that the processor can call and execute the operations corresponding to the above-mentioned modules.
  • a computer device including a memory and a processor, a computer program is stored in the memory, and the processor implements the following steps when the processor executes the computer program:
  • the target animation refresh request is sent to the processor, and the target animation refresh request is used to instruct the processor to perform a corresponding animation refresh operation.
  • the processor further implements the following steps when executing the computer program:
  • the method further includes:
  • Methods also include:
  • the control processor reads the corresponding image resource from the local memory according to the target animation refresh request, and executes the animation refresh operation according to the image resource.
  • the processor further implements the following steps when executing the computer program:
  • the processor further implements the following steps when executing the computer program:
  • the processor further implements the following steps when executing the computer program:
  • the preset refresh time is updated to obtain the updated preset refresh time
  • the request number of the target animation refresh request in the time period formed by the current time and the last refresh time is obtained from the temporarily stored animation refresh request when the number of requests is equal to the request number threshold, Perform the step of sending the target animation refresh request to the processor.
  • the processor further implements the following steps when executing the computer program:
  • the method further includes:
  • the preset refresh time corresponding to the remaining power is obtained from the correspondence between the power and the preset refresh time.
  • the processor further implements the following steps when executing the computer program:
  • a computer-readable storage medium on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented:
  • the target animation refresh request is sent to the processor, and the target animation refresh request is used to instruct the processor to perform a corresponding animation refresh operation.
  • the method further includes:
  • Methods also include:
  • the control processor reads the corresponding image resource from the local memory according to the target animation refresh request, and executes the animation refresh operation according to the image resource.
  • the preset refresh time is updated to obtain the updated preset refresh time
  • the request number of the target animation refresh request in the time period formed by the current time and the last refresh time is obtained from the temporarily stored animation refresh request when the number of requests is equal to the request number threshold, Perform the step of sending the target animation refresh request to the processor.
  • the method further includes:
  • the preset refresh time corresponding to the remaining power is obtained from the correspondence between the power and the preset refresh time.
  • Non-volatile memory may include read only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory.
  • Volatile memory may include random access memory (RAM) or external cache memory.
  • RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous chain Channel (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Processing Or Creating Images (AREA)
  • Controls And Circuits For Display Device (AREA)

Abstract

一种动画刷新请求控制方法、装置、计算机设备和存储介质。方法包括:接收待刷新动画的动画刷新请求,并暂存动画刷新请求(202);当检测到当前时刻到达预设刷新时刻时,从暂存的动画刷新请求中获取当前时刻与上次刷新时刻所形成的时间段内的目标动画刷新请求(204);以及将目标动画刷新请求发送给处理器,目标动画刷新请求用于指示处理器执行对应的动画刷新操作(206)。采用本方案能够减少处理器的耗电量。

Description

动画刷新请求控制方法、装置、计算机设备和存储介质 【技术领域】
本申请涉及计算机技术领域,特别是涉及一种动画刷新请求控制方法、装置、计算机设备和存储介质。
【背景技术】
随着计算机技术发展,用户对终端应用的服务需求不断提高,对于应用界面中的动画显示的流畅度以及画面显示元素的颗粒度的要求也越来越高,需要连续动画或者多个对象同时运动。目前在页面中显示动画,通过触发处理器执行动画刷新操作,实现画面的连续动作。
然而,传统机制中各个动画各自处理自己界面的刷新操作,在一个界面呈现连续复杂动画,会导致处理器频繁使用而造成耗电快的问题。
【发明内容】
基于此,有必要针对上述技术问题,提供一种能够减少处理器耗电量的动画刷新请求控制方法、装置、计算机设备和存储介质。
一种动画刷新请求控制方法,所述方法包括:
接收待刷新动画的动画刷新请求,并暂存所述动画刷新请求;
当检测到当前时刻到达预设刷新时刻时,从所述暂存的动画刷新请求中获取所述当前时刻与上次刷新时刻所形成的时间段内的目标动画刷新请求;以及
将所述目标动画刷新请求发送给处理器,所述目标动画刷新请求用于指示所述处理器执行对应的动画刷新操作。
在其中一个实施例中,在所述接收待刷新动画的动画刷新请求之前,所述方法还包括:
获取待刷新动画的图像资源,并将所述图像资源存储在本地存储器中;
所述方法还包括:
控制所述处理器,根据所述目标动画刷新请求从所述本地存储器中读取对应的图像资源,并根据所述图像资源执行动画刷新操作。
在其中一个实施例中,在所述将所述目标动画刷新请求发送给处理器之前,所述方法还包括:
获取所述当前时刻与上次刷新时刻所形成的时间段内的目标动画刷新请求的请求数量;
当检测到所述请求数量小于请求数量阈值时,继续从所述暂存的动画刷新请求中获取目标动画刷新请求,直到获取的目标动画刷新请求的请求数量等于所述请求数量阈值时,执行所述将所述目标动画刷新请求发送给处理器步骤。
在其中一个实施例中,在所述将所述目标动画刷新请求发送给处理器之前,所述方法还包括:
获取所述当前时刻与上次刷新时刻所形成的时间段内的目标动画刷新请求的请求数量;
当检测到所述请求数量大于所述请求数量阈值时,获取所述目标动画刷新请求的优先级;
根据所述优先级,从所述当前时刻与上次刷新时刻所形成的时间段内的目标动画刷新请求中获取所述请求数量阈值对应的目标动画刷新请求;
执行将所述请求次数阈值对应的目标动画刷新请求发送给处理器步骤。
在其中一个实施例中,在所述将所述目标动画刷新请求发送给处理器之前,所述方法还包括:
获取所述当前时刻与上次刷新时刻所形成的时间段内的目标动画刷新请求的请求数量;
当检测到所述请求数量大于所述请求数量阈值时,更新所述预设刷新时刻,得到更新后的预设刷新时刻;
当检测到当前时刻到达更新后的预设刷新时刻,从所述暂存的动画刷新请求中获取所述当前时刻与上次刷新时刻所形成的时间段内的目标动画刷新请求的请求数量等于请求数量阈值时,执行将所述目标动画刷新请求发送给处理器步骤。
在其中一个实施例中,在所述当检测到当前时刻到达预设刷新时刻时,从所述暂存的动画刷新请求中获取所述当前时刻与上次刷新时刻所形成的时间段内的目标动画刷新请求之前,所述方法还包括:
获取所述动画刷新请求对应终端的剩余电量;
根据所述剩余电量,从电量与预设刷新时刻之间的对应关系中获取所述剩余电量对应的预设刷新时刻。
在其中一个实施例中,在所述将所述目标动画刷新请求发送给处理器之后,所述方法还包括:
从所述暂存的动画刷新请求中删除所述目标动画刷新请求。
一种动画刷新请求控制装置,所述装置包括:
接收模块,用于接收待刷新动画的动画刷新请求,并把所述动画刷新请求存储在缓存中;
检测模块,用于当检测到当前时刻到达预设刷新时刻时,从所述暂存的动画刷新请求中获取所述当前时刻与上次刷新时刻所形成的时间段内的目标动画刷新请求;以及
发送模块,用于将所述目标动画刷新请求发送给处理器,所述目标动画刷新请求用于指示所述处理器执行对应的动画刷新操作。
一种计算机设备,包括存储器和处理器,所述存储器存储有计算机程序,所述处理器执行所述计算机程序时实现以下步骤:
接收待刷新动画的动画刷新请求,并把所述动画刷新请求存储在缓存中;
当检测到当前时刻到达预设刷新时刻时,从所述暂存的动画刷新请求中获取所述当前时刻与上次刷新时刻所形成的时间段内的目标动画刷新请求;以及
将所述目标动画刷新请求发送给处理器,所述目标动画刷新请求用于指示所述处理器执行对应的动画刷新操作。
一种计算机可读存储介质,其上存储有计算机程序,所述计算机程序被处理器执行时实现以下步骤:
接收待刷新动画的动画刷新请求,并暂存所述动画刷新请求;
当检测到当前时刻到达预设刷新时刻时,从所述暂存的动画刷新请求中获取所述当前时刻与上次刷新时刻所形成的时间段内的目标动画刷新请求;以及
将所述目标动画刷新请求发送给处理器,所述目标动画刷新请求用于指示所述处理器执行对应的动画刷新操作。
上述动画刷新请求控制方法、装置、计算机设备和存储介质,通过接收待刷新动画的动画刷新请求,并暂存动画刷新请求;当检测到当前时刻到达预设刷新时刻时,从暂存的动画刷新请求中获取当前时刻与上次刷新时刻所形成的时间段内的目标动画刷新请求;以及将目标动画刷新请求发送给处理器,目标动画刷新请求用于指示处理器执行对应的动画刷新操作;而不是当接收到动画刷新请求时,立即把动画刷新请求发送给处理器去完成对应的动画刷新操作;只有达到刷新预设时刻时,把从暂存的动画刷新请求中获取时间段内的目标动画请求发送处理器,去完成对应的动画刷新操作,通过减少处理器执行动画刷新请求操作的工作时间,降低功耗损失和减少处理器的耗电量。
【附图说明】
图1为一个实施例中计算机设备的内部结构图;
图2为一个实施例中动画刷新请求控制方法的流程示意图;
图3为一个实施例中动画刷新请求步骤的流程示意图;
图4为另一个实施例中动画刷新请求方法的流程示意图;
图5为一个实施例中动画刷新请求装置的结构框图;
图6为另一个实施例中动画刷新请求装置的结构框图。
【具体实施方式】
为了使本申请的目的、技术方案及优点更加清楚明白,以下结合附图及实施例,对本申请进行进一步详细说明。应当理解,此处描述的具体实施例仅仅 用以解释本申请,并不用于限定本申请。
本申请提供的动画刷新请求控制方法,可以应用于计算机设备中。该计算机设备可以是终端,其内部结构图可以如图1所示。该计算机设备包括通过***总线连接的处理器、存储器、网络接口、显示屏和输入装置。
其中,时间同频控制中心接收待刷新动画的动画刷新请求并暂存动画刷新请求;当检测到当前时刻到达预设刷新时刻时,从暂存的动画刷新请求中获取当前时刻与上次刷新时刻所形成的时间段内的目标动画刷新请求;以及将目标动画刷新请求发送给处理器,目标动画刷新请求用于指示处理器执行对应的动画刷新操作。其中,该计算机设备的处理器用于提供计算和控制能力。该计算机设备的存储器包括非易失性存储介质、内存储器。该非易失性存储介质存储有操作***和计算机程序。该内存储器为非易失性存储介质中的操作***和计算机程序的运行提供环境。该计算机设备的网络接口用于与外部的终端通过网络连接通信。该计算机程序被处理器执行时以实现一种动画刷新请求控制方法。该计算机设备的显示屏可以是液晶显示屏或者电子墨水显示屏,该计算机设备的输入装置可以是显示屏上覆盖的触摸层,也可以是计算机设备外壳上设置的按键、轨迹球或触控板,还可以是外接的键盘、触控板或鼠标等。
本领域技术人员可以理解,图1中示出的结构,仅仅是与本申请方案相关的部分结构的框图,并不构成对本申请方案所应用于其上的计算机设备的限定,具体的计算机设备可以包括比图中所示更多或更少的部件,或者组合某些部件,或者具有不同的部件布置。
在一个实施例中,如图2所示,提供了一种动画刷新请求控制方法,以该方法应用于图1中的终端为例进行说明,包括以下步骤:
步骤202,接收待刷新动画的动画刷新请求,并暂存动画刷新请求。
其中,动画是由一些系列的图像来实现,通过采用逐帧拍摄对象方式并连续播放这一系列图像而形成的活动影像,从而形成动画。动画的类型可以包括很多中,动画类型可以包括但不仅限于二维动画、三维动画等。动画刷新是指对动画播放所需的图像进行处理来实现动画播放的过程;例如,动画刷新可以视频播放,通过对视频所需的图像进行加载、渲染、显示等一系列处理来实现视频播放。动画刷新请求用于刷新动画当前显示的画面,一个动画中可以包括多个子动画,一个动画的刷新需要通过各个子动画的刷新来实现;每个子动画的对应图像大小可以是不同的,每个子动画刷新的时间也不同;例如,在一个动画中包括不同人物的动作、表情等变化,每个人物的动作、表情变化对应不同的帧数据。
具体地,终端的时间同频控制中心接收待刷新动画中每个子动画的动画刷新请求,且每个动画刷新请求中携带了刷新请求的请求时间,把接收的动画刷 新请求按照请求时间的先后顺序依次进行暂存;可选地,终端接收待刷新动画的动画刷新请求,并把接收的动画刷新请求暂存在终端的缓存中;其中,缓存的方式可以包括但不仅限于内存缓存、文件缓存、数据库缓存、Memcache缓存等方式。步骤204,当检测到当前时刻到达预设刷新时刻时,从暂存的动画刷新请求中获取当前时刻与上次刷新时刻所形成的时间段内的目标动画刷新请求。
其中,预设刷新时刻是指预先设定的动画刷新时刻,动画刷新设置的预设刷新时刻可以是等时间间隔设置的,也可以是不等实际间隔设置的。例如,动画刷新中可以设置为每隔60ms(毫秒)设置预设刷新时刻,也可以是一次按照10ms、20ms、40ms、60ms的时间间隔设置预设刷新时刻,这里对预设刷新时刻的设置方式不做限定。
具体地,在终端接收到待刷新动画的动画刷新请求时,通过调用时间函数实时获取当前的时刻,获取的当前的时刻值的数据类型可以是字符串类型;当获取的时刻与预设刷新时刻相同时,获取上次刷新时刻,计算当前时刻与上次刷新时刻之间的时间间隔,根据上次刷新时刻、当前时刻和时间间隔从缓存中获取所在时间段内的目标动画刷新请求。例如,上次刷新时刻是9时30分00秒,当前刷新时刻是9时30分30秒,从暂存的动画刷新请求中获取时间段9时30分00秒至9时30分30秒内对应的所有目标动画刷新请求。
在一个实施例中,当动画开始播放时,终端接收到待刷新动画的动画刷新请求,触发计时器开始计时,当计时器的计时时长等于预设时间间隔时,即当前时刻达到预设刷新时刻,获取上次刷新时刻,从缓存中获取当前时刻与上次刷新时刻所形成的时间段内的目标动画刷新请求。
步骤206,将目标动画刷新请求发送给处理器,目标动画刷新请求用于指示处理器执行对应的动画刷新操作。
具体地,当当前时刻到达预设刷新时刻时,终端中的时间同频控制中心向处理器发送唤醒指令,把处理器从闲置状态唤醒,处理器在唤醒状态下接收目标刷新请求后执行目标动画刷新请求对应的动画刷新操作;其中,唤醒指令可以但不仅限于是电流脉冲信号,电流脉冲信号包括上升沿脉冲信号、下降沿脉冲信号。
上述动画刷新请求控制方法中,通过接收待刷新动画的动画刷新请求,并把动画刷新请求存储在缓存中;当检测到当前时刻到达预设刷新时刻时,从暂存的动画刷新请求中获取当前时刻与上次刷新时刻所形成的时间段内的目标动画刷新请求;以及将目标动画刷新请求发送给处理器,目标动画刷新请求用于指示处理器执行对应的动画刷新操作;而不是当接收到动画刷新请求时,立即把动画刷新请求发送给处理器去完成对应的动画刷新操作;只有达到刷新预设时刻时,把从缓存中获取时间段内的目标动画请求发送处理器,去完成对应的动画刷新操作,通过减少唤醒处理器的次数达到减少处理器执行动画刷新请求 操作的工作时间,降低功耗损失和减少处理器的耗电量。
在一个实施例中,在将目标动画刷新请求发送给处理器之后,从暂存的动画刷新请求中删除目标动画刷新请求。
具体地,当终端把目标动画刷新请求发送给处理器发送给处理器之后,把缓存中的目标动画刷新请求进行删除,避免因缓存的存储空间不足导致动画刷新请求数据的丢失,造成动画播放画面不流畅,影响动画效果,同时提高了从缓存中读取目标刷新动画请求的效率。
在一个实施例中,如图3所示,提供了一种动画刷新请求控制步骤的流程示意图,以该方法应用于图1中的终端为例进行说明,包括以下步骤:
步骤302,接收待刷新动画的动画刷新请求,并暂存动画刷新请求。
步骤304,当检测到当前时刻到达预设刷新时刻时,从暂存的动画刷新请求获取当前时刻与上次刷新时刻所形成的时间段内的目标动画刷新请求。
步骤306,获取当前时刻与上次刷新时刻所形成的时间段内的目标动画刷新请求的请求数量。
具体地,终端可以根据但不仅限于所调用的计数函数返回的结果,获取当前时刻与上次刷新时刻所形成的时间段内的目标动画刷新请求的请求数量;例如,计数函数为count()函数。
步骤308,判断请求数量是否等于请求数量阈值,若是,执行步骤316,否则执行步骤310。
其中,请求数量阈值是事先设置的请求数量,设置请求数量阈值可用于保证处理器工作性能达到最佳状态,动画刷新效果流畅。
步骤310,判断请求数量是否小于请求数量阈值,若是,执行步骤312,否则执行步骤314。
步骤312,从暂存的动画刷新请求中获取目标动画刷新请求,直到获取的目标动画刷新请求的请求数量等于请求数量阈值。
具体地,当当检测到当前时刻到达预设刷新时刻时,获取当前时刻与上次刷新时刻所形成的时间段内的目标动画刷新请求的请求数量小于请求数量阈值,终端不向处理器发送目标动画刷新请求,延长预设刷新时刻,直到延长后的预设刷新时刻与上次刷新时刻所形成的时间段内的目标动画刷新请求的请求数量等于请求数量阈值时,执行步骤316。
步骤314,获取目标动画刷新请求的优先级,根据优先级,从当前时刻与上次刷新时刻所形成的时间段内的目标动画刷新请求中获取请求数量阈值对应的目标动画刷新请求。
其中,优先级是用于表示目标动画刷新请求的先后顺序,优先级可以但不仅限于用数字表示。例如,优先级1、2、3对应的处理顺序是:优先级1>优先级2>优先级3。
具体地,当检测到当前时刻到达预设刷新时刻时,获取当前时刻与上次刷新时刻所形成的时间段内的目标动画刷新请求的请求数量大于请求数量阈值时;获取目标动画刷新请求对应的优先级,根据优先级,从当前时刻与上次刷新时刻所形成的时间段内的目标动画刷新请求中获取请求数量阈值对应的目标动画刷新请求。例如,请求数量阈值为2,获取目标动画刷新请求为目标动画刷新请求A、目标动画刷新请求B、目标动画刷新请求C;其中,目标动画刷新请求A对应的优先级为1,目标动画刷新请求B对应的优先级为2,目标动画刷新请求C对应的优先级为3,优先级1>优先级2>优先级3,根据优先级,获取目标动画刷新请求A、目标动画刷新请求B。
在一个实施例中,当请求数量大于请求数量阈值时,更新预设刷新时刻,得到更新后的预设刷新时刻;当检测到当前时刻到达更新后的预设刷新时刻,从缓存中获取当前时刻与上次刷新时刻所形成的时间段内的目标动画刷新请求的请求数量等于请求数量阈值时,将目标动画刷新请求发送给处理器。
具体地,当多次检测当前时刻等于预设刷新时刻时,从缓存中获取当前时刻与上次刷新时刻所形成的时间段内的目标动画刷新请求的请求数量大于请求数量阈值时,更新预设刷新时刻,即缩短当前时刻与预设刷新时刻之间的时间间隔;当检测到当前时刻到达更新后的预设刷新时刻时,从缓存中获取当前时刻与上次刷新时刻所形成的时间段内的目标动画刷新请求的请求数量等于请求数量阈值时,将目标动画刷新请求发送给处理器,避免处理器因接收的目标动画刷新请求数量过多,导致处理器工作性能下降和动画刷新画面不流畅。
步骤316,将目标动画刷新请求发送给处理器。
具体地,终端把目标动画刷新请求发送给处理器,处理器根据目标动画刷新请求完成对应的动画刷新操作,实现动画的连续播放。
上述动画刷新请求控制步骤中,通过接收待刷新动画的动画刷新请求,并把动画刷新请求暂存在缓存中;当检测到当前时刻到达预设刷新时刻时,从缓存的动画刷新请求中获取当前时刻与上次刷新时刻所形成的时间段内的目标动画刷新请求;获取当前时刻与上次刷新时刻所形成的时间段内的目标动画刷新请求的请求数量;判断请求数量是否等于请求数量阈值,当请求数量等于请求数量阈值时,将目标动画刷新请求发送给处理器;当请求数量小于请求数量阈值时,从缓存中获取目标动画刷新请求,直到获取的目标动画刷新请求的请求数量等于请求数量阈值时,将目标动画刷新请求发送给处理器;当请求数量大于请求数量阈值,获取目标动画刷新请求的优先级,根据优先级,从当前时刻与上次刷新时刻所形成的时间段内的目标动画刷新请求中获取请求数量阈值对应的目标动画刷新请求,将目标动画刷新请求发送给处理器。通过在当前时刻到达预设刷新时刻时,进一步对当前时刻与上次刷新时刻所形成的时间段内的目标动画刷新请求的请求数量进行判断,确保处理器接收请求数量阈值对应的 目标动画刷新请求,不仅减少处理器的工作时间,降低电量损耗,也确保了处理器的工作性能,保证动画刷新的动画效果。
在另一个实施例中,如图4所示,提供了一种动画刷新请求控制方法,以该方法应用于图1中的终端为例进行说明,包括以下步骤:
步骤402,获取待刷新动画的图像资源,并将图像资源存储在本地存储器中。
具体地,终端可以但不仅限于从服务器中下载待刷新动画的图像资源,把获取的图像资源通过图形处理器(Graphics Processing Uni,GPU)进行渲染处理,得到渲染数据,并把得到的渲染数据存储在本地存储器中。
步骤404,接收待刷新动画的动画刷新请求,并暂存动画刷新请求。
具体地,终端接收待刷新动画的动画刷新请求,把接收的动画刷新请求暂存在终端的缓存中。
步骤406,获取动画刷新请求对应终端的剩余电量;根据剩余电量,从电量与预设刷新时刻之间的对应关系中获取剩余电量对应的预设刷新时刻。
具体地,时间同频控制中心获取动画刷新请求对应终端的剩余电量;根据剩余电量获取相邻预设刷新时刻的对应的时间间隔;并获取当前时刻,根据当前时刻和时间间隔,重新设置预设刷新时刻。例如,剩余电量在80%-85%范围内时,相邻预设刷新时刻对应的时间间隔为20ms,剩余电量在80%-85%范围内时,相邻预设刷新时刻对应的时间间隔为30ms;当获取剩余电量为由84%变为82%时,相邻预设刷新时刻对应的时间间隔有20ms变为30ms,当前时刻为10时12分01秒00毫秒,预设刷新时刻由10时12分01秒20毫秒变为10时12分01秒30毫秒。
步骤408,当检测到当前时刻到达预设刷新时刻时,从暂存的动画刷新请求中获取当前时刻与上次刷新时刻所形成的时间段内的目标动画刷新请求。
步骤410,将目标动画刷新请求发送给处理器。
具体地,终端向处理器发送唤醒指令,把处理器从闲置状态唤醒,处理器在唤醒状态下接收目标刷新请求后执行目标动画刷新请求对应的动画刷新操作。
步骤412,控制处理器,根据目标动画刷新请求从本地存储器中读取对应的图像资源,并根据图像资源执行动画刷新操作。
具体地,终端控制处理器,处理器根据目标动画刷新请求从本地存储器中读取对应的渲染数据,将渲染数据显示在终端所对应的显示屏幕上,完成动画刷新操作。
步骤414,从暂存的动画刷新请求中删除目标动画刷新请求。
具体地,当终端检测到处理器根据目标动画刷新请求执行完对应的动画刷新操作后,从缓存中删除目标动画刷新请求。
上述动画刷新请求控制方法中,在接收待刷新动画的动画刷新请求,并把动画刷新请求暂存在缓存中之前,先从服务器中获取待刷新动画的图像资源, 并将图像资源存储在本地存储器中;然后获取动画刷新请求对应终端的剩余电量;根据剩余电量,从电量与预设刷新时刻之间的对应关系中获取剩余电量对应的预设刷新时刻,通过根据终端当前的剩余电量设置更改预设刷新时刻;当检测到当前时刻到达预设刷新时刻时,从暂存的动画刷新请求中获取当前时刻与上次刷新时刻所形成的时间段内的目标动画刷新请求;将目标动画刷新请求发送给处理器;控制处理器,根据目标动画刷新请求从本地存储器中读取对应的图像资源,并根据图像资源执行动画刷新操作,当终端检测到处理器根据目标动画刷新请求执行完对应的动画刷新操作后,从缓存中删除目标动画刷新请求。通过减少唤醒处理器的次数达到减少处理器执行动画刷新请求操作的工作时间,降低功耗损失和减少处理器的耗电量以及根据终端的剩余电量确定对应的预设刷新时刻提高动画刷新的刷新效果的稳定性。
在一个实施例中,终端获取待刷新动画的图像资源,并将图像资源存储在本地存储器中;接收待刷新动画的动画刷新请求,并把动画刷新请求存储在缓存中;获取动画刷新请求对应终端的剩余电量;根据剩余电量,从电量与预设刷新时刻之间的对应关系中获取剩余电量对应的预设刷新时刻;当检测到当前时刻到达预设刷新时刻时,从缓存的动画刷新请求中获取当前时刻与上次刷新时刻所形成的时间段内的目标动画刷新请求;获取当前时刻与上次刷新时刻所形成的时间段内的目标动画刷新请求的请求数量。
判断请求数量是否等于请求次数阈值,若检测到请求数量等于请求次数阈值,将目标动画刷新请求发送给处理器,处理器根据目标动画刷新请求执行对应的动画刷新操作;在检测到处理器执行对应的动画刷新操作之后,终端从缓存中删除目标动画刷新请求。若检测到请求数量小于请求数量阈值时,继续从缓存中获取目标动画刷新请求,直到获取的目标动画刷新请求的请求数量等于请求数量阈值时,将目标动画刷新请求发送给处理器,处理器根据目标动画刷新请求执行对应的动画刷新操作;在检测到处理器执行对应的动画刷新操作之后,终端从缓存中删除目标动画刷新请求。若检测到请求数量大于请求数量阈值时,更新预设刷新时刻,得到更新后的预设刷新时刻;当检测到当前时刻到达更新后的预设刷新时刻,从暂存的动画刷新请求中获取当前时刻与上次刷新时刻所形成的时间段内的目标动画刷新请求的请求数量等于请求数量阈值时,将目标动画刷新请求发送给处理器,处理器根据目标动画刷新请求执行对应的动画刷新操作;在检测到处理器执行对应的动画刷新操作之后,终端从缓存中删除目标动画刷新请求。
应该理解的是,虽然图2-4的流程图中的各个步骤按照箭头的指示依次显示,但是这些步骤并不是必然按照箭头指示的顺序依次执行。除非本文中有明确的说明,这些步骤的执行并没有严格的顺序限制,这些步骤可以以其它的顺序执 行。而且,图2-4中的至少一部分步骤可以包括多个子步骤或者多个阶段,这些子步骤或者阶段并不必然是在同一时刻执行完成,而是可以在不同的时刻执行,这些子步骤或者阶段的执行顺序也不必然是依次进行,而是可以与其它步骤或者其它步骤的子步骤或者阶段的至少一部分轮流或者交替地执行。
在一个实施例中,如图5所示,提供了一种动画刷新请求控制装置500,包括:接收模块502、检测模块504和发送模块506,其中:
接收模块502,用于接收待刷新动画的动画刷新请求,并暂存动画刷新请求。
检测模块504,用于当检测到当前时刻到达预设刷新时刻时,从暂存的动画刷新请求中获取当前时刻与上次刷新时刻所形成的时间段内的目标动画刷新请求。
发送模块506,用于将目标动画刷新请求发送给处理器,目标动画刷新请求用于指示处理器执行对应的动画刷新操作。
上述动画刷新请求控制装置中,通过接收待刷新动画的动画刷新请求,并把动画刷新请求暂存在缓存中;当检测到当前时刻到达预设刷新时刻时,从暂存的动画刷新请求中获取当前时刻与上次刷新时刻所形成的时间段内的目标动画刷新请求;以及将目标动画刷新请求发送给处理器,目标动画刷新请求用于指示处理器执行对应的动画刷新操作;通过减少动画刷新向处理器的发送请求次数,减少处理器执行动画刷新请求操作的工作时间,降低功耗损失和减少处理器的耗电量。
在另一个实施例中,如图6所示,提供了一种动画刷新请求控制装置500,除包括接收模块502、检测模块504和发送模块506之外还包括获取模块508、控制模块510、更新模块512、删除模块514,其中:
获取模块508,用于获取待刷新动画的图像资源,并将图像资源存储在本地存储器中。
在一个实施例中,获取模块508还用于获取当前时刻与上次刷新时刻所形成的时间段内的目标动画刷新请求的请求数量。
在一个实施例中,获取模块508还用于当检测到请求数量小于请求数量阈值时,继续从暂存的动画刷新请求中获取目标动画刷新请求,直到获取的目标动画刷新请求的请求数量等于请求数量阈值时。
在一个实施例中,获取模块508还用于当检测到请求数量大于请求数量阈值时,获取目标动画刷新请求的优先级;根据优先级,从当前时刻与上次刷新时刻所形成的时间段内的目标动画刷新请求中获取请求数量阈值对应的目标动画刷新请求。
在一个实施例中,获取模块508还用于当检测到当前时刻到达更新后的预设刷新时刻,从暂存的动画刷新请求中获取当前时刻与上次刷新时刻所形成的 时间段内的目标动画刷新请求的请求数量等于请求数量阈值时。
在一个实施例中,获取模块508还用于获取动画刷新请求对应终端的剩余电量;根据剩余电量,从电量与预设刷新时刻之间的对应关系中获取剩余电量对应的预设刷新时刻。
控制模块510,用于控制处理器,根据目标动画刷新请求从本地存储器中读取对应的图像资源,并根据图像资源执行动画刷新操作。
更新模块512,用于当检测到请求数量大于请求数量阈值时,更新预设刷新时刻,得到更新后的预设刷新时刻。
删除模块514,用于从缓存中删除目标动画刷新请求。
在一个实施例中,在接收模块502接收待刷新动画的动画刷新请求,并把动画刷新请求暂存在缓存中之前,获取模块508先从服务器中获取待刷新动画的图像资源,并将图像资源存储在本地存储器中;然后获取动画刷新请求对应终端的剩余电量;根据剩余电量,从电量与预设刷新时刻之间的对应关系中获取剩余电量对应的预设刷新时刻,通过根据终端当前的剩余电量设置更改预设刷新时刻;当检测模块504检测到当前时刻到达预设刷新时刻时,从暂存的动画刷新请求中获取当前时刻与上次刷新时刻所形成的时间段内的目标动画刷新请求;通过发送模块506将目标动画刷新请求发送给处理器;通过控制模块510控制处理器根据目标动画刷新请求从本地存储器中读取对应的图像资源,在处理器根据图像资源执行动画刷新操作之后,通过删除模块514从暂存的动画刷新请求中删除目标动画刷新请求。
关于动画刷新请求控制装置的具体限定可以参见上文中对于动画刷新请求控制方法的限定,在此不再赘述。上述动画刷新请求控制装置中的各个模块可全部或部分通过软件、硬件及其组合来实现。上述各模块可以硬件形式内嵌于或独立于计算机设备中的处理器中,也可以以软件形式存储于计算机设备中的存储器中,以便于处理器调用执行以上各个模块对应的操作。
在一个实施例中,提供了一种计算机设备,包括存储器和处理器,存储器中存储有计算机程序,该处理器执行计算机程序时实现以下步骤:
接收待刷新动画的动画刷新请求,并暂存动画刷新请求;
当检测到当前时刻到达预设刷新时刻时,从暂存的动画刷新请求中获取当前时刻与上次刷新时刻所形成的时间段内的目标动画刷新请求;以及
将目标动画刷新请求发送给处理器,目标动画刷新请求用于指示处理器执行对应的动画刷新操作。
在一个实施例中,处理器执行计算机程序时还实现以下步骤:
在接收待刷新动画的动画刷新请求之前,方法还包括:
获取待刷新动画的图像资源,并将图像资源存储在本地存储器中;
方法还包括:
控制处理器,根据目标动画刷新请求从本地存储器中读取对应的图像资源,并根据图像资源执行动画刷新操作。
在一个实施例中,处理器执行计算机程序时还实现以下步骤:
获取当前时刻与上次刷新时刻所形成的时间段内的目标动画刷新请求的请求数量;
当检测到请求数量小于请求数量阈值时,继续从暂存的动画刷新请求中获取目标动画刷新请求,直到获取的目标动画刷新请求的请求数量等于请求数量阈值时,执行将目标动画刷新请求发送给处理器步骤。
在一个实施例中,处理器执行计算机程序时还实现以下步骤:
获取当前时刻与上次刷新时刻所形成的时间段内的目标动画刷新请求的请求数量;
当检测到请求数量大于请求数量阈值时,获取目标动画刷新请求的优先级;
根据优先级,从当前时刻与上次刷新时刻所形成的时间段内的目标动画刷新请求中获取请求数量阈值对应的目标动画刷新请求;
执行将请求次数阈值对应的目标动画刷新请求发送给处理器步骤。
在一个实施例中,处理器执行计算机程序时还实现以下步骤:
获取当前时刻与上次刷新时刻所形成的时间段内的目标动画刷新请求的请求数量;
当检测到请求数量大于请求数量阈值时,更新预设刷新时刻,得到更新后的预设刷新时刻;
当检测到当前时刻到达更新后的预设刷新时刻,从暂存的动画刷新请求中获取当前时刻与上次刷新时刻所形成的时间段内的目标动画刷新请求的请求数量等于请求数量阈值时,执行将目标动画刷新请求发送给处理器步骤。
在一个实施例中,处理器执行计算机程序时还实现以下步骤:
在当检测到当前时刻到达预设刷新时刻时,从暂存的动画刷新请求中获取当前时刻与上次刷新时刻所形成的时间段内的目标动画刷新请求之前,方法还包括:
获取动画刷新请求对应终端的剩余电量;
根据剩余电量,从电量与预设刷新时刻之间的对应关系中获取剩余电量对应的预设刷新时刻。
在一个实施例中,处理器执行计算机程序时还实现以下步骤:
从暂存的动画刷新请求中删除目标动画刷新请求。
在一个实施例中,提供了一种计算机可读存储介质,其上存储有计算机程序,计算机程序被处理器执行时实现以下步骤:
接收待刷新动画的动画刷新请求,并暂存动画刷新请求;
当检测到当前时刻到达预设刷新时刻时,从暂存的动画刷新请求中获取当前时刻与上次刷新时刻所形成的时间段内的目标动画刷新请求;以及
将目标动画刷新请求发送给处理器,目标动画刷新请求用于指示处理器执行对应的动画刷新操作。
在一个实施例中,计算机程序被处理器执行时还实现以下步骤:
在接收待刷新动画的动画刷新请求之前,方法还包括:
获取待刷新动画的图像资源,并将图像资源存储在本地存储器中;
方法还包括:
控制处理器,根据目标动画刷新请求从本地存储器中读取对应的图像资源,并根据图像资源执行动画刷新操作。
在一个实施例中,计算机程序被处理器执行时还实现以下步骤:
获取当前时刻与上次刷新时刻所形成的时间段内的目标动画刷新请求的请求数量;
当检测到请求数量小于请求数量阈值时,继续从暂存的动画刷新请求中获取目标动画刷新请求,直到获取的目标动画刷新请求的请求数量等于请求数量阈值时,执行将目标动画刷新请求发送给处理器步骤。
在一个实施例中,计算机程序被处理器执行时还实现以下步骤:
获取当前时刻与上次刷新时刻所形成的时间段内的目标动画刷新请求的请求数量;
当检测到请求数量大于请求数量阈值时,获取目标动画刷新请求的优先级;
根据优先级,从当前时刻与上次刷新时刻所形成的时间段内的目标动画刷新请求中获取请求数量阈值对应的目标动画刷新请求;
执行将请求次数阈值对应的目标动画刷新请求发送给处理器步骤。
在一个实施例中,计算机程序被处理器执行时还实现以下步骤:
获取当前时刻与上次刷新时刻所形成的时间段内的目标动画刷新请求的请求数量;
当检测到请求数量大于请求数量阈值时,更新预设刷新时刻,得到更新后的预设刷新时刻;
当检测到当前时刻到达更新后的预设刷新时刻,从暂存的动画刷新请求中获取当前时刻与上次刷新时刻所形成的时间段内的目标动画刷新请求的请求数量等于请求数量阈值时,执行将目标动画刷新请求发送给处理器步骤。
在一个实施例中,计算机程序被处理器执行时还实现以下步骤:
在当检测到当前时刻到达预设刷新时刻时,从暂存的动画刷新请求中获取当前时刻与上次刷新时刻所形成的时间段内的目标动画刷新请求之前,方法还包括:
获取动画刷新请求对应终端的剩余电量;
根据剩余电量,从电量与预设刷新时刻之间的对应关系中获取剩余电量对应的预设刷新时刻。
在一个实施例中,计算机程序被处理器执行时还实现以下步骤:
从暂存的动画刷新请求中删除目标动画刷新请求。
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,是可以通过计算机程序来指令相关的硬件来完成,所述的计算机程序可存储于一非易失性计算机可读取存储介质中,该计算机程序在执行时,可包括如上述各方法的实施例的流程。其中,本申请所提供的各实施例中所使用的对存储器、存储、数据库或其它介质的任何引用,均可包括非易失性和/或易失性存储器。非易失性存储器可包括只读存储器(ROM)、可编程ROM(PROM)、电可编程ROM(EPROM)、电可擦除可编程ROM(EEPROM)或闪存。易失性存储器可包括随机存取存储器(RAM)或者外部高速缓冲存储器。作为说明而非局限,RAM以多种形式可得,诸如静态RAM(SRAM)、动态RAM(DRAM)、同步DRAM(SDRAM)、双数据率SDRAM(DDRSDRAM)、增强型SDRAM(ESDRAM)、同步链路(Synchlink)DRAM(SLDRAM)、存储器总线(Rambus)直接RAM(RDRAM)、直接存储器总线动态RAM(DRDRAM)、以及存储器总线动态RAM(RDRAM)等。
以上实施例的各技术特征可以进行任意的组合,为使描述简洁,未对上述实施例中的各个技术特征所有可能的组合都进行描述,然而,只要这些技术特征的组合不存在矛盾,都应当认为是本说明书记载的范围。
以上所述实施例仅表达了本申请的几种实施方式,其描述较为具体和详细,但并不能因此而理解为对发明专利范围的限制。应当指出的是,对于本领域的普通技术人员来说,在不脱离本申请构思的前提下,还可以做出若干变形和改进,这些都属于本申请的保护范围。因此,本申请专利的保护范围应以所附权利要求为准。

Claims (22)

  1. 一种动画刷新请求控制方法,其特征在于,所述方法包括:
    接收待刷新动画的动画刷新请求并暂存所述动画刷新请求;
    当检测到当前时刻到达预设刷新时刻时,从所述暂存的动画刷新请求中获取所述当前时刻与上次刷新时刻所形成的时间段内的目标动画刷新请求;
    将所述目标动画刷新请求发送给处理器,所述目标动画刷新请求用于指示所述处理器执行对应的动画刷新操作。
  2. 根据权利要求1所述的方法,其特征在于,在所述接收待刷新动画的动画刷新请求之前,所述方法还包括:
    获取待刷新动画的图像资源,并将所述图像资源存储在本地存储器中;
    所述方法还包括:
    控制所述处理器,根据所述目标动画刷新请求从所述本地存储器中读取对应的图像资源,并根据所述图像资源执行动画刷新操作。
  3. 根据权利要求1所述的方法,其特征在于,在所述将所述目标动画刷新请求发送给处理器之前,所述方法还包括:
    获取所述当前时刻与上次刷新时刻所形成的时间段内的目标动画刷新请求的请求数量;
    当检测到所述请求数量小于请求数量阈值时,继续从所述暂存的动画刷新请求中获取目标动画刷新请求,直到获取的目标动画刷新请求的请求数量等于所述请求数量阈值时,执行所述将所述目标动画刷新请求发送给处理器步骤。
  4. 根据权利要求1所述的方法,其特征在于,在所述将所述目标动画刷新请求发送给处理器之前,所述方法还包括:
    获取所述当前时刻与上次刷新时刻所形成的时间段内的目标动画刷新请求的请求数量;
    当检测到所述请求数量大于所述请求数量阈值时,获取所述目标动画刷新请求的优先级;
    根据所述优先级,从所述当前时刻与上次刷新时刻所形成的时间段内的目标动画刷新请求中获取所述请求数量阈值对应的目标动画刷新请求;
    执行将所述请求次数阈值对应的目标动画刷新请求发送给处理器步骤。
  5. 根据权利要求1所述的方法,其特征在于,在所述将所述目标动画刷新请求发送给处理器之前,所述方法还包括:
    获取所述当前时刻与上次刷新时刻所形成的时间段内的目标动画刷新请求 的请求数量;
    当检测到所述请求数量大于所述请求数量阈值时,更新所述预设刷新时刻,得到更新后的预设刷新时刻;
    当检测到当前时刻到达更新后的预设刷新时刻,从所述暂存的动画刷新请求中获取所述当前时刻与上次刷新时刻所形成的时间段内的目标动画刷新请求的请求数量等于请求数量阈值时,执行将所述目标动画刷新请求发送给处理器步骤。
  6. 根据权利要求1所述的方法,其特征在于,在所述当检测到当前时刻到达预设刷新时刻时,从所述暂存的动画刷新请求中获取所述当前时刻与上次刷新时刻所形成的时间段内的目标动画刷新请求之前,所述方法还包括:
    获取所述动画刷新请求对应终端的剩余电量;
    根据所述剩余电量,从电量与预设刷新时刻之间的对应关系中获取所述剩余电量对应的预设刷新时刻。
  7. 根据权利要求1至6任意一项所述的方法,其特征在于,在所述将所述目标动画刷新请求发送给处理器之后,所述方法还包括:
    从所述暂存的动画刷新请求中删除所述目标动画刷新请求。
  8. 一种动画刷新请求控制装置,其特征在于,所述装置包括:
    接收模块,用于接收待刷新动画的动画刷新请求,并把所述动画刷新请求暂存;
    检测模块,用于当检测到当前时刻到达预设刷新时刻时,从所述暂存的动画刷新请求中获取所述当前时刻与上次刷新时刻所形成的时间段内的目标动画刷新请求;以及
    发送模块,用于将所述目标动画刷新请求发送给处理器,所述目标动画刷新请求用于指示所述处理器执行对应的动画刷新操作。
  9. 根据权利要求8所述的动画刷新请求控制装置,其特征在于,所述装置还包括:
    获取模块,用于获取待刷新动画的图像资源,并将所述图像资源存储在本地存储器中;以及
    控制模块,用于控制所述处理器,根据所述目标动画刷新请求从所述本地存储器中读取对应的图像资源,并根据所述图像资源执行动画刷新操作。
  10. 根据权利要求8所述的动画刷新请求控制装置,其特征在于,所述装置还包括:
    获取模块,用于获取所述当前时刻与上次刷新时刻所形成的时间段内的目标动画刷新请求的请求数量,还用于当检测到所述请求数量小于请求数量阈值 时,继续从所述暂存的动画刷新请求中获取目标动画刷新请求,直到获取的目标动画刷新请求的请求数量等于所述请求数量阈值时;
    其中,所述发送模块用于在所述获取模块获取的目标动画刷新请求的请求数量等于所述请求数量阈值时,执行所述将所述目标动画刷新请求发送给处理器步骤。
  11. 根据权利要求8所述的动画刷新请求控制装置,其特征在于,所述装置还包括:
    获取模块,用于获取所述当前时刻与上次刷新时刻所形成的时间段内的目标动画刷新请求的请求数量,用于当检测到所述请求数量大于所述请求数量阈值时,获取所述目标动画刷新请求的优先级,还用于根据所述优先级,从所述当前时刻与上次刷新时刻所形成的时间段内的目标动画刷新请求中获取所述请求数量阈值对应的目标动画刷新请求;
    其中,所述发送模块用于执行将所述请求次数阈值对应的目标动画刷新请求发送给处理器步骤。
  12. 根据权利要求8所述的动画刷新请求控制装置,其特征在于,所述装置还包括:
    获取模块,用于获取所述当前时刻与上次刷新时刻所形成的时间段内的目标动画刷新请求的请求数量;
    更新模块,用于当所述获取模块检测到所述请求数量大于所述请求数量阈值时,更新所述预设刷新时刻,得到更新后的预设刷新时刻;
    其中,所述获取模块还用于当检测到当前时刻到达更新后的预设刷新时刻,从所述暂存的动画刷新请求中获取所述当前时刻与上次刷新时刻所形成的时间段内的目标动画刷新请求的请求数量等于请求数量阈值时,发送模块还用于在所述获取模块从所述暂存的动画刷新请求中获取所述当前时刻与上次刷新时刻所形成的时间段内的目标动画刷新请求的请求数量等于请求数量阈值时,执行将所述目标动画刷新请求发送给处理器步骤。
  13. 根据权利要求8所述的动画刷新请求控制装置,其特征在于,所述装置还包括:
    获取模块,用于获取所述动画刷新请求对应终端的剩余电量,还用于根据所述剩余电量,从电量与预设刷新时刻之间的对应关系中获取所述剩余电量对应的预设刷新时刻。
  14. 根据权利要求8-13所述的动画刷新请求控制装置,其特征在于,所述装置还包括:
    删除模块,用于从所述暂存的动画刷新请求中删除所述目标动画刷新请求。
  15. 一种计算机设备,包括存储器和处理器,所述存储器存储有计算机程序, 其特征在于,所述处理器执行所述计算机程序时实现动画刷新请求控制方法,所述方法包括:
    接收待刷新动画的动画刷新请求并暂存所述动画刷新请求;
    当检测到当前时刻到达预设刷新时刻时,从所述暂存的动画刷新请求中获取所述当前时刻与上次刷新时刻所形成的时间段内的目标动画刷新请求;
    将所述目标动画刷新请求发送给处理器,所述目标动画刷新请求用于指示所述处理器执行对应的动画刷新操作。
  16. 根据权利要求15所述的计算机设备,其特征在于,在所述接收待刷新动画的动画刷新请求之前,所述方法还包括:
    获取待刷新动画的图像资源,并将所述图像资源存储在本地存储器中;
    所述方法还包括:
    控制所述处理器,根据所述目标动画刷新请求从所述本地存储器中读取对应的图像资源,并根据所述图像资源执行动画刷新操作。
  17. 根据权利要求15所述的计算机设备,其特征在于,在所述将所述目标动画刷新请求发送给处理器之前,所述方法还包括:
    获取所述当前时刻与上次刷新时刻所形成的时间段内的目标动画刷新请求的请求数量;
    当检测到所述请求数量小于请求数量阈值时,继续从所述暂存的动画刷新请求中获取目标动画刷新请求,直到获取的目标动画刷新请求的请求数量等于所述请求数量阈值时,执行所述将所述目标动画刷新请求发送给处理器步骤。
  18. 根据权利要求15所述的计算机设备,其特征在于,在所述将所述目标动画刷新请求发送给处理器之前,所述方法还包括:
    获取所述当前时刻与上次刷新时刻所形成的时间段内的目标动画刷新请求的请求数量;
    当检测到所述请求数量大于所述请求数量阈值时,获取所述目标动画刷新请求的优先级;
    根据所述优先级,从所述当前时刻与上次刷新时刻所形成的时间段内的目标动画刷新请求中获取所述请求数量阈值对应的目标动画刷新请求;
    执行将所述请求次数阈值对应的目标动画刷新请求发送给处理器步骤。
  19. 根据权利要求15所述的计算机设备,其特征在于,在所述将所述目标动画刷新请求发送给处理器之前,所述方法还包括:
    获取所述当前时刻与上次刷新时刻所形成的时间段内的目标动画刷新请求的请求数量;
    当检测到所述请求数量大于所述请求数量阈值时,更新所述预设刷新时刻,得到更新后的预设刷新时刻;
    当检测到当前时刻到达更新后的预设刷新时刻,从所述暂存的动画刷新请求中获取所述当前时刻与上次刷新时刻所形成的时间段内的目标动画刷新请求的请求数量等于请求数量阈值时,执行将所述目标动画刷新请求发送给处理器步骤。
  20. 根据权利要求15所述的计算机设备,其特征在于,在所述当检测到当前时刻到达预设刷新时刻时,从所述暂存的动画刷新请求中获取所述当前时刻与上次刷新时刻所形成的时间段内的目标动画刷新请求之前,所述方法还包括:
    获取所述动画刷新请求对应终端的剩余电量;
    根据所述剩余电量,从电量与预设刷新时刻之间的对应关系中获取所述剩余电量对应的预设刷新时刻。
  21. 根据权利要求15至20任意一项所述的计算机设备,其特征在于,在所述将所述目标动画刷新请求发送给处理器之后,所述方法还包括:
    从所述暂存的动画刷新请求中删除所述目标动画刷新请求。
  22. 一种计算机可读存储介质,其上存储有计算机程序,其特征在于,所述计算机程序被处理器执行时实现权利要求1至7中任一项所述的方法的步骤。
PCT/CN2020/135645 2019-12-19 2020-12-11 动画刷新请求控制方法、装置、计算机设备和存储介质 WO2021121142A1 (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
US17/843,214 US20220319086A1 (en) 2019-12-19 2022-06-17 Method and apparatus for controlling animation refreshing, computer device, and storage medium

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201911314775.5A CN113012027A (zh) 2019-12-19 2019-12-19 动画刷新请求控制方法、装置、计算机设备和存储介质
CN201911314775.5 2019-12-19

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US17/843,214 Continuation US20220319086A1 (en) 2019-12-19 2022-06-17 Method and apparatus for controlling animation refreshing, computer device, and storage medium

Publications (1)

Publication Number Publication Date
WO2021121142A1 true WO2021121142A1 (zh) 2021-06-24

Family

ID=76381229

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/135645 WO2021121142A1 (zh) 2019-12-19 2020-12-11 动画刷新请求控制方法、装置、计算机设备和存储介质

Country Status (3)

Country Link
US (1) US20220319086A1 (zh)
CN (1) CN113012027A (zh)
WO (1) WO2021121142A1 (zh)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN118132880A (zh) * 2024-05-06 2024-06-04 宁波奥克斯电气股份有限公司 一种页面渲染优化方法、装置、浏览器***和介质

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106412338A (zh) * 2016-11-28 2017-02-15 惠州Tcl移动通信有限公司 一种基于移动终端的显示屏刷新率调节方法及***
CN106658064A (zh) * 2016-12-28 2017-05-10 广州华多网络科技有限公司 虚拟礼物展示方法及装置
US20170352322A1 (en) * 2016-06-03 2017-12-07 Apple Inc. Controlling Display Performance
CN107977068A (zh) * 2016-10-25 2018-05-01 中兴通讯股份有限公司 一种终端的延迟显示的方法、装置及终端
CN109656708A (zh) * 2017-10-10 2019-04-19 武汉斗鱼网络科技有限公司 Android的动画播放限制方法、存储介质、电子设备及***

Family Cites Families (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5864342A (en) * 1995-08-04 1999-01-26 Microsoft Corporation Method and system for rendering graphical objects to image chunks
US7064766B2 (en) * 2001-10-18 2006-06-20 Microsoft Corporation Intelligent caching data structure for immediate mode graphics
US7443401B2 (en) * 2001-10-18 2008-10-28 Microsoft Corporation Multiple-level graphics processing with animation interval generation
US7034834B2 (en) * 2003-10-24 2006-04-25 Microsoft Corporation Communication protocol for synchronizing animation systems
US7800614B2 (en) * 2004-02-17 2010-09-21 Oracle America, Inc. Efficient communication in a client-server scene graph system
US9019300B2 (en) * 2006-08-04 2015-04-28 Apple Inc. Framework for graphics animation and compositing operations
US8593463B2 (en) * 2009-10-27 2013-11-26 Microsoft Corporation Controlling animation frame rate of applications
US10062141B2 (en) * 2012-10-24 2018-08-28 Nubo Software Server-based fast remote display on client devices
US9477998B2 (en) * 2014-06-01 2016-10-25 Apple Inc. Performance control for concurrent animations
US9952642B2 (en) * 2014-09-29 2018-04-24 Apple Inc. Content dependent display variable refresh rate
US9495926B2 (en) * 2014-12-01 2016-11-15 Apple Inc. Variable frame refresh rate

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20170352322A1 (en) * 2016-06-03 2017-12-07 Apple Inc. Controlling Display Performance
CN107977068A (zh) * 2016-10-25 2018-05-01 中兴通讯股份有限公司 一种终端的延迟显示的方法、装置及终端
CN106412338A (zh) * 2016-11-28 2017-02-15 惠州Tcl移动通信有限公司 一种基于移动终端的显示屏刷新率调节方法及***
CN106658064A (zh) * 2016-12-28 2017-05-10 广州华多网络科技有限公司 虚拟礼物展示方法及装置
CN109656708A (zh) * 2017-10-10 2019-04-19 武汉斗鱼网络科技有限公司 Android的动画播放限制方法、存储介质、电子设备及***

Also Published As

Publication number Publication date
CN113012027A (zh) 2021-06-22
US20220319086A1 (en) 2022-10-06

Similar Documents

Publication Publication Date Title
WO2020207251A1 (zh) 图像更新方法、装置、终端及存储介质
WO2020207250A1 (zh) 垂直同步方法、装置、终端及存储介质
JP6894976B2 (ja) 画像円滑性向上方法および装置
US10706604B2 (en) Controlling display performance using display system hints
US11688367B2 (en) Varying display refresh rate
JP6377263B2 (ja) 端末機器においてスクリーンショットサービスを提供するための方法、装置、記憶媒体及び機器
CN113766324B (zh) 视频播放的控制方法、装置、计算机设备和存储介质
WO2021129415A1 (zh) 显示屏的帧率调整方法、装置、终端和存储介质
WO2023046164A1 (zh) 图像显示方法、ddic、显示屏模组及终端
WO2021121142A1 (zh) 动画刷新请求控制方法、装置、计算机设备和存储介质
WO2022188600A1 (zh) 界面显示方法、装置、终端设备及计算机可读存储介质
US10936365B2 (en) Data processing systems
US9563931B2 (en) Control method and information processing device
US10002589B2 (en) Retaining user selected screen area on user equipment
CN110377140A (zh) 唤醒操作***的方法、装置、终端及存储介质
CN116137675A (zh) 渲染方法及装置
WO2021129416A1 (zh) 移动终端帧率的控制方法、装置、计算机设备和存储介质
CN114647521A (zh) 绘图流水线调节方法、装置、计算机设备和存储介质
CN116761032B (zh) 视频播放方法、可读介质和电子设备
CN113507500A (zh) 终端控制方法、装置、计算机设备和计算机可读存储介质
US7046227B2 (en) System and method for continuously tracing transfer rectangles for image data transfers
CN116991600B (zh) 图形调用指令的处理方法、装置、设备及存储介质
CN118134749A (zh) 数据传输速率的更新方法、装置及设备
US20060012602A1 (en) System and method for efficiently performing automatic partial transfers of image data
CN118351811A (zh) 刷新频率确定方法、装置、电子设备、可读存储介质和程序产品

Legal Events

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

Ref document number: 20903356

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 25.10.2022)

122 Ep: pct application non-entry in european phase

Ref document number: 20903356

Country of ref document: EP

Kind code of ref document: A1