Embodiment
It should be noted that, in the situation that not conflicting, embodiment and the feature in embodiment in the application can combine mutually.Describe below with reference to the accompanying drawings and in conjunction with the embodiments the present invention in detail.
In order to make those skilled in the art person understand better the present invention program, below in conjunction with the accompanying drawing in the embodiment of the present invention, technical scheme in the embodiment of the present invention is clearly and completely described, obviously, described embodiment is only the embodiment of a part of the present invention, rather than whole embodiment.Embodiment based in the present invention, those of ordinary skills, not making the every other embodiment obtaining under creative work prerequisite, should belong to the scope of protection of the invention.
It should be noted that, the term " first " in specification of the present invention and claims and above-mentioned accompanying drawing, " second " etc. are for distinguishing similar object, and needn't be for describing specific order or precedence.The data that should be appreciated that such use suitably can exchanged in situation, so as embodiments of the invention described herein can with except diagram here or describe those order enforcement.In addition, term " comprises " and " having " and their any distortion, intention is to cover not exclusive comprising, for example, those steps or unit that the process that has comprised series of steps or unit, method, system, product or equipment are not necessarily limited to clearly list, but can comprise clearly do not list or for these processes, method, product or equipment intrinsic other step or unit.
Fig. 1 is according to the flow chart of the video fluency computation processing method of first embodiment of the invention.As shown in the figure, this video fluency computation processing method comprises the steps:
Step S101, the client records video card information of pausing.Client is the arbitrary client in network system, the video card that can record client itself information of pausing.In client, can set up the video card information table that pauses, in the time of video generation Caton phenomenon, add this card information to video card and pause in information table.In order to facilitate the inquirying card information of pausing, can fill the video card information table that pauses according to time sequencing.
The recording of video card information of pausing can be immediately long for time in fact and card that recording of video card pauses.For fear of the duplicate record of data, when card just occurs, card is immediately long is recorded as 0, in the process of card, can be updated periodically the duration of card, when current card pauses and finishes, and the duration that more neocaine pauses for the last time.Because card is to finish the last time just may occur next time afterwards again, therefore the current card record one that pauses is positioned the pause end of information table of card, upgrading card that current video card pauses and only need upgrade in immediately long this record at end, the information of can recording of video card pausing.Following table is the example of a card record sheet, the most de novo card end that fixes on queue of pausing, and every secondary card pause necessarily do not have overlapping.
Step S102, client is calculated unit video fluency according to the video card information of pausing.Unit video fluency can be the video fluency of client in current slot, in enough hour of the time period of current slot, can think that unit video fluency is real-time video fluency.Client is according to the card information of pausing of record, determines total duration that in number of times that this client video card pauses and certain hour, video card pauses.The number of times that video card pauses is more, and unit video fluency is lower, and total duration that video card pauses is longer, and the fluency of unit video is also lower.Number of times * constant a that client can be paused video card and video card immediately between * constant b summation obtains unit video fluency.The higher video playback of unit video fluency calculating is more smooth, and therefore less by the above-mentioned numerical value calculating, unit video fluency is high.
Preferably, can obtain unit video fluency with constant/(number of times * constant a+ video card that video card pauses immediately between * constant b+ constant).The numerical value of the unit video fluency calculating between 0 to 1, the convenient machine of order really video fluency.
It should be noted that, what the mode of the calculating unit fluency that the embodiment of the present invention provides was just carried out for convenient understanding illustrates, should be understood that, unit fluency can calculate by the mode that other can characterize numerical value and unit video fluency relation.
Step S103, client sends unit video fluency to server, and wherein, server calculates the average video fluency of a plurality of clients according to unit video fluency.One or more clients are sent to service by unit video fluency, wherein, server can receive the unit video fluency of a plurality of clients, and the unit video fluency of a plurality of clients is processed, and calculates the average video fluency of a plurality of clients.By the average video fluency of a plurality of clients, can determine the fluency of the video playback of whole network.
After calculating unit video fluency by client, unit video fluency is sent to server, server only need be added up the average video fluency of a plurality of clients, repeatedly transfer of data and calculating without client and server, save Internet resources and memory source, improved the computational efficiency of average video fluency.
Preferably, in order to determine the video fluency of current slot in network, video card in client records the first predetermined amount of time information of pausing, then client obtains unit video fluency according to the pause time span of information and the first predetermined amount of time of the video card of record.
Wherein, the first predetermined amount of time is the time period adjacent with current time.Enough hour of the duration of the first predetermined amount of time, the card that to think at interval of the video card information of pausing in the first predetermined amount of time be real time record current time that can the be similar to information of timing.
Further, client can record video card in the first predetermined amount of time information of pausing to step S204 by following steps S201:
Step S201, in chronological order the store video card information of pausing.Because video card pauses, be to finish the last time just may occur again next time afterwards, when pausing information, store video card can be stored in client according to time sequencing, therefore, it is more forward that the video card information of pausing is stored in the position that video card pauses in information table, the video card information of pausing is older, longer with the interval of current time.The video card that can read easily storage according to the time sequencing store video card information of the pausing information of pausing.
Step S202, the video card of searching storage before the first predetermined amount of time information of pausing, obtains a historical card information.Video card pause information according to the sequential storage of time in client, client can by storage the video card information of pausing obtain unit video fluency.Calculate unit video fluency and need to utilize video card in the first predetermined amount of time information of pausing, and canned data not only comprises that the video card information of pausing in the first predetermined amount of time also comprises video card before the first predetermined amount of time information of pausing in client, therefore need to determine the first predetermined amount of time information before by searching, i.e. a historical card information.
Search storage before the first Preset Time section the video card information of pausing can according to time sequencing from video card pause information table start foremost search, also can adopt the methods such as binary search to search.The value of the first predetermined amount of time can be preferably a minute rank according to user's the setting that needs, and can more accurately reflect the fluency of current video.
Step S203, the deleting history card information of pausing, obtains video card in the first predetermined amount of time information of pausing.After finding a historical card information, the video card that can distinguish the first predetermined amount of time pause information and a historical card information, pause history card after information deletion, obtains video card in the first predetermined amount of time information of pausing.
Step S204, records video card in the first predetermined amount of time information of pausing.When deleting history card pauses information, the information of pausing of the video card in the first predetermined amount of time of obtaining of record.
Owing to surpassing the history card information of pausing of the first predetermined amount of time, be all removed, each playing duration while calculating unit video fluency is all the first predetermined amount of time of fixing, therefore only need be by video card number of times and the video card total duration calculation of pausing of pausing when calculating unit video fluency.
Fig. 2 is according to the flow chart of the video fluency computation processing method of second embodiment of the invention.
Step S301, the client records video card information of pausing.Client is the arbitrary client in network system, the video card that can record client itself information of pausing.In client, can set up the video card information table that pauses, in the time of video generation Caton phenomenon, add this card information to video card and pause in information table.In order to facilitate the inquirying card information of pausing, can fill the video card information table that pauses according to time sequencing.
Step S302, client is calculated unit video fluency according to the video card information of pausing.Unit video fluency can be the video fluency of client in current slot, in enough hour of the time period of current slot, can think that unit video fluency is real-time video fluency.Client is according to the card information of pausing of record, determines total duration that in number of times that this client video card pauses and certain hour, video card pauses.The number of times that video card pauses is more, and unit video fluency is lower, and total duration that video card pauses is longer, and the fluency of unit video is also lower.Number of times * constant a that client can be paused video card and video card immediately between * constant b summation obtains unit video fluency, can also obtain unit video fluency with constant/(number of times * constant a+ video card that video card pauses immediately between * constant b+ constant).
Step S303, client sends unit video fluency to server at interval of the second predetermined amount of time, and server calculates the average video fluency of a plurality of clients according to unit video fluency at interval of the second Preset Time section.
Client sends unit video fluency at interval of the second predetermined amount of time to server, server receives at interval of the second predetermined amount of time the unit video fluency that client is sent, because transmission cycle of client is identical with the receiving cycle of server, in one-period, each client only serviced device statistics once, has been avoided a large amount of duplicate removal computings.For example, first scheduled time was 5 minutes, and second scheduled time was 1 minute, and client retains the video card information of pausing in before current time 5 minutes, by the information deletion that pauses of the video card before 5 minutes.Suppose that current time is the 5th minute, the video card information of pausing that current time sends is the information of pausing of the video card in zero minutes to the five minutes, and the video card information of pausing that after one minute, the 6th minute client sends is the video card of first minute to the 6th minute information of pausing.
After client is sent to server by unit video fluency, server only need be added up the summation of the number of client and the unit video fluency that all clients are sent, and by the summation of unit video fluency, divided by the number of client, can access the average video fluency of a plurality of clients.
Client matches with server and has reduced the amount of calculation of average video fluency, by unified data, sends and computing cycle, can guarantee that each client is only added up once, has improved the accuracy rate of calculating average video fluency.
Fig. 3 is according to the flow chart of the video fluency computation processing method of third embodiment of the invention.As shown in the figure, this video fluency computation processing method comprises the steps:
Step S401, server receives the unit video fluency from a plurality of clients, and wherein, unit video fluency is the client records video card information of pausing, and calculates according to the video card information of pausing.
Unit video fluency can be the video fluency of client in current slot, in enough hour of the time period of current slot, can think that unit video fluency is real-time video fluency.Client is according to the card information of pausing of record, determines total duration that in number of times that this client video card pauses and certain hour, video card pauses.The number of times that video card pauses is more, and unit video fluency is lower, and total duration that video card pauses is longer, and the fluency of unit video is also lower.Number of times * constant a that client can be paused video card and video card immediately between * constant b summation obtains unit video fluency.
Server receives the unit video fluency of a plurality of clients at interval of second scheduled time, a plurality of clients send unit video fluency at interval of second scheduled time, be that server and client side has the unified data transmit-receive cycle, guarantee that the unit video fluency that server receives is only added up once.
Step S402, server is added up the number of a plurality of clients.Because server and client side has the unified data transmit-receive cycle, therefore, the number of the unit video fluency that server is received by statistics just can obtain the number of client.In the number of a plurality of clients of statistics, the summation that can also add up the unit video fluency of a plurality of clients.In the process of summation of adding up the number of a plurality of clients and the unit video fluency of a plurality of clients, without each unit video fluency of judgement, come from which client, reduced deal with data workload, improved computational speed.
Step S403, server calculates the average video fluency of a plurality of clients according to the number of the unit video fluency of a plurality of clients receiving and the client of statistics.Server can be processed the unit video fluency of a plurality of clients, calculates the average video fluency of a plurality of clients.It can be the number divided by a plurality of clients by the summation of the unit video fluency of a plurality of clients that server is processed the unit video fluency of a plurality of clients, thereby obtains average video fluency.By the average video fluency of a plurality of clients, can determine the fluency of the video playback of whole network.
Pass through said method, server only need to be determined to the unit video fluency of a plurality of clients that receive the summation of the number of client and the unit video fluency of a plurality of clients, thereby reduced the calculating of server, saved the Internet resources of server and client communication.
According to embodiments of the invention, provide a kind of video fluency calculation processing apparatus.
The video fluency calculation processing apparatus that the video fluency computation processing method of the embodiment of the present invention can provide by the embodiment of the present invention is carried out, the video fluency computation processing method that the video fluency calculation processing apparatus of the embodiment of the present invention also can provide for carrying out the embodiment of the present invention.
Fig. 4 is according to the schematic diagram of the video fluency calculation processing apparatus of first embodiment of the invention.As shown in the figure, this video fluency calculation processing apparatus comprises record cell 10, the first computing unit 20 and transmitting element 30.
Record cell 10 is for the recording of video card information of pausing.Client is the arbitrary client in network system, the video card that can record client itself information of pausing.In client, can set up the video card information table that pauses, in the time of video generation Caton phenomenon, add this card information to video card and pause in information table.In order to facilitate the inquirying card information of pausing, can fill the video card information table that pauses according to time sequencing.
The recording of video card information of pausing can be immediately long for time in fact and card that recording of video card pauses.For fear of the duplicate record of data, when card just occurs, card is immediately long is recorded as 0, in the process of card, can be updated periodically the duration of card, when current card pauses and finishes, and the duration that more neocaine pauses for the last time.Because card is to finish the last time just may occur next time afterwards again, therefore the current card record one that pauses is positioned the pause end of information table of card, upgrading card that current video card pauses and only need upgrade in immediately long this record at end, the information of can recording of video card pausing.Following table is the example of a card record sheet, the most de novo card end that fixes on queue of pausing, and every secondary card pause necessarily do not have overlapping.
The first computing unit 20 calculates unit video fluency for the information of pausing according to video card.Unit video fluency can be the video fluency of client in current slot, in enough hour of the time period of current slot, can think that unit video fluency is real-time video fluency.Client is according to the card information of pausing of record, determines total duration that in number of times that this client video card pauses and certain hour, video card pauses.The number of times that video card pauses is more, and unit video fluency is lower, and total duration that video card pauses is longer, and the fluency of unit video is also lower.Number of times * constant a that client can be paused video card and video card immediately between * constant b summation obtains unit video fluency.The higher video playback of unit video fluency calculating is more smooth, and therefore less by the above-mentioned numerical value calculating, unit video fluency is high.
Preferably, can obtain unit video fluency with constant/(number of times * constant a+ video card that video card pauses immediately between * constant b+ constant).The numerical value of the unit video fluency calculating between 0 to 1, the convenient machine of order really video fluency.
It should be noted that, what the mode of the calculating unit fluency that the embodiment of the present invention provides was just carried out for convenient understanding illustrates, should be understood that, unit fluency can calculate by the mode that other can characterize numerical value and unit video fluency relation.
Transmitting element 30 is for sending unit video fluency to server, and wherein, server calculates the average video fluency of a plurality of clients according to unit video fluency.One or more clients are sent to service by unit video fluency, wherein, server can receive the unit video fluency of a plurality of clients, and the unit video fluency of a plurality of clients is processed, and calculates the average video fluency of a plurality of clients.It can be the number divided by a plurality of clients by the summation of the unit video fluency of a plurality of clients that server is processed the unit video fluency of a plurality of clients, thereby obtains average video fluency.By the average video fluency of a plurality of clients, can determine the fluency of the video playback of whole network.
After calculating unit video fluency by client, unit video fluency is sent to server, server only need be added up the average video fluency of a plurality of clients, repeatedly transfer of data and calculating without client and server, save Internet resources and memory source, improved the computational efficiency of average video fluency.
Preferably, in order to determine the video fluency of current slot in network, record cell 10 is also for recording video card in the first predetermined amount of time information of pausing, and the first computing unit 20 also obtains unit video fluency for the time span of pause according to the video card of record information and the first predetermined amount of time.
Wherein, the first predetermined amount of time is the time period adjacent with current time.Enough hour of the duration of the first predetermined amount of time, the card that to think at interval of the video card information of pausing in the first predetermined amount of time be real time record current time that can the be similar to information of timing.
Further, video fluency calculation processing apparatus can be by memory module, search module, removing module and logging modle and record video card in the first predetermined amount of time information of pausing:
Memory module is for the information of pausing of store video card in chronological order.Because video card pauses, be to finish the last time just may occur again next time afterwards, when pausing information, store video card can be stored in client according to time sequencing, therefore, it is more forward that the video card information of pausing is stored in the position that video card pauses in information table, the video card information of pausing is older, longer with the interval of current time.The video card that can read easily storage according to the time sequencing store video card information of the pausing information of pausing.
Search module for searching the video card of storage before the first predetermined amount of time information of pausing, obtain a historical card information.The video card of searching storage before the first predetermined amount of time information of pausing, obtains a historical card information.Video card pause information according to the sequential storage of time in client, client can by storage the video card information of pausing obtain unit video fluency.Calculate unit video fluency and need to utilize video card in the first predetermined amount of time information of pausing, and canned data not only comprises that the video card information of pausing in the first predetermined amount of time also comprises video card before the first predetermined amount of time information of pausing in client, therefore need to determine the first predetermined amount of time information before by searching, i.e. a historical card information.
Search storage before the first Preset Time section the video card information of pausing can according to time sequencing from video card pause information table start foremost search, also can adopt the methods such as binary search to search.The value of the first predetermined amount of time can be preferably a minute rank according to user's the setting that needs, and can more accurately reflect the fluency of current video.
Removing module is for the deleting history card information of pausing, and obtains video card in the first predetermined amount of time information of pausing.After finding a historical card information, the video card that can distinguish the first predetermined amount of time pause information and a historical card information, pause history card after information deletion, obtains video card in the first predetermined amount of time information of pausing.
Logging modle is for recording video card in the first predetermined amount of time information of pausing.When deleting history card pauses information, the information of pausing of the video card in the first predetermined amount of time of obtaining of record.
Owing to surpassing the history card information of pausing of the first predetermined amount of time, be all removed, each playing duration while calculating unit video fluency is all the first predetermined amount of time of fixing, therefore only need be by video card number of times and the video card total duration calculation of pausing of pausing when calculating unit video fluency.
Preferably, in order to calculate the average video fluency of a plurality of clients, this video fluency calculation processing apparatus also comprises transmitting element and the second computing unit, wherein, transmitting element is for sending unit video fluency to server at interval of the second predetermined amount of time, the second computing unit is for calculating the average video fluency of a plurality of clients according to unit video fluency at interval of the second Preset Time section.
Transmitting element sends unit video fluency at interval of the second predetermined amount of time to server, server receives at interval of the second predetermined amount of time the unit video fluency that transmitting element is sent, because transmission cycle of transmitting element is identical with the receiving cycle of server, in one-period, each client only serviced device statistics once, has been avoided a large amount of duplicate removal computings.For example, first scheduled time was 5 minutes, and second scheduled time was 1 minute, and client retains the video card information of pausing in before current time 5 minutes, by the information deletion that pauses of the video card before 5 minutes.Suppose that current time is the 5th minute, the video card information of pausing that current time sends is the information of pausing of the video card in zero minutes to the five minutes, and the video card information of pausing that after one minute, the 6th minute client sends is the video card of first minute to the 6th minute information of pausing.
After client is sent to server by unit video fluency, server only need be added up the summation of the number of client and the unit video fluency that all clients are sent, and by the summation of unit video fluency, divided by the number of client, can access the average video fluency of a plurality of clients.
Client matches with server and has reduced the amount of calculation of average video fluency, by unified data, sends and computing cycle, can guarantee that each client is only added up once, has improved the accuracy rate of calculating average video fluency.
Fig. 5 is according to the schematic diagram of the video fluency calculation processing apparatus of second embodiment of the invention.As described in Figure, this video fluency calculation processing apparatus comprises receiving element 11, statistic unit 22 and the 3rd computing unit 33.
Receiving element 11 is for receiving the unit video fluency from a plurality of clients, and wherein, unit video fluency is the client records video card information of pausing, and calculates according to the video card information of pausing.
Unit video fluency can be the video fluency of client in current slot, in enough hour of the time period of current slot, can think that unit video fluency is real-time video fluency.Client is according to the card information of pausing of record, determines total duration that in number of times that this client video card pauses and certain hour, video card pauses.The number of times that video card pauses is more, and unit video fluency is lower, and total duration that video card pauses is longer, and the fluency of unit video is also lower.
Receiving element 11 receives the unit video fluency of a plurality of clients at interval of second scheduled time, a plurality of clients send unit video fluency at interval of second scheduled time, the receiving element 11 and the client that are server have the unified data transmit-receive cycle, guarantee that the unit video fluency that receiving element 11 receives is only added up once.
Statistic unit 22 is for adding up the number of a plurality of clients.Because server and client side has the unified data transmit-receive cycle, therefore, the number of the unit video fluency that the statistic unit 22 of server is received by statistics just can obtain the number of client.Statistic unit 22 statistics a plurality of clients number in, the summation that can also add up the unit video fluency of a plurality of clients.In the process of summation of adding up the number of a plurality of clients and the unit video fluency of a plurality of clients, without each unit video fluency of judgement, come from which client, reduced deal with data workload, improved computational speed.
The 3rd computing unit 33 is for calculating the average video fluency of a plurality of clients according to the number of the unit video fluency of a plurality of clients receiving and the client of statistics.
The 3rd computing unit 33 can be processed the unit video fluency of a plurality of clients, calculates the average video fluency of a plurality of clients.It can be the number divided by a plurality of clients by the summation of the unit video fluency of a plurality of clients that the unit video fluency of 33 pairs of a plurality of clients of the 3rd computing unit is processed, thereby obtains average video fluency.By the average video fluency of a plurality of clients, can determine the fluency of the video playback of whole network.
Pass through said apparatus, server only need to be determined to the unit video fluency of a plurality of clients that receive the summation of the number of client and the unit video fluency of a plurality of clients, thereby reduced the calculating of server, saved the Internet resources of server and client communication.
It should be noted that, in the step shown in the flow chart of accompanying drawing, can in the computer system such as one group of computer executable instructions, carry out, and, although there is shown logical order in flow process, but in some cases, can carry out shown or described step with the order being different from herein.
Obviously, those skilled in the art should be understood that, above-mentioned each module of the present invention or each step can realize with general calculation element, they can concentrate on single calculation element, or be distributed on the network that a plurality of calculation elements form, alternatively, they can be realized with the executable program code of calculation element, thereby, they can be stored in storage device and be carried out by calculation element, or they are made into respectively to each integrated circuit modules, or a plurality of modules in them or step are made into single integrated circuit module to be realized.Like this, the present invention is not restricted to any specific hardware and software combination.
The foregoing is only the preferred embodiments of the present invention, be not limited to the present invention, for a person skilled in the art, the present invention can have various modifications and variations.Within the spirit and principles in the present invention all, any modification of doing, be equal to replacement, improvement etc., within all should being included in protection scope of the present invention.