Data connection restarting method, data processing method and device in live broadcast service

文档序号:1398631 发布日期:2020-03-03 浏览:10次 中文

阅读说明:本技术 直播业务中数据连接重启方法、数据处理方法和装置 (Data connection restarting method, data processing method and device in live broadcast service ) 是由 刘廷伟 闵庆欢 朱照远 于 2018-08-24 设计创作,主要内容包括:本发明公开了一种直播业务中数据连接重启方法、数据处理方法和装置。其中,该方法包括:存储待迁移进程的数据;在内核协议栈中停止接收推流终端发送的数据包,执行进程重启;将待迁移进程的数据迁移至目标进程,恢复数据连接。本发明解决了由于相关技术在解决直播流断流问题的过程中需要通过上层业务修改用户层协议栈才能实现直播流不断流的情况下的计划内重启,导致的执行效率低的技术问题。(The invention discloses a data connection restarting method, a data processing method and a data processing device in a live broadcast service. Wherein, the method comprises the following steps: storing data of a process to be migrated; stopping receiving the data packet sent by the plug flow terminal in the kernel protocol stack, and executing process restart; and migrating the data of the process to be migrated to the target process, and recovering the data connection. The invention solves the technical problem of low execution efficiency caused by that the related technology can realize the in-plan restart under the condition that the live stream is not interrupted only by modifying a user layer protocol stack through an upper layer service in the process of solving the problem of live stream interruption.)

1. A method for restarting data connection in live broadcast service comprises the following steps:

storing data of a process to be migrated;

stopping receiving the data packet sent by the plug flow terminal in the kernel protocol stack, and executing process restart;

and migrating the data of the process to be migrated to a target process, and recovering data connection.

2. The method for restarting data connection in live broadcast service according to claim 1, wherein the storing data of the process to be migrated includes:

and under the condition that the session information is located in the local storage device, storing the kernel protocol stack state and the content data of the process to be migrated in the session information.

3. The method for restarting data connection in live broadcast service according to claim 2, wherein the migrating the data of the process to be migrated to a target process includes:

reading the kernel protocol stack state and content data of the process to be migrated;

and updating the kernel protocol stack state and the content data of the process to be migrated to the target process.

4. The method for restarting data connection in live broadcast service according to claim 1, wherein the storing data of the process to be migrated includes:

and under the condition that the session information is positioned at the network end, storing the kernel protocol stack state and the content data of the process to be migrated of the first host in the session information.

5. The method for restarting data connection in live broadcast service according to claim 4, wherein the migrating the data of the process to be migrated to a target process includes:

and the second host reads the kernel protocol stack state and the content data of the process to be migrated of the first host and updates the kernel protocol stack state and the content data of the process to be migrated to the target process of the second host.

6. The method for restarting data connection in live broadcast service according to claim 1, wherein the stopping receiving the data packet sent by the stream pushing terminal in the kernel protocol stack includes:

and stopping receiving the data packet sent by the stream pushing terminal, and discarding the data packet sent by the stream pushing terminal during the stopping period.

7. The method for restarting data connection in live broadcast service according to any one of claims 1 to 6, wherein after migrating the data of the process to be migrated to a target process, the method further comprises:

and re-receiving the data packet sent by the stream pushing terminal discarded when the process is restarted, and recovering the data connection.

8. A method for restarting data connection in live broadcast service comprises the following steps:

under the condition that the session information is located in the local storage device, storing the kernel protocol stack state and the content data of the process to be migrated in the session information;

stopping receiving the data packet sent by the plug flow terminal in the kernel protocol stack, and executing process restart;

reading the kernel protocol stack state and content data of the process to be migrated from the session information;

and updating the kernel protocol stack state and the content data of the process to be migrated to a target process, and re-receiving the data packet sent by the plug flow terminal discarded when the process is restarted.

9. A method for restarting data connection in live broadcast service comprises the following steps:

under the condition that the session information is located at a network end, the first host stores the kernel protocol stack state and content data of a process to be migrated of the first host in the session information;

stopping receiving the data packet sent by the plug flow terminal in the kernel protocol stack, and executing process restart;

the second host reads the kernel protocol stack state and the content data of the process to be migrated of the first host from the session information;

and updating the state and the content data of the kernel protocol stack of the process to be migrated to the target process of the second host, and re-receiving the data packet sent by the plug flow terminal discarded when the process is restarted.

10. A method of data processing, comprising:

storing data of a process to be migrated;

stopping receiving the data packet sent by the sender in the kernel protocol stack, and executing process restart;

and migrating the data of the process to be migrated to a target process, and recovering data connection.

11. A data connection restart apparatus in a live broadcast service, comprising:

the storage module is used for storing data of a process to be migrated;

the restarting module is used for stopping receiving the data packet sent by the plug flow terminal in the kernel protocol stack and executing process restarting;

and the data recovery module is used for migrating the data of the process to be migrated to the target process and recovering data connection.

12. The apparatus for restarting data connection in live service according to claim 11, wherein said storage module comprises:

the first storage unit is used for storing the kernel protocol stack state and the content data of the process to be migrated in the session information under the condition that the session information is located in the local storage device.

13. The apparatus for restarting data connection in live service according to claim 12, wherein the data recovery module comprises:

the reading unit is used for reading the kernel protocol stack state and the content data of the process to be migrated;

and the updating unit is used for updating the kernel protocol stack state and the content data of the process to be migrated to the target process.

14. The apparatus for restarting data connection in live service according to claim 11, wherein said storage module comprises:

and the second storage unit is used for storing the kernel protocol stack state and the content data of the process to be migrated of the first host in the session information under the condition that the session information is located at a network end.

15. The apparatus for restarting data connection in live service according to claim 14, wherein the data recovery module comprises:

and the data recovery unit is used for controlling the second host to read the kernel protocol stack state and the content data of the process to be migrated of the first host and update the kernel protocol stack state and the content data of the process to be migrated to the target process of the second host.

16. The live service data connection restart apparatus of claim 11, wherein the restart module comprises:

and the discarding unit is used for stopping receiving the data packet sent by the stream pushing terminal and discarding the data packet sent by the stream pushing terminal during the stopping period.

17. The apparatus for restarting data connection in live service according to any one of claims 11 to 16, wherein said apparatus further comprises:

and the receiving module is used for re-receiving the data packet sent by the stream pushing terminal discarded when the process is restarted and recovering data connection after the data of the process to be migrated is migrated to the target process.

18. An apparatus for restarting a data connection in a live broadcast service, comprising:

the storage module is used for storing the kernel protocol stack state and the content data of the process to be migrated in the session information under the condition that the session information is located in the local storage device;

the restarting module is used for stopping receiving the data packet sent by the plug flow terminal in the kernel protocol stack and executing process restarting;

a reading module, configured to read, from the session information, a kernel protocol stack state and content data of the process to be migrated;

and the updating module is used for updating the kernel protocol stack state and the content data of the process to be migrated to a target process and re-receiving the data packet sent by the plug flow terminal when the process is restarted.

19. A data connection restart apparatus in a live broadcast service, comprising:

the storage module is used for storing the kernel protocol stack state and the content data of the process to be migrated of the first host in the session information by the first host under the condition that the session information is positioned at a network end;

the restarting module is used for stopping receiving the data packet sent by the plug flow terminal in the kernel protocol stack and executing process restarting;

and the updating module is used for updating the kernel protocol stack state and the content data of the process to be migrated to the target process of the second host under the condition that the second host reads the kernel protocol stack state and the content data of the process to be migrated from the session information, and re-receiving the data packet sent by the plug flow terminal and discarded when the process is restarted.

20. A data processing apparatus comprising:

the storage module is used for storing data of a process to be migrated;

the restarting module is used for stopping receiving the data packet sent by the sender in the kernel protocol stack and executing process restarting;

and the data migration module is used for migrating the data of the process to be migrated to the target process and recovering the data connection.

21. A storage medium comprising a stored program, wherein the program, when executed, controls an apparatus on which the storage medium is located to perform: storing data of a process to be migrated; stopping receiving the data packet sent by the plug flow terminal in the kernel protocol stack, and executing process restart; and migrating the data of the process to be migrated to a target process, and recovering data connection.

Technical Field

The invention relates to the field of internet, in particular to a data connection restarting method, a data processing method and a data processing device in a live broadcast service.

Background

Live streaming services on a Content Delivery Network (CDN) are very huge, and live streaming services are very sensitive to interruption of streaming and replay, and once a software restart in a plan or an software restart out of the plan occurs, all live streaming on the server will be interrupted.

Disclosure of Invention

The embodiment of the invention provides a data connection restarting method, a data processing method and a data processing device in a live broadcast service, which at least solve the technical problem of low execution efficiency caused by that in the process of solving the problem of live broadcast stream interruption, the execution efficiency is low under the condition that the live broadcast stream can be restarted without interruption only by modifying a user layer protocol stack through an upper layer service in the related technology.

According to an aspect of the embodiments of the present invention, a method for restarting a data connection in a live broadcast service is provided, including: storing data of a process to be migrated; stopping receiving the data packet sent by the plug flow terminal in the kernel protocol stack, and executing process restart; and migrating the data of the process to be migrated to the target process, and recovering the data connection.

Optionally, the storing the data of the process to be migrated includes: and under the condition that the session information is located in the local storage device, storing the kernel protocol stack state and the content data of the process to be migrated in the session information.

Optionally, migrating the data of the process to be migrated to the target process includes: reading the kernel protocol stack state and content data of a process to be migrated; and updating the kernel protocol stack state and the content data of the process to be migrated to the target process.

Optionally, the storing the data of the process to be migrated includes: and under the condition that the session information is positioned at the network end, storing the kernel protocol stack state and the content data of the process to be migrated of the first host in the session information.

Further, optionally, migrating the data of the process to be migrated to the target process includes: and the second host reads the kernel protocol stack state and the content data of the process to be migrated of the first host and updates the kernel protocol stack state and the content data of the process to be migrated to the target process of the second host.

Optionally, the stopping receiving, in the kernel protocol stack, the data packet sent by the stream pushing terminal includes: stopping receiving the data packet sent by the stream pushing terminal, and discarding the data packet sent by the stream pushing terminal during the stopping period.

Optionally, after migrating the data of the process to be migrated to the target process, the method further includes: and re-receiving the data packet sent by the stream pushing terminal discarded when the process is restarted, and recovering the data connection.

According to an aspect of the embodiments of the present invention, there is provided another method for restarting a data connection in a live broadcast service, including: under the condition that the session information is located in the local storage device, storing the kernel protocol stack state and the content data of the process to be migrated in the session information; stopping receiving the data packet sent by the plug flow terminal in the kernel protocol stack, and executing process restart; reading the kernel protocol stack state and content data of the process to be migrated from the session information; and updating the kernel protocol stack state and the content data of the process to be migrated to the target process, and re-receiving the data packet sent by the plug flow terminal discarded when the process is restarted.

According to an aspect of the embodiments of the present invention, there is provided another method for restarting a data connection in a live broadcast service, including: under the condition that the session information is located at the network end, the first host stores the kernel protocol stack state and the content data of the process to be migrated of the first host in the session information; stopping receiving the data packet sent by the plug flow terminal in the kernel protocol stack, and executing process restart; the second host reads the kernel protocol stack state and content data of the process to be migrated of the first host from the session information; and updating the kernel protocol stack state and the content data of the process to be migrated to the target process of the second host, and re-receiving the data packet sent by the plug flow terminal discarded when the process is restarted.

According to an aspect of the embodiments of the present invention, there is further provided a data processing method, including: storing data of a process to be migrated; stopping receiving the data packet sent by the sender in the kernel protocol stack, and executing process restart; and migrating the data of the process to be migrated to the target process, and recovering the data connection.

According to another aspect of the embodiments of the present invention, there is also provided a device for restarting data connection in live broadcast service, including: the storage module is used for storing data of a process to be migrated; the restarting module is used for stopping receiving the data packet sent by the plug flow terminal in the kernel protocol stack and executing process restarting; and the data recovery module is used for migrating the data of the process to be migrated to the target process and recovering the data connection.

Optionally, the storage module includes: and the first storage unit is used for storing the kernel protocol stack state and the content data of the process to be migrated in the session information under the condition that the session information is located in the local storage device.

Optionally, the data recovery module includes: the reading unit is used for reading the kernel protocol stack state and the content data of the process to be migrated; and the updating unit is used for updating the kernel protocol stack state and the content data of the process to be migrated to the target process.

Optionally, the storage module includes: and the second storage unit is used for storing the kernel protocol stack state and the content data of the process to be migrated of the first host in the session information under the condition that the session information is located at the network end.

Further, optionally, the data recovery module includes: and the data recovery unit is used for controlling the second host to read the kernel protocol stack state and the content data of the process to be migrated of the first host and update the kernel protocol stack state and the content data of the process to be migrated to the target process of the second host.

Optionally, the restart module includes: and the discarding unit is used for stopping receiving the data packet sent by the stream pushing terminal and discarding the data packet sent by the stream pushing terminal during the stopping period.

Optionally, the apparatus further comprises: and the receiving module is used for re-receiving the data packet sent by the stream pushing terminal discarded when the process is restarted and recovering the data connection after the data of the process to be migrated is migrated to the target process.

According to another aspect of the embodiments of the present invention, there is provided another apparatus for restarting a data connection in a live broadcast service, including: the storage module is used for storing the kernel protocol stack state and the content data of the process to be migrated in the session information under the condition that the session information is located in the local storage device; the restarting module is used for stopping receiving the data packet sent by the plug flow terminal in the kernel protocol stack and executing process restarting; the reading module is used for reading the kernel protocol stack state and the content data of the process to be migrated from the session information; and the updating module is used for updating the kernel protocol stack state and the content data of the process to be migrated to the target process and re-receiving the data packet sent by the plug flow terminal discarded when the process is restarted.

According to another aspect of the embodiments of the present invention, there is provided another apparatus for restarting data connection in live broadcast service, including: the storage module is used for storing the kernel protocol stack state and the content data of the process to be migrated of the first host in the session information by the first host under the condition that the session information is positioned at the network end; the restarting module is used for stopping receiving the data packet sent by the plug flow terminal in the kernel protocol stack and executing process restarting; and the updating module is used for updating the kernel protocol stack state and the content data of the process to be migrated to the target process of the second host under the condition that the second host reads the kernel protocol stack state and the content data of the process to be migrated of the first host from the session information, and re-receiving the data packet sent by the plug flow terminal discarded when the process is restarted.

According to another aspect of the embodiments of the present invention, there is also provided a data processing apparatus, including: the storage module is used for storing data of a process to be migrated; the restarting module is used for stopping receiving the data packet sent by the sender in the kernel protocol stack and executing process restarting; and the data migration module is used for migrating the data of the process to be migrated to the target process and recovering the data connection. According to still another aspect of an embodiment of the present invention, there is also provided a storage medium including: the storage medium includes a stored program, wherein the program, when executed, controls the apparatus on which the storage medium is located to perform: storing data of a process to be migrated; stopping receiving the data packet sent by the plug flow terminal in the kernel protocol stack, and executing process restart; and migrating the data of the process to be migrated to the target process, and recovering the data connection.

In the embodiment of the invention, the reliable transmission characteristic of a TCP protocol stack is utilized, freezing in a short time is adopted, the flow-out of a plug-flow terminal can be ensured not to be triggered, and meanwhile, after connection recovery, data in a freezing period can be acquired by means of retransmission, and the data of a process to be migrated is stored; stopping receiving the data packet sent by the plug flow terminal in the kernel protocol stack, and executing process restart; the method has the advantages that data of a process to be migrated are migrated to a target process, data connection is recovered, and the aims of reducing flow break caused by unplanned restart and achieving planned restart are achieved, so that the technical effect of live stream flow break when data connection under the CDN scene is subjected to hot migration is achieved, and the technical problem of low execution efficiency caused by the fact that in the process of solving the live stream flow break problem, the planned restart under the condition that live stream is not subjected to flow break can be achieved only by modifying a user layer protocol stack through upper-layer services in the related technology is solved.

Drawings

The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the invention and together with the description serve to explain the invention without limiting the invention. In the drawings:

fig. 1 is a block diagram of a hardware structure of a computer terminal of a data connection restart method in a live broadcast service according to an embodiment of the present invention;

fig. 2 is a flowchart of a method for restarting a data connection in a live broadcast service according to an embodiment of the present invention;

fig. 3 is a flowchart illustrating a method for restarting a data connection in a live broadcast service according to an embodiment of the present invention;

fig. 4 is a schematic flowchart of intra-cell hot repair in a data connection restart method in a live broadcast service according to a first embodiment of the present invention;

fig. 5 is a schematic flowchart of cross-host hot repair in a data connection restart method in a live broadcast service according to an embodiment of the present invention;

fig. 6 is a flowchart illustrating a method for restarting a data connection in a live broadcast service according to a second embodiment of the present invention;

fig. 7 is a flowchart illustrating a method for restarting a data connection in a live broadcast service according to a third embodiment of the present invention;

fig. 8 is a structural diagram of a data connection restarting apparatus in a live broadcast service according to a fourth embodiment of the present invention;

fig. 9 is a block diagram of a data connection restart apparatus in a live broadcast service according to a fifth embodiment of the present invention;

fig. 10 is a block diagram of a data connection restarting apparatus in a live service according to a sixth embodiment of the present invention.

Detailed Description

In order to make the technical solutions of the present invention better understood, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.

It should be noted that the terms "first," "second," and the like in the description and claims of the present invention and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the invention described herein are capable of operation in sequences other than those illustrated or described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.

The technical terms related to the present application are:

content distribution network: content Delivery Network, CDN for short.

23页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:一种注册域名的获取方法及装置

网友询问留言

已有0条留言

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

精彩留言,会给你点赞!

技术分类