Nothing Special   »   [go: up one dir, main page]

CN106028077B - Any active ues collection maintenance system and method based on time wheel disc and broadcast state - Google Patents

Any active ues collection maintenance system and method based on time wheel disc and broadcast state Download PDF

Info

Publication number
CN106028077B
CN106028077B CN201610475616.3A CN201610475616A CN106028077B CN 106028077 B CN106028077 B CN 106028077B CN 201610475616 A CN201610475616 A CN 201610475616A CN 106028077 B CN106028077 B CN 106028077B
Authority
CN
China
Prior art keywords
broadcast state
time
state information
active ues
real
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.)
Active
Application number
CN201610475616.3A
Other languages
Chinese (zh)
Other versions
CN106028077A (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.)
Guangdong Gaohang Intellectual Property Operation Co ltd
Xiamen Qiliang Technology Co.,Ltd.
Original Assignee
Wuhan Douyu 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 Wuhan Douyu Network Technology Co Ltd filed Critical Wuhan Douyu Network Technology Co Ltd
Priority to CN201610475616.3A priority Critical patent/CN106028077B/en
Publication of CN106028077A publication Critical patent/CN106028077A/en
Application granted granted Critical
Publication of CN106028077B publication Critical patent/CN106028077B/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/44213Monitoring of end-user related data
    • H04N21/44218Detecting physical presence or behaviour of the user, e.g. using sensors to detect if the user is leaving the room or changes his face expression during a TV program
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/25Management operations performed by the server for facilitating the content distribution or administrating data related to end-users or client devices, e.g. end-user or client device authentication, learning user preferences for recommending movies
    • H04N21/258Client or end-user data management, e.g. managing client capabilities, user preferences or demographics, processing of multiple end-users preferences to derive collaborative data
    • H04N21/25866Management of end-user data
    • H04N21/25891Management of end-user data being end-user preferences
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/60Network structure or processes for video distribution between server and client or between remote clients; Control signalling between clients, server and network components; Transmission of management data between server and client, e.g. sending from server to client commands for recording incoming content stream; Communication details between server and client 
    • H04N21/65Transmission of management data between client and server
    • H04N21/658Transmission by the client directed to the server
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/60Network structure or processes for video distribution between server and client or between remote clients; Control signalling between clients, server and network components; Transmission of management data between server and client, e.g. sending from server to client commands for recording incoming content stream; Communication details between server and client 
    • H04N21/65Transmission of management data between client and server
    • H04N21/658Transmission by the client directed to the server
    • H04N21/6582Data stored in the client, e.g. viewing habits, hardware capabilities, credit card number

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Databases & Information Systems (AREA)
  • Health & Medical Sciences (AREA)
  • General Health & Medical Sciences (AREA)
  • Social Psychology (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Computer Graphics (AREA)
  • Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The invention discloses a kind of any active ues collection maintenance system and method based on time wheel disc and broadcast state, are related to the maintenance technology field of any active ues collection in net cast.This method comprises: each user terminal recording played status information and reporting live streaming Platform Server;Live streaming Platform Server is cached and is pre-processed to broadcast state information, and broadcast state information is sent to distributed real-time computing module in the form of several data slices;Distributed computing module in real time parses broadcast state information, is verified, and the corresponding user of broadcast state information being verified is added in any active ues collection fragment corresponding with current time;Any active ues integrate functional module using the active calculating period as the period, periodically update the corresponding any active ues collection fragment of current time into the time wheel disc created.The present invention efficiently can be updated maintenance to any active ues collection in time, and larger load will not be caused to system, ensure that effective progress of interactive event.

Description

Any active ues collection maintenance system and method based on time wheel disc and broadcast state
Technical field
It is specifically a kind of based on time wheel the present invention relates to the maintenance technology field of any active ues collection in net cast Any active ues collection maintenance system and method for disk and broadcast state.
Background technique
With the rapid development of Internet technology, more and more users can be used the terminals such as computer, mobile phone and pass through net Network watches Online Video live streaming.Online Video live streaming refers to the live video direct broadcast service carried out using Internet resource, It is synchronized and is published on network by the video capture at scene, user can see live feelings in real time the same time on network Condition.
In the business scenario of net cast website, many direct broadcasting room main broadcasters are initiating in initiation interactive event or website When special activities, need to interact just for any active ues or active user on website watched between current live, At this moment it just needs that any active ues are recorded and updated in real time by an any active ues collection.
Currently, safeguarding the usual thinking of any active ues collection are as follows: when server continuous a period of time in net cast field Interior (it is generally necessary to the customized time, which is time-out duration Timeout) does not receive user behavior data, just this User eliminates any active ues collection.Specifically, it is generally divided into following two mode:
(1) it is directed to each user, saves corresponding " finally receiving the time lastReceiveTime of behavioral data ";So Afterwards by a timer, each second traverses the user conversation of all users, rejects those users for meeting following formula Session:
Current time now- finally receives the time lastReceiveTime > time-out duration Timeout of behavioral data.
It is overtime every time but since this way overall situation is provided only with a repetition timer repeated timer It will check whole user session informations, it is this if user conversation number is bigger (as kept a users up to ten thousand simultaneously) The inspection amount of mode will be very big, and entire checking process is time-consuming serious, reduces real-time.
(2) substantially identical as first way, the difference is that a disposable timer is arranged for each user conversation One-shot timer just disconnects this session when timer expiry, and when receiving user behavior data every time Update the timer.
Although the method improves the efficiency of inspection to a certain extent, need to be arranged many disposable timers, and It needs continually to update timer.If linking number is larger, " timer queue to be updated " can be caused stress, when serious It also will cause system congestion even to collapse.
Summary of the invention
The purpose of the invention is to overcome the shortcomings of above-mentioned background technique, provide a kind of based on time wheel disc and broadcasting shape Any active ues collection maintenance system and method for state, video render state when can watch video based on normal users generate active User's collection, while any active ues collection is kept updating using time wheel disc, not only in time efficiently, and system will not be caused Larger load ensure that effective progress of interactive event.
To achieve the above objectives, the present invention provides a kind of based on any active ues collection of time wheel disc and broadcast state maintenance system It unites, including several user terminals and a live streaming Platform Server, is provided with broadcast state logging modle in each user terminal, Caching preprocessing module, distributed computing module and any active ues collection functional module in real time are provided in live streaming Platform Server;
The broadcast state logging modle is used for: the broadcast state information of video flowing when record user watches live streaming in real time; Give the broadcast state information reporting of record to live streaming Platform Server;
The caching preprocessing module is used for: carrying out caching and pre- place to the broadcast state information that each user terminal reports Reason;Timing will caching and pretreated all broadcast state information by be sent in the form of several data slices it is distributed in real time in terms of Calculate module;
The distributed computing module in real time includes several real-time computational submodules, and distributed computing module in real time is used for The each data slice received is distributed into a specified real-time computational submodule according to Hash strategy;It is each to calculate submodule in real time Block is parsed and is verified to the broadcast state information in data slice, and the corresponding user of broadcast state information being verified is added It is added in the corresponding any active ues collection fragment of current time, any active ues collection fragment is by any active ues collection according to specified Actively several fragments that the calculating period is divided into;
Any active ues integrate functional module and are used for: using the specified active calculating period as the period, by current time pair Any active ues collection fragment answered is updated into the time wheel disc created, and the time wheel disc is a kind of data structure, main body It is an end to end circular list, includes the unit that several are referred to as slot in the circular list, filled in each slot There is an any active ues collection fragment, and the circular list also has the pointer of a direction tail of the queue.
Based on the above technical solution, broadcast state information includes: video stream mode, User ID and according to specific rule The identification code then generated.
Based on the above technical solution, the video stream mode includes video render, video stream buffer area is full, regards Frequency streambuf is empty and video playing is closed;The create-rule of the identification code are as follows: timestamp+subscriber terminal equipment API The terminal device ID+ random number that (Application Programming Interface, Application Programming Interface) obtains.
Based on the above technical solution, any active ues collection functional module is with the specified active calculating period Period, when the corresponding any active ues collection fragment of current time is updated into the time wheel disc created, specific operation process are as follows: It is every after the specified active calculating period, any active ues collection fragment in time wheel disc in each slot is to head of the queue Forward one Lattice;The corresponding any active ues collection fragment of current time is updated in the slot of tail of the queue;By the pointer on time wheel disc to team Head one lattice of Forward.
The present invention also provides a kind of any active ues collection maintaining method based on time wheel disc and broadcast state, including following step Rapid: A, the broadcast state logging modle of each user terminal records the broadcast state letter of video flowing when user watches live streaming in real time Breath;Give the broadcast state information reporting of record to live streaming Platform Server;B, the caching preprocessing module of Platform Server is broadcast live The broadcast state information that each user terminal reports is cached and pre-processed;C, caching preprocessing module timing will caching and Pretreated all broadcast state information are sent to distributed real-time computing module in the form of several data slices;It is distributed real When computing module each data slice distributed into a specified real-time computational submodule according to Hash strategy;D, each meter in real time Operator module is parsed and is verified to the broadcast state information in data slice, and the broadcast state information being verified is corresponding User is added in the corresponding any active ues collection fragment of current time;E, any active ues collection functional module is with the active calculating period For the period, periodically the corresponding any active ues collection fragment of current time is updated into the time wheel disc created.
Based on the above technical solution, it in step B, when the caching preprocessing module is cached, can abandon not Satisfactory broadcast state information;The undesirable broadcast state information includes: the illegal broadcasting shape of frequency stream mode State information, User ID are that empty or User ID does not meet the broadcast state information of data field type, timestamp format error Broadcast state information and type of user terminal identify illegal broadcast state information.
Based on the above technical solution, in step C, the timing of caching preprocessing module will caching and pretreated institute There is broadcast state information to be sent to distributed real-time computing module in the form of several data slices, specifically include following operation: is slow It deposits preprocessing module and current cache and pretreated all broadcast state information is sent to distributed meter in real time every 1 second Module is calculated, broadcast state information is combined into several data slices less than or equal to 1M when sending every time and is sent.
Based on the above technical solution, in step C, distributed computing module in real time is by each data slice according to Hash Strategy distributes to a specified real-time computational submodule, specifically includes following operation: distributed computing module in real time is each Data slice distributes a unique ID number, which is pressed to the number modulus of real-time computational submodule, and the remainder of acquisition then corresponds to The ID number of specified real-time computational submodule;Data slice is distributed to the real-time computational submodule of corresponding ID number.
Based on the above technical solution, step D specifically includes following operation: each computational submodule in real time is to data Broadcast state information in piece is parsed, and judges that the broadcast state information is according to the identification code of the broadcast state information of parsing It is no effectively if invalid, directly to abandon the broadcast state information, terminate;If effective, then to the video of the broadcast state information Stream mode is verified, if verifying does not pass through, directly abandons the broadcast state information, is terminated, if being verified, by the broadcasting shape The User ID of state information is added in the corresponding any active ues collection fragment of current time.
Based on the above technical solution, step E specifically includes following operation: every by the specified active calculating time Duan Hou, any active ues collection fragment in time wheel disc in each slot move forward a lattice to head of the queue;By the corresponding active use of current time Family collection fragment is updated in the slot of tail of the queue;By the pointer on time wheel disc to head of the queue move forward a lattice.
The beneficial effects of the present invention are:
1, video render state when watching video the present invention is based on normal users generates corresponding any active ues collection point Piece, any active ues collection fragment are several fragments for being divided into any active ues collection according to the specified active calculating period, only There is the normal user of video render state that any active ues is just used as to be added to any active ues collection corresponding with current time point In piece;On this basis, while using time wheel disc any active ues collection is kept updating, with the specified active calculating period For the period, periodically the corresponding any active ues collection fragment of current time is updated into the time wheel disc created, thus completion pair The timely maintenance of any active ues collection.
Compared with prior art, the present invention is not to use to repeat timer or disposable timer, but be based on video Stream broadcasting state and time wheel disc are updated maintenance to any active ues collection, not only in time efficiently, and will not make to system At larger load, can effectively limit the participation of inactive users in certain interactive events, guarantee interactive event it is effective into Row.
2, in the present invention, any active ues collection fragment is to be divided according to the specified active calculating period, and live It is also using the specified active calculating period as maintenance period that jump user, which integrates functional module,.This actively calculates the period can be according to reality Border use needs self-setting and adjustment, and the number of any active ues collection fragment also can be adjusted accordingly, this allows for enlivening use The statistics granularity at family can be configured and adjust as needed (can liveness, minute liveness or other are active by the hour Degree calculates to count), and corresponding wheel disc period time can also correspond to adjustment (can be safeguarded by maintenance in 1 hour, 1 minute or its His safeguards in period), strong flexibility, applicability is high.
3, in the present invention, live streaming Platform Server is provided with caching preprocessing module, which can not only The broadcast state information that each user terminal reports is cached and pre-processed, moreover it is possible to periodically be owned caching with pretreated Broadcast state information is sent to distributed real-time computing module in the form of several data slices;Also, the distribution calculates in real time Module is made of several real-time computational submodules, and each data slice is assigned to the real-time computational submodule of specified one and carries out Processing, multiple real-time computational submodules can handle multiple data slices simultaneously, and treatment effeciency is high, and real-time is stronger.
It 4, is the real-time computational submodule for selecting to be reported according to Hash strategy, mesh to data slice in the present invention Be horizontal extension ability in order to improve distributed computing module in real time, allow distributed computing module in real time according to wanting The scale of the data volume of processing accordingly increases and decreases the number of real-time computational submodule.
Detailed description of the invention
Fig. 1 is the structural frames of any active ues collection maintenance system based on time wheel disc and broadcast state in the embodiment of the present invention Figure;
Fig. 2 is the structural schematic diagram of time wheel disc;
Fig. 3 is the process of any active ues collection maintaining method based on time wheel disc and broadcast state in the embodiment of the present invention Figure.
Specific embodiment
With reference to the accompanying drawing and specific embodiment the present invention is described in further detail.
Shown in Figure 1, the embodiment of the present invention provides a kind of based on any active ues collection of time wheel disc and broadcast state dimension Protecting system, including several user terminals and a live streaming Platform Server are provided with broadcast state record in each user terminal Module is broadcast live in Platform Server and is provided with caching preprocessing module, distributed computing module and any active ues collection function in real time Module.
Wherein, broadcast state logging modle is used for: the broadcast state information of video flowing when record user watches live streaming in real time; Give the broadcast state information reporting of record to live streaming Platform Server.
It is understood that broadcast state information includes: video stream mode, User ID (i.e. the ID of user's uniqueness) and presses The identification code generated according to ad hoc rules.Video stream mode includes that video render PLAY, video stream buffer area are full Buffer.Full, video stream buffer area sky Buffer.Empty and video playing close Close;Wherein Buffer.Full When, user sees video smoothness;When Buffer.Empty, user sees video cardton.The create-rule of the identification code are as follows: timestamp Terminal device ID (unique ID that terminal device ID is subscriber terminal equipment)+random number that+subscriber terminal equipment API is obtained;It should Identification code is regular length, and through encryption after generation.
Caching preprocessing module is used for: the broadcast state information that each user terminal reports is cached and pre-processed;It is fixed When caching and pretreated all broadcast state information are sent in the form of several data slices distributed calculate mould in real time Block.
Distributed computing module in real time includes several real-time computational submodules, and distributed computing module in real time will be for that will receive To each data slice distribute to a specified real-time computational submodule according to Hash strategy;Each computational submodule pair in real time Broadcast state information in data slice is parsed and is verified, and the User ID for the broadcast state information being verified is added to and is worked as In preceding time corresponding any active ues collection fragment, which refers to: in advance by any active ues collection according to specified Actively several fragments that the calculating period is divided into.Such as: if the specified active calculating period is 1 hour, any active ues As soon as collection 24 hours corresponding day, there is 24 corresponding any active ues collection fragments;If the specified active calculating period is 1 minute, As soon as then any active ues collection is day 24*60=1440 minutes corresponding, there are 1440 corresponding any active ues collection fragments.
Any active ues integrate functional module and are used for: being the period (such as with 1 hour or 1 minute using the specified active calculating period Deng for the period), the corresponding any active ues collection fragment of current time is updated into the time wheel disc created;As shown in Fig. 2, The time wheel disc of creation is a kind of data structure, and main body is an end to end circular list (circular buffer), Include the unit that several are referred to as slot (slot) in the circular list, divides in each slot filled with an any active ues collection Piece, and the circular list also has the pointer (tail) of a direction tail of the queue.
It is shown in Figure 3, the embodiment of the present invention also provide it is a kind of using above system based on time wheel disc and user's row For any active ues collection maintaining method, comprising the following steps:
Step S1: video flowing broadcasts when the broadcast state logging modle of each user terminal records user's viewing live streaming in real time Put status information;The broadcast state information of record is assembled into JSON format, and BASE64 coding is carried out to JSON character string;It will Broadcast state information reporting after coding gives live streaming Platform Server, is transferred to step S2.
Step S2: the broadcast state information that the caching preprocessing module of Platform Server reports each user terminal is broadcast live It is cached and is pre-processed (Uniform data format), be transferred to step S3.
Specifically, the detailed process that caching preprocessing module is cached are as follows: the broadcasting that each user terminal is reported The JSON character string of status information carries out BASE64 decoding, abandons undesirable broadcast state information.Wherein, it does not meet and wants The broadcast state information asked includes: that the illegal broadcast state information of video stream mode, User ID do not meet for empty or User ID The broadcast state information of data field type, the broadcast state information of timestamp format error and type of user terminal mark Illegal broadcast state information etc..
Also, the data format after broadcast state information is preprocessed is as follows:
Step S3: the timing of caching preprocessing module will cache and pretreated all broadcast state information are with several data The form of piece is sent to distributed real-time computing module;Distributed computing module in real time is by each data slice received according to Hash Strategy distributes to a specified real-time computational submodule, is transferred to step S4.
Preprocessing module timing is cached when practical operation, in step S3 will caching and pretreated all broadcast state letters Breath is sent to distributed real-time computing module in the form of several data slices, specifically includes following operation: caching preprocessing module Current cache and pretreated all broadcast state information are sent to distributed real-time computing module every 1 second, every time Broadcast state information is combined into several data slices less than or equal to 1M when transmission to send, i.e., each data slice is by least one A complete broadcast state information composition, and the data slice size formed is less than or equal to 1M.Such as: the broadcast state of current cache There are three information has altogether, size is respectively that 0.3M, 0.4M and 0.5M can broadcast two of 0.3M, 0.4M when then this time sending It puts status information and forms a data slice, then the broadcast state information of 0.5M is formed into another data slice;Finally by the two Data slice is sent to distributed real-time computing module together.
Further, distributed computing module in real time distributes each data slice received according to Hash strategy in step S3 To a specified real-time computational submodule, specifically include following operation: distributed computing module in real time is each data slice point With a unique ID number, by the ID number according to the number modulus of real-time computational submodule, the remainder of acquisition then corresponds to specified The ID number of real-time computational submodule;Data slice is distributed to the real-time computational submodule of corresponding ID number.In the present invention, to data slice The real-time computational submodule to be reported is selected by Hash strategy, in order to improve the water of distributed computing module in real time Flat extended capability allows distributed computing module in real time accordingly to increase and decrease real-time meter according to the scale of data volume to be processed The number of operator module.
Step S4: each computational submodule in real time parses the broadcast state information in data slice, according to parsing The identification code of broadcast state information judges whether the broadcast state information is effective, if effective, is then transferred to step S5;Otherwise, directly It connects and abandons the broadcast state information, terminate.
Wherein, judging the broadcast state information, effectively whether detailed process is as follows: to the identification in broadcast state information Code be decrypted, take-off time stamp and terminal device ID, respectively checking time stamp whether in the reasonable scope (i.e. timestamp with work as Whether the time difference of preceding server in one minute), terminal device ID whether meet whether specification (verifies terminal device ID again Meet the create-rule of identification code);If above-mentioned verification passes through, determine that the broadcast state information is effective, otherwise, it is determined that It is invalid.
Step S5: real-time computational submodule verifies the video stream mode of the broadcast state information, if being verified, Then the User ID for the broadcast state information being verified is added in the corresponding any active ues collection fragment of current time, is turned Enter step S6;If verifying does not pass through, the broadcast state information is directly abandoned, is terminated.
Wherein, verified that detailed process is as follows to the video stream mode of the broadcast state information: parsing, which obtains, to play Video stream mode in status information, judges whether it meets the feature of normal play, if meeting, decision verification passes through;If It does not meet, then decision verification does not pass through.Specifically, video flowing state meets the feature of normal play are as follows: must have PLAY first; Secondly both Buffer.Full or Buffer.Empty be alternately present, or secondly only Buffer.Full or Buffer.Empty one occurs.
Step S6: any active ues integrate functional module using the specified active calculating period as the period, periodically by current time Corresponding any active ues collection fragment is updated into the time wheel disc created, is terminated.
Specifically, using the specified active calculating period as the period, periodically by the corresponding any active ues collection of current time Fragment is updated into the time wheel disc created, and concrete operations are as follows:
Step S601: every any active ues collection after the specified active calculating period, in time wheel disc in each slot Fragment moves forward a lattice (in the present invention, definition is mobile for Forward to head of the queue along clockwise direction) to head of the queue, at this point, being located at head of the queue Any active ues collection fragment in slot is moved out of and destroys, and the slot positioned at tail of the queue is sky, is transferred to step S602;
Step S602: the corresponding any active ues collection fragment of current time is updated in the slot of tail of the queue, step is transferred to S603;
Step S603: by the pointer on time wheel disc to head of the queue move forward a lattice.
The present invention is not limited to the above-described embodiments, for those skilled in the art, is not departing from Under the premise of the principle of the invention, several improvements and modifications can also be made, these improvements and modifications are also considered as protection of the invention Within the scope of.
The content being not described in detail in this specification belongs to the prior art well known to professional and technical personnel in the field.

Claims (8)

1. a kind of any active ues collection maintenance system based on time wheel disc and broadcast state, including several user terminals and one it is straight Broadcast Platform Server, it is characterised in that: be provided with broadcast state logging modle in each user terminal, be broadcast live in Platform Server It is provided with caching preprocessing module, distributed computing module and any active ues collection functional module in real time;
The broadcast state logging modle is used for: the broadcast state information of video flowing when record user watches live streaming in real time;It will note The broadcast state information reporting of record gives live streaming Platform Server;
The caching preprocessing module is used for: the broadcast state information that each user terminal reports is cached and pre-processed;It is fixed When caching and pretreated all broadcast state information are sent in the form of several data slices distributed calculate mould in real time Block;
The distributed computing module in real time includes several real-time computational submodules, and distributed computing module in real time will be for that will receive To each data slice distribute to a specified real-time computational submodule according to Hash strategy;Each computational submodule pair in real time Broadcast state information in data slice is parsed and is verified, and the corresponding user of broadcast state information being verified is added to In the corresponding any active ues collection fragment of current time, any active ues collection fragment is to enliven any active ues collection according to specified Several fragments that the calculating period is divided into;
Any active ues integrate functional module and are used for: using the specified active calculating period as the period, current time is corresponding Any active ues collection fragment is updated into the time wheel disc created, and the time wheel disc is a kind of data structure, and main body is one A end to end circular list includes the unit that several are referred to as slot in the circular list, is filled with one in each slot A any active ues collection fragment, and the circular list also has the pointer of a direction tail of the queue;
Any active ues integrate functional module using the specified active calculating period as the period, by the corresponding active use of current time When family collection fragment is updated into the time wheel disc created, specific operation process are as follows: every by the specified active calculating period Afterwards, any active ues collection fragment in time wheel disc in each slot is to head of the queue one lattice of Forward, at this point, being located at enlivening in the slot of head of the queue User collects fragment and is moved out of and destroys, and the slot positioned at tail of the queue is sky;The corresponding any active ues collection fragment update of current time is arrived In the slot of tail of the queue;By the pointer on time wheel disc to head of the queue move forward a lattice.
2. any active ues collection maintenance system based on time wheel disc and broadcast state as described in claim 1, it is characterised in that: Broadcast state information includes: video stream mode, User ID and the identification code generated according to ad hoc rules.
3. any active ues collection maintenance system based on time wheel disc and broadcast state as claimed in claim 2, it is characterised in that: The video stream mode includes video render, video stream buffer area is full, video stream buffer area is empty and video playing is closed; The create-rule of the identification code are as follows: the terminal device ID+ random number that timestamp+subscriber terminal equipment API is obtained.
4. a kind of any active ues collection maintaining method based on time wheel disc and broadcast state using system described in claim 1, Characterized by comprising the following steps:
A, the broadcast state logging modle of each user terminal records the broadcast state letter of video flowing when user watches live streaming in real time Breath;Give the broadcast state information reporting of record to live streaming Platform Server;
B, the caching preprocessing module that Platform Server is broadcast live caches the broadcast state information that each user terminal reports And pretreatment;
C, the timing of caching preprocessing module is by caching and pretreated all broadcast state information in the form of several data slices It is sent to distributed real-time computing module;Each data slice is distributed to one according to Hash strategy by distributed computing module in real time Specified real-time computational submodule;
D, each computational submodule in real time is parsed and is verified to the broadcast state information in data slice, is broadcast what is be verified The corresponding user of status information is put to be added in the corresponding any active ues collection fragment of current time;
E, any active ues integrate functional module using the active calculating period as the period, periodically by the corresponding any active ues collection of current time Fragment is updated into the time wheel disc created;
Step E specifically includes following operation: every work after the specified active calculating period, in time wheel disc in each slot The user that jumps collects fragment to head of the queue one lattice of Forward, at this point, any active ues collection fragment being located in the slot of head of the queue is moved out of and destroys, position In tail of the queue slot be sky;The corresponding any active ues collection fragment of current time is updated in the slot of tail of the queue;By time wheel disc On pointer to head of the queue move forward a lattice.
5. any active ues collection maintaining method based on time wheel disc and broadcast state as claimed in claim 4, it is characterised in that: Broadcast state information described in step A includes: video stream mode, User ID and the identification code generated according to ad hoc rules, the knowledge The create-rule of other code are as follows: the terminal device ID+ random number that timestamp+subscriber terminal equipment API is obtained;
In step B, when the caching preprocessing module is cached, undesirable broadcast state information can be abandoned;It is described It is empty or User ID that undesirable broadcast state information, which includes: the illegal broadcast state information of frequency stream mode, User ID, The broadcast state information of data field type, the broadcast state information of timestamp format error and user terminal class are not met Type identifies illegal broadcast state information.
6. any active ues collection maintaining method based on time wheel disc and broadcast state as claimed in claim 4, it is characterised in that: In step C, caching preprocessing module timing is by caching and pretreated all broadcast state information with the shape of several data slices Formula is sent to distributed real-time computing module, specifically includes following operation: caching preprocessing module is every 1 second by current cache It is sent to distributed real-time computing module with pretreated all broadcast state information, by broadcast state information when sending every time Several data slices less than or equal to 1M are formed to be sent.
7. any active ues collection maintaining method based on time wheel disc and broadcast state as claimed in claim 4, it is characterised in that: In step C, each data slice is distributed to specified real-time calculating according to Hash strategy by distributed computing module in real time Module specifically includes following operation: distributed computing module in real time is that each data slice distributes a unique ID number, by the ID Number press the number modulus of real-time computational submodule, the ID number of the remainder of acquisition then corresponding specified real-time computational submodule;It will count The real-time computational submodule of corresponding ID number is distributed to according to piece.
8. any active ues collection maintaining method based on time wheel disc and broadcast state as claimed in claim 4, it is characterised in that: Broadcast state information described in step A includes: video stream mode, User ID and the identification code generated according to ad hoc rules;
On this basis, step D specifically includes following operation: each computational submodule in real time believes the broadcast state in data slice Breath is parsed, and judges whether the broadcast state information is effective according to the identification code of the broadcast state information of parsing, if invalid, The broadcast state information is directly abandoned, is terminated;If effective, then the video stream mode of the broadcast state information is verified, If verifying does not pass through, the broadcast state information is directly abandoned, is terminated, if being verified, by the User ID of the broadcast state information It is added in the corresponding any active ues collection fragment of current time.
CN201610475616.3A 2016-06-24 2016-06-24 Any active ues collection maintenance system and method based on time wheel disc and broadcast state Active CN106028077B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610475616.3A CN106028077B (en) 2016-06-24 2016-06-24 Any active ues collection maintenance system and method based on time wheel disc and broadcast state

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610475616.3A CN106028077B (en) 2016-06-24 2016-06-24 Any active ues collection maintenance system and method based on time wheel disc and broadcast state

Publications (2)

Publication Number Publication Date
CN106028077A CN106028077A (en) 2016-10-12
CN106028077B true CN106028077B (en) 2019-03-05

Family

ID=57083586

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610475616.3A Active CN106028077B (en) 2016-06-24 2016-06-24 Any active ues collection maintenance system and method based on time wheel disc and broadcast state

Country Status (1)

Country Link
CN (1) CN106028077B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107968893B (en) * 2016-10-19 2020-09-08 阿里巴巴集团控股有限公司 Communication method and device, electronic equipment and computer readable storage medium
CN109151577B (en) * 2018-07-05 2021-04-27 武汉斗鱼网络科技有限公司 Player state tracking method, storage medium, device and system

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9020965B1 (en) * 2011-09-29 2015-04-28 Google Inc. Social networking relationship ranking and decay
US20130091280A1 (en) * 2011-10-08 2013-04-11 Broadcom Corporation Social Device Resource Management
CN105516115B (en) * 2015-12-02 2019-06-18 华为软件技术有限公司 A kind of method that channel quickly plays and user equipment (UE)
CN105578211B (en) * 2015-12-16 2018-09-07 深圳市网心科技有限公司 Live streaming based on unlimited service node accelerates network interim card optimization method and system

Also Published As

Publication number Publication date
CN106028077A (en) 2016-10-12

Similar Documents

Publication Publication Date Title
CN105979299B (en) Any active ues collection maintenance system and method based on time wheel disc and player heartbeat
CN106131605B (en) Any active ues collection maintenance system and method based on time wheel disc and user behavior
US10536543B2 (en) Methods and apparatus to share online media impressions data
CN106162247B (en) Any active ues collection maintaining method and system based on time wheel disc and page heartbeat
CN106060057B (en) Net cast website generates the system and method for white list based on user's barrage behavior
CN106210792B (en) Any active ues collection maintaining method and system based on time wheel disc and page behavior
CN106027548B (en) Net cast website generates the system and method for white list based on page heartbeat event
CN106385601B (en) The statistical method and system of live streaming number are watched while based on multi-protocols verifying
CN101075908B (en) Method and system for accounting network click numbers
US20170223427A1 (en) System and method for scalable, high accuracy, sensor and id based audience measurement system based on distributed computing architecture
CN106067991B (en) A kind of white list generation system and method based on User Page action trail
US9149682B2 (en) System and method for sharing of athletic performance data
CN106028077B (en) Any active ues collection maintenance system and method based on time wheel disc and broadcast state
CN106162365B (en) Any active ues collection maintaining method and system based on time wheel disc and barrage behavior
CN106326461A (en) Real time processing guarantee method and system based on network signaling record
CN104219571A (en) Method and device for automatically providing watching focus
CN106060594B (en) A kind of white list generation system and method based on player heartbeat
CN106792209A (en) Video preference information processing method, apparatus and system
CN105791326B (en) A kind of white list generation system and method based on User Page behavior
CN111861592B (en) Method, device and equipment for processing activity information
CN105187688B (en) The method and system that a kind of real-time video and audio to mobile phone collection synchronizes
CN104349206A (en) Method, device and system for processing television information
CN106507149A (en) Video preference information processing method, apparatus and system
US8954990B2 (en) Adaptable mass data message receipt and handling system and method
CN105847898A (en) Video automatic releasing method and device

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
TR01 Transfer of patent right

Effective date of registration: 20230407

Address after: 510000 2414-2416 of the main building 371, five mountain road, Tianhe District, Guangzhou, Guangdong.

Patentee after: GUANGDONG GAOHANG INTELLECTUAL PROPERTY OPERATION Co.,Ltd.

Address before: 430000 East Lake Development Zone, Wuhan City, Hubei Province, No. 1 Software Park East Road 4.1 Phase B1 Building 11 Building

Patentee before: WUHAN DOUYU NETWORK TECHNOLOGY Co.,Ltd.

Effective date of registration: 20230407

Address after: Unit 901, No. 339 Chengyi Street, Software Park Phase III, Xiamen Torch High tech Zone, Xiamen, Fujian Province, 361000

Patentee after: Xiamen Qiliang Technology Co.,Ltd.

Address before: 510000 2414-2416 of the main building 371, five mountain road, Tianhe District, Guangzhou, Guangdong.

Patentee before: GUANGDONG GAOHANG INTELLECTUAL PROPERTY OPERATION Co.,Ltd.