CN114221886B - Data transmission method and device, streaming media server and sending client - Google Patents

Data transmission method and device, streaming media server and sending client Download PDF

Info

Publication number
CN114221886B
CN114221886B CN202111574541.1A CN202111574541A CN114221886B CN 114221886 B CN114221886 B CN 114221886B CN 202111574541 A CN202111574541 A CN 202111574541A CN 114221886 B CN114221886 B CN 114221886B
Authority
CN
China
Prior art keywords
streaming media
stage
media server
client
server
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
CN202111574541.1A
Other languages
Chinese (zh)
Other versions
CN114221886A (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.)
Hangzhou Miluoxing Technology Group Co ltd
Original Assignee
Hangzhou Miluoxing Technology Group 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 Hangzhou Miluoxing Technology Group Co ltd filed Critical Hangzhou Miluoxing Technology Group Co ltd
Priority to CN202111574541.1A priority Critical patent/CN114221886B/en
Publication of CN114221886A publication Critical patent/CN114221886A/en
Application granted granted Critical
Publication of CN114221886B publication Critical patent/CN114221886B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • H04L43/0852Delays
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/17Interaction among intermediate nodes, e.g. hop by hop

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Environmental & Geological Engineering (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)
  • Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)

Abstract

The embodiment of the invention provides a data transmission method, a device, a streaming media server and a sending client, which relate to the field of streaming media transmission and are applied to any streaming media server in a multi-level streaming media server, wherein the method comprises the following steps: sending a sender message to a post-stage device of a streaming media server; receiving a receiver message returned by the later-stage equipment aiming at the sender message; calculating a second network time delay between the streaming media server and the latter-stage equipment according to the sender message and the receiver message; according to the first network time delay and the second network time delay which are obtained in advance between the sending client and the streaming media server, the current-stage network time delay between the sending client and the later-stage equipment is calculated; and forwarding the streaming media data to be transmitted to the receiving client step by step based on the network delay of the present stage. By adopting the method, the real-time performance of network delay detection can be improved, and the monitoring of the data transmission state can be enhanced.

Description

Data transmission method and device, streaming media server and sending client
Technical Field
The present invention relates to the field of streaming media transmission, and in particular, to a data transmission method, a data transmission device, a streaming media server and a sending client.
Background
Today, the development of the internet is very new, the application scene of real-time audio and video tends to be diversified and complicated, and a simple end-to-end model can not meet the transmission requirement of streaming media data.
In the conventional transmission model, according to the calculation method of calculating RTT (Round-Trip Time) and unidirectional network delay according to SR (Sender Reports)/RR (Receiver Reports), only the delay of two adjacent nodes can be calculated, and the end-to-end network delay containing a plurality of media service nodes in the middle cannot be calculated, so that the process of data transmission cannot be monitored in real Time, and the data transmission effect is affected.
Disclosure of Invention
The embodiment of the invention provides a data transmission method, a data transmission device, a streaming media server and a sending client, which can improve the real-time performance of network time delay detection and enhance the monitoring of a data transmission state.
In a first aspect, an embodiment of the present invention provides a data transmission method, which is applied to any one of multiple streaming media servers, including:
sending a sender message to a post-stage device of the streaming media server;
Receiving a receiver message returned by the latter equipment aiming at the sender message;
calculating a second network time delay between the streaming media server and the latter-stage equipment according to the sender message and the receiver message;
according to the first network time delay between the sending client and the streaming media server and the second network time delay which are acquired in advance, calculating the current-stage network time delay between the sending client and the later-stage equipment;
and based on the local network delay, forwarding the streaming media data to be transmitted to a receiving client step by step.
Optionally, before the calculating the local network delay between the client and the streaming media server according to the pre-acquired first network delay between the sending client and the streaming media server and the second network delay, the method further includes:
receiving a first application data packet sent by a front-end device of the streaming media server, wherein the first application data packet comprises: the first network delay and the streaming media data.
Optionally, if the streaming media server is a first-stage streaming media server, the former-stage device is the sending client; or if the streaming media server is any streaming media server after the first-stage streaming media server, the former-stage device is any streaming media server before the streaming media server.
Optionally, if the subsequent device is a next-stage media server after the streaming media server, forwarding the streaming media data to the receiving client step by step based on the local network delay includes:
sending a second application data packet to the next-stage streaming media server, wherein the second application data packet comprises: the second application data packet is configured to enable the next-stage streaming media server to forward the streaming media data to the receiving client stage by stage based on the local network delay.
Optionally, if the later-stage device is a receiving client, forwarding the streaming media data step by step to the receiving client based on the local network delay includes:
transmitting a third application data packet to the receiving client, wherein the third application data packet comprises: the local network delay in the third application data packet is used for indicating the network delay between the sending client and the receiving client.
In a second aspect, an embodiment of the present invention further provides a data transmission method, applied to a sending client, including:
Sending a sender message to a first-stage streaming media server in the multi-stage streaming media servers;
receiving a receiver message returned by the first-level streaming media server aiming at the sender message;
according to the sender message and the receiver message, calculating the local network time delay between the sending client and the first-level streaming media server;
transmitting an application data packet to the first-stage streaming media server, wherein the application data packet comprises: the application data packet is used for enabling the first-stage streaming media server to forward the streaming media data to a receiving client stage by stage based on the local network delay.
In a third aspect, an embodiment of the present invention further provides a data transmission device, which is applied to any one of the streaming media servers, where the device includes:
the first sending module is used for sending a sender message to the post-stage equipment of the streaming media server;
the first receiving module is used for receiving a receiver message returned by the latter equipment aiming at the sender message;
the first processing module is used for calculating second network time delay between the streaming media server and the latter-stage equipment according to the sender message and the receiver message; according to the first network time delay between the sending client and the streaming media server and the second network time delay which are acquired in advance, calculating the current-stage network time delay between the sending client and the later-stage equipment; and based on the local network delay, forwarding the streaming media data to be transmitted to a receiving client step by step.
In a fourth aspect, an embodiment of the present invention further provides a data transmission device, applied to a sending client, where the device includes:
the second sending module is used for sending a sender message to a first-stage streaming media server in the multi-stage streaming media servers;
the second receiving module is used for receiving a receiver message returned by the first-level streaming media server aiming at the sender message;
the second processing module is used for calculating the local network time delay between the sending client and the first-level streaming media server according to the sender message and the receiver message; transmitting an application data packet to the first-stage streaming media server, wherein the application data packet comprises: the application data packet is used for enabling the first-stage streaming media server to forward the streaming media data to a receiving client stage by stage based on the local network delay.
In a fifth aspect, an embodiment of the present invention further provides a streaming media server, including: the first transmitter, the first receiver and the first processor are connected through the first bus;
The first transmitter is configured to send a sender message to a subsequent device of the streaming media server;
the first receiver is configured to receive a receiver packet returned by the subsequent device for the sender packet;
the first processor is configured to calculate a second network delay between the streaming media server and the subsequent device according to the sender packet and the receiver packet; according to the first network time delay between the sending client and the streaming media server and the second network time delay which are acquired in advance, calculating the current-stage network time delay between the sending client and the later-stage equipment; and based on the local network delay, forwarding the streaming media data to be transmitted to a receiving client step by step.
In a sixth aspect, an embodiment of the present invention further provides a sending client, including: the second transmitter, the second receiver, the second processor and the second bus are connected through the second bus;
the second transmitter is configured to send a sender message to a first-stage streaming media server in the multi-stage streaming media servers;
The second receiver is configured to receive a receiver packet returned by the first-level streaming media server for the sender packet;
the second processor is configured to calculate a local network delay between the sending client and the first-level streaming media server according to the sender message and the receiver message; transmitting an application data packet to the first-stage streaming media server, wherein the application data packet comprises: the application data packet is used for enabling the first-stage streaming media server to forward the streaming media data to a receiving client stage by stage based on the local network delay.
Compared with the prior art, the method and the device have the advantages that the network time delay between the current streaming media server and the later-stage device is calculated through the sender message and the receiver message between the current streaming media server and the later-stage device, then the network time delay between the sending client and the later-stage device can be obtained according to the network time delay between the pre-obtained sending client and the current streaming media server, the multi-stage streaming media data can be transmitted from the sending client to the receiving client step by step based on the network time delay, the network time delay between the ends, containing the multi-stage streaming media server, of the multi-stage streaming media server can be calculated in the data transmission process, the network time delay can be detected in real time in the data transmission process, the data transmission process can be monitored more flexibly, the timeliness of the data transmission process is guaranteed, and network congestion is avoided.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings that are needed in the embodiments will be briefly described below, it being understood that the following drawings only illustrate some embodiments of the present invention and therefore should not be considered as limiting the scope, and other related drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 is a diagram of a streaming media transmission system according to the present invention;
fig. 2 is a schematic flow chart of a data transmission method provided by the invention;
fig. 3 is a schematic flow chart of another data transmission method according to the present invention;
fig. 4 is a schematic flow chart of another data transmission method according to the present invention;
fig. 5 is a schematic flow chart of another data transmission method according to the present invention;
fig. 6 is a schematic flow chart of another data transmission method according to the present invention;
fig. 7 is a schematic diagram of a data transmission device according to the present invention;
fig. 8 is a schematic diagram of another data transmission device according to the present invention;
fig. 9 is a schematic diagram of a streaming media server according to the present invention;
fig. 10 is a schematic diagram of a sending client according to the present invention.
Icon: 1000, a first sending module; 2000, a first receiving module; 3000, a first processing module; 4000, a second sending module; 5000, a second receiving module; 6000, a second processing module; 10, streaming media server; 11, a first transmitter; 12, a first receiver; 13, a first processor; 14, a first bus; 20, sending the client; a second transmitter 21; 22, a second receiver; 23, a second processor; 24, a second bus; 30, receiving the client.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the embodiments of the present invention more apparent, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention, and it is apparent that the described embodiments are some embodiments of the present invention, but not all embodiments of the present invention. The components of the embodiments of the present invention generally described and illustrated in the figures herein may be arranged and designed in a wide variety of different configurations.
Thus, the following detailed description of the embodiments of the invention, as presented in the figures, is not intended to limit the scope of the invention, as claimed, but is merely representative of selected embodiments of the invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
It should be noted that: like reference numerals and letters denote like items in the following figures, and thus once an item is defined in one figure, no further definition or explanation thereof is necessary in the following figures.
Before explaining the present invention in detail, an application scenario of the present invention will be described.
For streaming media transmission, real-time transmission of data is critical. The streaming media transmission is different from the traditional single data transmission service, and has the characteristics of time delay sensitivity, large data volume and the like. In order to meet the Real-time transmission of streaming media data with large data volume, RTP (Real-time Transport Protocol ) and RTCP (Real-time Transport Control Protocol, real-time transport control protocol) are commonly used in combination. RTP works on transmissions between a single sender and a single receiver or between a sender and multiple receivers, and its associated RTCP provides transport control functions for RTP.
In order to solve the problems of excessive pressure of a terminal, network partitioning and long-distance transmission accessed by a user, a multi-node SFU (Selective Forwarding Unit) communication architecture containing Proxy is derived. In order to monitor data of a transmission system including a plurality of streaming media nodes, since the conventional method can only calculate the time delay between two adjacent nodes, the time delay data of a transmitting end and a receiving end of an interval multi-level streaming media server cannot be transmitted to each other.
Based on this, the invention provides a data transmission method, a device, a streaming media server and a sending client, wherein the middle multi-stage streaming media server is regarded as a node, and two nodes which are connected in a similar way form P2P (Peer to Peer) connection, so that the sending client can transmit time delay data to a receiving client after spacing the multi-stage streaming media server, and the monitoring in streaming media data transmission is facilitated. The data transmission method provided by the embodiments of the present invention may be executed by a streaming media server, or may be executed by a sending client, where the streaming media server may be set up by a mobile communication device or a desktop computer device, and the sending client may be a mobile communication device or a desktop computer device.
The following is an explanation of various embodiments with reference to the drawings. Fig. 1 is a diagram of a streaming media transmission system provided by the present invention, as shown in fig. 1, where the streaming media transmission system includes: streaming server 10, sending client 20, receiving client 30. Wherein the number of the streaming media servers 10 is N, and N is more than or equal to 1. The sending client 20 sends the streaming media data, which passes through one or more streaming media servers 10 in the middle and is finally transmitted to the receiving client 30. The sending client 20 and the receiving client 30 mainly realize the receiving and subsequent decoding and playing of the streaming media data, and the middle streaming media server 10 mainly realizes the functions of streaming media data transmission rate adjustment and coding rate control. Specifically, when the current streaming media transmission system adopts an SFU communication architecture, the streaming media server 10 in the streaming media transmission system is an SFU server (SFU server), and the SFU server that is not directly connected to the sending client 20 or/and the receiving client 30 may be referred to as a Proxy server, where the Proxy server may forward all requests. In this way, the sending client 20 and the receiving client 30 do not know whether a real client or a server is connected to the client, and can disguise all streaming media servers 10 as clients, so as to implement P2P connection. The unstable time delay in the streaming media transmission can cause unstable time difference of two adjacent data reception to cause jitter of the streaming media transmission, thereby causing disorder of received data. It is therefore desirable to monitor the latency of streaming media data transmission processes in real time.
On the basis of the streaming media transmission system provided in fig. 1, the present invention also provides a possible implementation manner of the data transmission method. Fig. 2 is a schematic flow chart of a data transmission method provided by the invention. As shown in fig. 2, a data transmission method applied to any one of the multi-level streaming media servers includes:
s110, sending the sender message to the latter equipment of the streaming media server.
In the process of streaming media data transmission, the streaming media server 10 constructs an SR (Sender Report) to be sent to a later-stage device, which is used for describing the statistics information of the transmission and reception of the current streaming media server 10 as a Sender member, counting its own sending situation to notify the later-stage device, and the SR packet includes an NTP (Network Time Procotol, network time protocol) timestamp, indicating the time context when the SR packet is sent.
S120, receiving a receiver message returned by the latter-stage equipment aiming at the sender message.
After receiving the SR packet, the postmark device records the LSR (Time of Last Sender Report, 32 bits in the middle of the NTP timestamp) in the SR packet, constructs an RR (Receiver Report) and returns the RR to the streaming server 10 at the previous stage, and the RR packet contains the LSR and the DLSR (Delay since Last Sender Report, the direct time difference between receiving the SR packet and sending the RR packet).
S130, calculating second network time delay between the streaming media server and the latter-stage equipment according to the sender message and the receiver message.
When the current streaming media server 10 sends an SR packet and receives an RR packet returned by the later-stage device, the time when the streaming media server 10 receives the last RR packet is set as R now The last RTT (Round-Trip Time, the network Round-Trip Time between sender and receiver) is:
RTT=R now -R LSR -R DLSR formula (1)
R in formula (1) LSR The intermediate 32 bits of the NTP timestamp in the SR packet received from the streaming server 10 for the next-stage device are stored in the LSR field in the RR packet received by the streaming server 10. R is R DLSR For the delay between the last receiving of the SR packet from the streaming media server 10 to the sending of the RR packet by the subsequent device, the unit is 1/65536 seconds, and the DLSR field is stored in the RR packet received by the streaming media server 10. Thus, the streaming server 10 can calculate the loop time RTT from the RR packet related information fed back by the subsequent device. The second network delay between the streaming server 10 and the subsequent device is RTT/2.
And S140, calculating the local network time delay between the sending client and the subsequent equipment according to the first network time delay and the second network time delay which are acquired in advance between the sending client and the streaming media server.
Assuming that the first network delay between the sending client 20 and the streaming server 10 is t 'and the second network delay is t ", the current level network delay between the sending client 20 and the subsequent device is calculated to be t=t' +t".
And S150, based on the network delay of the current stage, forwarding the streaming media data to be transmitted to the receiving client side step by step.
Based on the local network time delay t between the sending client 20 and the subsequent devices 3 The streaming media data to be transmitted can be forwarded from the later-stage device to the receiving client 30 step by step according to the RTCP protocol, so as to complete the transmission of the data from the sending client 20 to the receiving client 30.
In this embodiment, the network delay between the current streaming media server and the subsequent device is calculated through the sender message and the receiver message between the current streaming media server and the subsequent device, and then the network delay between the sending client and the subsequent device can be obtained according to the network delay between the pre-obtained sending client and the current streaming media server, based on which the multi-level streaming media data can be forwarded from the sending client to the receiving client step by step, and the network delay between the ends with the multi-level streaming media server in the middle can be calculated in the data transmission process, so that the network delay can be detected in real time in the data transmission process, the data transmission process can be monitored more flexibly, the timeliness of the data transmission process can be ensured, and the network congestion can be avoided.
On the basis of the streaming media transmission system provided in fig. 2, the present invention also provides a possible implementation manner of the data transmission method. Fig. 3 is a flow chart of another data transmission method provided by the invention. As shown in fig. 3, in S140 of the above method, before calculating the local network delay between the sending client and the subsequent device according to the first network delay and the second network delay between the sending client and the streaming media server, the method further includes:
s135, receiving a first application data packet sent by a front-end device of the streaming media server.
The first application data packet includes: first network delay and streaming media data.
In order to transmit the data information of the first network delay, the current streaming server 10 receives a first application data packet (APP, application-Defined RTCP Packet) sent by a previous device, where APP represents an application specific function report, and may be customized by a user. The first APP packet includes a first network delay between the pre-device to the streaming server 10 and streaming data transmitted by the sending client 20 to the receiving client 30.
Optionally, if the streaming media server is a first-stage streaming media server, the former-stage device is a sending client; or if the streaming media server is any streaming media server after the first-stage streaming media server, the former-stage device is any streaming media server before the streaming media server.
In this embodiment, if the streaming media server 10 is a first-stage streaming media server, the former-stage device is the sending client 20, that is, the first APP packet includes a first network delay between the sending client 20 and the directly connected first-stage streaming media server and streaming media data that the sending client 20 needs to transmit to the receiving client 30;
if the streaming media Server 10 is any streaming media Server after the first-stage streaming media Server, the former-stage device is any streaming media Server before the streaming media Server 10, the connection between the former-stage device and the streaming media Server 10 is the connection between the servers, and the connection between the former-stage device and the streaming media Server 10 is made to form a P2P connection by the SFU communication architecture including Proxy Server, and the first APP packet includes the first network delay between the two-stage streaming media servers 10 and the streaming media data that the sending client 20 needs to transmit to the receiving client 30.
In this embodiment, after the network delay is calculated according to the SR/RR packet, the end-to-end network delay including a plurality of service nodes can be calculated by transmitting the custom APP packet with the previous network delay to the next streaming media server, so as to facilitate monitoring in streaming media transmission.
On the basis of the streaming media transmission system provided in fig. 2, the present invention also provides a possible implementation manner of the data transmission method. Fig. 4 is a flow chart of another data transmission method provided by the invention. As shown in fig. 4, the method includes:
s210, if the latter equipment is the next media server after the streaming media server, the streaming media data is forwarded to the receiving client step by step based on the local network delay.
And S215, sending a second application data packet to the next-stage streaming media server.
The second application data packet includes: the second application data packet is used for enabling the next-stage streaming media server to forward the streaming media data to the receiving client stage by stage based on the current-stage network delay.
In this embodiment, if the subsequent device is the next-stage media server after the streaming media server 10, the current streaming media server 10 sends a second APP packet to the next-stage connected streaming media server, where the second APP packet includes the local network delay between the sending client 20 and the next-stage streaming media server and streaming media data to be transmitted, and the next-stage streaming media server will accumulate step by step based on the local network delay to obtain the network delay between the sending client 20 and the receiving client 30, and forward the streaming media data step by step to the receiving client 30.
In this embodiment, through the current-stage network delay between the sending client and the next-stage streaming media server, and accumulating step by step until the streaming media data is transmitted to the receiving client, the end-to-end network delay including a plurality of server nodes can be calculated, so that delay calculation in streaming media data transmission is realized, and adjustment of the transmission rate based on the network delay is facilitated.
On the basis of the streaming media transmission system provided in fig. 2, the present invention also provides a possible implementation manner of the data transmission method. Fig. 5 is a flow chart of another data transmission method provided by the invention. As shown in fig. 5, the method includes:
and S310, if the latter-stage equipment is a receiving client, forwarding the streaming media data to the receiving client step by step based on the current-stage network delay.
S315, the third application data packet is sent to the receiving client.
The third application data packet includes: the local network delay in the third application data packet is used for indicating the network delay between the sending client and the receiving client.
In this embodiment, if the subsequent device of the current streaming media server 10 is a receiving client, the local network delay between the sending client 20 and the subsequent device is the network delay between the sending client 20 and the receiving client 30. The third APP packet between the streaming server 10 and the receiving client 30 includes the network delay between the transmitting client 20 and the receiving client 30 and the streaming data that the transmitting client 20 needs to transmit.
In this embodiment, the current streaming media server is a server directly connected to the receiving client, and by directly transmitting the APP packet with the current network delay to the receiving client, the end-to-end network delay including a plurality of server nodes can be calculated, which improves the flexibility of streaming media data transmission, and is not limited to the transmission between the sending end and the receiving end.
The invention also provides a possible implementation mode of the data transmission method based on the streaming media transmission system provided by the figure 1. Fig. 6 is a schematic flow chart of a data transmission method provided by the invention. As shown in fig. 6, a data transmission method applied to a sending client includes:
s410, sending a sender message to a first-stage streaming media server in the multi-stage streaming media servers.
When the method is executed by the transmitting client 20, an SR packet is transmitted to a first-stage streaming server directly connected to the transmitting client 20 in the multi-stage streaming server 10, and the SR packet includes an NTP timestamp indicating a time context when the SR packet is transmitted.
S420, receiving a receiver message returned by the first-stage streaming media server for the sending message.
After sending the SR packet to the first-level streaming server, the first-level streaming server constructs an RR packet, and returns the RR packet to the sending client 20, where the RR packet includes the LSR and the DLSR.
S430, according to the sender message and the receiver message, the local network time delay between the sending client and the first-stage streaming media server is calculated.
R 'from SR packets and RR packets' LSR And R'. DLSR In combination with the time R at which the sending client 20 received the RR packet now The present level network delay RTT' between the sending client 20 and the first level streaming server can be calculated according to formula (2).
RTT′=R now -R′ LSR -R′ DLSR Formula (2)
S440, sending the application data packet to the first-level streaming media server.
The application data packet includes: the method comprises the steps of local network time delay and streaming media data to be transmitted, wherein an application data packet is used for enabling a first-stage streaming media server to forward the streaming media data to a receiving client step by step based on the local network time delay.
Specifically, after calculating the local network time delay RTT 'between the sending client 20 and the first-stage streaming media server, the sending client 20 installs RTT' and the streaming media data to be transmitted, which needs to be transmitted to the receiving client 30, in an APP packet and sends the RTT 'to the first-stage streaming media server, and the first streaming media server may forward the streaming media data to the receiving client 30 step by step according to the RTT' in the APP packet, and may superimpose the network time delay in the forwarding APP packet, so as to finally obtain the network time delay between the sending client 20, which includes a plurality of streaming media servers 10 in the middle, and the receiving client 30. In one possible implementation, the network rate during transmission may be adjusted later in time depending on the network delay.
In this embodiment, the sending client sends the SR packet to the connected first-stage streaming media server, calculates the network delay between the sending client and the first-stage streaming media server according to the returned RR packet, and simultaneously sends the network delay to the first-stage streaming media server through the APP packet, so that the first-stage streaming media server can forward the streaming media data to the receiving client step by step according to the network delay in the APP packet and the streaming media data to be forwarded, and finally obtains the network delay from the sending client to the receiving client, thereby completing the data transmission, enabling the transmission process of the streaming media data to be monitored, and facilitating the judgment of the current network congestion situation.
Alternatively, in one possible implementation manner, the current streaming system includes a sending client 20, n streaming servers 10 and a receiving client 30; wherein N is more than or equal to 2.
In the current streaming media transmission system, the transmitting client 20 transmits a first SR packet to a first-stage streaming media server connected to the transmitting client 20, and the first-stage streaming media server returns a first RR packet to the transmitting client 20, and calculates a network delay t from the transmitting client 20 to the first-stage streaming media server according to the first SR packet and the first RR packet S1 Let t S1 =t 1 The sending client 20 loads t 1 The first APP packet of the (a) is sent to a first-stage streaming media server;
the first-stage streaming media server sends a second SR packet to a second-stage streaming media server connected with the first-stage streaming media server, the second-stage streaming media server returns a second RR packet to the first-stage streaming media server, and network time delay t between the first-stage streaming media server and the second-stage streaming media server is calculated according to the second SR packet and the second RR packet 2 The method comprises the steps of carrying out a first treatment on the surface of the Meanwhile, the first-level streaming media server handles t 1 And t 2 Adding and loading a second APP packet to send to a second-stage streaming media server; the network delay t between the sending client 20 and the second-level streaming server S2 =t 1 +t 2
Similarly, the nth streaming server receives the NAPP packet from the nth-1 streaming server, and loads the network delay t from the transmitting client 20 to the nth streaming server SN
Figure BDA0003424820160000121
Then when the nth stage streaming media server and the receiving client 30 complete the transmission of the n+1st SR/RR packet, the network time delay t between the nth stage streaming media server and the receiving client 30 is calculated N+1 The method comprises the steps of carrying out a first treatment on the surface of the The N-th streaming media server sends an n+1th APP packet toReceiving client 30, network delay t loading transmitting client 20 to receiving client 30 SR
Figure BDA0003424820160000122
Based on the method, the network time delay between the ends of the multi-stage streaming media server can be calculated, and the whole streaming media data transmission can be monitored conveniently.
Fig. 7 is a schematic diagram of a data transmission device provided by the present invention, as shown in fig. 7, the data transmission device is applied to any streaming media server of a multi-level streaming media server, and includes:
a first sending module 1000, configured to send a sender message to a device at a later stage of the streaming media server;
a first receiving module 2000, configured to receive a receiver packet returned by the subsequent device for the sender packet;
a first processing module 3000, configured to calculate a second network delay between the streaming media server and the subsequent device according to the sender packet and the receiver packet; according to the first network time delay and the second network time delay which are obtained in advance between the sending client and the streaming media server, the current-stage network time delay between the sending client and the later-stage equipment is calculated; and forwarding the streaming media data to be transmitted to the receiving client step by step based on the network delay of the present stage.
Optionally, the first processing module 3000 is specifically further configured to receive a first application data packet sent by a front-end device of the streaming media server, where the first application data packet includes: first network delay and streaming media data.
Optionally, the first processing module 3000 is specifically further configured to, if the streaming media server is a first-stage streaming media server, enable the former-stage device to be a sending client; or if the streaming media server is any streaming media server after the first-stage streaming media server, the former-stage device is the streaming media server before the first-stage streaming media server.
Optionally, the first processing module 3000 is specifically further configured to forward, if the subsequent device is a next-stage media server after the streaming media server, the streaming media data to the receiving client stage by stage based on the local network delay, including: transmitting a second application data packet to the next-stage streaming media server, wherein the second application data packet comprises: the second application data packet is used for enabling the next-stage streaming media server to forward the streaming media data to the receiving client stage by stage based on the current-stage network delay.
Optionally, the first processing module 3000 is specifically further configured to forward, if the subsequent device is a receiving client, the streaming media data to the receiving client step by step based on the current network delay, where the processing module includes: transmitting a third application data packet to the receiving client, the third application data packet comprising: the local network delay in the third application data packet is used for indicating the network delay between the sending client and the receiving client.
Fig. 8 is a schematic diagram of another data transmission device provided by the present invention, as shown in fig. 8, where the data transmission device is applied to a sending client, and includes:
the second sending module 4000 is configured to send a sender message to a first-stage streaming media server in the multi-stage streaming media servers;
a second receiving module 5000, configured to receive a receiver packet returned by the first-level streaming media server for the sender packet;
the second processing module 6000 is configured to calculate a local network delay between the sending client and the first-level streaming media server according to the sender message and the receiver message; transmitting an application data packet to the first-stage streaming media server, wherein the application data packet comprises: the application data packet is used for enabling the first-stage streaming media server to forward the streaming media data to a receiving client stage by stage based on the local network delay.
The above modules may be one or more integrated circuits configured to implement the above methods, for example: one or more application specific integrated circuits (Application Specific Integrated Circuit, abbreviated as ASIC), or one or more digital signal processors (Digital Singnal Processor, abbreviated as DSP), or one or more field programmable gate arrays (Field Programmable Gate Array, abbreviated as FPGA), etc. For another example, when a module above is implemented in the form of a processing element scheduler code, the processing element may be a general-purpose processor, such as a central processing unit (Central Processing Unit, CPU) or other processor that may invoke the program code. For another example, the modules may be integrated together and implemented in the form of a System-on-a-Chip (SOC).
Fig. 9 is a schematic diagram of a streaming media server according to the present invention, where the streaming media server may be a computing device or a server with a computing function.
The streaming server 10 includes: the first transmitter 11, the first receiver 12, the first processor 13 and the first bus 14, the first transmitter 11, the first receiver 12 and the first processor 13 being connected by the first bus 14;
a first sender 11, configured to send a sender message to a subsequent device of the streaming media server;
a first receiver 12, configured to receive a receiver packet returned by the subsequent device for the sender packet;
a first processor 13, configured to calculate a second network delay between the streaming media server and the subsequent device according to the sender message and the receiver message; according to the first network time delay and the second network time delay which are obtained in advance between the sending client and the streaming media server, the current-stage network time delay between the sending client and the later-stage equipment is calculated; and forwarding the streaming media data to be transmitted to the receiving client step by step based on the network delay of the present stage.
Optionally, the first processor 13 is specifically further configured to receive a first application data packet sent by a former device of the streaming media server, where the first application data packet includes: first network delay and streaming media data.
Optionally, the first processor 13 is specifically further configured to, if the streaming media server is a first-stage streaming media server, enable the former-stage device to be a sending client; or if the streaming media server is any streaming media server after the first-stage streaming media server, the former-stage device is the streaming media server before the first-stage streaming media server.
Optionally, the first processor 13 is specifically further configured to forward, if the subsequent device is a next-stage media server after the streaming media server, the streaming media data to the receiving client stage by stage based on the local network delay, including: transmitting a second application data packet to the next-stage streaming media server, wherein the second application data packet comprises: the second application data packet is used for enabling the next-stage streaming media server to forward the streaming media data to the receiving client stage by stage based on the current-stage network delay.
Optionally, the first processor 13 is specifically further configured to forward the streaming media data to the receiving client step by step based on the local network delay if the latter device is the receiving client, and includes: transmitting a third application data packet to the receiving client, the third application data packet comprising: the local network delay in the third application data packet is used for indicating the network delay between the sending client and the receiving client.
In a possible implementation manner, the streaming server 10 further includes a first storage medium, where program instructions executable by the first processor 13 are stored, and when the streaming server 10 is running, the first processor 13 executes the program instructions to implement the above embodiment.
Fig. 10 is a schematic diagram of a sending client provided in the present invention, where the sending client may be a computing device or a server with a computing processing function.
The transmitting client 20 includes: the second transmitter 21, the second receiver 22, the second processor 23 and the second bus 24, the second transmitter 21, the second receiver 22 and the second processor 23 being connected by the second bus 24;
a second transmitter 21, configured to transmit a transmitter packet to a first-stage streaming server of the multi-stage streaming servers;
a second receiver 22, configured to receive a receiver packet returned by the first-level streaming media server for the sender packet;
a second processor 23, configured to calculate a local network delay between the sending client and the first-level streaming media server according to the sender message and the receiver message; transmitting an application data packet to a first-level streaming media server, wherein the application data packet comprises: the method comprises the steps of local network time delay and streaming media data to be transmitted, wherein an application data packet is used for enabling a first-stage streaming media server to forward the streaming media data to a receiving client step by step based on the local network time delay.
In a possible implementation manner, the sending client 20 further includes a second storage medium, where program instructions executable by the second processor 23 are stored, and when the sending client 20 runs, the second processor 23 executes the program instructions to implement the above embodiment.
In the several embodiments provided by the present invention, it should be understood that the disclosed apparatus and method may be implemented in other manners. For example, the apparatus embodiments described above are merely illustrative, e.g., the division of the units is merely a logical function division, and there may be additional divisions when actually implemented, e.g., multiple units or components may be combined or integrated into another system, or some features may be omitted or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be an indirect coupling or communication connection via some interfaces, devices or units, which may be in electrical, mechanical or other form.
The units described as separate units may or may not be physically separate, and units shown as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in the embodiments of the present invention may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units may be implemented in hardware or in hardware plus software functional units.
The integrated units implemented in the form of software functional units described above may be stored in a computer readable storage medium. The software functional unit is stored in a storage medium, and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) or a Processor (english: processor) to perform some of the steps of the methods according to the embodiments of the invention. And the aforementioned storage medium includes: u disk, mobile hard disk, read-Only Memory (ROM), random access Memory (Random Access Memory, RAM), magnetic disk or optical disk, etc.
The foregoing is merely illustrative of the present invention, and the present invention is not limited thereto, and any changes or substitutions easily contemplated by those skilled in the art within the scope of the present invention should be included in the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims (10)

1. A data transmission method, applied to any one of a plurality of streaming media servers, comprising:
sending a sender message to a post-stage device of the streaming media server;
receiving a receiver message returned by the latter equipment aiming at the sender message;
calculating a second network time delay between the streaming media server and the latter-stage equipment according to the sender message and the receiver message;
according to the first network time delay between the sending client and the streaming media server and the second network time delay which are acquired in advance, calculating the current-stage network time delay between the sending client and the later-stage equipment;
and based on the local network delay, forwarding the streaming media data to be transmitted to a receiving client step by step.
2. The method of claim 1, wherein the computing the local network delay between the client and the streaming server is preceded by computing the local network delay between the client and the streaming server based on a pre-obtained first network delay between the sending client and the streaming server and the second network delay, the method further comprising:
receiving a first application data packet sent by a front-end device of the streaming media server, wherein the first application data packet comprises: the first network delay and the streaming media data.
3. The method according to claim 2, wherein if the streaming server is a first-level streaming server, the pre-device is the sending client; or alternatively, the process may be performed,
if the streaming media server is any streaming media server after the first-stage streaming media server, the former-stage device is any streaming media server before the streaming media server.
4. The method according to claim 1, wherein if the subsequent device is a subsequent streaming server subsequent to the streaming server, the step-by-step forwarding the streaming data to a receiving client based on the local network delay comprises:
sending a second application data packet to the next-stage streaming media server, wherein the second application data packet comprises: the second application data packet is configured to enable the next-stage streaming media server to forward the streaming media data to the receiving client stage by stage based on the local network delay.
5. The method according to claim 1, wherein if the secondary device is a receiving client, the step-by-step forwarding the streaming media data to the receiving client based on the present-level network delay comprises:
Transmitting a third application data packet to the receiving client, wherein the third application data packet comprises: the local network delay in the third application data packet is used for indicating the network delay between the sending client and the receiving client.
6. A data transmission method, applied to a transmitting client, comprising:
sending a sender message to a first-stage streaming media server in the multi-stage streaming media servers;
receiving a receiver message returned by the first-level streaming media server aiming at the sender message;
according to the sender message and the receiver message, calculating the local network time delay between a sending client and the first-level streaming media server;
transmitting an application data packet to the first-stage streaming media server, wherein the application data packet comprises: the application data packet is used for enabling the first-stage streaming media server to forward the streaming media data to a receiving client stage by stage based on the local network delay.
7. A data transmission apparatus for use with any one of a plurality of streaming media servers, the apparatus comprising:
The first sending module is used for sending a sender message to the post-stage equipment of the streaming media server;
the first receiving module is used for receiving a receiver message returned by the latter equipment aiming at the sender message;
the first processing module is used for calculating second network time delay between the streaming media server and the latter-stage equipment according to the sender message and the receiver message; according to the first network time delay between the sending client and the streaming media server and the second network time delay which are acquired in advance, calculating the current-stage network time delay between the sending client and the later-stage equipment; and based on the local network delay, forwarding the streaming media data to be transmitted to a receiving client step by step.
8. A data transmission apparatus for use with a sending client, the apparatus comprising:
the second sending module is used for sending a sender message to a first-stage streaming media server in the multi-stage streaming media servers;
the second receiving module is used for receiving a receiver message returned by the first-level streaming media server aiming at the sender message;
the second processing module is used for calculating the local network time delay between the sending client and the first-level streaming media server according to the sender message and the receiver message; transmitting an application data packet to the first-stage streaming media server, wherein the application data packet comprises: the application data packet is used for enabling the first-stage streaming media server to forward the streaming media data to a receiving client stage by stage based on the local network delay.
9. A streaming server, comprising: the first transmitter, the first receiver and the first processor are connected through the first bus;
the first transmitter is configured to send a sender message to a subsequent device of the streaming media server;
the first receiver is configured to receive a receiver packet returned by the subsequent device for the sender packet;
the first processor is configured to calculate a second network delay between the streaming media server and the subsequent device according to the sender packet and the receiver packet; according to the first network time delay between the sending client and the streaming media server and the second network time delay which are acquired in advance, calculating the current-stage network time delay between the sending client and the later-stage equipment; and based on the local network delay, forwarding the streaming media data to be transmitted to a receiving client step by step.
10. A transmitting client, comprising: the second transmitter, the second receiver, the second processor and the second bus are connected through the second bus;
The second transmitter is configured to send a sender message to a first-stage streaming media server in the multi-stage streaming media servers;
the second receiver is configured to receive a receiver packet returned by the first-level streaming media server for the sender packet;
the second processor is configured to calculate a local network delay between the sending client and the first-level streaming media server according to the sender message and the receiver message; transmitting an application data packet to the first-stage streaming media server, wherein the application data packet comprises: the application data packet is used for enabling the first-stage streaming media server to forward the streaming media data to a receiving client stage by stage based on the local network delay.
CN202111574541.1A 2021-12-21 2021-12-21 Data transmission method and device, streaming media server and sending client Active CN114221886B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111574541.1A CN114221886B (en) 2021-12-21 2021-12-21 Data transmission method and device, streaming media server and sending client

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111574541.1A CN114221886B (en) 2021-12-21 2021-12-21 Data transmission method and device, streaming media server and sending client

Publications (2)

Publication Number Publication Date
CN114221886A CN114221886A (en) 2022-03-22
CN114221886B true CN114221886B (en) 2023-05-12

Family

ID=80704818

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111574541.1A Active CN114221886B (en) 2021-12-21 2021-12-21 Data transmission method and device, streaming media server and sending client

Country Status (1)

Country Link
CN (1) CN114221886B (en)

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1937543A (en) * 2006-10-20 2007-03-28 北京邮电大学 Hop-by-hop transferred distributed flow media transmission performance test method and device
CN103532931A (en) * 2013-09-24 2014-01-22 北京星网锐捷网络技术有限公司 Method and system for testing transmission performance of data stream, and server
WO2018125686A2 (en) * 2016-12-30 2018-07-05 Intel Corporation Methods and devices for radio communications
WO2019156935A1 (en) * 2018-02-12 2019-08-15 Futurewei Technologies, Inc. Latency guarantee for multimedia streaming service to a moving subscriber
CN110446122A (en) * 2019-05-31 2019-11-12 广东电网有限责任公司 A kind of cross-domain collaboration resource allocation methods of fiber radio integration network
CN110583008A (en) * 2017-03-22 2019-12-17 思杰系统有限公司 Method for DNS response reordering based on path quality and connection priority for better QOS
CN110708597A (en) * 2019-10-12 2020-01-17 腾讯科技(深圳)有限公司 Live broadcast delay monitoring method and device, electronic equipment and readable storage medium
CN111034254A (en) * 2017-10-27 2020-04-17 华为技术有限公司 Method and device for reducing network delay
EP3739523A1 (en) * 2019-05-14 2020-11-18 Nvidia Corporation Using decay parameters for inferencing with neural networks

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20200225655A1 (en) * 2016-05-09 2020-07-16 Strong Force Iot Portfolio 2016, Llc Methods, systems, kits and apparatuses for monitoring and managing industrial settings in an industrial internet of things data collection environment
US11044194B2 (en) * 2019-02-28 2021-06-22 T-Mobile Usa, Inc. QoS for latency-sensitive network-traffic flows

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1937543A (en) * 2006-10-20 2007-03-28 北京邮电大学 Hop-by-hop transferred distributed flow media transmission performance test method and device
CN103532931A (en) * 2013-09-24 2014-01-22 北京星网锐捷网络技术有限公司 Method and system for testing transmission performance of data stream, and server
WO2018125686A2 (en) * 2016-12-30 2018-07-05 Intel Corporation Methods and devices for radio communications
CN110583008A (en) * 2017-03-22 2019-12-17 思杰系统有限公司 Method for DNS response reordering based on path quality and connection priority for better QOS
CN111034254A (en) * 2017-10-27 2020-04-17 华为技术有限公司 Method and device for reducing network delay
WO2019156935A1 (en) * 2018-02-12 2019-08-15 Futurewei Technologies, Inc. Latency guarantee for multimedia streaming service to a moving subscriber
EP3739523A1 (en) * 2019-05-14 2020-11-18 Nvidia Corporation Using decay parameters for inferencing with neural networks
CN110446122A (en) * 2019-05-31 2019-11-12 广东电网有限责任公司 A kind of cross-domain collaboration resource allocation methods of fiber radio integration network
CN110708597A (en) * 2019-10-12 2020-01-17 腾讯科技(深圳)有限公司 Live broadcast delay monitoring method and device, electronic equipment and readable storage medium

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
Ming-Chin Chuang.A Mobile Proxy Architecture for Video Services Over High-Speed Rail Environments in LTE-A Networks.《IEEE Systems Journal ( Volume: 9, Issue: 4, December 2015)》.2014,全文. *
向雄 ; .基于SDN网络的流媒体组播实现.信息技术.2018,(第10期),全文. *
王晴 ; 张晋豫 ; 宋晓莉 ; .P2P流媒体系统服务节点选择机制研究与仿真.计算机系统应用.2017,(第02期),全文. *

Also Published As

Publication number Publication date
CN114221886A (en) 2022-03-22

Similar Documents

Publication Publication Date Title
US10057150B2 (en) Managing communication congestion for internet of things devices
US10097379B2 (en) Managing communication congestion for internet of things devices
CN107508719B (en) Method and device for measuring network time delay and network node
CN106612284B (en) Streaming data transmission method and device
US9173006B2 (en) Method for live broadcasting in a distributed network and apparatus for the same
EP3395048A1 (en) Managing communication congestion for internet of things devices
EP2288086A1 (en) Network monitoring device, bus system monitoring device, method and program
JP2004519113A (en) Distributed network management system and method
JP2004266840A (en) Controlling admission of data stream onto network based on end-to-end measurement
CN103283255A (en) Method for providing an adaptive streaming service
US20110096849A1 (en) Optimized selection of transmission protocol respecting thresholds
CN108924205B (en) Data transmission method and device, electronic equipment and gatekeeper adapter
US20160337091A1 (en) Method and device for retransmitting packet of mmt service, and retransmission request method and device
US7613979B1 (en) Network communication protocol for large scale distribution of streaming content
CN103108354B (en) Control data transmission
Bhambay et al. Differential encoding for real-time status updates
JP2002118598A (en) Congestion detecting method, congestion preventing method, and packet communication system
CN115037416A (en) Data forward error correction processing method, device, electronic equipment and storage medium
EP3560152B1 (en) Determining the bandwidth of a communication link
CN114221886B (en) Data transmission method and device, streaming media server and sending client
WO2007026604A1 (en) Multicast node apparatus, multicast transfer method and program
CN110493658A (en) A kind of network bandwidth method for detecting, equipment and storage equipment
CN107547620B (en) Response time obtaining method and device
CN100555929C (en) Access network with believable real-time feedback
CN112312209A (en) Comprehensive alarm generation method, device, server and storage medium

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