Background technology
During user's watching video live broadcast, in order to ensure the good viewing experience of user, server real-time monitoring and
Adjust the video fluency (card situation) during watching video live broadcast, if fluency relatively low (often card), then need in time
Repair.At present, the method for existing monitor video smoothness degree is generally: monitoring CDN (Content Delivery Network,
Content distributing network) video flowing request delay, determine video fluency according to time delay, and then location and repair problem source.
But the method for existing monitor video smoothness degree has the disadvantage in that
(1) because the terminal environments of the terminal unit of user's use is different from network environment, so terminal unit is with recently
CDN node between video fluency cannot be monitored by CDN, and then CDN in-house network can not be in decision problem source
Network distribution problem or terminal environments problem.
(2) current, the pushing video streaming scheme of live operator is self-built plus the cooperation of CDN manufacturer, but CDN cannot supervise
The self-built video flowing request delay of control operator, and then cannot accurately learn the fluency of video that terminal unit obtains.
(3) current, CDN node typically can only accomplish provincial covering, and then makes orientation problem source scope relatively big, greatly
In the range of search problem the time-consuming the longest of source, and operating process is relatively difficult.
In sum, the method for existing monitor video smoothness degree cannot accurately learn terminal unit watching video live broadcast mistake
Video fluency in journey, also cannot position and repair problem source in time, it is difficult to ensure the viewing experience of user.
Summary of the invention
For defect present in prior art, present invention solves the technical problem that for: accurately learn that terminal unit is watched
Video flowing length during net cast, the terminal unit that quickly location fluency is relatively low.The present invention positions the relatively low terminal of fluency
Equipment is easier, the shortest, even and if then corresponding adjustment can be made, at utmost ensure the viewing of terminal user
Experience.
For reaching object above, the method for monitor video smoothness degree, the party during net cast that the present invention provides
Method comprises the following steps:
Step A: the terminal unit that user uses, timing reports the broadcast state information of the video flowing received to server,
Broadcast state information includes that video render state, video render state include NetStream.Buffer.Empty, turns
To step B;
Step B: after server is the broadcast state information interpolation terminal device IP meeting call format, carry out caching with pre-
Process, form broadcast state data, forward step C to;
Step C: determine the broadcast state data being verified, forward step D to;
Step D: according to every terminal device IP playing status data, obtain corresponding terminal unit geographical position and
Network operator information;Geographical position according to terminal unit and network operator information, broadcast corresponding for all terminal units
Put status data and be divided into some set;According to the broadcast state being marked with NetStream.Buffer.Empty in each set
The quantity of data, determines the set that fluency is low.
The system of monitor video smoothness degree, this system during net cast of realizing said method that the present invention provides
Delay including: uniform service monitoring module, the broadcast state information reporting module being positioned on terminal unit, the data that are positioned at server
Deposit pretreatment module and Data Verification module;
Broadcast state information reporting module is used for: timing reports broadcasting of the video flowing received to data buffer storage pretreatment module
Putting status information, broadcast state information includes that video render state, video render state include
NetStream.Buffer.Empty;
Data buffer storage pretreatment module is used for: add after terminal device IP for meeting the broadcast state information of call format,
Carry out caching and pretreatment, form broadcast state Data Concurrent and deliver to Data Verification module;
Data Verification module is used for: determine the broadcast state data by checking, by the broadcast state data by checking
Send to uniform service monitoring module;
Uniform service monitoring module is used for: according to every terminal device IP playing status data, obtain corresponding terminal
The geographical position of equipment and network operator information;Geographical position according to terminal unit and network operator information, will be all
The broadcast state data that terminal unit is corresponding are divided into some set;It is marked with according in each set
The quantity of the broadcast state data of NetStream.Buffer.Empty, determines the set that fluency is low.
Compared with prior art, it is an advantage of the current invention that:
The present invention, according to the broadcast state information of terminal unit active reporting, determines geographical position and the operation of terminal unit
Broadcast state data corresponding for terminal unit are divided into multiple set according to geographical position and operator by business;According to each collection
He Zhong video stream buffer district is the quantity of empty broadcast state data, determines that the collection that fluency is low is merged into row alarm.
In view of this, with prior art cannot accurately learn whole video fluency, cannot position in time and reparation problem
The method of the monitor video smoothness degree in source is compared, and the present invention can accurately obtain the set that fluency is relatively low, and single set
Monitoring range less, be easier according to terminal device IP positioning terminal equipment, time-consumingly in the relatively low set of single fluency
Shorter, even and if then corresponding adjustment can be made, at utmost ensure the viewing experience of terminal user.
Detailed description of the invention
Below in conjunction with drawings and Examples, the present invention is described in further detail.
The method of monitor video smoothness degree during net cast shown in Figure 1, in the embodiment of the present invention, including
Following steps:
When S1: user uses terminal unit watching video live broadcast, terminal unit timing (timing is 1 minute) is to service
Device reports the broadcast state information of the video flowing received, and broadcast state information includes: ID (i.e. the ID of user's uniqueness), end
End device type mark, the video player information (such as FLASH version, operator etc.) of terminal unit, video render shape
State, request time stamp (time of mark be broadcast state information on call time) and identification code, forward S2 to.
In S1, the video render state of broadcast state information includes: NetStream.Play.Start (video playback
In), NetStream.Buffer.Full (video stream buffer district is full), NetStream.Buffer.Empty (video stream buffer
District is empty), Close (video playback is complete).
In S1, the identification code of broadcast state information is regular length, can be encrypted after generation;The create-rule of identification code
For: being formed by recognition time stamp (recognition time stamp is identical with request time stamp), terminal unit ID and random number arrangement, terminal sets
Standby ID obtains according to the API (Application Programming Interface, application programming interface) of terminal unit
Take.
After S2: server is the broadcast state information interpolation terminal device IP meeting call format, carry out caching and pre-place
Reason (i.e. Uniform data format), forms broadcast state data, is divided at least 3 groups (in the present embodiment all broadcast state data
It is 3 groups), forward S3 to.
The broadcast state information needs meeting call format in S2 meet following condition simultaneously: ID is not for empty, user
ID meets data field type, terminal equipment type mark is legal, video render state is legal, request time stamp form is correct
Deng.
In S2, the broadcast state data form after pretreatment is as follows;
S3: 3 multicasts are put status data simultaneously and verify, if being verified, then forwards S4 to;If checking is not passed through, lose
Abandon this broadcast state data, terminate;Broadcast state packet checking simultaneously can be improved work efficiency.
The idiographic flow in S3 verified wall scroll broadcast state data is: carry out the identification code of broadcast state data
Deciphering, obtains timestamp and terminal unit ID, it is judged that timestamp (i.e. timestamp and current server the most in the reasonable scope
Whether the time difference in one minute) and terminal unit ID compliant (terminal unit ID meets the create-rule of identification code and is considered as symbol
Close specification), if then confirming to be verified, otherwise confirm that checking is not passed through.
S4: all broadcast state data being verified are monitored in real time: set according to the terminal of broadcast state data
Standby IP, obtains geographical position and the network operation of corresponding terminal unit (i.e. reporting this terminal unit playing status data)
Business's information.Processing function through real-time streams, the final data monitoring acquisition in real time includes: the geographical position of terminal unit,
The operator's informaiton of terminal unit, the video player information of terminal unit, forward S5 to.
S5: according to geographical position and the network operator information of terminal unit, by broadcasting shape corresponding for all terminal units
State data are divided into some set;According to the broadcast state data being marked with NetStream.Buffer.Empty in each set
Quantity, determine the collection that fluency is low be merged into row alarm (monitoring the page in highlight or under specified requirements by accuse
Alert channel informing function director), forward S6 to.
S5 specifically includes below scheme: according to the geographical position of terminal unit, will be under the jurisdiction of the terminal of same geographic area
The broadcast state data that equipment is corresponding are associated, and obtain at least 1 region fluency monitoring set;Same operation will be under the jurisdiction of
The broadcast state data that the terminal unit of business is corresponding are associated, and obtain at least 1 operator's fluency monitoring set.Judge every
Individual set internal labeling has the quantity of the broadcast state data of NetStream.Buffer.Empty, if at all broadcast state numbers
More than the 10% of data bulk, if, it is determined that and alert this collection and be combined into the set that fluency is low.
S6: in the set that fluency is low, according to reporting the terminal device IP of NetStream.Buffer.Empty, location
Terminal unit (i.e. problem terminal unit) also adjusts accordingly.
The monitoring video flow during net cast realizing said method shown in Figure 2, in the embodiment of the present invention
The system of smooth degree, this system includes: uniform service monitoring module, the broadcast state information reporting module being positioned on terminal unit,
It is positioned at the data buffer storage pretreatment module of server and 3 Data Verification module.
Broadcast state information reporting module is used for: timing reports broadcasting of the video flowing received to data buffer storage pretreatment module
Put status information:
Broadcast state information include video render state, ID, terminal equipment type mark, request time stamp and
Identification code;Video render state include NetStream.Buffer.Empty, NetStream.Play.Start,
NetStream.Buffer.Full and Close.
Data buffer storage pretreatment module is used for: in order to meet the broadcast state information of call format, (ID is not for empty, user
ID meets data field type, terminal equipment type mark is legal, video render state is legal, request time is just stabbing form
After really) adding terminal device IP, carry out caching and pretreatment, form broadcast state data;All broadcast state data are divided into 3
Group, puts every multicast status data respectively and sends to 1 Data Verification module.
Data Verification module is used for: determine the broadcast state data by checking, by the broadcast state data by checking
Send to uniform service monitoring module.
Data Verification module determines that the flow process of the broadcast state data that wall scroll is verified is: the knowledge to broadcast state data
Other code is decrypted, and obtains timestamp and terminal unit ID, it is judged that timestamp is the most in the reasonable scope and terminal unit ID accords with
Close specification;If then confirming to be verified, otherwise confirm that checking is not passed through.
Uniform service monitoring module is used for:
(1) according to every terminal device IP playing status data, geographical position and the net of corresponding terminal unit are obtained
Network operator's informaiton.
(2) according to geographical position and the network operator information of terminal unit, by broadcasting shape corresponding for all terminal units
State data are divided into some set, and idiographic flow is: according to the geographical position of terminal unit, will be under the jurisdiction of same geographic area
The broadcast state data that terminal unit is corresponding are associated, and obtain at least 1 region fluency monitoring set;To be under the jurisdiction of same
The broadcast state data that the terminal unit of operator is corresponding are associated, and obtain at least 1 operator's fluency monitoring set.
(3) according to the quantity of the broadcast state data being marked with NetStream.Buffer.Empty in each set, really
Determining the set that fluency is low, idiographic flow is: judge that each set internal labeling has the broadcasting of NetStream.Buffer.Empty
The quantity of status data, if at more than the 10% of all broadcast state data bulks, if, it is determined that this collection is combined into fluency
Low set, otherwise determines that this set is not the set that fluency is low.
The present invention is not limited to above-mentioned embodiment, for those skilled in the art, without departing from
On the premise of the principle of the invention, it is also possible to make some improvements and modifications, these improvements and modifications are also considered as the protection of the present invention
Within the scope of.The content not being described in detail in this specification belongs to prior art known to professional and technical personnel in the field.