CN102082794A - Real-time play method and equipment - Google Patents
Real-time play method and equipment Download PDFInfo
- Publication number
- CN102082794A CN102082794A CN2011100003909A CN201110000390A CN102082794A CN 102082794 A CN102082794 A CN 102082794A CN 2011100003909 A CN2011100003909 A CN 2011100003909A CN 201110000390 A CN201110000390 A CN 201110000390A CN 102082794 A CN102082794 A CN 102082794A
- Authority
- CN
- China
- Prior art keywords
- client
- server
- group leader
- real
- group
- 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.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 29
- 238000001514 detection method Methods 0.000 claims description 3
- 230000005540 biological transmission Effects 0.000 description 6
- 238000010586 diagram Methods 0.000 description 4
- 238000005516 engineering process Methods 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 230000006837 decompression Effects 0.000 description 1
- 230000007547 defect Effects 0.000 description 1
- 238000012544 monitoring process Methods 0.000 description 1
Images
Landscapes
- Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)
Abstract
The invention relates to a real-time play method and real-time play equipment. The method comprises the following steps that: A, a server selects one of a plurality of clients as a client group leader and acquires a port number of user datagram protocol (UDP) broadcast of the client group leader; B, the server transmits a real-time play instruction to the plurality of clients, transmits a group leader label to the client group leader and transmits the port number of the UDP broadcast of the client group leader to client members in a group; C, the client group leader establishes connection with the server; and D, the client group leader receives video data from the server and broadcasts the received video data to the client members in the group through the UDP broadcast during real-time play. By implementing the technical scheme provided by the invention, a bandwidth can be utilized well, the load of a backbone network is reduced, and the possibility of congestion of the backbone network is reduced.
Description
Technical Field
The present invention relates to the field of network data transmission technologies, and in particular, to a real-time playing method and a playing device.
Background
The stream media is also called as stream media, which means that a merchant uses a video transmission server to send programs as data packets and transmits the data packets to a network, after a user decompresses the data through decompression equipment, the programs can be displayed as before being sent, the user can request and download high-quality music and MTV at any time and any place on terminal equipment of a client, watch and listen to live programs of a television station, enjoy wonderful television drama and movie films, experience fierce sports events, realize remote real-time monitoring and traffic road condition inquiry and develop special applications of various industries. When real-time playing and video returning are carried out, the system ensures the real-time performance of the video by using a streaming media technology.
However, in the existing playing method, the server generally transmits the video data packets to the plurality of clients through the backbone network, but the pressure of the backbone network is very large, and the possibility of congestion of the backbone network is increased.
Disclosure of Invention
The technical problem to be solved by the present invention is to provide a real-time playing method, which can reduce the pressure of the backbone network and reduce the possibility of congestion, aiming at the defects that the above backbone network in the prior art has high pressure and increases the possibility of congestion.
The technical scheme adopted by the invention for solving the technical problems is as follows: a real-time playing method is constructed, and is characterized by comprising the following steps:
A. the server selects one of the clients as a client group leader, and acquires a UDP (user Datagram protocol) broadcast port number of the client group leader;
B. the server sends real-time playing instructions to a plurality of clients, simultaneously sends group leader marks to client group leaders, and sends UDP broadcast port numbers of the client group leaders to client members in the group;
C. the client group leader establishes connection with the server;
D. during real-time playing, the client group leader receives video data from the server, and simultaneously broadcasts the received video data to the client members in the group through a UDP protocol.
In the real-time playing method of the present invention, after the step D, the method further includes:
E. and the client members in the group establish connection with the server and return the received video data to the server.
In the real-time playing method of the present invention, the step E includes:
E1. the server establishes connection with the client members in the group;
E2. the server sends a video return instruction to the client;
E3. the client members in the group transmit the received video data back to the server.
In the real-time playing method of the present invention, in step E2:
when the client member detects any one of the following conditions: and when the power supply fails and the temperature exceeds the preset value and is damaged, the server sends a video return instruction to the client.
In the real-time playing method of the present invention, in the step C, the client group leader establishes a connection with the server through a TCP/IP protocol.
In the real-time playing method of the present invention, in the step E, the client members in the group establish a connection with the server through the TCP/IP protocol.
In the real-time playing method, the server selects one of the clients as the client group leader through a random algorithm.
The invention also constructs a real-time playing device, which comprises a server and a plurality of clients, wherein the server comprises:
the selection module is used for selecting one of the clients as a client group leader and acquiring a UDP (user Datagram protocol) broadcast port number of the client group leader;
the server first sending module is used for sending real-time playing instructions to a plurality of clients, sending a group leader mark to a client group leader and sending a UDP (user datagram protocol) broadcast port number of the client group leader to client members in a group;
the server connection module is used for establishing connection with the client group leader;
the second sending module of the server is used for sending the video data to the client group leader;
the plurality of clients comprise client group leaders and client members; wherein,
the client group leader comprises:
the group leader first receiving module is used for receiving a real-time playing instruction and a group leader mark from the server during real-time playing;
the group leader connection module is used for establishing connection with the server;
a group leader second receiving module for receiving the video data from the server;
a group leader sending module for broadcasting the received video data to the client members in the group through a UDP protocol;
each client member includes:
the first receiving module of member is used for receiving the real-time playing instruction from the server and the UDP broadcast port number of the client group leader during the real-time playing;
and the second receiving module is used for receiving the video data broadcast by the client group leader through the UDP protocol.
In the real-time playing device of the present invention, the server further includes:
the third sending module of the server is used for sending a video return instruction to the client member;
the client member further comprises:
the member connection module is used for establishing connection with the server;
and the member returning module is used for returning the received video data to the server when receiving the video returning instruction.
In the real-time playing device of the present invention, the client member further includes:
and the detection module is used for detecting the power failure, the temperature exceeding a preset value and the occurrence of the damaged condition of the client member.
Firstly, the server transmits video data to be played in real time to a preselected client group leader; the client group leader then broadcasts the received video data to other clients over UDP. The video data is played in real time in an inter-group forwarding mode, so that the transmission between the client group leader and the server is guaranteed one-to-one transmission, and then the data is transmitted by broadcasting the group leader in a point-to-multiple mode in the group, so that the bandwidth can be well utilized, the pressure of a backbone network is reduced, and the possibility of congestion of the backbone network is reduced.
Drawings
The invention will be further described with reference to the accompanying drawings and examples, in which:
FIG. 1 is a flowchart of a first embodiment of a real-time playing method according to the present invention;
FIG. 2 is a flowchart of a second embodiment of a real-time playing method according to the present invention;
FIG. 3 is a logic diagram of a first embodiment of a real-time playback device according to the present invention;
fig. 4 is a logic diagram of a second embodiment of the real-time playing device according to the present invention.
Detailed Description
As shown in fig. 1, in a flowchart of a first embodiment of a real-time playing method according to the present invention, the real-time playing method includes:
s101, a server selects one of a plurality of clients as a client group leader, and acquires a UDP (user Datagram protocol) broadcast port number of the client group leader;
s102, a server sends real-time playing instructions to a plurality of clients, simultaneously sends group leader marks to client group leaders, and sends UDP (user datagram protocol) broadcast port numbers of the client group leaders to client members in a group;
s103, establishing connection between a client group leader and a server;
and S104, during real-time playing, the client group leader receives the video data from the server, and simultaneously broadcasts the received video data to the client members in the group through a UDP protocol.
The technical scheme of the embodiment is implemented, firstly, the server transmits the video data to be played in real time to a client group leader which is selected in advance; the client group leader then broadcasts the received video data to other clients over UDP. The video data is played in real time in an inter-group forwarding mode, so that the transmission between the client group leader and the server is guaranteed one-to-one transmission, and then the data is transmitted by broadcasting the group leader in a point-to-multiple mode in the group, so that the bandwidth can be well utilized, the pressure of a backbone network is reduced, and the possibility of congestion of the backbone network is reduced.
Preferably, in step S103, the client group leader establishes a connection with the server through the TCP/IP protocol.
In the flowchart of fig. 2 illustrating the real-time playing method according to the second embodiment of the present invention, compared with the method according to the first embodiment, steps S101 to S104 are the same, and are not described herein again, and only different parts are described below: after step S104, the method further includes:
and step S105, the client members in the group establish connection with the server and return the received video data to the server.
Preferably, step S105 may include the steps of:
s1051, a server establishes connection with client members in a group;
s1052, the server sends a video return instruction to the client, in an embodiment, if any of the following occurs to a client member: when the power supply fails and the temperature exceeds a preset value and is damaged, the server sends a video return instruction after knowing the condition of the client;
and S1053, the client members in the group transmit the received video data back to the server.
In the above embodiment, the server establishes a connection with a client member within the group, preferably via the TCP/IP protocol.
Preferably, a client group leader may be selected from the plurality of clients based on a random algorithm, so that the network condition of the selected client group leader is better.
Fig. 3 is a logic diagram of a first embodiment of a real-time playing device according to the present invention, where the playing device includes: the system comprises a server 100 and a plurality of clients 200 and 300, wherein the server 100 comprises a selection module 101, a first server sending module 102, a server connection module 103 and a second server sending module 104 which are sequentially connected; the client 200 is a client group leader selected by the server 100, and comprises a group leader first receiving module 201, a group leader connecting module 202, a group leader second receiving module 203 and a group leader sending module 204 which are connected in sequence; the client 300 is a client member and comprises a member first receiving module 301 and a member second receiving module 302 which are connected. It should be noted that, although only one client member is shown in this embodiment, the number of the client members is not limited in the present invention, and may be any number, and the logical structure of other client members is the same as the logical structure of the client member 300, which is not described herein again.
In the server 100, a selection module 101 is configured to select one of the multiple clients as a client group leader, and obtain a port number of a UDP broadcast by the client group leader; the first server sending module 102 is configured to send a real-time playing instruction to multiple clients, send a group leader flag to the client group leader 200, and send a UDP broadcast port number of the client group leader to the client members 300 in the group; the server connection module 103 is used for establishing connection with the client group leader 200; the second sending module 104 of the server is used for sending the video data to the client group leader 200.
In the client group leader 200, a first group leader receiving module 201 is configured to receive a real-time playing instruction and a group leader mark from the server 100 during real-time playing; the group leader connection module 202 is configured to establish a connection with the server 100; the group leader second receiving module 203 is used for receiving the video data from the server 100; the group leader sending module 204 is configured to broadcast the received video data to the client members 300 in the group via UDP;
in the client member 300, the first member receiving module 301 is configured to receive a real-time playing instruction from the server 100 and a UDP broadcast port number of the client group leader 200 during real-time playing; the member second receiving module 302 is configured to receive video data broadcast by the client group leader 200 through the UDP protocol.
In the real-time playing device of this embodiment, the selection module 101 of the server 100 selects one of the plurality of clients as the client group leader 200, and obtains the UDP broadcast port number of the client group leader 200; a first sending module 102 of the server 100 sends a real-time playing instruction to a plurality of clients 200 and 300, and simultaneously sends a group leader mark to a client group leader 200, and sends a UDP broadcast port number of the client group leader 200 to client members 300 in a group, a group leader first receiving module 201 receives the real-time playing instruction and the group leader mark, and a member first receiving module 301 receives the real-time playing instruction and the UDP broadcast port number of the client group leader 200; the group leader connection module 202 establishes connection with the server connection module 103; during real-time playing, the second server sending module 104 sends video data to the client group leader 200, the second group leader receiving module 203 receives the video data from the server 100, and meanwhile, the group leader sending module 204 broadcasts the received video data to the client members 300 in the group via the UDP protocol, and the second member receiving module 302 can receive the video data.
In the logic diagram of the second embodiment of the real-time playing device shown in fig. 4, compared with the first embodiment shown in fig. 3, the server 100 further includes: a third sending module 105 of the server, configured to send a video return instruction to the client member; the client member 300 further includes: a member connection module 303, configured to establish a connection with a server; and the member returning module 304 is configured to return the received video data to the server when the video returning instruction is received.
Preferably, the client member 300 further comprises a detection module for detecting a power failure, a temperature exceeding a preset value, and a damage condition of the client member.
The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention should be included in the scope of the claims of the present invention.
Claims (10)
1. A real-time playing method, comprising:
A. the server selects one of the clients as a client group leader, and acquires a UDP (user Datagram protocol) broadcast port number of the client group leader;
B. the server sends real-time playing instructions to a plurality of clients, simultaneously sends group leader marks to client group leaders, and sends UDP broadcast port numbers of the client group leaders to client members in the group;
C. the client group leader establishes connection with the server;
D. during real-time playing, the client group leader receives video data from the server, and simultaneously broadcasts the received video data to the client members in the group through a UDP protocol.
2. The real-time playing method according to claim 1, further comprising, after step D:
E. and the client members in the group establish connection with the server and return the received video data to the server.
3. The real-time playing method according to claim 2, wherein the step E comprises:
E1. the server establishes connection with the client members in the group;
E2. the server sends a video return instruction to the client;
E3. the client members in the group transmit the received video data back to the server.
4. The real-time playing method according to claim 3, wherein in step E2:
when the client member detects any one of the following conditions: and when the power supply fails and the temperature exceeds the preset value and is damaged, the server sends a video return instruction to the client.
5. The real-time playing method according to any one of claims 1 to 4, wherein in the step C, the client group leader establishes a connection with the server through TCP/IP protocol.
6. The real-time playing method according to any one of claims 2 to 4, wherein in step E, the client members in the group establish connection with the server through TCP/IP protocol.
7. The real-time playing method according to claim 1, wherein the server selects one of the plurality of clients as the client group leader by a random algorithm.
8. A real-time playing device, comprising a server and a plurality of clients, wherein the server comprises:
the selection module is used for selecting one of the clients as a client group leader and acquiring a UDP (user Datagram protocol) broadcast port number of the client group leader;
the server first sending module is used for sending real-time playing instructions to a plurality of clients, sending a group leader mark to a client group leader and sending a UDP (user datagram protocol) broadcast port number of the client group leader to client members in a group;
the server connection module is used for establishing connection with the client group leader;
the second sending module of the server is used for sending the video data to the client group leader;
the plurality of clients comprise client group leaders and client members; wherein,
the client group leader comprises:
the group leader first receiving module is used for receiving a real-time playing instruction and a group leader mark from the server during real-time playing;
the group leader connection module is used for establishing connection with the server;
a group leader second receiving module for receiving the video data from the server;
a group leader sending module for broadcasting the received video data to the client members in the group through a UDP protocol;
each client member includes:
the first receiving module of member is used for receiving the real-time playing instruction from the server and the UDP broadcast port number of the client group leader during the real-time playing;
and the second receiving module is used for receiving the video data broadcast by the client group leader through the UDP protocol.
9. The real-time playback device of claim 8,
the server further comprises:
the third sending module of the server is used for sending a video return instruction to the client member;
the client member further comprises:
the member connection module is used for establishing connection with the server;
and the member returning module is used for returning the received video data to the server when receiving the video returning instruction.
10. The real-time playing device of claim 9, wherein the client member further comprises:
and the detection module is used for detecting the power failure, the temperature exceeding a preset value and the occurrence of the damaged condition of the client member.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN2011100003909A CN102082794A (en) | 2011-01-04 | 2011-01-04 | Real-time play method and equipment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN2011100003909A CN102082794A (en) | 2011-01-04 | 2011-01-04 | Real-time play method and equipment |
Publications (1)
Publication Number | Publication Date |
---|---|
CN102082794A true CN102082794A (en) | 2011-06-01 |
Family
ID=44088546
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN2011100003909A Pending CN102082794A (en) | 2011-01-04 | 2011-01-04 | Real-time play method and equipment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN102082794A (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102752643A (en) * | 2012-06-11 | 2012-10-24 | 苏州阔地网络科技有限公司 | Method and system for stream media live broadcast |
CN106331795A (en) * | 2016-08-11 | 2017-01-11 | 乐视控股(北京)有限公司 | Data preview method, data preview system, server and preview device |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1363066A (en) * | 2000-01-17 | 2002-08-07 | Egc&C株式会社 | System and method for providing Internet broadcasting data based on hierarchical structure |
CN1633109A (en) * | 2005-01-20 | 2005-06-29 | 杨金钰 | A flow media system |
WO2008132557A1 (en) * | 2007-04-26 | 2008-11-06 | Videob Holdings Limited | Method for broadcasting data to multiple clients over a computer network |
CN101374059A (en) * | 2007-08-20 | 2009-02-25 | 深圳Tcl工业研究院有限公司 | Multimedia broadcast method, system and medium source equipment |
-
2011
- 2011-01-04 CN CN2011100003909A patent/CN102082794A/en active Pending
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1363066A (en) * | 2000-01-17 | 2002-08-07 | Egc&C株式会社 | System and method for providing Internet broadcasting data based on hierarchical structure |
CN1633109A (en) * | 2005-01-20 | 2005-06-29 | 杨金钰 | A flow media system |
WO2008132557A1 (en) * | 2007-04-26 | 2008-11-06 | Videob Holdings Limited | Method for broadcasting data to multiple clients over a computer network |
CN101374059A (en) * | 2007-08-20 | 2009-02-25 | 深圳Tcl工业研究院有限公司 | Multimedia broadcast method, system and medium source equipment |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102752643A (en) * | 2012-06-11 | 2012-10-24 | 苏州阔地网络科技有限公司 | Method and system for stream media live broadcast |
CN106331795A (en) * | 2016-08-11 | 2017-01-11 | 乐视控股(北京)有限公司 | Data preview method, data preview system, server and preview device |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP6419235B2 (en) | Apparatus for receiving data in a digital broadcasting system | |
US8837488B2 (en) | Two tier multiple sliding window mechanism for multidestination media applications | |
CN105187847B (en) | A kind of distributed network live telecast method, apparatus, video gateway and system | |
US8661491B1 (en) | Methods using base content and additive content and related client devices and network server devices | |
US8542682B2 (en) | Systems and methods for media distribution | |
US20130294747A1 (en) | Content playing device, content playing method, distribution system, content playing program, recording medium, and data structure | |
JP2017500805A (en) | Session management and control procedures to support multiple groups of sink devices in a peer-to-peer wireless display system | |
CN102075338A (en) | Distributed network-based live broadcasting method and device | |
US9749702B2 (en) | Limited chain relay with virtual peer for multimedia distribution | |
CN101969431B (en) | Method for implementing unicast and multicast seamless switching for streaming media play | |
JP2011146942A (en) | Satellite receiving apparatus and communication method | |
EP2649794A1 (en) | Method and apparatus for managing content distribution over multiple terminal devices in collaborative media system | |
CN106464938B (en) | Method for providing heterogeneous network based broadcast service | |
JP2010161550A (en) | Image content reception device and image content reception method | |
US9215567B2 (en) | Local area broadcasting service system and method, and wireless transmission device applied therein | |
CN103685314A (en) | Method for achieving seamless switching of unicast and multicast of stream media playing | |
CN102082794A (en) | Real-time play method and equipment | |
CN105007500A (en) | Video transmission method and device | |
CN101989977A (en) | Method, device, server and system for implementing rich media real-time services | |
EP3089459B1 (en) | Apparatus and method for implementing video-on-demand quick switching among multiple screens | |
JP2010278803A (en) | Packet receiving device and packet transmitting / receiving device | |
EP3386203A1 (en) | Signalling of auxiliary content for a broadcast signal | |
US11444863B2 (en) | Leveraging actual cable network usage | |
KR20130040098A (en) | Apparatus and method for transmitting and receiving network flow control information in a communication system | |
WO2010096966A1 (en) | Method for switching channel, terminal equipment and channel switching server |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
AD01 | Patent right deemed abandoned |
Effective date of abandoning: 20110601 |
|
C20 | Patent right or utility model deemed to be abandoned or is abandoned |