Background technique
With the rapid development of the improved day by day and Internet technology of China's deployment of broadband network, at the same it is smart phone, flat
The continuous of all kinds of mobile terminal devices such as plate computer is popularized, and user is to broadbands such as web based education and training, video conference, videos on demand
The demand of class application service is more more and more urgent, increasingly welcomes in such a way that Online Video transmits information as carrier, online
Video is increasingly becoming network foundation application.In this context, education and training organization, broadcasting and TV media, Internet enterprises, big-and-middle universities and colleges
It commences business one after another by Online Video etc. all kinds of mechanisms.
Traditionally, enterprise needs to spend huge fund to purchase service in construction and operation Online Video system
Device and network bandwidth need to solve video storage, transcoding, distribution, broadcasting, antitheft, data statistics and analysis etc. with higher skill
The problem of art threshold, it is also necessary to which building technology O&M team carries out maintenance and upgrade to system, and last result is often put into
Very big imbalance between output.
Then, with the rise of cloud computing and SaaS service mode, the opening of Online Video service is provided exclusively for enterprise
Platform comes into being, and Online Video cloud platform mainly provides on video to education and training organization, e-commerce venture, universities and colleges etc.
" one-stop " such as biography, storage, transcoding, management, publication, content copyright protection, multiple terminals broadcasting, the statistics of played data and analyses
Service.These have the mechanism of video distribution demand without respectively construction Online Video system, need to only buy the clothes of cloud platform on demand
Business, can quickly carry out Online Video related service, greatly save cost and improve efficiency.
However, Online Video cloud platforms many at present provides real-time statistical data without normal direction client, it is general only to provide
The offline statistical data of lag.Therefore client can not real-time monitoring its video broadcasting situation, to influence client to its business
Operation data is quickly judged and decision.
Currently, most of Online Video cloud platforms, using offline statistical project, statistical data has hysteresis quality.Currently
The technological means of implementation be that video player is constantly sent to the Web server of cloud platform during playing video
The data of video playing and the watching behavior data of spectators, Web server are recorded these data in the form of log, shape
At journal file.At the same time, the data statistics program of cloud platform periodically analyzes the journal file of these magnanimity, and raw
At the statistical data of each dimension.Since existing solution is first sent to video player the broadcasting number of Web server
According to storage at journal file, then backstage statistics program is waited to analyze and count journal file, and the number of journal file
Amount and data volume are all very big, therefore the analysis of data takes a long time with statistics, and the statistical data of generation has hysteresis quality, generally
Need to postpone even a couple of days a few hours.
Summary of the invention
The purpose of the present invention is realizing the real-time statistics to video playing data in video cloud platform, the present invention provides
A kind of method of Online Video cloud platform real-time statistics video-see data is its video of client's Real-time Feedback of video cloud platform
Broadcasting situation and spectators watching behavior.
The present invention provides a kind of methods of Online Video cloud platform real-time statistics video-see data, including walk as follows
It is rapid:
Video player sends play parameter information to Web server during playing video;
Web server receives the play parameter information that video player is sent based on the designated port of creation;
Parse each parameter information in play parameter information;
Aggregate statistics are carried out based on each parameter information, and provide real-time statistics to outside based on real time data query interface
Inquiry.
The video player sends broadcasting parameter information to Web server during playing video
The video player sends played data parameter information to Web server based on the GET method of http protocol.
The played data parameter includes: to play video error information, play video content information, played data state letter
Breath, geographical location information and network operator data.
It is described to include: based on each parameter information progress aggregate statistics
The each parameter information parsed is passed into statistics component;
Aggregate statistics are carried out with the data being stored in memory database according to each parameter information by statistics component;
Result after the aggregate statistics being made of each parameter information forms the statistical data of each dimension.
The method also includes:
The each parameter information parsed is stored in corresponding memory database.
Correspondingly, the present invention also provides a kind of system of Online Video cloud platform real-time statistics video-see data, packet
It includes:
Video player, for sending play parameter information to Web server during playing video;
Web server receives the play parameter information that video player is sent for the designated port based on creation;Parsing
Each parameter information in play parameter information out;Aggregate statistics are carried out based on each parameter information, and are looked into based on real time data
It askes interface and provides real-time statistics inquiry to outside.
The video player sends played data parameter information to Web server based on the GET method of http protocol.
The played data parameter includes: to play video error information, play video content information, played data state letter
Breath, geographical location information and network operator data.
Each parameter information that the Web server is also used to parse passes to statistics component;By statistics component root
Aggregate statistics are carried out with the data being stored in memory database according to each parameter information;What is be made of each parameter information is poly-
Result after closing statistics forms the statistical data of each dimension.
The system also includes at least one memory database, at least one described memory database plays number for storing
It is stored in corresponding memory database according to parameter, and by each parameter information parsed.
Most of Online Video cloud platform does not provide the sight of real-time video playing data and spectators for client at present
See behavioral data, and the present invention provides a kind of solution that can data be carried out with real-time statistics, the statistical system energy of realization
For the broadcasting situation of client's Real-time Feedback of video cloud platform its video and the watching behavior of spectators, be client service operation and
Relevant Decision provides real-time, quick data and supports, is conducive to the competitiveness that client promotes itself.
Specific embodiment
Following will be combined with the drawings in the embodiments of the present invention, and technical solution in the embodiment of the present invention carries out clear, complete
Site preparation description, it is clear that described embodiments are only a part of the embodiments of the present invention, instead of all the embodiments.It is based on
Embodiment in the present invention, it is obtained by those of ordinary skill in the art without making creative efforts all other
Embodiment shall fall within the protection scope of the present invention.
It is video cloud platform the purpose of the present invention is realizing the real-time statistics to video playing data in video cloud platform
Client's Real-time Feedback its video broadcasting situation and spectators watching behavior.This real-time statistics function can become Online Video
Cloud platform attracts clients the competitive method of garrison.
Fig. 1 shows the system structure of the Online Video cloud platform real-time statistics video-see data in the embodiment of the present invention
Schematic diagram, the system include: video player, Web server, several memory databases etc., in which:
Web server receives the play parameter information that video player is sent for the designated port based on creation;Parsing
Each parameter information in play parameter information out;Aggregate statistics are carried out based on each parameter information, and are looked into based on real time data
It askes interface and provides real-time statistics inquiry to outside.The each parameter information parsed is passed to statistics component by Web server;By
Statistics component carries out aggregate statistics with the data being stored in memory database according to each parameter information;By each parameter information
Result after the aggregate statistics constituted forms the statistical data of each dimension.Web server can receive video player and be transmitted across
The watching behavior data of the video playing data and spectators come, and these data are analyzed and counted in real time based on memory,
Statistical data will be stored in distributed memory database.Meanwhile Web server provides the query interface of real time data,
Real time data inquiry request outside receiving, inquires the statistical data in memory database.
Video player is used to send play parameter information to Web server during playing video.Played data
Parameter includes: to play video error information, play video content information, played data status information, geographical location information and net
Network carrier data video player sends data to the rule of Web server, and Web server handles the logic of data, and
The implementation method of query interface real-time query statistical data.Video player needs during playing video to Web service
Device sends played data and the behavioral data of spectators, unified to be sent using the GET method of http protocol.
Memory database in system is stored for storing played data parameter, and by each parameter information parsed
In corresponding memory database.
Video player particular content includes:
1) video player is loaded, play parameter is initialized, error message is sent when initiation parameter fails and is taken to statistics
Business device;
2) video information to be played is obtained, error message is sent when can not obtain video information to statistical server;
3) video file is loaded, error message is sent when loading video failure to statistical server, after loading video success
It sends buffering duration (as unit of millisecond) for the first time and arrives statistical server;
4) video is played, every 1 second transmissions played data (including video information, broadcasting mark, playing duration, load
File size etc.) arrive statistical server;
5) during broadcasting video, when spectators' pause plays, transmission pause data (including video information, broadcasting are identified, are broadcast
Degree of putting into etc.) arrive statistical server;
6) during playing video, spectators pull video when playing out, and send and pull data and (including video information, drag
End position, duration of buffering of the starting position, dragging dragged etc.) arrive statistical server;
7) during playing video, when secondary buffer occurs, transmission buffered data (including video information, broadcasting are identified, are broadcast
Put duration, secondary buffer duration etc.) arrive statistical server;
8) after playing, send broadcasting end is tagged to statistical server.
The step of Web server receives the data that video player sends over and handles data is as follows:
1) server-side Socket is created, is bound designated port (such as 8283), the data for waiting player to be received to send over;
2) when player has data to send over, the HTTP request that parsing player is sent obtains video information, spectators
IP address, place geographical location information and the data such as network operator;
3) data parsed are passed to statistics component, statistics component will gather with the data in memory database
Statistics is closed, forms the statistical data of each dimension, and statistics is stored in memory database;
The data structure that Web server statistics component, that is, statistical module uses is as shown in table 2:
Fig. 2 shows the method flows of the Online Video cloud platform real-time statistics video-see data in the embodiment of the present invention
Figure, includes the following steps:
S201, video player send play parameter information to Web server during playing video;
The video player sends played data parameter information to Web server based on the GET method of http protocol, plays
Data parameters include: to play video error information, play video content information, played data status information, geographical location information
With network operator data etc..
S202, Web server receive the play parameter information that video player is sent based on the designated port of creation;
S203, each parameter information in play parameter information is parsed;
S204, aggregate statistics are carried out based on each parameter information, and real to outside offer based on real time data query interface
When statistical query.
It includes: that each parameter information that will be parsed passes to system that this, which carries out aggregate statistics step based on each parameter information,
Count component;Aggregate statistics are carried out with the data being stored in memory database according to each parameter information by statistics component;By every
Result after the aggregate statistics that one parameter information is constituted forms the statistical data of each dimension.
After the step, each parameter information parsed can also be stored in corresponding memory database, for
Data, which are looked into, next time newly counts needs.
To sum up, most of Online Video cloud platform does not provide real-time video playing data and spectators for client at present
Watching behavior data, and the present invention provides it is a kind of can to data carry out real-time statistics solution, the department of statistic of realization
System can be the broadcasting situation of its video of client's Real-time Feedback of video cloud platform and the watching behavior of spectators, be that the business of client is transported
Battalion and relevant Decision provide real-time, quick data and support, are conducive to the competitiveness that client promotes itself.
Those of ordinary skill in the art will appreciate that all or part of the steps in the various methods of above-described embodiment is can
It is completed with instructing relevant hardware by program, which can be stored in a computer readable storage medium, storage
Medium may include: read-only memory (ROM, Read Only Memory), random access memory (RAM, Random
Access Memory), disk or CD etc..
Be provided for the embodiments of the invention above Online Video cloud platform real-time statistics video-see data method and
System is described in detail, and used herein a specific example illustrates the principle and implementation of the invention, with
The explanation of upper embodiment is merely used to help understand method and its core concept of the invention;Meanwhile for the general of this field
Technical staff, according to the thought of the present invention, there will be changes in the specific implementation manner and application range, in conclusion
The contents of this specification are not to be construed as limiting the invention.