Data transmission method, device, terminal equipment and storage medium

文档序号:1131027 发布日期:2020-10-02 浏览:17次 中文

阅读说明:本技术 一种数据传输方法、装置、终端设备和存储介质 (Data transmission method, device, terminal equipment and storage medium ) 是由 谢文龙 李云鹏 吕亚亚 杨春晖 于 2020-05-26 设计创作,主要内容包括:本发明实施例提供了一种数据传输方法、装置、终端设备和存储介质,包括:流媒体服务器获取接收会议发送端发送的当前媒体数据包所需的当前带宽值;确定将当前媒体数据包发送至至少两个会议接收端的预测带宽值;根据当前带宽值与预测带宽值的对比结果,获取与对比结果相对应的流控传输策略;根据流控传输策略,将当前媒体数据包发送至至少两个会议接收端,以使至少两个会议接收端接收到的当前媒体数据包的丢包率小于预设值,利用本发明实施例,会议发送端发送的同一份帧率、码流的媒体数据包可以适应多种网络带宽状态下的会议接收端,会议接收端接收到的媒体数据包避免出现丢包现象。(The embodiment of the invention provides a data transmission method, a data transmission device, terminal equipment and a storage medium, wherein the data transmission method comprises the following steps: the method comprises the steps that a streaming media server obtains a current bandwidth value required by receiving a current media data packet sent by a conference sending end; determining a prediction bandwidth value for sending the current media data packet to at least two conference receiving ends; acquiring a flow control transmission strategy corresponding to a comparison result according to the comparison result of the current bandwidth value and the predicted bandwidth value; according to the flow control transmission strategy, the current media data packet is sent to at least two conference receiving ends, so that the packet loss rate of the current media data packet received by the at least two conference receiving ends is smaller than a preset value.)

1. A data transmission method is applied to a streaming media server, and the method comprises the following steps:

acquiring a current bandwidth value required for receiving a current media data packet sent by a conference sending end;

determining a prediction bandwidth value for sending the current media data packet to at least two conference receiving ends;

acquiring a flow control transmission strategy corresponding to the comparison result according to the comparison result of the current bandwidth value and the predicted bandwidth value;

and sending the current media data packet to the at least two conference receiving ends according to the flow control transmission strategy, so that the packet loss rate of the current media data packet received by the at least two conference receiving ends is smaller than a preset value.

2. The method of claim 1, wherein the determining a predicted bandwidth value for transmitting the media data packet to at least two conference receivers comprises:

sending a first media data packet sent by the conference sending end at the previous moment to the conference receiving end, wherein the first media data packet comprises a first timestamp;

acquiring statistical data packets and packet loss rates returned by the at least two conference receiving ends, wherein the statistical data packets comprise second timestamps;

and respectively calculating the prediction bandwidth values for sending the current media data packet to the at least two conference receiving ends according to the first time stamp, the second time stamp and the packet loss rate.

3. The method according to claim 1, wherein the obtaining a flow control transmission policy corresponding to the comparison result according to the comparison result between the current bandwidth value and the predicted bandwidth value comprises:

and returning a code stream adjusting instruction to the conference sending end under the condition that the current bandwidth value is larger than the maximum value in the predicted bandwidth values of the at least two conference receiving ends, wherein the code stream adjusting instruction comprises a target bandwidth value, and the target bandwidth value is the minimum value in the predicted bandwidth values of the at least two conference receiving ends, so that the conference sending end adjusts the bandwidth for sending the current media data packet according to the target bandwidth value.

4. The method according to claim 1, wherein the obtaining a flow control transmission policy corresponding to the comparison result according to the comparison result between the current bandwidth value and the predicted bandwidth value comprises:

under the condition that the current bandwidth value is larger than a first prediction bandwidth value and smaller than a second prediction bandwidth value, sending the current media data packet to a conference receiving end corresponding to the second prediction bandwidth value according to the current bandwidth value;

and is

Transcoding the current media data packet to obtain a transcoded media data packet corresponding to the first prediction bandwidth value;

and sending the transcoded media data packet to a conference receiving end corresponding to the first prediction bandwidth value.

5. The method of claim 4, wherein transcoding the current media data packet to obtain a transcoded media data packet corresponding to the first predicted bandwidth value comprises:

multiplying the preset resolution ratio by the preset frame rate to obtain a code rate value;

comparing the code rate value to the first predicted bandwidth value;

if the code rate value is smaller than the first prediction bandwidth value and the difference value between the code rate value and the first prediction bandwidth value is minimum, determining the code rate value as a target code rate value;

and transcoding the current media data packet to obtain the transcoded media data packet corresponding to the target code rate value.

6. The method according to claim 1, wherein the obtaining a flow control transmission policy corresponding to the comparison result according to the comparison result between the current bandwidth value and the predicted bandwidth value comprises:

and under the condition that the current bandwidth value is smaller than the minimum value of the predicted bandwidth values of the at least two conference receiving ends, sending the current media data packet to the at least two conference receiving ends according to the current bandwidth value.

7. A data transmission apparatus, applied to a streaming media server, the apparatus comprising:

the acquisition module is used for acquiring a current bandwidth value required by receiving a current media data packet sent by a conference sending end;

the prediction module is used for determining the prediction bandwidth value for transmitting the current media data packet to at least two conference receiving ends;

the comparison module is used for acquiring a flow control transmission strategy corresponding to the comparison result according to the comparison result of the current bandwidth value and the predicted bandwidth value;

and the sending module is used for sending the current media data packet to the at least two conference receiving ends according to the flow control transmission strategy so as to enable the packet loss rate of the current media data packet received by the at least two conference receiving ends to be smaller than a preset value.

8. The apparatus of claim 7, wherein the prediction module is configured to:

sending a first media data packet sent by the conference sending end at the previous moment to the conference receiving end, wherein the first media data packet comprises a first timestamp;

acquiring statistical data packets and packet loss rates returned by the at least two conference receiving ends, wherein the statistical data packets comprise second timestamps;

and respectively calculating the prediction bandwidth values for sending the current media data packet to the at least two conference receiving ends according to the first time stamp, the second time stamp and the packet loss rate.

9. A terminal device, comprising: at least one processor and memory;

the memory stores a computer program; the at least one processor executes the computer program stored by the memory to implement the data transfer method of any of claims 1-6.

10. A computer-readable storage medium, characterized in that a computer program is stored in the computer-readable storage medium, which computer program, when executed, implements the data transmission method of any one of claims 1-6.

Technical Field

The present invention relates to the field of data communication technologies, and in particular, to a data transmission method, an apparatus, a terminal device, and a storage medium.

Background

In a video conference, each conference terminal encodes adopted audio and video data according to a certain frame rate and code stream, and then sends the encoded audio and video data to other conference receiving terminals through a network protocol, and the conference receiving terminals decode and play the received audio and video data. However, because the network bandwidths of each conference end are different, the maximum code streams that can be received are different, and the packet loss phenomenon of the audio and video data may be caused in the transmission process.

Disclosure of Invention

In view of the above problems, embodiments of the present invention are proposed to provide a data transmission method, apparatus, terminal device and storage medium that overcome or at least partially solve the above problems.

In a first aspect, an embodiment of the present invention provides a data transmission method, where the method is applied to a streaming media server, and includes:

acquiring a current bandwidth value required for receiving a current media data packet sent by a conference sending end;

determining a prediction bandwidth value for sending the current media data packet to at least two conference receiving ends;

acquiring a flow control transmission strategy corresponding to the comparison result according to the comparison result of the current bandwidth value and the predicted bandwidth value;

and sending the current media data packet to the at least two conference receiving ends according to the flow control transmission strategy, so that the packet loss rate of the current media data packet received by the at least two conference receiving ends is smaller than a preset value.

Optionally, the determining a predicted bandwidth value for sending the media data packet to at least two conference receiving ends includes:

sending a first media data packet sent by the conference sending end at the previous moment to the conference receiving end, wherein the first media data packet comprises a first timestamp;

acquiring statistical data packets and packet loss rates returned by the at least two conference receiving ends, wherein the statistical data packets comprise second timestamps;

and respectively calculating the prediction bandwidth values for sending the current media data packet to the at least two conference receiving ends according to the first time stamp, the second time stamp and the packet loss rate.

Optionally, the obtaining, according to a comparison result between the current bandwidth value and the predicted bandwidth value, a flow control transmission policy corresponding to the comparison result includes:

and returning a code stream adjusting instruction to the conference sending end under the condition that the current bandwidth value is larger than the maximum value in the predicted bandwidth values of the at least two conference receiving ends, wherein the code stream adjusting instruction comprises a target bandwidth value, and the target bandwidth value is the minimum value in the predicted bandwidth values of the at least two conference receiving ends, so that the conference sending end adjusts the bandwidth for sending the current media data packet according to the target bandwidth value.

Optionally, the obtaining, according to a comparison result between the current bandwidth value and the predicted bandwidth value, a flow control transmission policy corresponding to the comparison result includes:

under the condition that the current bandwidth value is larger than a first prediction bandwidth value and smaller than a second prediction bandwidth value, sending the current media data packet to a conference receiving end corresponding to the second prediction bandwidth value according to the current bandwidth value;

and is

Transcoding the current media data packet to obtain a transcoded media data packet corresponding to the first prediction bandwidth value;

and sending the transcoded media data packet to a conference receiving end corresponding to the first prediction bandwidth value.

Optionally, the transcoding the current media data packet to obtain a transcoded media data packet corresponding to the first predicted bandwidth value includes:

multiplying the preset resolution ratio by the preset frame rate to obtain a code rate value;

comparing the code rate value to the first predicted bandwidth value;

if the code rate value is smaller than the first prediction bandwidth value and the difference value between the code rate value and the first prediction bandwidth value is minimum, determining the code rate value as a target code rate value;

and transcoding the current media data packet to obtain the transcoded media data packet corresponding to the target code rate value.

Optionally, the obtaining, according to a comparison result between the current bandwidth value and the predicted bandwidth value, a flow control transmission policy corresponding to the comparison result includes:

and under the condition that the current bandwidth value is smaller than the minimum value of the predicted bandwidth values of the at least two conference receiving ends, sending the current media data packet to the at least two conference receiving ends according to the current bandwidth value.

In a second aspect, an embodiment of the present invention provides a data transmission apparatus, where the apparatus is applied to a streaming media server, and includes:

the acquisition module is used for acquiring a current bandwidth value required by receiving a current media data packet sent by a conference sending end;

the prediction module is used for determining the prediction bandwidth value for transmitting the current media data packet to at least two conference receiving ends;

the comparison module is used for acquiring a flow control transmission strategy corresponding to the comparison result according to the comparison result of the current bandwidth value and the predicted bandwidth value;

and the sending module is used for sending the current media data packet to the at least two conference receiving ends according to the flow control transmission strategy so as to enable the packet loss rate of the current media data packet received by the at least two conference receiving ends to be smaller than a preset value.

Optionally, the prediction module is to:

sending a first media data packet sent by the conference sending end at the previous moment to the conference receiving end, wherein the first media data packet comprises a first timestamp;

acquiring statistical data packets and packet loss rates returned by the at least two conference receiving ends, wherein the statistical data packets comprise second timestamps;

and respectively calculating the prediction bandwidth values for sending the current media data packet to the at least two conference receiving ends according to the first time stamp, the second time stamp and the packet loss rate.

Optionally, the comparison module is configured to:

and returning a code stream adjusting instruction to the conference sending end under the condition that the current bandwidth value is larger than the maximum value in the predicted bandwidth values of the at least two conference receiving ends, wherein the code stream adjusting instruction comprises a target bandwidth value, and the target bandwidth value is the minimum value in the predicted bandwidth values of the at least two conference receiving ends, so that the conference sending end adjusts the bandwidth for sending the current media data packet according to the target bandwidth value.

Optionally, the comparison module is configured to:

under the condition that the current bandwidth value is larger than a first prediction bandwidth value and smaller than a second prediction bandwidth value, sending the current media data packet to a conference receiving end corresponding to the second prediction bandwidth value according to the current bandwidth value;

and is

Transcoding the current media data packet to obtain a transcoded media data packet corresponding to the first prediction bandwidth value;

and sending the transcoded media data packet to a conference receiving end corresponding to the first prediction bandwidth value.

Optionally, the comparison module is configured to:

multiplying the preset resolution ratio by the preset frame rate to obtain a code rate value;

comparing the code rate value to the first predicted bandwidth value;

if the code rate value is smaller than the first prediction bandwidth value and the difference value between the code rate value and the first prediction bandwidth value is minimum, determining the code rate value as a target code rate value;

and transcoding the current media data packet to obtain the transcoded media data packet corresponding to the target code rate value.

Optionally, the comparison module is configured to:

and under the condition that the current bandwidth value is smaller than the minimum value of the predicted bandwidth values of the at least two conference receiving ends, sending the current media data packet to the at least two conference receiving ends by using the current bandwidth value.

In a third aspect, an embodiment of the present invention provides a terminal device, including: at least one processor and memory;

the memory stores a computer program; the at least one processor executes the computer program stored by the memory to implement the data transmission method provided by the first aspect.

In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, where a computer program is stored, and when the computer program is executed, the computer program implements the data transmission method provided in the first aspect.

The embodiment of the invention has the following advantages:

the data transmission method, the data transmission device, the terminal equipment and the storage medium provided by the embodiment of the invention comprise the steps that a streaming media server obtains a current bandwidth value required by receiving a current media data packet sent by a conference sending end; determining a prediction bandwidth value for sending the current media data packet to at least two conference receiving ends; acquiring a flow control transmission strategy corresponding to a comparison result according to the comparison result of the current bandwidth value and the predicted bandwidth value; according to the flow control transmission strategy, the current media data packet is sent to at least two conference receiving ends, so that the packet loss rate of the current media data packet received by the at least two conference receiving ends is smaller than a preset value.

Drawings

FIG. 1 is a flow chart of the steps of one embodiment of a data transmission method of the present invention;

FIG. 2 is a flow chart of steps in another data transmission method embodiment of the present invention;

FIG. 3 is a block diagram of an embodiment of a data transmission apparatus according to the present invention;

fig. 4 is a schematic structural diagram of a terminal device of the present invention.

Detailed Description

In order to make the aforementioned objects, features and advantages of the present invention comprehensible, embodiments accompanied with figures are described in further detail below.

The video networking is an important milestone for network development, is a real-time network, can realize high-definition video real-time transmission, and pushes a plurality of internet applications to high-definition video, and high-definition faces each other.

The video networking adopts a real-time high-definition video exchange technology, can integrate required services such as dozens of services of video, voice, pictures, characters, communication, data and the like on a system platform on a network platform, such as high-definition video conference, video monitoring, intelligent monitoring analysis, emergency command, digital broadcast television, delayed television, network teaching, live broadcast, VOD on demand, television mail, Personal Video Recorder (PVR), intranet (self-office) channels, intelligent video broadcast control, information distribution and the like, and realizes high-definition quality video broadcast through a television or a computer.

The nouns are explained as follows:

RTT: is the time taken by the client to make a round-trip time (RTT) to the server, TCP contains algorithms to dynamically estimate the RTT. TCP also continuously estimates the RTT for a given connection because RTT varies due to changes in the network transport congestion procedures.

4G multi-network card polymerization terminal: a terminal product capable of adopting multi-network card link simultaneous transmission is provided.

WebRTC: web Real-Time Communication, Web instant messaging, is an API that supports Web browsers to perform Real-Time voice conversations or video conversations.

An embodiment of the present invention provides a data transmission method, which is used for transmitting a media data packet sent by a conference sending end to a conference receiving end according to an appropriate flow control transmission policy, and an execution main body is a data transmission device and is installed on a flow media server.

Referring to fig. 1, a flowchart illustrating steps of an embodiment of a data transmission method according to the present invention is shown, where the method may be applied to a streaming media server, and specifically may include the following steps:

s101, acquiring a current bandwidth value required for receiving a current media data packet sent by a conference sending end;

specifically, in a video conference, the video conference includes a conference sending end, a conference receiving end and a streaming media server, where the conference sending end may be a chairman or a speaking party, the conference sending end sends a media data packet, that is, audio and video data, to the streaming media server, and the streaming media server receives a current media data packet sent by the conference sending end and calculates a current bandwidth value required for receiving the current media data packet according to the size of the current media data packet and the receiving time.

The conference receiving terminal may be an internet terminal or a video networking terminal, such as a 4G multi-network card aggregation terminal.

S102, determining a prediction bandwidth value for sending the current media data packet to at least two conference receiving ends;

specifically, before sending the current media data packet, the streaming media server calculates a prediction bandwidth value for sending the current media data packet to at least two conference receiving ends according to the previously received media data packet and the historical data of the sent media data packet.

S103, acquiring a flow control transmission strategy corresponding to the comparison result according to the comparison result of the current bandwidth value and the predicted bandwidth value;

specifically, the streaming media server compares the current bandwidth value with the predicted bandwidth values of at least two conference receiving ends to obtain a flow control transmission strategy corresponding to a comparison result, wherein each different comparison result corresponds to a different flow control transmission strategy.

Exemplarily, if the current bandwidth value of the current media data packet sent by the conference sending end is obtained by the streaming media server as E, the predicted bandwidth values of the current media data packet sent to the at least two conference receiving ends are determined as A, B, C and D, and E is compared with A, B, C and D, wherein one of the three conditions is that the current bandwidth value E is greater than all the predicted values A, B, C and D; one is that the current bandwidth value E is less than all of the predicted values A, B, C and D; and the E is a middle value, is larger than the minimum value of the predicted value and is smaller than the maximum value of the predicted value, and for the situations, the E corresponds to different flow control transmission strategies respectively.

And S104, sending the current media data packet to the at least two conference receiving ends according to the flow control transmission strategy, so that the packet loss rate of the current media data packet received by the at least two conference receiving ends is smaller than a preset value.

Specifically, the streaming media server obtains a flow control transmission policy corresponding to the comparison result according to the comparison result, and processes the current media data packet according to the obtained flow control transmission policy, for example, if the current bandwidth value is greater than the maximum value of the predicted value, the conference sending end is notified to reduce the code rate and the frame rate for sending, or transcode the current media data packet for sending, or send with the current bandwidth value. In any case, the packet loss rates of the current media data packets received by the at least two conference receiving ends are smaller than the preset value, so that the media data packets with the same frame rate and code stream can adapt to the conference receiving ends in various network bandwidth states, and the media data packets received by the conference receiving ends are prevented from packet loss.

The data transmission method provided by the embodiment of the invention obtains the current bandwidth value required by receiving the current media data packet sent by the conference sending end through the streaming media server; determining a prediction bandwidth value for sending the current media data packet to at least two conference receiving ends; acquiring a flow control transmission strategy corresponding to a comparison result according to the comparison result of the current bandwidth value and the predicted bandwidth value; according to the flow control transmission strategy, the current media data packet is sent to at least two conference receiving ends, so that the packet loss rate of the current media data packet received by the at least two conference receiving ends is smaller than a preset value.

The present invention further provides a supplementary description of the data transmission method provided in the above embodiment.

As shown in fig. 2, a flow chart of steps of another embodiment of a data transmission method of the present invention is shown, and is applied to a streaming media server, and the data transmission method includes:

s201, acquiring a current bandwidth value required for receiving a current media data packet sent by a conference sending end;

s202, determining a prediction bandwidth value for sending the current media data packet to at least two conference receiving ends;

specifically, a WebRTC stream control prediction mechanism, that is, a WebRTC stream control prediction unit, is installed on the streaming media server and is configured to determine a prediction bandwidth value for sending the current media data packet to at least two conference receiving ends; step S202 includes:

step a: sending a first media data packet sent by the conference sending end at the previous moment to the conference receiving end, wherein the first media data packet comprises a first timestamp;

step b: acquiring statistical data packets and packet loss rates returned by the at least two conference receiving ends, wherein the statistical data packets comprise second timestamps;

specifically, the conference receiving end calculates the packet loss rate within the preset time according to the packet sequence of the media data packet received within the preset time.

Step c: and respectively calculating the prediction bandwidth values for sending the current media data packet to the at least two conference receiving ends according to the first time stamp, the second time stamp and the packet loss rate.

Specifically, each conference receiving unit returns a statistical data packet to the streaming media server, the streaming media calculates an RTT value according to the first timestamp and the second timestamp, and calculates a prediction bandwidth value of each conference receiving terminal according to the RTT value and the packet loss rate.

S203, acquiring a flow control transmission strategy corresponding to the comparison result according to the comparison result of the current bandwidth value and the predicted bandwidth value;

this step S203 includes three cases, S2031, S2032, and S2033, specifically:

s2031 is an optional method, and includes:

and returning a code stream adjusting instruction to the conference sending end under the condition that the current bandwidth value is larger than the maximum value in the predicted bandwidth values of the at least two conference receiving ends, wherein the code stream adjusting instruction comprises a target bandwidth value, and the target bandwidth value is the minimum value in the predicted bandwidth values of the at least two conference receiving ends, so that the conference sending end adjusts the bandwidth for sending the current media data packet according to the target bandwidth value.

Illustratively, on the basis of the above embodiment, if E is greater than the maximum value of A, B, C and D, the streaming media server returns an instruction for adjusting a code stream to the conference sending end, where the instruction for adjusting a code stream includes a destination bandwidth value, the destination bandwidth value is the minimum value of the predicted bandwidth values A, B, C and D of the at least two conference receiving ends, and the conference sending end adjusts the bandwidth for sending the current media data packet according to the minimum value of A, B, C and D, and sends the current media data packet according to the adjusted media data packet.

S2032 is another optional method, including:

under the condition that the current bandwidth value is larger than a first prediction bandwidth value and smaller than a second prediction bandwidth value, sending the current media data packet to a conference receiving end corresponding to the second prediction bandwidth value according to the current bandwidth value;

and is

Transcoding the current media data packet to obtain a transcoded media data packet corresponding to the first prediction bandwidth value;

specifically, multiplying a preset resolution ratio by a preset frame rate to obtain a code rate value;

comparing the code rate value to the first predicted bandwidth value;

if the code rate value is smaller than the first prediction bandwidth value and the difference value between the code rate value and the first prediction bandwidth value is minimum, determining the code rate value as a target code rate value;

and transcoding the current media data packet to obtain the transcoded media data packet corresponding to the target code rate value.

And sending the transcoded media data packet to a conference receiving end corresponding to the first prediction bandwidth value.

Illustratively, if E is an intermediate value, i.e., E is greater than the first predicted bandwidth value (AB) and E is less than the second predicted bandwidth value (CD), then E is greater than the first predicted bandwidth value (AB) and E is less than the second predicted bandwidth value (CD)

Sending the conference receiving end corresponding to C, D to the conference receiving end corresponding to C, D according to the E code stream;

for the conference receiving end corresponding to A, B, transcoding is performed at the streaming media server, specifically:

the method includes the steps of storing resolutions of various different formats and frame rates of various different formats in a streaming media server in advance, for example, multiplying the resolutions of m different formats and n different frame rates of a device in advance respectively to obtain m × n code rate values, comparing the m × n code rate values with a preset side bandwidth value A (or B), determining the code rate value as a target code rate value if the code rate value is smaller than the preset side bandwidth value A (or B) and the difference between the code rate value and the preset side bandwidth value A (or B) is minimum, decoding and encoding an original media file by the streaming media server to obtain a media file of a file format corresponding to the target code rate value, and then sending the media file (media data packet) to a corresponding conference receiving end by the preset side bandwidth value A.

The resolution formats include, for example, 320 × 240, 640 × 480, 320 × 480, 480 × 272, 640 × 360, 672 × 378, 720 × 480, 1024 × 600, 1280 × 720, 1920 × 1080, but the frame rate includes, but is not limited to, 15 frames, 20 frames, and 25 frames, and may be set according to actual circumstances.

S2033 is yet another optional method, and includes:

and under the condition that the current bandwidth value is smaller than the minimum value of the predicted bandwidth values of the at least two conference receiving ends, sending the current media data packet to the at least two conference receiving ends according to the current bandwidth value.

Specifically, when E is smaller than the minimum value of all the values a, B, C, and D, the streaming media server continues to send the media file to the conference receiving end corresponding to a, B, C, and D, respectively, according to the original bandwidth value E.

And S204, sending the current media data packet to the at least two conference receiving ends according to the flow control transmission strategy, so that the packet loss rate of the current media data packet received by the at least two conference receiving ends is smaller than a preset value.

Since steps S201 and S204 are the same as steps S101 and S104 in the embodiment shown in fig. 1. Step S101 and step S104 have already been described in detail in fig. 1, and therefore step S201 and step S204 will not be described again here.

The embodiment of the invention can predict the reasonable code stream which can be received by each end after introducing a webrtc flow control prediction mechanism, and the streaming media server needs to properly adjust the audio and video data of speakers and chairmen (conference sending ends) according to the code stream. Therefore, data of the same frame rate and code stream needs to be adapted to conference receiving ends in multiple states, and audio and video transcoding operation needs to be performed on the streaming media server on the audio and video data to match the conference receiving ends with various receiving capabilities, so that the effect of smooth pictures of the conference receiving ends is achieved.

It should be noted that, for simplicity of description, the method embodiments are described as a series of acts or combination of acts, but those skilled in the art will recognize that the present invention is not limited by the illustrated order of acts, as some steps may occur in other orders or concurrently in accordance with the embodiments of the present invention. Further, those skilled in the art will appreciate that the embodiments described in the specification are presently preferred and that no particular act is required to implement the invention.

The data transmission method provided by the embodiment of the invention obtains the current bandwidth value required by receiving the current media data packet sent by the conference sending end through the streaming media server; determining a prediction bandwidth value for sending the current media data packet to at least two conference receiving ends; acquiring a flow control transmission strategy corresponding to a comparison result according to the comparison result of the current bandwidth value and the predicted bandwidth value; according to the flow control transmission strategy, the current media data packet is sent to at least two conference receiving ends, so that the packet loss rate of the current media data packet received by the at least two conference receiving ends is smaller than a preset value.

Another embodiment of the present invention provides a data transmission apparatus, configured to execute the data transmission method provided in the foregoing embodiment.

Referring to fig. 3, a block diagram of a data transmission apparatus according to an embodiment of the present invention is shown, where the apparatus may be applied to a streaming media server, and specifically includes the following modules: an obtaining module 301, a predicting module 302, a comparing module 303 and a sending module 304, wherein:

the obtaining module 301 is configured to obtain a current bandwidth value required for receiving a current media data packet sent by a conference sending end;

the prediction module 302 is configured to determine a prediction bandwidth value for sending the current media data packet to at least two conference receiving ends;

the comparison module 303 is configured to obtain a flow control transmission policy corresponding to the comparison result according to the comparison result between the current bandwidth value and the predicted bandwidth value;

the sending module 304 is configured to send the current media data packet to the at least two conference receiving ends according to the flow control transmission policy, so that the packet loss rate of the current media data packet received by the at least two conference receiving ends is smaller than a preset value.

The data transmission device provided by the embodiment of the invention obtains the current bandwidth value required by receiving the current media data packet sent by the conference sending end through the streaming media server; determining a prediction bandwidth value for sending the current media data packet to at least two conference receiving ends; acquiring a flow control transmission strategy corresponding to a comparison result according to the comparison result of the current bandwidth value and the predicted bandwidth value; according to the flow control transmission strategy, the current media data packet is sent to at least two conference receiving ends, so that the packet loss rate of the current media data packet received by the at least two conference receiving ends is smaller than a preset value.

The data transmission device provided by the above embodiment is further described in an additional embodiment of the present invention.

Optionally, the prediction module 302 is configured to:

sending a first media data packet sent by the conference sending end at the previous moment to the conference receiving end, wherein the first media data packet comprises a first timestamp;

acquiring statistical data packets and packet loss rates returned by the at least two conference receiving ends, wherein the statistical data packets comprise second timestamps;

and respectively calculating the prediction bandwidth values for sending the current media data packet to the at least two conference receiving ends according to the first time stamp, the second time stamp and the packet loss rate.

Optionally, the comparison module 303 is configured to:

and returning a code stream adjusting instruction to the conference sending end under the condition that the current bandwidth value is larger than the maximum value in the predicted bandwidth values of the at least two conference receiving ends, wherein the code stream adjusting instruction comprises a target bandwidth value, and the target bandwidth value is the minimum value in the predicted bandwidth values of the at least two conference receiving ends, so that the conference sending end adjusts the bandwidth for sending the current media data packet according to the target bandwidth value.

Optionally, the comparison module 303 is configured to:

under the condition that the current bandwidth value is larger than a first prediction bandwidth value and smaller than a second prediction bandwidth value, sending the current media data packet to a conference receiving end corresponding to the second prediction bandwidth value according to the current bandwidth value;

and is

Transcoding the current media data packet to obtain a transcoded media data packet corresponding to the first prediction bandwidth value;

and sending the transcoded media data packet to a conference receiving end corresponding to the first prediction bandwidth value.

Optionally, the comparison module 303 is configured to:

multiplying the preset resolution ratio by the preset frame rate to obtain a code rate value;

comparing the code rate value to the first predicted bandwidth value;

if the code rate value is smaller than the first prediction bandwidth value and the difference value between the code rate value and the first prediction bandwidth value is minimum, determining the code rate value as a target code rate value;

and transcoding the current media data packet to obtain the transcoded media data packet corresponding to the target code rate value.

Optionally, the comparison module 303 is configured to:

and under the condition that the current bandwidth value is smaller than the minimum value of the predicted bandwidth values of the at least two conference receiving ends, sending the current media data packet to the at least two conference receiving ends by using the current bandwidth value.

It should be noted that the respective implementable modes in the present embodiment may be implemented individually, or may be implemented in combination in any combination without conflict, and the present application is not limited thereto.

For the device embodiment, since it is basically similar to the method embodiment, the description is simple, and for the relevant points, refer to the partial description of the method embodiment.

The data transmission device provided by the embodiment of the invention obtains the current bandwidth value required by receiving the current media data packet sent by the conference sending end through the streaming media server; determining a prediction bandwidth value for sending the current media data packet to at least two conference receiving ends; acquiring a flow control transmission strategy corresponding to a comparison result according to the comparison result of the current bandwidth value and the predicted bandwidth value; according to the flow control transmission strategy, the current media data packet is sent to at least two conference receiving ends, so that the packet loss rate of the current media data packet received by the at least two conference receiving ends is smaller than a preset value.

Still another embodiment of the present invention provides a terminal device, configured to execute the data transmission method provided in the foregoing embodiment.

Fig. 4 is a schematic structural diagram of a terminal device of the present invention, and as shown in fig. 4, the terminal device includes: at least one processor 401 and memory 402;

the memory stores a computer program; the at least one processor executes the computer program stored in the memory to implement the data transmission method provided by the above-mentioned embodiments.

The terminal device provided in this embodiment obtains, by using the streaming media server, a current bandwidth value required for receiving a current media data packet sent by a conference sending end; determining a prediction bandwidth value for sending the current media data packet to at least two conference receiving ends; acquiring a flow control transmission strategy corresponding to a comparison result according to the comparison result of the current bandwidth value and the predicted bandwidth value; according to the flow control transmission strategy, the current media data packet is sent to at least two conference receiving ends, so that the packet loss rate of the current media data packet received by the at least two conference receiving ends is smaller than a preset value.

Yet another embodiment of the present application provides a computer-readable storage medium, in which a computer program is stored, and when the computer program is executed, the computer program implements the data transmission method provided in any one of the above embodiments.

According to the computer-readable storage medium of the embodiment, a streaming media server acquires a current bandwidth value required for receiving a current media data packet sent by a conference sending end; determining a prediction bandwidth value for sending the current media data packet to at least two conference receiving ends; acquiring a flow control transmission strategy corresponding to a comparison result according to the comparison result of the current bandwidth value and the predicted bandwidth value; according to the flow control transmission strategy, the current media data packet is sent to at least two conference receiving ends, so that the packet loss rate of the current media data packet received by the at least two conference receiving ends is smaller than a preset value.

The embodiments in the present specification are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other.

As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, apparatus, or computer program product. Accordingly, embodiments of the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, embodiments of the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.

Embodiments of the present invention are described with reference to flowchart illustrations and/or block diagrams of methods, electronic devices (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing electronic device to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing electronic device, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.

These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing electronic devices to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.

These computer program instructions may also be loaded onto a computer or other programmable data processing electronic device to cause a series of operational steps to be performed on the computer or other programmable electronic device to produce a computer implemented process such that the instructions which execute on the computer or other programmable electronic device provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.

While preferred embodiments of the present invention have been described, additional variations and modifications of these embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. Therefore, it is intended that the appended claims be interpreted as including preferred embodiments and all such alterations and modifications as fall within the scope of the embodiments of the invention.

Finally, it should also be noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or electronic device that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or electronic device. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or electronic device that comprises the element.

The data transmission method and the data transmission device provided by the invention are described in detail, and the principle and the implementation mode of the invention are explained by applying specific examples, and the description of the embodiments is only used for helping to understand the method and the core idea of the invention; meanwhile, for a person skilled in the art, according to the idea of the present invention, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present invention.

16页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:一种网络拥塞检测方法及装置

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!

技术分类