CN105491448A - Animation data play method and device - Google Patents

Animation data play method and device Download PDF

Info

Publication number
CN105491448A
CN105491448A CN201510896822.7A CN201510896822A CN105491448A CN 105491448 A CN105491448 A CN 105491448A CN 201510896822 A CN201510896822 A CN 201510896822A CN 105491448 A CN105491448 A CN 105491448A
Authority
CN
China
Prior art keywords
animation data
queue
occupancy
target animation
described target
Prior art date
Legal status (The legal status 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 status listed.)
Granted
Application number
CN201510896822.7A
Other languages
Chinese (zh)
Other versions
CN105491448B (en
Inventor
方阳
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangzhou Cubesili Information Technology Co Ltd
Original Assignee
Guangzhou Huaduo Network Technology Co Ltd
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 Guangzhou Huaduo Network Technology Co Ltd filed Critical Guangzhou Huaduo Network Technology Co Ltd
Priority to CN201510896822.7A priority Critical patent/CN105491448B/en
Publication of CN105491448A publication Critical patent/CN105491448A/en
Application granted granted Critical
Publication of CN105491448B publication Critical patent/CN105491448B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/442Monitoring of processes or resources, e.g. detecting the failure of a recording device, monitoring the downstream bandwidth, the number of times a movie has been viewed, the storage space available from the internal hard disk
    • H04N21/44204Monitoring of content usage, e.g. the number of times a movie has been viewed, copied or the amount which has been watched
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/442Monitoring of processes or resources, e.g. detecting the failure of a recording device, monitoring the downstream bandwidth, the number of times a movie has been viewed, the storage space available from the internal hard disk
    • H04N21/4424Monitoring of the internal components or processes of the client device, e.g. CPU or memory load, processing speed, timer, counter or percentage of the hard disk space used

Landscapes

  • Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Processing Or Creating Images (AREA)
  • Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)

Abstract

Embodiments of the invention disclose an animation data play method and device. The method comprises the following steps: when obtaining target animation data sent by a server, obtaining a first processor occupancy rate corresponding to the target animation data, and detecting whether the target animation data satisfy a preset occupancy rate play condition according to the first processor occupancy rate; if yes, playing the target animation data; if no, when detecting that the target animation data satisfy the occupancy rate play condition in a periodic circular detection mode, playing the target animation data; wherein the occupancy rate play condition is that a sum of the first processor occupancy rate and a second processor occupancy rate is smaller than a preset total occupancy rate threshold; and the second processor occupancy rate refers to the sum of processor occupancy rates corresponding to a plurality of simultaneously played animation data respectively. By adopting the animation data play method and device disclosed by the invention, when an animation effect is played on a client, the operation pressure of a CPU can be reduced to guarantee the normal operation of user equipment.

Description

A kind of animation data player method and device
Technical field
The present invention relates to Internet technical field, particularly relate to a kind of animation data player method and device.
Background technology
In recent years, the comprehensive rich media client that function of gathering that online K sings, Online Video is live, game on line is live, online education is live etc. is integrated develops on an unprecedented scale, and makes spectators user can watch the live content of main broadcaster's client by spectator client comfortablely; Wherein, spectators user, while the content that viewing main broadcaster client is live, can also send virtual present (i.e. gifts) by spectator client to main broadcaster's client.But can be too large due to the density of user's gifts when the peak traffic phase, and cause client to need at short notice to play a large amount of animation effect be associated with given present simultaneously, and common animation effect all realizes based on Flash (solid-state memory and Animation Editors) technology, and based on the animation effect of Flash technology to CPU (CentralProcessingUnit, central processing unit) occupancy general higher, so when to play a large amount of animation effect simultaneously, the occupancy of client process on current run CPU core may be made to become too high, thus cause the operating pressure of CPU excessive, then have impact on the normal operation of subscriber equipment.
Summary of the invention
The embodiment of the present invention provides a kind of animation data player method and device, can reduce the operating pressure of CPU, to ensure that subscriber equipment can normal operation when client terminal playing animation effect.
Embodiments provide a kind of animation data player method, comprising:
When getting the target animation data that server sends, obtain the first processor occupancy that described target animation data are corresponding, and detect the whether satisfied occupancy broadcasting condition preset of described target animation data according to described first processor occupancy;
If meet described occupancy to play condition, then play described target animation data;
If do not meet described occupancy to play condition, then, when the mode detected by timing cycle detects that described target animation data meet described occupancy broadcasting condition, play described target animation data;
Wherein, described occupancy plays condition is that described first processor occupancy and the second processor occupancy sum are less than default total occupancy threshold value; Described second processor occupancy refers to the summation of the processor occupancy of the multiple animation datas difference correspondences play just at the same time.
Correspondingly, the embodiment of the present invention additionally provides a kind of animation data playing device, comprising:
Obtain detection module, for when getting the target animation data that server sends, obtain the first processor occupancy that described target animation data are corresponding, and detect the whether satisfied occupancy broadcasting condition preset of described target animation data according to described first processor occupancy;
For described acquisition detection module, condition playing module, if detect that meeting described occupancy plays condition, then play described target animation data;
Timing detects playing module, if detect that not meeting described occupancy plays condition for described acquisition detection module, when the mode then detected by timing cycle detects that described target animation data meet described occupancy broadcasting condition, play described target animation data;
Wherein, described occupancy plays condition is that described first processor occupancy and the second processor occupancy sum are less than default total occupancy threshold value; Described second processor occupancy refers to the summation of the processor occupancy of the multiple animation datas difference correspondences play just at the same time.
The embodiment of the present invention is by obtaining first processor occupancy corresponding to target animation data, target animation data can be detected according to first processor occupancy and whether meet the occupancy broadcasting condition preset, if meet occupancy condition, illustrate that current behavior of playing target animation data can't make the occupancy of client process on current run CPU core become too high, therefore can start to play target animation data, if do not meet occupancy condition, illustrate that current behavior of playing target animation data will make the occupancy of client process on current run CPU core become too high, when the mode that therefore can be detected by timing cycle detects that target animation data meet occupancy broadcasting condition, play target animation data, as can be seen here, when not meeting occupancy condition, target animation data can't be play immediately, but go out when target animation data meet occupancy condition to play target animation data again in subsequent detection by the mode that timing cycle detects, thus make the playing process of whole animation data to control in lower number range by the occupancy of client process on current run CPU core all the time, thus the operating pressure of CPU can be reduced when client terminal playing animation data, to ensure that subscriber equipment can normal operation.
Accompanying drawing explanation
In order to be illustrated more clearly in the embodiment of the present invention or technical scheme of the prior art, be briefly described to the accompanying drawing used required in embodiment or description of the prior art below, apparently, accompanying drawing in the following describes is only some embodiments of the present invention, for those of ordinary skill in the art, under the prerequisite not paying creative work, other accompanying drawing can also be obtained according to these accompanying drawings.
Fig. 1 is the schematic flow sheet of a kind of animation data player method that the embodiment of the present invention provides;
Fig. 2 is the schematic flow sheet of the another kind of animation data player method that the embodiment of the present invention provides;
Fig. 3 is the structural representation of a kind of animation data playing device that the embodiment of the present invention provides;
Fig. 4 is a kind of structural representation obtaining detection module that the embodiment of the present invention provides;
Fig. 5 is a kind of structural representation adding detecting unit that the embodiment of the present invention provides;
Fig. 6 is the structural representation of a kind of timing detection playing module that the embodiment of the present invention provides;
Fig. 7 is the structural representation of a kind of data acquisition detecting unit that the embodiment of the present invention provides;
Fig. 8 is the structural representation of the another kind of animation data playing device that the embodiment of the present invention provides.
Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present invention, be clearly and completely described the technical scheme in the embodiment of the present invention, obviously, described embodiment is only the present invention's part embodiment, instead of whole embodiments.Based on the embodiment in the present invention, those of ordinary skill in the art, not making the every other embodiment obtained under creative work prerequisite, belong to the scope of protection of the invention.
Refer to Fig. 1, be the schematic flow sheet of a kind of animation data player method that the embodiment of the present invention provides, described method can comprise:
S101, when getting the target animation data that server sends, obtains the first processor occupancy that described target animation data are corresponding;
Concrete, when the main broadcaster client of spectator client in certain channel live sends destination virtual present, the client (described client can comprise the interior all spectator client of this channel live and main broadcaster's client) in this channel live can obtain the target animation data corresponding with described destination virtual present that server sends; Wherein, the animation data of the different corresponding different animation types of virtual present difference, the animation data of often kind of animation types has fixing play mode and play position.Described server is passing through TCP/IP (TransmissionControlProtocol/InternetProtocol, transmission control protocol/Internet Protocol) while described target animation data are sent to described client by agreement, first processor occupancy corresponding for described target animation data also can also be sent to described client, make, when described client gets the target animation data of server transmission, the first processor occupancy that described target animation data are corresponding to be obtained in the lump.Wherein, described first processor occupancy refers to the occupancy to processor when playing described target animation data, described first processor occupancy be on stream repeatedly test is play to described target animation data after the mean value got.Such as, if the overall utilization rate of current processor is 30%, described first processor occupancy is 5%, and so when playing described target animation data, the overall utilization rate of processor can become 35%.
S102, detects described target animation data according to described first processor occupancy and whether meets the occupancy broadcasting condition preset;
Concrete, after described client gets described first processor occupancy, whether can detect currently has get identical with the animation types of described target animation data before acquisition time stamp and the animation data also do not play, described acquisition time stamp refers to timestamp when to get described target animation data from described server, if detect and do not exist, then can detect described target animation data further according to described first processor occupancy and whether meet the occupancy broadcasting condition preset, otherwise, need to wait until described got before acquisition time stamp identical with the animation types of described target animation data and after animation data that is that also do not play all is sequentially played, detect described target animation data further according to described first processor occupancy again and whether meet the occupancy broadcasting condition preset, to ensure that the animation data of identical animation types can be play successively according to the order of sequence.
Wherein, described occupancy plays condition is that described first processor occupancy and the second processor occupancy sum are less than default total occupancy threshold value; Described second processor occupancy refers to the summation of the processor occupancy of the multiple animation datas difference correspondences play just at the same time; Wherein, the animation types of the multiple animation datas simultaneously play is different.Described total occupancy threshold value can carry out dynamic conditioning according to business demand, after described total occupancy threshold value is heightened, can increase the quantity of the animation data simultaneously play; After described total occupancy threshold value is turned down, the quantity of the animation data simultaneously play can be reduced.
S103, plays described target animation data;
Concrete, when S102 step detect described target animation data meet default occupancy play condition time, illustrate that described first processor occupancy and the second processor occupancy sum are less than described total occupancy threshold value, namely illustrate that the overall utilization rate of CPU is still in lower number range, now, described target animation data can be play.
S104, when the mode detected detects that described target animation data meet described occupancy broadcasting condition, plays described target animation data by timing cycle;
Concrete, when S102 step detect described target animation data do not meet described occupancy play condition time, illustrate that described first processor occupancy and the second processor occupancy sum are equal to or greater than described total occupancy threshold value, namely illustrating to cause the overall utilization rate of CPU higher, now, temporarily described target animation data are not play, and whether target animation data described in the mode periodic detection detected by timing cycle meet described occupancy plays condition, as every within 3 seconds, to detect once described target animation data whether meet as described in occupancy broadcasting condition, due to after a period of time has passed, the quantity of the multiple animation datas simultaneously play may reduce, now, the mode detected by described timing cycle can detect that described target animation data meet described occupancy and play condition, thus described target animation data can be play at this moment, simultaneously and by the mode that described timing cycle detects, periodic detection is carried out to the animation data that failing in another kind of animation types is play immediately, to realize can circulating periodic detection to all animation datas of failing to play immediately.Such as, there is the animation data that two animation types are identical, be respectively A and B, when A has been played, whether can meet described occupancy to detection B and play condition, if meet, then play B immediately; If do not meet, then when the mode detected by timing cycle detects that B meets described occupancy broadcasting condition, then play B, to ensure the occupancy of client process on current run CPU core to be controlled in lower number range all the time when playing B.
The embodiment of the present invention is by obtaining first processor occupancy corresponding to target animation data, target animation data can be detected according to first processor occupancy and whether meet the occupancy broadcasting condition preset, if meet occupancy condition, illustrate that current behavior of playing target animation data can't make the occupancy of client process on current run CPU core become too high, therefore can start to play target animation data, if do not meet occupancy condition, illustrate that current behavior of playing target animation data will make the occupancy of client process on current run CPU core become too high, when the mode that therefore can be detected by timing cycle detects that target animation data meet occupancy broadcasting condition, play target animation data, as can be seen here, when not meeting occupancy condition, target animation data can't be play immediately, but go out when target animation data meet occupancy condition to play target animation data again in subsequent detection by the mode that timing cycle detects, thus make the playing process of whole animation data to control in lower number range by the occupancy of client process on current run CPU core all the time, thus the operating pressure of CPU can be reduced when client terminal playing animation data, to ensure that subscriber equipment can normal operation.
Refer to Fig. 2, be the schematic flow sheet of the another kind of animation data player method that the embodiment of the present invention provides, described method can comprise:
S201, when getting the target animation data that server sends, obtaining the first processor occupancy that described target animation data are corresponding, and searching the object queue identical with the animation types of described target animation data;
Concrete, when the main broadcaster client of spectator client in certain channel live sends destination virtual present, the client (described client can comprise the interior all spectator client of this channel live and main broadcaster's client) in this channel live can obtain the target animation data corresponding with described destination virtual present that server sends; Wherein, the animation data of the different corresponding different animation types of virtual present difference, the animation data of often kind of animation types has fixing play mode and play position.Described server is while being sent to described client by ICP/IP protocol by described target animation data, first processor occupancy corresponding for described target animation data also can also be sent to described client, make, when described client gets the target animation data of server transmission, the first processor occupancy that described target animation data are corresponding to be obtained in the lump.Wherein, described first processor occupancy refers to the occupancy to processor when playing described target animation data, described first processor occupancy be on stream repeatedly test is play to described target animation data after the mean value got.Such as, if the overall utilization rate of current processor is 30%, described first processor occupancy is 5%, and so when playing described target animation data, the overall utilization rate of processor can become 35%.
Described client, while getting described first processor occupancy, can also search the object queue identical with the animation types of described target animation data; Wherein, described object queue is for depositing and the animation data do not play identical with the animation types of described target animation data, and the animation data in described object queue carries out successively playing according to the sorting position in described object queue, and the animation data in described object queue will remove when played from described object queue.Wherein, described object queue can be one of them queue at least one default queue, and each default queue is respectively used to the animation data depositing different animation types.Each default queue can also distinguish corresponding different queue number, such as, for deposit the animation data that animation types is A queue corresponding to queue number can be set to 1, for deposit the animation data that animation types is B queue corresponding to queue number can be set to 2, for deposit the animation data that animation types is C queue corresponding to queue number can be set to 3.
Described target animation data are added into described object queue by S202;
Concrete, whether after described client finds described object queue, can detect described object queue is empty, when detecting that described object queue is for time empty, described target animation data can be added into the first position of described object queue by described client, and directly perform the step of S203;
When described object queue being detected not for time empty, described target animation data can be added into the end position of described object queue by described client, and when playing the adjacent animation data being positioned at the previous position of described target animation data in described object queue, and when described adjacent animation data is removed from described object queue, position residing for described target animation data is defined as the first position of described object queue, and at the end of the animation data of the previous position being positioned at described target animation data in described object queue is play, receive and play end, and the first position of searching according to described broadcasting end in described object queue, to obtain the described target animation data being positioned at described the first position, now can perform S203 step.Such as, if be respectively A (being positioned at the first position), B (being positioned at the second place), C (being positioned at the 3rd position), D (being positioned at end position) from the first position to the animation data of end position in described object queue, then when A is played, A will remove from described object queue, whether the animation data now in described object queue comprises B (being positioned at the first position), C (being positioned at the second place), D (being positioned at end position), and can detect the B being positioned at the first position when A is played complete and can play; If B also starts to be played, then B also will remove from described object queue, whether the animation data now in described object queue comprises C (being positioned at the first position), D (being positioned at end position), and can detect the C being positioned at the first position when B is played complete and can play.
S203, when described target animation data are positioned at the first position of described object queue, detect described target animation data according to described first processor occupancy and whether meets the occupancy broadcasting condition preset;
Concrete, when described client detects that the initial position of described target animation data in described object queue is the first position (described object queue is empty situation), or when detecting that described target animation data are progressively moved to the first position of described object queue (described object queue is not empty situation), described target animation data can be detected according to described first processor occupancy and whether meet the occupancy broadcasting condition preset.
Wherein, described occupancy plays condition is that described first processor occupancy and the second processor occupancy sum are less than default total occupancy threshold value; Described second processor occupancy refers to the summation of the processor occupancy of the multiple animation datas difference correspondences play just at the same time; Wherein, the animation types of the multiple animation datas simultaneously play is different.Described total occupancy threshold value can carry out dynamic conditioning according to business demand, after described total occupancy threshold value is heightened, can increase the quantity of the animation data simultaneously play; After described total occupancy threshold value is turned down, the quantity of the animation data simultaneously play can be reduced.
S204, plays described target animation data;
Concrete, when S203 step detect described target animation data meet default occupancy play condition time, illustrate that described first processor occupancy and the second processor occupancy sum are less than described total occupancy threshold value, namely illustrate that the overall utilization rate of CPU is still in lower number range, now, described target animation data can be play, and described target animation data are removed from described object queue, make the next animation data being positioned at described target animation data in described object queue can move to the first position, so that start to detect the next animation data being positioned at described target animation data whether meet described occupancy broadcasting condition.
S205, when receiving the time exceeded message detected for circulation timing, obtains queue variate-value, and obtain the queue number identical with described queue variate-value at least one queue number preset, to be defined as object queue numbering;
Concrete, when 203 steps detect described target animation data do not meet described occupancy play condition time, illustrate that described first processor occupancy and the second processor occupancy sum are equal to or greater than described total occupancy threshold value, namely illustrating to cause the overall utilization rate of CPU higher, now, temporarily described target animation data are not play, and start wait-receiving mode for regularly detecting time exceeded message.When receiving the time exceeded message detected for circulation timing, obtain queue variate-value, and obtain the queue number identical with described queue variate-value at least one queue number preset, to be defined as object queue numbering; Queue corresponding to each queue number is respectively used to the animation data depositing different animation types; The corresponding respectively queue number of each queue and each queue pre-sets.Wherein, described time exceeded message can be triggered by the QTimer startup timer of Qt (cross-platform C++ graphical user interface application program).Such as, QTimer starts timer and triggered a time exceeded message every 3 seconds, makes described client can receive a time exceeded message every 3 seconds.
S206, when the queue that described object queue numbering is corresponding is described object queue, obtains the described target animation data being positioned at the first position of described object queue, and detects described target animation data and whether meet described occupancy and play condition;
Concrete, when the queue that described object queue numbering is corresponding is described object queue, can judge currently whether playing the animation data belonging to described object queue further, if be judged as NO, then can obtain the described target animation data of the first position being positioned at described object queue, and detect described target animation data whether meet described occupancy play condition, if be judged as YES, then suspend the described target animation data of detection and whether meet described occupancy broadcasting condition, and incremental calculation is carried out to described queue variate-value, to wait for when receiving next time exceeded message according to the queue variate-value after increasing progressively, detect the animation data being arranged in the first position of the queue adjacent with described object queue whether to meet described occupancy and play condition, thus can ensure that the animation data of the upper position being positioned at described target animation data is when played complete, the mode detected by timing cycle is again detected described target animation data and whether meets described occupancy broadcasting condition, play with the multiple animation datas avoiding animation types identical simultaneously.
S207, when detecting that described target animation data meet described occupancy broadcasting condition, playing described target animation data, and described target animation data being removed from described object queue, and carrying out incremental calculation to described queue variate-value;
Concrete, when S206 detects that described target animation data meet described occupancy broadcasting condition, namely illustrate that the mode detected by timing cycle detects that described target animation data meet described occupancy and play condition, now, described client can play described target animation data, and described target animation data are removed from described object queue, make the next animation data being positioned at described target animation data in described object queue can move to the first position, so that start to detect the next animation data being positioned at described target animation data whether meet described occupancy broadcasting condition.
Described client is while removing described target animation data from described object queue, incremental calculation can also be carried out to described queue variate-value, so that when receiving next time exceeded message according to the queue variate-value after increasing progressively, detecting the animation data being arranged in the first position of the queue adjacent with described object queue and whether meeting described occupancy and play condition.
Further, when judging the maximum numbering that the queue variate-value after increasing progressively is greater than at least one queue number described, queue variate-value after described increasing progressively is re-set as the lowest number at least one queue number described, so that cycle detection is carried out in the queue corresponding respectively at least one queue number described according to described queue variate-value, namely described queue variate-value can be made can be incremented to maximum numbering from lowest number, to be recycled to lowest number.
S208, when detecting that described target animation data do not meet described occupancy broadcasting condition, suspends and play described target animation data, and time-out carrying out incremental calculation to described queue variate-value;
Concrete, when S206 detects that described target animation data do not meet described occupancy broadcasting condition, described client can suspend the described target animation data of broadcasting, and time-out carries out incremental calculation to described queue variate-value, namely described queue variate-value remains unchanged, so that continue to detect described target animation data according to described queue variate-value whether meet described occupancy broadcasting condition when receiving next time exceeded message.
Such as, if there are 3 queues to be respectively a, b, c, and the queue number of queue a is 1, the queue number of queue b is 2, the queue number of queue c is 3, then when receiving time exceeded message, the described queue variate-value got is 1, and detect current not at the animation data that broadcasting is identical with the animation types of queue a, now, the mode that can be detected by timing cycle is detected the animation data being positioned at the first position in queue a and whether meets described occupancy broadcasting condition, if detect, the animation data being positioned at the first position in queue a meets described occupancy and plays condition, then can play the animation data being positioned at the first position in queue a, and the animation data being arranged in the first position in queue a is removed from queue a, and 1 is added to described queue variate-value, described queue variate-value is made to become 2, when receiving next time exceeded message, the described queue variate-value got is 2, and the current animation data identical with the animation types of queue b in broadcasting detected, now, described occupancy broadcasting condition whether is met by not detecting the animation data being positioned at the first position in queue b, namely can not play the animation data being positioned at the first position in queue b, and again 1 be added to described queue variate-value, make described queue variate-value become 3, when again receiving next time exceeded message, the described queue variate-value got is 3, and detect current not at the animation data that broadcasting is identical with the animation types of queue c, now, the mode that can be detected by timing cycle is detected the animation data being positioned at the first position in queue c and whether meets described occupancy broadcasting condition, the animation data being positioned at the first position in queue c if detect does not meet described occupancy and plays condition, then temporarily do not play the animation data being positioned at the first position in queue c, and keep described queue variate-value constant, namely described queue variate-value is still 3, when again receiving next time exceeded message, the described queue variate-value got is still 3, and detect current not at the animation data that broadcasting is identical with the animation types of queue c, now, the mode that can again be detected by timing cycle is detected the animation data being positioned at the first position in queue c and whether meets described occupancy broadcasting condition, if detect, the animation data being positioned at the first position in queue c meets described occupancy and plays condition, then play the animation data being positioned at the first position in queue c again, and the animation data being arranged in the first position in queue c is removed from queue c, and again 1 is added to described queue variate-value, described queue variate-value is made to become 4, now, described queue variate-value is greater than maximum queue number, so need described queue variate-value to be re-set as 1.
The client that the embodiment of the present invention provides can when detecting that certain animation data finishes, detect the animation data being positioned at the first position in queue belonging to this animation data immediately whether can be played, simultaneously, whether the animation data being positioned at the first position in all queues of mode Polling that described client can also be detected by timing cycle can be played, can ensure that the multiple animation datas in each queue can be sequentially played by these two kinds of detection modes, and ensure that the total occupancy of multiple animation datas to CPU simultaneously play is less than default total occupancy threshold value.
The embodiment of the present invention is by obtaining first processor occupancy corresponding to target animation data, target animation data can be detected according to first processor occupancy and whether meet the occupancy broadcasting condition preset, if meet occupancy condition, illustrate that current behavior of playing target animation data can't make the occupancy of client process on current run CPU core become too high, therefore can start to play target animation data, if do not meet occupancy condition, illustrate that current behavior of playing target animation data will make the occupancy of client process on current run CPU core become too high, when the mode that therefore can be detected by timing cycle detects that target animation data meet occupancy broadcasting condition, play target animation data, as can be seen here, when not meeting occupancy condition, target animation data can't be play immediately, but go out when target animation data meet occupancy condition to play target animation data again in subsequent detection by the mode that timing cycle detects, thus make the playing process of whole animation data to control in lower number range by the occupancy of client process on current run CPU core all the time, thus the operating pressure of CPU can be reduced when client terminal playing animation data, to ensure that subscriber equipment can normal operation.
Refer to Fig. 3, it is the structural representation of a kind of animation data playing device that the embodiment of the present invention provides, described animation data playing device 1 can be applied in client, and described animation data playing device 1 can comprise: obtain detection module 10, condition playing module 20, timing detection playing module 30;
Described acquisition detection module 10, for when getting the target animation data that server sends, obtain the first processor occupancy that described target animation data are corresponding, and detect the whether satisfied occupancy broadcasting condition preset of described target animation data according to described first processor occupancy;
Concrete, when the main broadcaster client of spectator client in certain channel live sends destination virtual present, the client (described client can comprise the interior all spectator client of this channel live and main broadcaster's client) in this channel live can obtain the target animation data corresponding with described destination virtual present that server sends; Wherein, the animation data of the different corresponding different animation types of virtual present difference, the animation data of often kind of animation types has fixing play mode and play position.Described server is while being sent to described client by ICP/IP protocol by described target animation data, first processor occupancy corresponding for described target animation data also can also be sent to described client, make, when described client gets the target animation data of server transmission, first processor occupancy corresponding to described target animation data to be obtained by described acquisition detection module 10.Wherein, described first processor occupancy refers to the occupancy to processor when playing described target animation data, described first processor occupancy be on stream repeatedly test is play to described target animation data after the mean value got.Such as, if the overall utilization rate of current processor is 30%, described first processor occupancy is 5%, and so when playing described target animation data, the overall utilization rate of processor can become 35%.
After described acquisition detection module 10 gets described first processor occupancy, whether can also detect currently has get identical with the animation types of described target animation data before acquisition time stamp and the animation data also do not play, described acquisition time stamp refers to timestamp when to get described target animation data from described server, if detect and do not exist, then described acquisition detection module 10 can detect the whether satisfied occupancy preset of described target animation data further according to described first processor occupancy and play condition, otherwise, need to wait until described got before acquisition time stamp identical with the animation types of described target animation data and after animation data that is that also do not play all is sequentially played, detect described target animation data further according to described first processor occupancy again and whether meet the occupancy broadcasting condition preset, to ensure that the animation data of identical animation types can be play successively according to the order of sequence.
Wherein, described occupancy plays condition is that described first processor occupancy and the second processor occupancy sum are less than default total occupancy threshold value; Described second processor occupancy refers to the summation of the processor occupancy of the multiple animation datas difference correspondences play just at the same time; Wherein, the animation types of the multiple animation datas simultaneously play is different.Described total occupancy threshold value can carry out dynamic conditioning according to business demand, after described total occupancy threshold value is heightened, can increase the quantity of the animation data simultaneously play; After described total occupancy threshold value is turned down, the quantity of the animation data simultaneously play can be reduced.
For described acquisition detection module 10, described condition playing module 20, if detect that meeting described occupancy plays condition, then play described target animation data;
Concrete, when described acquisition detection module 10 detects that described target animation data meet default occupancy broadcasting condition, illustrate that described first processor occupancy and the second processor occupancy sum are less than described total occupancy threshold value, namely illustrate that the overall utilization rate of CPU is still in lower number range, now, described condition playing module 20 can play described target animation data.
Described timing detects playing module 30, if detect that not meeting described occupancy plays condition for described acquisition detection module 10, when the mode then detected by timing cycle detects that described target animation data meet described occupancy broadcasting condition, play described target animation data;
Concrete, when described acquisition detection module 10 detects that described target animation data do not meet described occupancy broadcasting condition, illustrate that described first processor occupancy and the second processor occupancy sum are equal to or greater than described total occupancy threshold value, namely illustrating to cause the overall utilization rate of CPU higher, now, described timing detects playing module 30 and does not temporarily play described target animation data, described timing detects target animation data described in mode periodic detection that playing module 30 detected by timing cycle and whether meets described occupancy and play condition, as every within 3 seconds, to detect once described target animation data whether meet as described in occupancy broadcasting condition, due to after a period of time has passed, the quantity of the multiple animation datas simultaneously play may reduce, now, by the mode that described timing cycle detects, described timing detects playing module 30 can detect that described target animation data meet described occupancy and play condition, thus described target animation data can be play at this moment, simultaneously and by the mode that described timing cycle detects, periodic detection is carried out to the animation data that failing in another kind of animation types is play immediately, to realize can circulating periodic detection to all animation datas of failing to play immediately.Such as, there is the animation data that two animation types are identical, be respectively A and B, when A has been played, whether can meet described occupancy to detection B and play condition, if meet, then play B immediately; If do not meet, when then by the mode that timing cycle detects, described timing detection playing module 30 detects that B meets described occupancy broadcasting condition, play B again, to ensure the occupancy of client process on current run CPU core to be controlled in lower number range all the time when playing B.
Further, then refer to Fig. 4, be the structural representation of the acquisition detection module 10 in the corresponding embodiment of above-mentioned Fig. 3, described acquisition detection module 10 can comprise: obtain and search unit 101, add detecting unit 102;
Unit 101 is searched in described acquisition, for when getting the target animation data that server sends, obtaining the first processor occupancy that described target animation data are corresponding, and searching the object queue identical with the animation types of described target animation data;
Concrete, when getting the target animation data that server sends, unit 101 is searched in described acquisition can obtain first processor occupancy corresponding to described target animation data.Wherein, described first processor occupancy refers to the occupancy to processor when playing described target animation data, described first processor occupancy be on stream repeatedly test is play to described target animation data after the mean value got.Such as, if the overall utilization rate of current processor is 30%, described first processor occupancy is 5%, and so when playing described target animation data, the overall utilization rate of processor can become 35%.
Described acquisition searches unit 101 while getting described first processor occupancy, can also search the object queue identical with the animation types of described target animation data; Wherein, described object queue is for depositing and the animation data do not play identical with the animation types of described target animation data, and the animation data in described object queue carries out successively playing according to the sorting position in described object queue, and the animation data in described object queue will remove when played from described object queue.Wherein, described object queue can be one of them queue at least one default queue, and each default queue is respectively used to the animation data depositing different animation types.Each default queue can also distinguish corresponding different queue number, such as, for deposit the animation data that animation types is A queue corresponding to queue number can be set to 1, for deposit the animation data that animation types is B queue corresponding to queue number can be set to 2, for deposit the animation data that animation types is C queue corresponding to queue number can be set to 3.
Described interpolation detecting unit 102, for described target animation data are added into described object queue, and when described target animation data are positioned at the first position of described object queue, detect described target animation data according to described first processor occupancy and whether meet the occupancy broadcasting condition preset;
Wherein, described occupancy plays condition is that described first processor occupancy and the second processor occupancy sum are less than default total occupancy threshold value; Described second processor occupancy refers to the summation of the processor occupancy of the multiple animation datas difference correspondences play just at the same time; Wherein, the animation types of the multiple animation datas simultaneously play is different.Described total occupancy threshold value can carry out dynamic conditioning according to business demand, after described total occupancy threshold value is heightened, can increase the quantity of the animation data simultaneously play; After described total occupancy threshold value is turned down, the quantity of the animation data simultaneously play can be reduced.
Further, refer to 5 again, be the structural representation of the interpolation detecting unit 102 in the corresponding embodiment of above-mentioned Fig. 4, described interpolation detecting unit 102 can comprise: queue detection subelement 1021, first adds detection sub-unit 1022, second and adds detection sub-unit 1023;
Whether described queue detection subelement 1021 is empty for detecting described object queue;
Described first adds detection sub-unit 1022, during for being empty when described object queue, described target animation data are added into the first position of described object queue, and whether meet described occupancy broadcasting condition according to the described target animation data that described first processor occupancy detection is positioned at described the first position;
Described second adds detection sub-unit 1023, during for not being empty when described object queue, described target animation data are added into the end position of described object queue, and when playing the adjacent animation data being positioned at the previous position of described target animation data in described object queue, and when being removed from described object queue by described adjacent animation data, the position residing for described target animation data is defined as the first position of described object queue;
Described second adds detection sub-unit 1023, also at the end of the animation data broadcasting of previous position being positioned at described target animation data in described object queue, receive and play end, and the first position of searching according to described broadcasting end in described object queue, to obtain the described target animation data being positioned at described the first position, and whether meet described occupancy broadcasting condition according to the described target animation data that described first processor occupancy detection is positioned at described the first position;
Concrete, when described queue detection subelement 1021 detects described object queue not for time empty, described second adds the end position that described target animation data can be added into described object queue by detection sub-unit 1023, and when playing the adjacent animation data being positioned at the previous position of described target animation data in described object queue, and when described adjacent animation data is removed from described object queue, position residing for described target animation data is defined as the first position of described object queue, and at the end of the animation data of the previous position being positioned at described target animation data in described object queue is play, receive and play end, and the first position of searching according to described broadcasting end in described object queue, to obtain the described target animation data being positioned at described the first position, now can detect according to described first processor occupancy the described target animation data being positioned at described the first position and whether meet described occupancy broadcasting condition.Such as, if be respectively A (being positioned at the first position) from the first position to the animation data of end position in described object queue, B (being positioned at the second place), C (being positioned at the 3rd position), D (being positioned at end position), then when A is played, described second adds detection sub-unit 1023 removes A from described object queue, animation data now in described object queue comprises B (being positioned at the first position), C (being positioned at the second place), D (being positioned at end position), and second add detection sub-unit 1023 and can detect the B being positioned at the first position and whether can play described in when A is played complete, if B also starts to be played, then B also removes by described second interpolation detection sub-unit 1023 from described object queue, whether the animation data now in described object queue comprises C (being positioned at the first position), D (being positioned at end position), and can detect the C being positioned at the first position when B is played complete and can play.
Further, refer to Fig. 6 again, be the structural representation of the timing detection playing module 30 in above-mentioned Fig. 3 correspondence embodiment, described timing detects playing module 30 and can comprise: numbering acquisition determining unit 301, data acquisition detecting unit 302, broadcasting increase progressively unit 303, time-out broadcast unit 304, variate-value setting unit 305;
Described numbering obtains determining unit 301, for when receiving the time exceeded message detected for circulation timing, obtain queue variate-value, and obtain the queue number identical with described queue variate-value at least one queue number preset, to be defined as object queue numbering; Queue corresponding to different queue number is respectively used to the animation data depositing different animation types;
Concrete, when receiving the time exceeded message detected for circulation timing, described numbering obtains determining unit 301 and obtains queue variate-value, and obtains the queue number identical with described queue variate-value at least one queue number preset, to be defined as object queue numbering; Queue corresponding to each queue number is respectively used to the animation data depositing different animation types; The corresponding respectively queue number of each queue and each queue pre-sets.Wherein, described time exceeded message can be triggered by the QTimer startup timer of Qt (cross-platform C++ graphical user interface application program).Such as, QTimer starts timer and triggered a time exceeded message every 3 seconds, makes described client can receive a time exceeded message every 3 seconds.
Described data acquisition detecting unit 302, when being described object queue for the queue corresponding when described object queue numbering, obtain and be positioned at the described target animation data of the first position of described object queue, and detect described target animation data and whether meet described occupancy and play condition;
Described broadcasting increases progressively unit 303, for when detecting that described target animation data meet described occupancy broadcasting condition, play described target animation data, and described target animation data are removed from described object queue, and incremental calculation is carried out to described queue variate-value, so that when receiving next time exceeded message according to the queue variate-value after increasing progressively, detecting the animation data being arranged in the first position of the queue adjacent with described object queue and whether meeting described occupancy and play condition;
Concrete, when described data acquisition detecting unit 302 detects that described target animation data meet described occupancy broadcasting condition, namely illustrate that the mode detected by timing cycle detects that described target animation data meet described occupancy and play condition, now, described broadcasting increases progressively unit 303 can play described target animation data, and described target animation data are removed from described object queue, make the next animation data being positioned at described target animation data in described object queue can move to the first position, so that start to detect the next animation data being positioned at described target animation data whether meet described occupancy broadcasting condition.
Described broadcasting increases progressively unit 303 while described target animation data being removed from described object queue, incremental calculation can also be carried out to described queue variate-value, so that when receiving next time exceeded message according to the queue variate-value after increasing progressively, detecting the animation data being arranged in the first position of the queue adjacent with described object queue and whether meeting described occupancy and play condition.
Described time-out broadcast unit 304, for when detecting that described target animation data do not meet described occupancy broadcasting condition, suspend and play described target animation data, and time-out carries out incremental calculation to described queue variate-value, so that continue to detect described target animation data according to described queue variate-value whether meet described occupancy broadcasting condition when receiving next time exceeded message;
Concrete, when described data acquisition detecting unit 302 detects that described target animation data do not meet described occupancy broadcasting condition, described time-out broadcast unit 304 can suspend plays described target animation data, and time-out carries out incremental calculation to described queue variate-value, namely described queue variate-value remains unchanged, so that continue to detect described target animation data according to described queue variate-value whether meet described occupancy broadcasting condition when receiving next time exceeded message.
Described variate-value setting unit 305, for when judging the maximum numbering that the queue variate-value after increasing progressively is greater than at least one queue number described, queue variate-value after described increasing progressively is re-set as the lowest number at least one queue number described, so that cycle detection is carried out in the queue corresponding respectively at least one queue number described according to described queue variate-value;
Concrete, after described queue variate-value is increased progressively, can judge whether the queue variate-value after increasing progressively is greater than the maximum numbering at least one queue number described, when judging the maximum numbering that the queue variate-value after increasing progressively is greater than at least one queue number described, queue variate-value after described increasing progressively can be re-set as the lowest number at least one queue number described by described variate-value setting unit 305, so that cycle detection is carried out in the queue corresponding respectively at least one queue number described according to described queue variate-value, namely described queue variate-value can be made can be incremented to maximum numbering from lowest number, be recycled to lowest number.
Further, refer to Fig. 7 again, be the structural representation of the data acquisition detecting unit 302 in the corresponding embodiment of above-mentioned Fig. 6, described data acquisition detecting unit 302 can comprise: data judgment sub-unit 3021, data acquisition detection sub-unit 3022, computation subunit 3023;
Described data judgment sub-unit 3021, when being described object queue for the queue corresponding when described object queue numbering, judges currently whether playing the animation data belonging to described object queue;
Described data acquisition detection sub-unit 3022, if be judged as NO for described data judgment sub-unit 3021, then obtain and be positioned at the described target animation data of the first position of described object queue, and detect described target animation data and whether meet described occupancy and play condition;
Described computation subunit 3023, if be judged as YES for described data judgment sub-unit 3021, then suspend the described target animation data of detection and whether meet described occupancy broadcasting condition, and incremental calculation is carried out to described queue variate-value, to wait for when receiving next time exceeded message according to the queue variate-value after increasing progressively, whether the animation data that detection is arranged in the first position of the queue adjacent with described object queue meets described occupancy is play condition;
Concrete, if described data judgment sub-unit 3021 is judged as YES, then described computation subunit 3023 can suspend detect described target animation data whether meet described occupancy play condition, and incremental calculation is carried out to described queue variate-value, to wait for when receiving next time exceeded message according to the queue variate-value after increasing progressively, detect the animation data being arranged in the first position of the queue adjacent with described object queue whether to meet described occupancy and play condition, thus can ensure that the animation data of the upper position being positioned at described target animation data is when played complete, the mode detected by timing cycle is again detected described target animation data and whether meets described occupancy broadcasting condition, play with the multiple animation datas avoiding animation types identical simultaneously.
The client that the embodiment of the present invention provides can when detecting that certain animation data finishes, detect the animation data being positioned at the first position in queue belonging to this animation data immediately whether can be played, simultaneously, whether the animation data being positioned at the first position in all queues of mode Polling that described client can also be detected by timing cycle can be played, can ensure that the multiple animation datas in each queue can be sequentially played by these two kinds of detection modes, and ensure that the total occupancy of multiple animation datas to CPU simultaneously play is less than default total occupancy threshold value.
The embodiment of the present invention is by obtaining first processor occupancy corresponding to target animation data, target animation data can be detected according to first processor occupancy and whether meet the occupancy broadcasting condition preset, if meet occupancy condition, illustrate that current behavior of playing target animation data can't make the occupancy of client process on current run CPU core become too high, therefore can start to play target animation data, if do not meet occupancy condition, illustrate that current behavior of playing target animation data will make the occupancy of client process on current run CPU core become too high, when the mode that therefore can be detected by timing cycle detects that target animation data meet occupancy broadcasting condition, play target animation data, as can be seen here, when not meeting occupancy condition, target animation data can't be play immediately, but go out when target animation data meet occupancy condition to play target animation data again in subsequent detection by the mode that timing cycle detects, thus make the playing process of whole animation data to control in lower number range by the occupancy of client process on current run CPU core all the time, thus the operating pressure of CPU can be reduced when client terminal playing animation data, to ensure that subscriber equipment can normal operation.
Referring to Fig. 8, is the structural representation of the another kind of animation data playing device that the embodiment of the present invention provides.Described animation data playing device 1000 can comprise processor 1001, communication interface 1002 and memory 1003 (quantity of the processor 1001 in described animation data playing device 1000 can be one or more, for a processor in Fig. 8).In some embodiments of the present invention, processor 1001, communication interface 1002 are connected by communication bus or other modes with memory 1003, and wherein, Fig. 8 is to connect by communication bus.
Wherein, described communication interface 1002, for communicating with server;
Described memory 1003 is for storage program;
Described processor 1001 for performing described program, to realize
When getting the target animation data that server sends, obtain the first processor occupancy that described target animation data are corresponding, and detect the whether satisfied occupancy broadcasting condition preset of described target animation data according to described first processor occupancy;
If meet described occupancy to play condition, then play described target animation data;
If do not meet described occupancy to play condition, then, when the mode detected by timing cycle detects that described target animation data meet described occupancy broadcasting condition, play described target animation data;
Wherein, described occupancy plays condition is that described first processor occupancy and the second processor occupancy sum are less than default total occupancy threshold value; Described second processor occupancy refers to the summation of the processor occupancy of the multiple animation datas difference correspondences play just at the same time.
In one embodiment, described processor 1001 is performing when getting the target animation data that server sends, obtain the first processor occupancy that described target animation data are corresponding, and when detecting described target animation data whether satisfied default occupancy broadcasting condition according to described first processor occupancy, specifically for:
When getting the target animation data that server sends, obtaining the first processor occupancy that described target animation data are corresponding, and searching the object queue identical with the animation types of described target animation data;
Described target animation data are added into described object queue, and when described target animation data are positioned at the first position of described object queue, detect described target animation data according to described first processor occupancy and whether meet the occupancy broadcasting condition preset;
Wherein, described object queue is for depositing and the animation data do not play identical with the animation types of described target animation data, and the animation data in described object queue carries out successively playing according to the sorting position in described object queue, and the animation data in described object queue will remove when played from described object queue.
In one embodiment, described target animation data are added into described object queue in execution by described processor 1001, and when described target animation data are positioned at the first position of described object queue, when detecting described target animation data whether satisfied default occupancy broadcasting condition according to described first processor occupancy, specifically for:
Whether detect described object queue is empty;
When described object queue is empty, described target animation data are added into the first position of described object queue, and whether meet described occupancy broadcasting condition according to the described target animation data that described first processor occupancy detection is positioned at described the first position;
When described object queue is not empty, described target animation data are added into the end position of described object queue, and when playing the adjacent animation data being positioned at the previous position of described target animation data in described object queue, and when being removed from described object queue by described adjacent animation data, the position residing for described target animation data is defined as the first position of described object queue;
At the end of the animation data of the previous position being positioned at described target animation data in described object queue is play, receive and play end, and the first position of searching according to described broadcasting end in described object queue, to obtain the described target animation data being positioned at described the first position, and whether meet described occupancy broadcasting condition according to the described target animation data that described first processor occupancy detection is positioned at described the first position.
In one embodiment, described processor 1001 perform the mode detected by timing cycle detect described target animation data meet described occupancy play condition time, when playing described target animation data, specifically for:
When receiving the time exceeded message detected for circulation timing, obtain queue variate-value, and obtain the queue number identical with described queue variate-value at least one queue number preset, to be defined as object queue numbering; Queue corresponding to each queue number is respectively used to the animation data depositing different animation types;
When the queue that described object queue numbering is corresponding is described object queue, obtain the described target animation data being positioned at the first position of described object queue, and detect described target animation data and whether meet described occupancy and play condition;
When detecting that described target animation data meet described occupancy broadcasting condition, play described target animation data, and described target animation data are removed from described object queue, and incremental calculation is carried out to described queue variate-value, so that when receiving next time exceeded message according to the queue variate-value after increasing progressively, detecting the animation data being arranged in the first position of the queue adjacent with described object queue and whether meeting described occupancy and play condition;
When detecting that described target animation data do not meet described occupancy broadcasting condition, suspend and play described target animation data, and time-out carries out incremental calculation to described queue variate-value, so that continue to detect described target animation data according to described queue variate-value whether meet described occupancy broadcasting condition when receiving next time exceeded message.
In one embodiment, described processor 1001 is performing when detecting that described target animation data meet described occupancy broadcasting condition, play described target animation data, and described target animation data are removed from described object queue, and after incremental calculation is carried out to described queue variate-value, also for:
When judging the maximum numbering that the queue variate-value after increasing progressively is greater than at least one queue number described, queue variate-value after described increasing progressively is re-set as the lowest number at least one queue number described, so that cycle detection is carried out in the queue corresponding respectively at least one queue number described according to described queue variate-value.
In one embodiment, described processor 1001 is performing when the queue that described object queue numbering is corresponding is described object queue, obtain the described target animation data being positioned at the first position of described object queue, and detect described target animation data whether meet described occupancy play condition time, specifically for:
When the queue that described object queue numbering is corresponding is described object queue, judge currently whether playing the animation data belonging to described object queue;
If be judged as NO, then obtain and be positioned at the described target animation data of the first position of described object queue, and detect described target animation data and whether meet described occupancy and play condition;
If be judged as YES, then suspend the described target animation data of detection and whether meet described occupancy broadcasting condition, and incremental calculation is carried out to described queue variate-value, to wait for when receiving next time exceeded message according to the queue variate-value after increasing progressively, whether the animation data that detection is arranged in the first position of the queue adjacent with described object queue meets described occupancy is play condition.
The embodiment of the present invention is by obtaining first processor occupancy corresponding to target animation data, target animation data can be detected according to first processor occupancy and whether meet the occupancy broadcasting condition preset, if meet occupancy condition, illustrate that current behavior of playing target animation data can't make the occupancy of client process on current run CPU core become too high, therefore can start to play target animation data, if do not meet occupancy condition, illustrate that current behavior of playing target animation data will make the occupancy of client process on current run CPU core become too high, when the mode that therefore can be detected by timing cycle detects that target animation data meet occupancy broadcasting condition, play target animation data, as can be seen here, when not meeting occupancy condition, target animation data can't be play immediately, but go out when target animation data meet occupancy condition to play target animation data again in subsequent detection by the mode that timing cycle detects, thus make the playing process of whole animation data to control in lower number range by the occupancy of client process on current run CPU core all the time, thus the operating pressure of CPU can be reduced when client terminal playing animation data, to ensure that subscriber equipment can normal operation.
One of ordinary skill in the art will appreciate that all or part of flow process realized in above-described embodiment method, that the hardware that can carry out instruction relevant by computer program has come, described program can be stored in a computer read/write memory medium, this program, when performing, can comprise the flow process of the embodiment as above-mentioned each side method.Wherein, described storage medium can be magnetic disc, CD, read-only store-memory body (Read-OnlyMemory, ROM) or random store-memory body (RandomAccessMemory, RAM) etc.
Above disclosedly be only present pre-ferred embodiments, certainly can not limit the interest field of the present invention with this, therefore according to the equivalent variations that the claims in the present invention are done, still belong to the scope that the present invention is contained.

Claims (12)

1. an animation data player method, is characterized in that, comprising:
When getting the target animation data that server sends, obtain the first processor occupancy that described target animation data are corresponding, and detect the whether satisfied occupancy broadcasting condition preset of described target animation data according to described first processor occupancy;
If meet described occupancy to play condition, then play described target animation data;
If do not meet described occupancy to play condition, then, when the mode detected by timing cycle detects that described target animation data meet described occupancy broadcasting condition, play described target animation data;
Wherein, described occupancy plays condition is that described first processor occupancy and the second processor occupancy sum are less than default total occupancy threshold value; Described second processor occupancy refers to the summation of the processor occupancy of the multiple animation datas difference correspondences play just at the same time.
2. the method for claim 1, it is characterized in that, described when getting the target animation data that server sends, obtain the first processor occupancy that described target animation data are corresponding, and detect the whether satisfied occupancy broadcasting condition preset of described target animation data according to described first processor occupancy, comprising:
When getting the target animation data that server sends, obtaining the first processor occupancy that described target animation data are corresponding, and searching the object queue identical with the animation types of described target animation data;
Described target animation data are added into described object queue, and when described target animation data are positioned at the first position of described object queue, detect described target animation data according to described first processor occupancy and whether meet the occupancy broadcasting condition preset;
Wherein, described object queue is for depositing and the animation data do not play identical with the animation types of described target animation data, and the animation data in described object queue carries out successively playing according to the sorting position in described object queue, and the animation data in described object queue will remove when played from described object queue.
3. method as claimed in claim 2, it is characterized in that, described described target animation data are added into described object queue, and when described target animation data are positioned at the first position of described object queue, detect described target animation data according to described first processor occupancy and whether meet the occupancy broadcasting condition preset, comprising:
Whether detect described object queue is empty;
When described object queue is empty, described target animation data are added into the first position of described object queue, and whether meet described occupancy broadcasting condition according to the described target animation data that described first processor occupancy detection is positioned at described the first position;
When described object queue is not empty, described target animation data are added into the end position of described object queue, and when playing the adjacent animation data being positioned at the previous position of described target animation data in described object queue, and when being removed from described object queue by described adjacent animation data, the position residing for described target animation data is defined as the first position of described object queue;
At the end of the animation data of the previous position being positioned at described target animation data in described object queue is play, receive and play end, and the first position of searching according to described broadcasting end in described object queue, to obtain the described target animation data being positioned at described the first position, and whether meet described occupancy broadcasting condition according to the described target animation data that described first processor occupancy detection is positioned at described the first position.
4. method as claimed in claim 2 or claim 3, is characterized in that, when the described mode detected by timing cycle detects that described target animation data meet described occupancy broadcasting condition, plays described target animation data, comprising:
When receiving the time exceeded message detected for circulation timing, obtain queue variate-value, and obtain the queue number identical with described queue variate-value at least one queue number preset, to be defined as object queue numbering; Queue corresponding to each queue number is respectively used to the animation data depositing different animation types;
When the queue that described object queue numbering is corresponding is described object queue, obtain the described target animation data being positioned at the first position of described object queue, and detect described target animation data and whether meet described occupancy and play condition;
When detecting that described target animation data meet described occupancy broadcasting condition, play described target animation data, and described target animation data are removed from described object queue, and incremental calculation is carried out to described queue variate-value, so that when receiving next time exceeded message according to the queue variate-value after increasing progressively, detecting the animation data being arranged in the first position of the queue adjacent with described object queue and whether meeting described occupancy and play condition;
When detecting that described target animation data do not meet described occupancy broadcasting condition, suspend and play described target animation data, and time-out carries out incremental calculation to described queue variate-value, so that continue to detect described target animation data according to described queue variate-value whether meet described occupancy broadcasting condition when receiving next time exceeded message.
5. method as claimed in claim 4, it is characterized in that, described when detecting that described target animation data meet described occupancy broadcasting condition, play described target animation data, and described target animation data are removed from described object queue, and after the step of incremental calculation is carried out to described queue variate-value, also comprise:
When judging the maximum numbering that the queue variate-value after increasing progressively is greater than at least one queue number described, queue variate-value after described increasing progressively is re-set as the lowest number at least one queue number described, so that cycle detection is carried out in the queue corresponding respectively at least one queue number described according to described queue variate-value.
6. method as claimed in claim 4, it is characterized in that, when the described queue corresponding when described object queue numbering is described object queue, obtain the described target animation data being positioned at the first position of described object queue, and detect described target animation data whether meet described occupancy play condition, comprising:
When the queue that described object queue numbering is corresponding is described object queue, judge currently whether playing the animation data belonging to described object queue;
If be judged as NO, then obtain and be positioned at the described target animation data of the first position of described object queue, and detect described target animation data and whether meet described occupancy and play condition;
If be judged as YES, then suspend the described target animation data of detection and whether meet described occupancy broadcasting condition, and incremental calculation is carried out to described queue variate-value, to wait for when receiving next time exceeded message according to the queue variate-value after increasing progressively, whether the animation data that detection is arranged in the first position of the queue adjacent with described object queue meets described occupancy is play condition.
7. an animation data playing device, is characterized in that, comprising:
Obtain detection module, for when getting the target animation data that server sends, obtain the first processor occupancy that described target animation data are corresponding, and detect the whether satisfied occupancy broadcasting condition preset of described target animation data according to described first processor occupancy;
For described acquisition detection module, condition playing module, if detect that meeting described occupancy plays condition, then play described target animation data;
Timing detects playing module, if detect that not meeting described occupancy plays condition for described acquisition detection module, when the mode then detected by timing cycle detects that described target animation data meet described occupancy broadcasting condition, play described target animation data;
Wherein, described occupancy plays condition is that described first processor occupancy and the second processor occupancy sum are less than default total occupancy threshold value; Described second processor occupancy refers to the summation of the processor occupancy of the multiple animation datas difference correspondences play just at the same time.
8. device as claimed in claim 7, it is characterized in that, described acquisition detection module comprises:
Unit is searched in acquisition, for when getting the target animation data that server sends, obtaining the first processor occupancy that described target animation data are corresponding, and searching the object queue identical with the animation types of described target animation data;
Add detecting unit, for described target animation data are added into described object queue, and when described target animation data are positioned at the first position of described object queue, detect described target animation data according to described first processor occupancy and whether meet the occupancy broadcasting condition preset;
Wherein, described object queue is for depositing and the animation data do not play identical with the animation types of described target animation data, and the animation data in described object queue carries out successively playing according to the sorting position in described object queue, and the animation data in described object queue will remove when played from described object queue.
9. device as claimed in claim 8, it is characterized in that, described interpolation detecting unit comprises:
Whether queue detection subelement is empty for detecting described object queue;
First adds detection sub-unit, during for being empty when described object queue, described target animation data are added into the first position of described object queue, and whether meet described occupancy broadcasting condition according to the described target animation data that described first processor occupancy detection is positioned at described the first position;
Second adds detection sub-unit, during for not being empty when described object queue, described target animation data are added into the end position of described object queue, and when playing the adjacent animation data being positioned at the previous position of described target animation data in described object queue, and when being removed from described object queue by described adjacent animation data, the position residing for described target animation data is defined as the first position of described object queue;
Described second adds detection sub-unit, also at the end of the animation data broadcasting of previous position being positioned at described target animation data in described object queue, receive and play end, and the first position of searching according to described broadcasting end in described object queue, to obtain the described target animation data being positioned at described the first position, and whether meet described occupancy broadcasting condition according to the described target animation data that described first processor occupancy detection is positioned at described the first position.
10. device as claimed in claim 8 or 9, is characterized in that, described timing detects playing module and comprises:
Numbering obtains determining unit, for when receiving the time exceeded message detected for circulation timing, obtains queue variate-value, and obtain the queue number identical with described queue variate-value at least one queue number preset, to be defined as object queue numbering; Queue corresponding to different queue number is respectively used to the animation data depositing different animation types;
Data acquisition detecting unit, when being described object queue for the queue corresponding when described object queue numbering, obtain and be positioned at the described target animation data of the first position of described object queue, and detect described target animation data and whether meet described occupancy and play condition;
Broadcasting increases progressively unit, for when detecting that described target animation data meet described occupancy broadcasting condition, play described target animation data, and described target animation data are removed from described object queue, and incremental calculation is carried out to described queue variate-value, so that when receiving next time exceeded message according to the queue variate-value after increasing progressively, detecting the animation data being arranged in the first position of the queue adjacent with described object queue and whether meeting described occupancy and play condition;
Suspend broadcast unit, for when detecting that described target animation data do not meet described occupancy broadcasting condition, suspend and play described target animation data, and time-out carries out incremental calculation to described queue variate-value, so that continue to detect described target animation data according to described queue variate-value whether meet described occupancy broadcasting condition when receiving next time exceeded message.
11. devices as claimed in claim 10, is characterized in that, described timing detects playing module and also comprises:
Variate-value setting unit, for when judging the maximum numbering that the queue variate-value after increasing progressively is greater than at least one queue number described, queue variate-value after described increasing progressively is re-set as the lowest number at least one queue number described, so that cycle detection is carried out in the queue corresponding respectively at least one queue number described according to described queue variate-value.
12. devices as claimed in claim 10, it is characterized in that, described data acquisition detecting unit comprises:
Data judgment sub-unit, when being described object queue for the queue corresponding when described object queue numbering, judges currently whether playing the animation data belonging to described object queue;
Data acquisition detection sub-unit, if be judged as NO for described data judgment sub-unit, then obtain and is positioned at the described target animation data of the first position of described object queue, and detects described target animation data and whether meet described occupancy and play condition;
Computation subunit, if be judged as YES for described data judgment sub-unit, then suspend the described target animation data of detection and whether meet described occupancy broadcasting condition, and incremental calculation is carried out to described queue variate-value, to wait for when receiving next time exceeded message according to the queue variate-value after increasing progressively, whether the animation data that detection is arranged in the first position of the queue adjacent with described object queue meets described occupancy is play condition.
CN201510896822.7A 2015-12-07 2015-12-07 A kind of animation data playback method and device Active CN105491448B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510896822.7A CN105491448B (en) 2015-12-07 2015-12-07 A kind of animation data playback method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510896822.7A CN105491448B (en) 2015-12-07 2015-12-07 A kind of animation data playback method and device

Publications (2)

Publication Number Publication Date
CN105491448A true CN105491448A (en) 2016-04-13
CN105491448B CN105491448B (en) 2018-11-23

Family

ID=55678106

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510896822.7A Active CN105491448B (en) 2015-12-07 2015-12-07 A kind of animation data playback method and device

Country Status (1)

Country Link
CN (1) CN105491448B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110891181A (en) * 2019-12-03 2020-03-17 广州酷狗计算机科技有限公司 Live broadcast picture display method and device, storage medium and terminal
CN114650239A (en) * 2022-03-23 2022-06-21 腾讯音乐娱乐科技(深圳)有限公司 Data brushing amount identification method, storage medium and electronic equipment

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080122971A1 (en) * 2006-11-29 2008-05-29 Ipera Technology, Inc. System and method for allocation of resources for processing video
CN101387971A (en) * 2008-09-26 2009-03-18 中兴通讯股份有限公司 Task regulation method and apparatus for embedded software
CN101477820A (en) * 2008-12-30 2009-07-08 深圳华为通信技术有限公司 File playing method and apparatus
CN104461520A (en) * 2014-11-25 2015-03-25 广州酷狗计算机科技有限公司 Method and device for adjusting playing frame frequency of animation
CN104661059A (en) * 2013-11-20 2015-05-27 中兴通讯股份有限公司 Picture playing method and device as well as set-top box

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080122971A1 (en) * 2006-11-29 2008-05-29 Ipera Technology, Inc. System and method for allocation of resources for processing video
CN101387971A (en) * 2008-09-26 2009-03-18 中兴通讯股份有限公司 Task regulation method and apparatus for embedded software
CN101477820A (en) * 2008-12-30 2009-07-08 深圳华为通信技术有限公司 File playing method and apparatus
CN104661059A (en) * 2013-11-20 2015-05-27 中兴通讯股份有限公司 Picture playing method and device as well as set-top box
CN104461520A (en) * 2014-11-25 2015-03-25 广州酷狗计算机科技有限公司 Method and device for adjusting playing frame frequency of animation

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110891181A (en) * 2019-12-03 2020-03-17 广州酷狗计算机科技有限公司 Live broadcast picture display method and device, storage medium and terminal
CN110891181B (en) * 2019-12-03 2022-02-18 广州酷狗计算机科技有限公司 Live broadcast picture display method and device, storage medium and terminal
CN114650239A (en) * 2022-03-23 2022-06-21 腾讯音乐娱乐科技(深圳)有限公司 Data brushing amount identification method, storage medium and electronic equipment
CN114650239B (en) * 2022-03-23 2024-02-23 腾讯音乐娱乐科技(深圳)有限公司 Data brushing amount identification method, storage medium and electronic equipment

Also Published As

Publication number Publication date
CN105491448B (en) 2018-11-23

Similar Documents

Publication Publication Date Title
CN106658133B (en) Audio and video synchronous playing method and terminal
TWI473478B (en) Network communication control method and system
CN109803152B (en) Violation auditing method and device, electronic equipment and storage medium
CN108124202B (en) Method for making stream media server support H L S protocol
CN102547395B (en) Method and device for determining video data source of network player
CN104602131A (en) Barrage processing method and system
CN105872721A (en) Processing method and device of play-starting speed
WO2019128667A1 (en) Video playback method and terminal, server and storage medium
CN104519124A (en) Allocation method and device of virtual resources
CN108540818B (en) Live broadcast room corner mark setting method and device, terminal and computer readable medium
CN109445941B (en) Method, device, terminal and storage medium for configuring processor performance
CN104331601A (en) Method and device for optimizing game scenes
CN105791987B (en) The method and terminal that media data plays
CN106375835A (en) Streaming media playing method and device
CN112473144A (en) Game resource data processing method and device
CN111185003A (en) Real-time cloud application hosting method and device, server and storage medium
CN105491448A (en) Animation data play method and device
JP2019016042A (en) Data acquisition program, device, and method
CN107648854B (en) Game classification method and device and electronic equipment
CN109597566B (en) Data reading and storing method and device
CN108521577B (en) Video playing method, device, equipment and storage medium
CN109218766B (en) Method for summoning bean vermicelli, live broadcast platform server and anchor terminal
CN113923472A (en) Video content analysis method and device, electronic equipment and storage medium
CN106776056B (en) Game data processing method and device and server
CN110446117B (en) Video playing method, device and system

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right

Effective date of registration: 20210111

Address after: 511442 3108, 79 Wanbo 2nd Road, Nancun Town, Panyu District, Guangzhou City, Guangdong Province

Patentee after: GUANGZHOU CUBESILI INFORMATION TECHNOLOGY Co.,Ltd.

Address before: 511442 24 floors, B-1 Building, Wanda Commercial Square North District, Wanbo Business District, 79 Wanbo Second Road, Nancun Town, Panyu District, Guangzhou City, Guangdong Province

Patentee before: GUANGZHOU HUADUO NETWORK TECHNOLOGY Co.,Ltd.

TR01 Transfer of patent right
EE01 Entry into force of recordation of patent licensing contract

Application publication date: 20160413

Assignee: GUANGZHOU HUADUO NETWORK TECHNOLOGY Co.,Ltd.

Assignor: GUANGZHOU CUBESILI INFORMATION TECHNOLOGY Co.,Ltd.

Contract record no.: X2021440000053

Denomination of invention: A method and device for playing animation data

Granted publication date: 20181123

License type: Common License

Record date: 20210208

EE01 Entry into force of recordation of patent licensing contract