Data sending method and device based on multilink aggregation

文档序号:1601346 发布日期:2020-01-07 浏览:24次 中文

阅读说明:本技术 一种基于多链路聚合的数据发送方法和装置 (Data sending method and device based on multilink aggregation ) 是由 谢文龙 李云鹏 吕亚亚 王艳辉 于 2019-08-30 设计创作,主要内容包括:本发明提供了一种基于多链路聚合的数据发送方法和装置,涉及视联网技术领域,该方法包括:当第一队列中存有接收到的至少一个目标数据包时将至少一个目标数据包从第一队列复制到第二队列;清空第一队列;按照预设顺序和预设发送间隔将至少一个目标数据包从第二队列中依次发送至视联网设备。将目标数据包从第一队列复制到第二队列,清空第一队列,第二队列将目标数据包发送至视联网设备,数据包可同时入队和出队,保证数据包的发包效率;按照预设顺序和预设发送间隔将目标数据包发送至视联网设备,使不同通信链路对应的网卡发送的数据包数量及时间间隔相同,数据包能被均匀稳定地发送,可降低实时带宽的抖动程度,提高了视联网终端的播放流畅性。(The invention provides a data sending method and device based on multilink aggregation, which relate to the technical field of video networking and comprise the following steps: copying at least one target data packet from the first queue to the second queue when the at least one target data packet is received in the first queue; emptying the first queue; and sequentially sending at least one target data packet from the second queue to the video networking equipment according to a preset sequence and a preset sending interval. Copying the target data packet from the first queue to the second queue, emptying the first queue, sending the target data packet to the video networking equipment by the second queue, and enabling the data packet to be queued and dequeued simultaneously so as to ensure the packet sending efficiency of the data packet; the target data packets are sent to the video networking equipment according to the preset sequence and the preset sending intervals, so that the number and the time intervals of the data packets sent by the network cards corresponding to different communication links are the same, the data packets can be evenly and stably sent, the jitter degree of real-time bandwidth can be reduced, and the playing smoothness of the video networking terminal is improved.)

1. A data transmission method based on multilink aggregation is applied to a graph transmission device, wherein the graph transmission device is connected with a video network device through at least two communication links, and the method comprises the following steps:

when the received at least one target data packet is stored in the first queue, copying the at least one target data packet from the first queue to a second queue;

emptying the first queue;

and sequentially sending the at least one target data packet from the second queue to the video networking equipment through the at least two communication links according to a preset sequence and a preset sending interval.

2. The method of claim 1, wherein after flushing the first queue, further comprising:

receiving at least one latest data packet;

storing the at least one latest data packet into the first queue according to the receiving sequence of the at least one latest data packet;

and taking the at least one latest data packet as the at least one target data packet, and returning to execute the step of copying the at least one target data packet from the first queue to the second queue when the at least one received target data packet is stored in the first queue.

3. The method according to claim 1, wherein the preset sequence is a sequence of storing the at least one target packet into the second queue, and the sequentially sending the at least one target packet from the second queue to the video networking device through the at least two communication links according to the preset sequence and the preset sending interval comprises:

determining a target data packet which is stored in the second queue firstly from the target data packets left in the second queue;

sending the target data packet stored in the second queue to the video networking equipment;

determining whether the second queue contains the remaining target data packets;

and if the second queue has the residual target data packets, returning to the step of executing the target data packets left in the second queue and determining the target data packet which is stored in the second queue firstly.

4. The method of claim 3, wherein after determining whether the target packet remains in the second queue, further comprising:

if the second queue does not contain the remaining target data packets, returning to execute the step of copying the at least one target data packet from the first queue to the second queue when the first queue contains the received at least one target data packet.

5. The method of any one of claims 1 to 4, wherein the target data packet is a panoramic camera data packet.

6. A data sending device based on multilink aggregation is applied to image transmission equipment, wherein the image transmission equipment is connected with video networking equipment through at least two communication links, and the device comprises:

a copying module, configured to copy the at least one target data packet from a first queue to a second queue when the at least one received target data packet is stored in the first queue;

an emptying module for emptying the first queue;

and the sending module is used for sequentially sending the at least one target data packet from the second queue to the video networking equipment through the at least two communication links according to a preset sequence and a preset sending interval.

7. The apparatus of claim 6, further comprising:

a receiving module, configured to receive at least one latest data packet;

a storing module, configured to store the at least one latest data packet into the first queue according to a receiving order of the at least one latest data packet;

and the calling module is used for taking the at least one latest data packet as the at least one target data packet and calling the copying module to execute the step of copying the at least one target data packet from the first queue to the second queue when the received at least one target data packet is stored in the first queue.

8. The apparatus of claim 6, wherein the predetermined sequence is a sequence in which the at least one target packet is stored in the second queue, and the sending module comprises:

a first determining submodule, configured to determine, from the remaining target data packets in the second queue, a target data packet that is stored in the second queue first;

the sending submodule is used for sending the target data packet firstly stored in the second queue to the video networking equipment;

a second determining submodule, configured to determine whether the second queue stores the remaining target data packets;

a first calling sub-module, configured to, if the remaining target data packets are stored in the second queue, call the first determining sub-module to perform the step of determining, from the remaining target data packets in the second queue, a target data packet that is first stored in the second queue.

9. The apparatus of claim 8, wherein the sending module further comprises:

a second invoking sub-module, configured to invoke the copying module to execute the step of copying the at least one target data packet from the first queue to the second queue when the at least one received target data packet is stored in the first queue if the second queue does not store the remaining target data packets.

10. The apparatus of any one of claims 6 to 9, wherein the target data packet is a panoramic camera data packet.

Technical Field

The invention relates to the technical field of video networking, in particular to a data sending method and device based on multilink aggregation.

Background

With the development of the technical field of video networking, the real-time bandwidth required for transmitting data is larger and larger. At present, when data is sent, data can be sent in a multilink aggregation mode, that is, each link corresponds to multiple network cards in the data sending device one by one, the data can be distributed to each network card after being shunted, and then each network card can send the data through the corresponding link.

However, in the process of directly sending data by adopting the multi-link aggregation method, because multiple network cards are independent of each other, the data volume sent by each network card in a unit time and the data volume sent by the same network card in different times are greatly different, so that the real-time bandwidth in the data sending process greatly jitters, and the video networking equipment receiving the data cannot smoothly play.

Disclosure of Invention

In view of the above, embodiments of the present invention are proposed in order to provide a data transmission method and apparatus based on multi-link aggregation that overcomes or at least partially solves the above problems.

In order to solve the above problem, an embodiment of the present invention discloses a data sending method based on multilink aggregation, which is applied to a graph transmission device, where the graph transmission device is connected to a video networking device through at least two communication links, and the method includes:

when the received at least one target data packet is stored in the first queue, copying the at least one target data packet from the first queue to a second queue;

emptying the first queue;

and sequentially sending the at least one target data packet from the second queue to the video networking equipment through the at least two communication links according to a preset sequence and a preset sending interval.

Optionally, after clearing the first queue, the method further includes:

receiving at least one latest data packet;

storing the at least one latest data packet into the first queue according to the receiving sequence of the at least one latest data packet;

and taking the at least one latest data packet as the at least one target data packet, and returning to execute the step of copying the at least one target data packet from the first queue to the second queue when the at least one received target data packet is stored in the first queue.

Optionally, the preset order is a sequence of the at least one target data packet stored in the second queue, and the sequentially sending the at least one target data packet from the second queue to the video networking device through the at least two communication links according to the preset order and the preset sending interval includes:

determining a target data packet which is stored in the second queue firstly from the target data packets left in the second queue;

sending the target data packet stored in the second queue to the video networking equipment;

determining whether the second queue contains the remaining target data packets;

and if the second queue has the residual target data packets, returning to the step of executing the target data packets left in the second queue and determining the target data packet which is stored in the second queue firstly.

Optionally, after determining whether the second queue stores the remaining target data packets, the method further includes:

if the second queue does not contain the remaining target data packets, returning to execute the step of copying the at least one target data packet from the first queue to the second queue when the first queue contains the received at least one target data packet.

Optionally, the target data packet is a panoramic camera data packet.

The invention also provides a data sending device based on multilink aggregation, which is applied to image transmission equipment, wherein the image transmission equipment is connected with the video network equipment through at least two communication links, and the device comprises:

a copying module, configured to copy the at least one target data packet from a first queue to a second queue when the at least one received target data packet is stored in the first queue;

an emptying module for emptying the first queue;

and the sending module is used for sequentially sending the at least one target data packet from the second queue to the video networking equipment through the at least two communication links according to a preset sequence and a preset sending interval.

Optionally, the apparatus further comprises:

a receiving module, configured to receive at least one latest data packet;

a storing module, configured to store the at least one latest data packet into the first queue according to a receiving order of the at least one latest data packet;

and the calling module is used for taking the at least one latest data packet as the at least one target data packet and calling the copying module to execute the step of copying the at least one target data packet from the first queue to the second queue when the received at least one target data packet is stored in the first queue.

Optionally, the preset order is an order of storing the at least one target data packet into the second queue, and the sending module includes:

a first determining submodule, configured to determine, from the remaining target data packets in the second queue, a target data packet that is stored in the second queue first;

the sending submodule is used for sending the target data packet firstly stored in the second queue to the video networking equipment;

a second determining submodule, configured to determine whether the second queue stores the remaining target data packets;

a first calling sub-module, configured to, if the remaining target data packets are stored in the second queue, call the first determining sub-module to perform the step of determining, from the remaining target data packets in the second queue, a target data packet that is first stored in the second queue.

Optionally, the sending module further includes:

a second invoking sub-module, configured to invoke the copying module to execute the step of copying the at least one target data packet from the first queue to the second queue when the at least one received target data packet is stored in the first queue if the second queue does not store the remaining target data packets.

Optionally, the target data packet is a panoramic camera data packet.

The embodiment of the invention has the following advantages:

in this embodiment of the present invention, when at least one received target packet is stored in a first queue, a graph transmission device copies the at least one target packet from the first queue to a second queue, then empties the first queue, and sequentially sends the at least one target packet from the second queue to an internet of view device through at least two communication links according to a preset sequence and a preset sending interval. In the embodiment of the present invention, after the graph transmission device copies the target data packet from the first queue to the second queue, the first queue may be emptied, and then the second queue may sequentially send the target data packet to the view network device, and at the same time, the first queue may receive a new data packet, that is, may implement simultaneous enqueuing and dequeuing of the data packet, thereby ensuring that the packet sending efficiency and the delay condition of the data packet are maintained at normal levels meeting requirements. Under the condition of ensuring basic packet sending efficiency and delay requirements, the image transmission equipment can send target data packets to the video networking equipment in sequence from the second queue according to a preset sequence and preset sending intervals, the quantity and the time intervals of the data packets sent by the network cards corresponding to different communication links within any time are ensured to be the same, and therefore the data packets can be sent uniformly and stably, the jitter degree of real-time bandwidth can be reduced, the video networking equipment can also receive the data packets uniformly and stably, and the playing fluency of the video networking terminal is improved.

Drawings

Fig. 1 is a flowchart illustrating a method for transmitting data based on multilink aggregation according to an embodiment of the present invention;

fig. 2 is a flowchart illustrating a method for transmitting data based on multilink aggregation according to a second embodiment of the present invention;

fig. 3 is a flowchart of another method for transmitting data based on multilink aggregation according to a second embodiment of the present invention;

fig. 4 is a schematic structural diagram illustrating a data transmitting apparatus based on multilink aggregation according to a third embodiment of the present invention;

fig. 5 is a schematic structural diagram illustrating a data transmitting apparatus based on multilink aggregation according to a fourth embodiment of the present invention;

FIG. 6 is a networking schematic of a video network of the present invention;

FIG. 7 is a diagram of a hardware architecture of a node server according to the present invention;

fig. 8 is a schematic diagram of a hardware architecture of an access switch of the present invention;

fig. 9 is a schematic diagram of a hardware structure of an ethernet protocol conversion gateway according to 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.

23页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:数据传输优化方法、装置、计算机设备和存储介质

网友询问留言

已有0条留言

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

精彩留言,会给你点赞!