CN106791884B - The holding system and method for the video data consistency of P2P live streaming - Google Patents

The holding system and method for the video data consistency of P2P live streaming Download PDF

Info

Publication number
CN106791884B
CN106791884B CN201610696712.0A CN201610696712A CN106791884B CN 106791884 B CN106791884 B CN 106791884B CN 201610696712 A CN201610696712 A CN 201610696712A CN 106791884 B CN106791884 B CN 106791884B
Authority
CN
China
Prior art keywords
chunk
live streaming
source station
identifier
video data
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
CN201610696712.0A
Other languages
Chinese (zh)
Other versions
CN106791884A (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.)
Shanghai Cloud Entropy Network Technology Co Ltd
Dazzle Entropy (shanghai) Internet Technology Co Ltd
Original Assignee
Shanghai Cloud Entropy Network Technology Co Ltd
Dazzle Entropy (shanghai) Internet 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 Shanghai Cloud Entropy Network Technology Co Ltd, Dazzle Entropy (shanghai) Internet Technology Co Ltd filed Critical Shanghai Cloud Entropy Network Technology Co Ltd
Priority to CN201610696712.0A priority Critical patent/CN106791884B/en
Publication of CN106791884A publication Critical patent/CN106791884A/en
Application granted granted Critical
Publication of CN106791884B publication Critical patent/CN106791884B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)

Abstract

The invention discloses a kind of holding system and methods of the video data consistency of P2P live streaming, and holding system includes main live streaming source station and spare live streaming source station;Main live streaming source station receives video data, writes video data into the first chunk;And first identifier ID is set for the first chunk using from increasing ID, and first identifier ID is synchronized to spare live streaming source station;It when main live streaming source station is broken down, chooses the spare live streaming source station of target and is switched to new main live streaming source station and continue to video data, video data is sequentially written in the 2nd chunk;The maximum value of new main live streaming source station inquiry first identifier ID, and the 2nd chunk setting second identifier ID is followed successively by using from increasing ID;The minimum value of second identifier ID is greater than the maximum value of first identifier ID.The present invention avoid the occurrence of chunk mark ID is identical and situation that the content of chunk is different, guarantee normally complete P2P live streaming.

Description

The holding system and method for the video data consistency of P2P live streaming
Technical field
The present invention relates to a kind of Technology of Network Streaming Media fields, consistent more particularly to a kind of video data of P2P live streaming The holding system and method for property.
Background technique
In traditional network direct broadcasting system, video flowing can be passed through RTMP (Real Time Messaging by live source Protocol, real-time messages transport protocol) be pushed to live streaming source station, then by transcoding/turn encapsulation etc. operation, formed one to The video flowing of distribution, usually flv format (stream media format) (but being also not limited to flv format), the video of this flv format Stream can be pushed to CDN (Content Delivery Network, content distributing network) edge by tag (video tab) one by one Server, user can obtain from CDN Edge Server nearby.
In existing P2P (Peer to Peer, peer-to-peer network) live broadcast system, it is single that video distribution, which is not with tag, Position, but several tag are merged into a chunk (video file block, also known as block of information), (n, k) for distributing chunk, which entangles, to be deleted Code coding result, each live streaming node transmit mutually after obtaining chunk coding segment from CDN fringe node.Live streaming node is being received Decoding operate is executed after collecting neat k different coding segments, restores chunk data, tag is further isolated from chunk.
In existing live broadcast system, in order to keep robustness and the safe operation of system, two live streaming source stations can be set Active and standby each other, usually pushing video streaming to main website, CDN fringe node is also to main website request data;When main website breaks down, depending on Frequency stream is changed to be pushed to standby station, and CDN fringe node is also changed to standby station request data.
In existing P2P live broadcast system, it is assumed that include two fringe nodes A and B, when initial, A and B are asked to main website Data are sought, at a time, A obtains the first chunk, but then main website delay machine, B do not obtain the first chunk also at this time, it It was found that being changed to standby station request data, thus B obtains the 2nd chunk after main website delay machine;But B obtained from standby station second Chunk is it is difficult to ensure that the first chunk obtained from main website with A is exactly the same (such as due to may occur during RTMP plug-flow The reasons such as random frame losing), this results in the chunk obtained at A and B not identical, and the coding segment in difference chunk is placed on It decodes together just and will appear inconsistent problem, so as to cause can not successfully parse the video data for needing to play, and then lead Cause can not normally complete P2P live streaming.
Summary of the invention
The technical problem to be solved by the present invention is in order to overcome in the prior art active and standby live streaming source station after handover generate The decoding of putting together of the coding segment of chunk will appear problem, leads to not the defect for normally completing P2P live streaming, provides one kind The holding system and method for the video data consistency of P2P live streaming.
The present invention is to solve above-mentioned technical problem by following technical proposals:
The present invention provides a kind of holding systems of the video data consistency of P2P live streaming, it is characterized in that, including one Main live streaming source station and at least one spare live streaming source station;
Video data is sequentially written in multiple first for receiving video data to be broadcast live by the main live streaming source station In chunk;
The main live streaming source station is also used to be followed successively by each first chunk setting first using from increasing ID (Identity Code) ID is identified, and the first identifier ID of each first chunk is synchronized at least one described spare live streaming source station;
When the main live streaming source station is broken down, it is spare from least one described spare live streaming source station to choose a target Live streaming source station is simultaneously switched to new main live streaming source station;
The new main live streaming source station is used to continue to the video data to be broadcast live, and video data is successively write Enter in multiple 2nd chunk;
The new main live streaming source station is also used to inquire the maximum value of the first identifier ID, and is followed successively by using from increasing ID Second identifier ID is arranged in each 2nd chunk;The minimum value of the second identifier ID is greater than the maximum value of the first identifier ID.
Preferably, the new main live streaming source station be also used to for the second identifier ID of each 2nd chunk being synchronized to it is other Spare live streaming source station.
Preferably, the minimum value of the second identifier ID is closed compared with meeting as follows with the maximum value of the first identifier ID System:
C2>C1+(ΔT*R)/Csize
Wherein C2Indicate the minimum value of the second identifier ID, C1Indicate the institute that the new main live streaming source station was synchronized The maximum value of first identifier ID is stated, Δ T expression, which is broken down from the main live streaming source station to the spare live streaming source station of the target, cuts The time interval being changed between new main live streaming source station, R indicate the code rate write video data into the first chunk, CsizeIndicate the capacity of the first chunk.
Preferably, the difference ratio (Δ T*R) of the minimum value of the second identifier ID and the maximum value of the first identifier ID/ CsizeIt is at least order of magnitude greater.
Preferably, the main live streaming source station is used for the first identifier ID of each first chunk of Timing Synchronization.
Preferably, the new main live streaming source station is used for the second identifier ID of each 2nd chunk of Timing Synchronization.
Preferably, the holding system further includes multiple Edge Servers and multiple live streaming nodes;
The main live streaming source station is also used to the multiple first chunk being distributed to the multiple Edge Server, described New main live streaming source station is also used to the multiple 2nd chunk being distributed to the multiple Edge Server;
The Edge Server be used to execute encoding operation to each chunk with generate it is multiple with the chunk with phase It is sent to live streaming node with the coding segment of mark ID, and by coding segment, difference is broadcast live between node for being exchanged with each other volume Chip segment, the live streaming node are used to execute decoding operate to the coding segment with like-identified ID to restore chunk;
The chunk includes the first chunk and the 2nd chunk.
Preferably, the encoding operation is correcting and eleting codes encoding operation, the decoding operate is correcting and eleting codes decoding operate, different For being exchanged with each other coding segment by P2P mode between live streaming node.Wherein, correcting and eleting codes coding and decoding is preferably (n, k) Correcting and eleting codes coding and decoding.
Preferably, the holding system further includes window setting module, the window setting module is received for being arranged one Window and a jump window;The reception window and the jump window are ID set, and the first identifier ID belongs to institute Reception window is stated, the second identifier ID belongs to the jump window;
The live streaming node is used for after the coding segment for receiving a target chunk, detects the target chunk's Whether mark ID belongs to the reception window or the jump window;
If the mark ID of the target chunk is not belonging to the reception window and the jump window, the mesh is abandoned Mark the coding segment of chunk;
If the mark ID of the target chunk belongs to the reception window, decoding behaviour is executed to the target chunk Make, and increases the minimum value of the reception window and the jump window;I.e. by increasing the reception window and the jump The minimum value of window is come while moving forward the reception window and the jump window, wherein the reception window and described The difference of maximum value and minimum value in jump window is always maintained at constant;
If the mark ID of the target chunk belongs to the jump window, the reception window and the jump are modified The minimum value of window, and the mark ID of the target chunk is made to belong to modified reception window, equally, the reception window The difference of mouth and maximum value and minimum value in the jump window is always maintained at constant.
It is an object of the invention to additionally provide a kind of keeping method of the video data consistency of P2P live streaming, feature It is, comprising the following steps:
S1, main live streaming source station receives video data to be broadcast live, and video data is sequentially written in multiple first chunk In;
S2, the main live streaming source station utilize and be followed successively by each first chunk setting first identifier ID from increasing ID, and will be each The first identifier ID of first chunk is synchronized at least one spare live streaming source station;
S3, when the main live streaming source station is broken down, choose a target from least one described spare live streaming source station Spare live streaming source station is simultaneously switched to new main live streaming source station;
S4, the new main live streaming source station continues to the video data to be broadcast live, and video data successively write Enter in multiple 2nd chunk;
S5, the new main live streaming source station inquires the maximum value of the first identifier ID, and is followed successively by often using from increasing ID Second identifier ID is arranged in a 2nd chunk;The minimum value of the second identifier ID is greater than the maximum value of the first identifier ID.
Preferably, step S5Later further include:
S6, the new main live streaming source station second identifier ID of each 2nd chunk is synchronized to other spare live sources It stands.
Preferably, the minimum value of the second identifier ID is closed compared with meeting as follows with the maximum value of the first identifier ID System:
C2>C1+(ΔT*R)/Csize
Wherein C2Indicate the minimum value of the second identifier ID, C1Indicate the institute that the new main live streaming source station was synchronized The maximum value of first identifier ID is stated, Δ T expression, which is broken down from the main live streaming source station to the spare live streaming source station of the target, cuts The time interval being changed between new main live streaming source station, R indicate the code rate write video data into the first chunk, CsizeIndicate the capacity of the first chunk.
Preferably, the difference ratio (Δ T*R) of the minimum value of the second identifier ID and the maximum value of the first identifier ID/ CsizeIt is at least order of magnitude greater.
Preferably, step S2Described in each first chunk of main live source station Timing Synchronization first identifier ID.
Preferably, step S6Described in new each 2nd chunk of main live source station Timing Synchronization second identifier ID.
Preferably, step S5Later further include:
S7, the main live streaming source station the multiple first chunk is distributed to multiple Edge Servers, the new master is straight It broadcasts source station and the multiple 2nd chunk is distributed to the multiple Edge Server;
The Edge Server encoding operation is executed to each chunk with generate it is multiple with the chunk with identical mark Know the coding segment of ID, and coding segment is sent to live streaming node, is exchanged with each other coding segment, institute between difference live streaming node It states live streaming node and decoding operate is executed to restore chunk to the coding segment with like-identified ID;
The chunk includes the first chunk and the 2nd chunk.
Preferably, step S7Described in encoding operation be correcting and eleting codes encoding operation, the decoding operate be correcting and eleting codes decode Operation, difference are broadcast live between node for being exchanged with each other coding segment by P2P mode.
Preferably, step S7It is further comprising the steps of:
S8, setting one receive window and one jump window;The reception window and the jump window are ID set, institute It states first identifier ID and belongs to the reception window, the second identifier ID belongs to the jump window;
S9, the live streaming node after the coding segment for receiving a target chunk, detect the target chunk's Whether mark ID belongs to the reception window or the jump window;
If the mark ID of the target chunk is not belonging to the reception window and the jump window, the mesh is abandoned Mark the coding segment of chunk;
If the mark ID of the target chunk belongs to the reception window, decoding behaviour is executed to the target chunk Make, and increases the minimum value of the reception window and the jump window;
If the mark ID of the target chunk belongs to the jump window, the reception window and the jump are modified The minimum value of window, and the mark ID of the target chunk is made to belong to modified reception window.
The positive effect of the present invention is that: the present invention passes through to the chunk that video data is written in main live streaming source station It is switched to from spare live streaming source station and the chunk of video data is wherein written behind new main live streaming source station marks different marks respectively ID, and difference is set between the mark ID before and after active-standby switch, thus write-in video data before and after guaranteeing active-standby switch Chunk has different mark ID, thus avoid the occurrence of chunk mark ID is identical and situation that the content of chunk is different, into And be not in any conflict between the different chunk before and after making active-standby switch, the coding segment in different chunk will not be by It puts together decoding, guarantee normally completes P2P live streaming.
Detailed description of the invention
Fig. 1 is the module diagram of the holding system for the video data consistency that the P2P of the embodiment of the present invention 1 is broadcast live.
Fig. 2 is the module diagram of the holding system for the video data consistency that the P2P of the embodiment of the present invention 2 is broadcast live.
Fig. 3 is the flow chart of the keeping method for the video data consistency that the P2P of the embodiment of the present invention 3 is broadcast live.
Fig. 4 is the flow chart of the keeping method for the video data consistency that the P2P of the embodiment of the present invention 4 is broadcast live.
Specific embodiment
The present invention is further illustrated below by the mode of embodiment, but does not therefore limit the present invention to the reality It applies among a range.
Embodiment 1
As shown in Figure 1, the holding system for the video data consistency that the P2P of the present embodiment is broadcast live includes a main live source Stand 1 and at least one spare live streaming source station 2;
Wherein, the main live streaming source station 1 can receive video data to be broadcast live, and video data is sequentially written in multiple In one chunk, specifically, the video data to be broadcast live can be obtained by live source by modes such as camera shootings and to pass through certain more Media transmission protocol (including but not limited to RTMP) is by the video data transmission to be broadcast live to the main live streaming source station 1.
The main live streaming source station 1 (can be indicated more using each first chunk setting first identifier ID is followed successively by from increasing ID The first identifier ID of a first chunk is followed successively by from increasing ID), it is described from increasing ID i.e. and indicate for current first chunk imparting the After one ID value, when assigning ID value for next chunk, the ID value assigned again can increase automatically on the basis of the first ID value Add.
During the specific implementation of the present embodiment, it is assumed that the main live streaming source station 1 needs to write video data into 10 It is 1 from the initial ID value for increasing ID, then the first identifier ID of 10 the first chunk can be denoted as respectively in first chunk Chunk_1, chunk_2, chunk_3, chunk_4, chunk_5, chunk_6, chunk_7, chunk_8, chunk_9 and chunk_10;
The first identifier ID of each first chunk is also synchronized to that described at least one is spare straight by the main live streaming source station 1 Broadcast in source station 2, in this way, it is each it is spare live streaming source station 2 in can synchronous recording write-in video data the first chunk first ID is identified, so as to know that main live streaming source station 1 described in current time generates the progress of chunk.
Wherein, in this embodiment, it is preferred that, in the mark ID of synchronized update chunk, real-time update is not needed, it can To synchronize update with a lower frequency, for example, it is primary per several seconds synchronized updates.Specifically, the main live streaming source station 1 Periodically the first identifier ID of each first chunk can be synchronized in spare live streaming source station with a lower frequency.
When delay machine is broken down in the main live streaming source station 1, the master of live streaming source station is may be implemented in holding system of the invention Standby switching specifically can choose the spare live streaming source station of a target and be switched to from least one described spare live streaming source station 2 New main live streaming source station;And main live streaming source station before is then correspondingly transformed to a spare live streaming source station;
The new main live source standing-meeting continues to the video data to be broadcast live, and video data is sequentially written in In multiple 2nd chunk, and (multiple second are indicated using each 2nd chunk setting second identifier ID is followed successively by from increasing ID The second identifier ID of chunk is from increasing ID);Wherein, the minimum value of the second identifier ID is greater than the first identifier ID most Big value;
During the specific implementation of the present embodiment, since the first identifier ID of 10 the first chunk before can distinguish Be denoted as chunk_1, chunk_2, chunk_3, chunk_4, chunk_5, chunk_6, chunk_7, chunk_8, chunk_9 and Chunk_10, the i.e. maximum value of first identifier ID are chunk_10;
Assuming that the mark ID of chunk_1 is synchronized in spare live streaming source station 2 by main live streaming source station 1 at a certain moment, Zhi Houzhu Source station 1 is broadcast live, delay machine occurs.New main live streaming source station only knows that chunk_1 was once generated, but does not know chunk_2 extremely The presence of chunk_10.But it knows that the speed of main live streaming source station 1 generation chunk will not be too fast simultaneously, marks updating from last time 10 chunks can about be generated till now by knowing ID, and the probability for generating 100 chunks is small to can be ignored.
It is preferred that the new optional minimum value for taking second identifier ID in main live streaming source station be chunk_101 (when So, can be chosen according to actual needs), it is assumed that the new main live streaming source station also needs to write video data into 10 In 2nd chunk, then the second identifier ID of 10 the 2nd chunk respectively is: chunk_101, chunk_102, chunk_ 103, chunk_104, chunk_105, chunk_106, chunk_107, chunk_108, chunk_109 and chunk_110;
Equally, the second identifier ID of each 2nd chunk is also synchronized to other spare straight by the new main live streaming source station Broadcast source station;Certainly, the new main live streaming source station can also be with a lower frequency periodically by the of each 2nd chunk Two mark ID are synchronized in spare live streaming source station.
In this embodiment, it is preferred that the minimum value of the second identifier ID and the maximum value of the first identifier ID are full The following comparison of foot:
C2>C1+(ΔT*R)/Csize
Wherein C2Indicate the minimum value of the second identifier ID, C1Indicate the institute that the new main live streaming source station was synchronized The maximum value of first identifier ID is stated, Δ T expression, which is broken down from the main live streaming source station to the spare live streaming source station of the target, cuts The time interval being changed between new main live streaming source station, R indicate the code rate write video data into the first chunk, CsizeIndicate the capacity of the first chunk.And it is highly preferred that the minimum value and described the of the second identifier ID can be set Difference ratio (Δ T*R)/C of the maximum value of one mark IDsizeIt is at least order of magnitude greater.
The minimum value of the second identifier ID and the maximum value of the first identifier ID are limited by above-mentioned comparison Between size, so that it may guarantee break down from the main live streaming source station to the spare live streaming source station of the target be switched to it is new It is not in that initial main live streaming source station and later new main live streaming source station assign in time interval between main live streaming source station Chunk the identical situation of mark ID, that is, avoid occur chunk mark ID is identical and feelings that the content of chunk is different Condition, so that being not in any conflict between different chunk before and after active-standby switch.
As shown in Figure 1, in this embodiment, it is preferred that, the holding system can also include multiple live streaming nodes 3 with it is more A Edge Server 4, the main live streaming source station 1 is also by the multiple first chunk (certainly, the including each first chunk One mark ID) it is distributed to the multiple Edge Server 4;The new main live streaming source station also by the multiple 2nd chunk (when So, the second identifier ID including each 2nd chunk) it is distributed to the Edge Server 4.
The Edge Server 4 be used to execute encoding operation to each chunk for receiving with generate it is multiple with it is described Chunk has the coding segment of like-identified ID, and coding segment is sent to live streaming node 4 (specifically can be to a live streaming Node 4 sends a coding segment), difference is broadcast live between node 4 for being exchanged with each other and sharing coding segment, the live streaming section Point 3 is then for executing decoding operate to the coding segment with like-identified ID to restore chunk;Wherein, the chunk includes First chunk and the 2nd chunk.
And preferably, the encoding operation can be (n, k) correcting and eleting codes encoding operation, the decoding operate can for (n, K) correcting and eleting codes decoding operate, difference are broadcast live between node 3 then for coding segment to be exchanged with each other and shared by P2P mode.
For a specific example, it is assumed that two Edge Servers C and D, when initial, C and D are to initial main live source Stand 1 request data, i.e., the described main live streaming source station 1 can by video data is wherein written the first chunk (i.e. chunk_1, Chunk_2 ...) successively it is distributed to C and D, it is assumed that and after a period of time has passed, break down delay machine for the main live streaming source station 1, This first chunk of chunk_10 is dispensed to Edge Server C, but is not distributed to Edge Server D also, then at this time quite Possess this 10 the first chunk of chunk_1 to chunk_10 in Edge Server C, and Edge Server D only possesses chunk_1 To this 9 the first chunk of chunk_9;
When initial main live streaming source station 1 is broken down, has a spare live streaming source station 2 and be switched to new main live source It stands, and since initial main live streaming source station 1 is not in real time by the first chunk and its first identifier ID synchronized update to spare Source station 2 is broadcast live, it is assumed that before delay machine is broken down in main live streaming source station 1, be only by the first identifier ID of the 9th the first chunk Chunk_9 is synchronized to spare live streaming source station 2, and spare live streaming source station 2 is not aware that current newest first chunk is the tenth First chunk does not know that the first identifier ID of current newest first chunk is chunk_10;
At this moment, when a spare live streaming source station 2 is switched to new main live streaming source station, due to remembering in new main live streaming source station The newest first identifier ID of first chunk of record is chunk_9 (that is, maximum value of first identifier ID), theoretically its meeting Come to assign second identifier ID to the 2nd chunk since chunk_10, in the present invention, in order to avoid such case generation, meeting The value that the minimum value of second identifier ID is modified on the basis of maximum value (chunk_9) of first identifier ID, i.e., can be first A sufficiently large increment, such as 92 are superimposed on the basis of the maximum value of mark ID, then, in the new main live streaming source station In, when writing video data into the 2nd chunk, the second identifier ID of the 2nd chunk can carry out assignment since 101, i.e., At this time in the new main live streaming source station, the minimum value of the second identifier ID of the 2nd chunk is chunk_101, wherein The second identifier ID that 10 the 2nd chunk of video data are written respectively is: chunk_101, chunk_102, chunk_ 103, chunk_104, chunk_105, chunk_106, chunk_107, chunk_108, chunk_109 and chunk_110;
Equally, Edge Server C and D can be changed to new main live streaming source station request data at this time, then new main live streaming 10 the 2nd chunk that video data is wherein written can be distributed to Edge Server C and D by source station;
Finally, chunk_1 to chunk_10 this 10 the first chunk and chunk_101 are possessed in Edge Server C extremely Then possessing in this 10 the 2nd chunk of chunk_110, Edge Server D has this 9 the first chunk of chunk_1 to chunk_9 And chunk_101 to chunk_110 this 10 the 2nd chunk;To which in Edge Server C and D, mark ID is less than or equal to The chunk of chunk_9 is all from initial main live streaming source station, and mark ID is all from new more than or equal to the chunk of chunk_101 Main live streaming source station, and the second identifier ID of the 2nd chunk can't be assigned a value of chunk_10 by new main live streaming source station, i.e., originally The mark ID in embodiment being not in two chunk is all chunk_10 but wherein content and different situation, thus really Having protected between the different chunk that active and standby live streaming source station switching front and back generates is not in any conflict, is guaranteed from initial master The coding segment in different chunk in live streaming source station and new main live streaming source station can put together decoding, and then guarantee is just Often complete P2P live streaming.
Embodiment 2
As shown in Fig. 2, the holding system for the video data consistency that the P2P of the present embodiment is broadcast live and the basic phase of embodiment 1 Together, the difference is that: the holding system of the video data consistency of the P2P of the present embodiment live streaming further includes being deployed in live streaming section The window setting module 5 of point;
A reception window and a jump window can be arranged in the window setting module 5;The reception window and the jump Window is ID set, and the first identifier ID belongs to the reception window, and the second identifier ID belongs to the jump Window, wherein the window setting module 5 the reception window and the jump window can be arranged in the multiple live streaming In node 3.
During the specific implementation of the present embodiment, referring to embodiment 1, it is assumed that live streaming node is receiving chunk_1's Segment is encoded, then [chunk_1, chunk_50] can be set by the reception window, in this way, any one is in the recent period by leading The first identifier ID for the first chunk (such as chunk_1 to chunk_10) that live streaming source station 1 generates each falls within the reception window Set in;[chunk_51, chunk_200] can be set by the jump window simultaneously, in this way, if live streaming source station exists Switch (i.e. one spare live streaming source station is switched to new main live streaming source station) in the recent period, and the second of new main live streaming source station generation Chunk second identifier ID (such as chunk_101 to chunk_110) each fall within it is described jump window set in;
The target can be detected after the coding segment for receiving a target chunk for each live streaming node Whether the mark ID of chunk belongs to the reception window or the jump window, is then executed not according to different testing results Same subsequent operation, specifically,
If the mark ID of the target chunk had both been not belonging to the reception window or had been not belonging to the jump window, lose Abandon the coding segment of the target chunk;
If the mark ID of the target chunk belongs to the reception window, receive the target chunk, such as target Chunk can be decoded, then execute decoding operate to the target chunk, and increase the reception window and the jump The minimum value of jump window, while keeping the difference of the reception window and maximum value and minimum value in the jump window not Become, moves forward the reception window and jump window to realize.For example, it is assumed that current reception window be [chunk_1, Chunk_50], and the window that jumps is [chunk_51, chunk_200];Live streaming node receives the coding segment of chunk_1, sentences Disconnected chunk_1 can be decoded, then execute decoding to chunk_1, at the same will receive window move forward for [chunk_2, Chunk_51], jump window is moved forward as [chunk_52, chunk_201].
If the mark ID of the target chunk belongs to the jump window, the reception window and the jump are modified The minimum value of window, and the mark ID of the target chunk is made to belong to modified reception window, equally, the reception window The difference of mouth and maximum value and minimum value in the jump window is always maintained at constant.For example, it is assumed that the target chunk Mark ID is chunk_105, belongs to the jump window [chunk_51, chunk_200] at this time, then described in just modifying at this time The minimum value of window and the jump window is received, for example, the minimum value for receiving window is revised as chunk_101, it will The minimum value of the jump window is revised as chunk_151, it is preferable that can keep the reception window and the jump window Difference between middle maximum value and minimum value is constant, then, modified reception window is [chunk_101, chunk_150], Modified jump window is [chunk_151, chunk_300], at this point, the mark ID of the target chunk is dropped into In modified reception window.
This testing result of the jump window is belonged to for the mark ID of the target chunk, usually there are two types of possibility Situation will lead to this result: the playback progress of the live streaming node is too slow, needs catch-up playback progress forward;Or the master Active-standby switch has occurred in live streaming source station and the spare live streaming source station.In the present embodiment, it is not necessary to above-mentioned two situations are distinguished, and It is to execute subsequent operation using identical means: it is considered that the currently playing progress of the live streaming node falls behind significantly In real-time live broadcast content, thus window and jump window will be received and moved forward simultaneously, received so that the live streaming node is newest Target chunk mark ID fall in receive window in.That is: the backwardness number being no longer attempt in decoding recovery primary reception window According to, but be absorbed in reception and restore newest video data content.At this moment, since the tag in the chunk that is resumed is in the time May not be continuous on axis, perhaps user will appear the jump of content in viewing.But less generation under the circumstances, and be broadcast live User generally pays close attention to newest content, it is usually the case that can be easily accepted by a user.
Embodiment 3
The video that the keeping method of the video data consistency of the P2P live streaming of the present embodiment is broadcast live using the P2P of embodiment 1 The holding system of data consistency is realized, as shown in figure 3, the keeping method of the video data consistency of P2P live streaming includes Following steps:
Step 101, main live streaming source station receive video data to be broadcast live, and video data are sequentially written in multiple first In chunk;
Step 102, the main live streaming source station utilize from increasing ID and are followed successively by each first chunk setting first identifier ID, and The first identifier ID of each first chunk is synchronized at least one spare live streaming source station;
Step 103, when the main live streaming source station is broken down, choose one from least one described spare live streaming source station The spare live streaming source station of target is simultaneously switched to new main live streaming source station;
Step 104, the new main live streaming source station continue to the video data to be broadcast live, and by video data according to In secondary multiple 2nd chunk of write-in;
Step 105, the new main live streaming source station inquire the maximum value of the first identifier ID, and successively using increasing ID certainly For each 2nd chunk, second identifier ID is set;The minimum value of the second identifier ID is greater than the maximum of the first identifier ID Value;
The second identifier ID of each 2nd chunk is synchronized to other spare straight by step 106, the new main live streaming source station Broadcast source station;
The multiple first chunk is distributed to the multiple live streaming node by step 107, the main live streaming source station;It is described The multiple 2nd chunk is distributed to the multiple live streaming node by new main live streaming source station.
Wherein, in step 105, the minimum value of the second identifier ID and the maximum value of the first identifier ID meet such as Lower comparison:
C2>C1+(ΔT*R)/Csize
Wherein C2Indicate the minimum value of the second identifier ID, C1Indicate the institute that the new main live streaming source station was synchronized The maximum value of first identifier ID is stated, Δ T expression, which is broken down from the main live streaming source station to the spare live streaming source station of the target, cuts The time interval being changed between new main live streaming source station, R indicate the code rate write video data into the first chunk, CsizeIndicate the capacity of the first chunk.And, it is preferable that the minimum value and the first identifier of the second identifier ID Difference ratio (Δ T*R)/C of the maximum value of IDsizeIt is at least order of magnitude greater.
In addition, the preferably described main live streaming source station can be with a lower frequency Timing Synchronization each in step 102 The first identifier ID of one chunk, new main live streaming source station can be every with a lower frequency Timing Synchronization described in step 106 The second identifier ID of a 2nd chunk.
Embodiment 4
The video that the keeping method of the video data consistency of the P2P live streaming of the present embodiment is broadcast live using the P2P of embodiment 2 The holding system of data consistency is realized, as shown in figure 4, the keeping method of the video data consistency of P2P live streaming includes Following steps:
Step 201, main live streaming source station receive video data to be broadcast live, and video data are sequentially written in multiple first In chunk;
Step 202, the main live streaming source station utilize from increasing ID and are followed successively by each first chunk setting first identifier ID, and The first identifier ID of each first chunk is synchronized at least one spare live streaming source station;
Step 203, when the main live streaming source station is broken down, choose one from least one described spare live streaming source station The spare live streaming source station of target is simultaneously switched to new main live streaming source station;
Step 204, the new main live streaming source station continue to the video data to be broadcast live, and by video data according to In secondary multiple 2nd chunk of write-in;
Step 205, the new main live streaming source station inquire the maximum value of the first identifier ID, and successively using increasing ID certainly For each 2nd chunk, second identifier ID is set;The minimum value of the second identifier ID is greater than the maximum of the first identifier ID Value;
The second identifier ID of each 2nd chunk is synchronized to other spare straight by step 206, the new main live streaming source station Broadcast source station;
The multiple first chunk is distributed to multiple Edge Servers by step 207, the main live streaming source station, described new Main live streaming source station the multiple 2nd chunk is distributed to the multiple Edge Server;
The Edge Server encoding operation is executed to each chunk with generate it is multiple with the chunk with identical mark Know the coding segment of ID, and coding segment is sent to live streaming node, is exchanged with each other coding segment, institute between difference live streaming node It states live streaming node and decoding operate is executed to restore chunk to the coding segment with like-identified ID;The chunk includes described First chunk and the 2nd chunk.
Wherein, in step 207, it is preferable that the encoding operation is correcting and eleting codes encoding operation, and the decoding operate is to entangle A yard decoding operate is deleted, is used to be exchanged with each other coding segment by P2P mode between difference live streaming node.
Step 208 receives window and a jump window in live streaming node setting one;The reception window and the jump window Mouth is ID set, and the first identifier ID belongs to the reception window, and the second identifier ID belongs to the jump window Mouthful;
Step 209, the live streaming node detect the target after the coding segment for receiving a target chunk Whether the mark ID of chunk belongs to the reception window or the jump window, is then executed not according to different testing results Same subsequent operation.
Specifically,
If the mark ID of the target chunk is not belonging to the reception window and the jump window, the mesh is abandoned Mark the coding segment of chunk;
If the mark ID of the target chunk belongs to the reception window, decoding behaviour is executed to the target chunk Make, and increase the minimum value of the reception window and the jump window, correspondingly to move forward the reception window and institute State jump window;
If the mark ID of the target chunk belongs to the jump window, the reception window and the jump are modified The minimum value of window, and the mark ID of the target chunk is made to belong to modified reception window.
Although specific embodiments of the present invention have been described above, it will be appreciated by those of skill in the art that these It is merely illustrative of, protection scope of the present invention is defined by the appended claims.Those skilled in the art is not carrying on the back Under the premise of from the principle and substance of the present invention, many changes and modifications may be made, but these are changed Protection scope of the present invention is each fallen with modification.

Claims (14)

1. a kind of holding system of the video data consistency of P2P live streaming, which is characterized in that including a main live streaming source station and extremely A few spare live streaming source station;
Video data is sequentially written in multiple first chunk for receiving video data to be broadcast live by the main live streaming source station In;
The main live streaming source station is also used to be followed successively by each first chunk setting first identifier ID using from increasing ID, and will be each The first identifier ID of first chunk is synchronized at least one described spare live streaming source station;
When the main live streaming source station is broken down, the spare live streaming of a target is chosen from least one described spare live streaming source station Source station is simultaneously switched to new main live streaming source station;
The new main live streaming source station is used to continue to the video data to be broadcast live, and video data is sequentially written in more In a 2nd chunk;
The new main live streaming source station is also used to inquire the maximum value of the first identifier ID, and each using being followed successively by from increasing ID Second identifier ID is arranged in 2nd chunk;The minimum value of the second identifier ID is greater than the maximum value of the first identifier ID;
The holding system further includes multiple Edge Servers and multiple live streaming nodes;
The main live streaming source station is also used to for the multiple first chunk being distributed to the multiple Edge Server, described new Main live streaming source station is also used to the multiple 2nd chunk being distributed to the multiple Edge Server;
The Edge Server be used to execute encoding operation to each chunk with generate it is multiple with the chunk with identical mark Know the coding segment of ID, and coding segment is sent to live streaming node, is used to be exchanged with each other coded slice between difference live streaming node Section, the live streaming node are used to execute decoding operate to the coding segment with like-identified ID to restore chunk;
The chunk includes the first chunk and the 2nd chunk;
The holding system further includes window setting module, and the window setting module receives window and a jump for being arranged one Window;The reception window and the jump window are ID set, and the first identifier ID belongs to the reception window, institute It states second identifier ID and belongs to the jump window;
The live streaming node is used for after the coding segment for receiving a target chunk, detects the mark of the target chunk Whether ID belongs to the reception window or the jump window;
If the mark ID of the target chunk is not belonging to the reception window and the jump window, the target is abandoned The coding segment of chunk;
If the mark ID of the target chunk belongs to the reception window, decoding operate is executed to the target chunk, and Increase the minimum value of the reception window and the jump window;
If the mark ID of the target chunk belongs to the jump window, the reception window and the jump window are modified Minimum value, and the mark ID of the target chunk is made to belong to modified reception window.
2. the holding system of the video data consistency of P2P as described in claim 1 live streaming, which is characterized in that described new Main live streaming source station is also used to the second identifier ID of each 2nd chunk being synchronized to other spare live streaming source stations.
3. the holding system of the video data consistency of P2P live streaming as described in claim 1, which is characterized in that described second The maximum value of the minimum value and the first identifier ID that identify ID meets following comparison:
C2>C1+(ΔT*R)/Csize
Wherein C2Indicate the minimum value of the second identifier ID, C1Indicate that the new main live streaming source station was synchronized described the The maximum value of one mark ID, Δ T expression, which is broken down from the main live streaming source station to the spare live streaming source station of the target, to be switched to Time interval between new main live streaming source station, R indicate the code rate write video data into the first chunk, CsizeTable Show the capacity of the first chunk.
4. the holding system of the video data consistency of P2P live streaming as claimed in claim 3, which is characterized in that described second Identify difference ratio (Δ T*R)/C of the minimum value of ID and the maximum value of the first identifier IDsizeIt is at least order of magnitude greater.
5. the holding system of the video data consistency of P2P live streaming as described in claim 1, which is characterized in that the master is straight Broadcast first identifier ID of the source station for each first chunk of Timing Synchronization.
6. the holding system of the video data consistency of P2P as claimed in claim 2 live streaming, which is characterized in that described new Main live streaming source station is used for the second identifier ID of each 2nd chunk of Timing Synchronization.
7. the holding system of the video data consistency of P2P live streaming as described in claim 1, which is characterized in that the coding Operation is correcting and eleting codes encoding operation, and the decoding operate is correcting and eleting codes decoding operate, and difference is broadcast live between node for passing through P2P Mode is exchanged with each other coding segment.
8. a kind of keeping method of the video data consistency of P2P live streaming, which comprises the following steps:
S1, main live streaming source station receives video data to be broadcast live, and video data is sequentially written in multiple first chunk;
S2, the main live streaming source station utilize and be followed successively by each first chunk setting first identifier ID from increasing ID, and by each first The first identifier ID of chunk is synchronized at least one spare live streaming source station;
S3, when the main live streaming source station is broken down, it is spare straight that a target is chosen from least one described spare live streaming source station It broadcasts source station and is switched to new main live streaming source station;
S4, the new main live streaming source station continues to the video data to be broadcast live, and video data is sequentially written in multiple In 2nd chunk;
S5, the new main live streaming source station inquires the maximum value of the first identifier ID, and is followed successively by each second using from increasing ID Second identifier ID is arranged in chunk;The minimum value of the second identifier ID is greater than the maximum value of the first identifier ID;
Step S5Later further include:
S7, the main live streaming source station the multiple first chunk is distributed to multiple Edge Servers, the new main live source It stands and the multiple 2nd chunk is distributed to the multiple Edge Server;
The Edge Server, which executes encoding operation to each chunk, has like-identified ID to generate the multiple and chunk Coding segment, and coding segment is sent to live streaming node, coding segment is exchanged with each other between difference live streaming nodes, it is described straight It broadcasts node and decoding operate is executed to restore chunk to the coding segment with like-identified ID;
The chunk includes the first chunk and the 2nd chunk;
Step S7It is further comprising the steps of:
S8, setting one receive window and one jump window;The reception window and the jump window are ID set, and described the One mark ID belongs to the reception window, and the second identifier ID belongs to the jump window;
S9, the live streaming node after the coding segment for receiving a target chunk, detect the mark ID of the target chunk Whether the reception window or the jump window are belonged to;
If the mark ID of the target chunk is not belonging to the reception window and the jump window, the target is abandoned The coding segment of chunk;
If the mark ID of the target chunk belongs to the reception window, decoding operate is executed to the target chunk, and Increase the minimum value of the reception window and the jump window;
If the mark ID of the target chunk belongs to the jump window, the reception window and the jump window are modified Minimum value, and the mark ID of the target chunk is made to belong to modified reception window.
9. the keeping method of the video data consistency of P2P live streaming as claimed in claim 8, which is characterized in that step S5Later Further include:
S6, the new main live streaming source station second identifier ID of each 2nd chunk is synchronized to other spare live streaming source stations.
10. the keeping method of the video data consistency of P2P live streaming as claimed in claim 8, which is characterized in that described second The maximum value of the minimum value and the first identifier ID that identify ID meets following comparison:
C2>C1+(ΔT*R)/Csize
Wherein C2Indicate the minimum value of the second identifier ID, C1Indicate that the new main live streaming source station was synchronized described the The maximum value of one mark ID, Δ T expression, which is broken down from the main live streaming source station to the spare live streaming source station of the target, to be switched to Time interval between new main live streaming source station, R indicate the code rate write video data into the first chunk, CsizeTable Show the capacity of the first chunk.
11. the keeping method of the video data consistency of P2P as claimed in claim 10 live streaming, which is characterized in that described the Difference ratio (Δ T*R)/C of the maximum value of the minimum value and first identifier ID of two mark IDsizeIt is at least order of magnitude greater.
12. the keeping method of the video data consistency of P2P live streaming as claimed in claim 8, which is characterized in that step S2In The first identifier ID of each first chunk of main live source station Timing Synchronization.
13. the keeping method of the video data consistency of P2P live streaming as claimed in claim 9, which is characterized in that step S6In The second identifier ID of new each 2nd chunk of main live source station Timing Synchronization.
14. the keeping method of the video data consistency of P2P live streaming as claimed in claim 8, which is characterized in that step S7In The encoding operation is correcting and eleting codes encoding operation, and the decoding operate is correcting and eleting codes decoding operate, is used between difference live streaming node In being exchanged with each other coding segment by P2P mode.
CN201610696712.0A 2016-08-19 2016-08-19 The holding system and method for the video data consistency of P2P live streaming Active CN106791884B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610696712.0A CN106791884B (en) 2016-08-19 2016-08-19 The holding system and method for the video data consistency of P2P live streaming

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610696712.0A CN106791884B (en) 2016-08-19 2016-08-19 The holding system and method for the video data consistency of P2P live streaming

Publications (2)

Publication Number Publication Date
CN106791884A CN106791884A (en) 2017-05-31
CN106791884B true CN106791884B (en) 2019-11-19

Family

ID=58972342

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610696712.0A Active CN106791884B (en) 2016-08-19 2016-08-19 The holding system and method for the video data consistency of P2P live streaming

Country Status (1)

Country Link
CN (1) CN106791884B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109309670B (en) * 2018-09-07 2021-02-12 深圳市网心科技有限公司 Data stream decoding method and system, electronic device and computer readable storage medium
CN109640106B (en) * 2018-12-10 2022-02-15 网宿科技股份有限公司 Multi-source station switching method and device of live broadcast system
CN110769266A (en) * 2019-10-22 2020-02-07 山东云缦智能科技有限公司 Method for realizing high availability and high concurrency of CMAF low-delay live broadcast
CN114040218B (en) * 2021-11-08 2023-07-21 北京量子之歌科技有限公司 Live video switching method, device, equipment and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101729909A (en) * 2008-10-23 2010-06-09 华为技术有限公司 Streaming media business processing method, device and system
CN103281356A (en) * 2013-05-03 2013-09-04 青岛海信传媒网络技术有限公司 File distribution method and system
CN103905917A (en) * 2012-12-27 2014-07-02 中国科学院声学研究所 Double windows based client fragment scheduling method and system
CN104283933A (en) * 2013-07-12 2015-01-14 腾讯科技(深圳)有限公司 Data downloading method, client-side and system

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI501614B (en) * 2012-10-23 2015-09-21 Univ Nat Sun Yat Sen Symmetric Dynamic Authentication and Key Exchange System and Its
US9426079B2 (en) * 2013-09-04 2016-08-23 Broadcom Corporation Retransmission and memory consumption tracking of data packets in a network device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101729909A (en) * 2008-10-23 2010-06-09 华为技术有限公司 Streaming media business processing method, device and system
CN103905917A (en) * 2012-12-27 2014-07-02 中国科学院声学研究所 Double windows based client fragment scheduling method and system
CN103281356A (en) * 2013-05-03 2013-09-04 青岛海信传媒网络技术有限公司 File distribution method and system
CN104283933A (en) * 2013-07-12 2015-01-14 腾讯科技(深圳)有限公司 Data downloading method, client-side and system

Also Published As

Publication number Publication date
CN106791884A (en) 2017-05-31

Similar Documents

Publication Publication Date Title
CN106791884B (en) The holding system and method for the video data consistency of P2P live streaming
KR102486777B1 (en) Establishment and use of temporal mapping based on interpolation using low-rate fingerprinting to facilitate frame-accurate content modification
CA2976437C (en) Methods and apparatus for reducing latency shift in switching between distinct content streams
CN110012300B (en) Video live broadcasting method and device
US8705511B2 (en) System and method for synchronous transmission of content
US8943215B2 (en) Distributed smooth streaming utilizing dynamic manifests
CN102713883B (en) Audio segmentation is carried out with the compulsory frame sign of codec
CN101102312B (en) A network communication data processing method, network communication system and client
CN104969560A (en) Determining available media data for network streaming
TWI513238B (en) Synchro-content broadcast delivery system
CN111372145B (en) Viewpoint switching method and system for multi-viewpoint video
TW202123718A (en) Dynamic reduction in playout of replacement content to help align end of replacement content with end of replaced content
CN107533449B (en) Using motion location information to control ultra-wide video display in stadium settings
CN104581366A (en) Internet television broadcasting method and server
CN102857730A (en) Method and system for caching frame data
CN102547395A (en) Method and device for determining video data source of network player
US20180288466A1 (en) Methods and systems for discovery and/or synchronization
US10715880B2 (en) Method for creation and distribution of segmented video over distributed multicast-aware sparse networks with low latency
CN111368005A (en) Data processing method, device and equipment based on block chain and readable storage medium
CN107070923B (en) P2P live broadcast system and method for reducing code segment repetition
CN117714532A (en) Data information pushing method based on Timeline model, gateway and related equipment
US10728161B2 (en) Method and apparatus for transmitting and receiving packet in communication system
CN114900707B (en) Live broadcast method and system
EP2077524B1 (en) Push-pull based content delivery system
CN106998478B (en) Offset correction method and device for current playlist of smart television

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant