Media stream delivery method, CDN node server, CDN system, and readable storage medium
AssigneeZte Corporation
InventorsXiaoqu Zhang, Rihong Wang
Life of this patent
Estimating the term…
Abstract
Provided are a media stream delivery method, a content delivery network (CDN) node server, a CDN system and a readable storage medium. The media stream delivery method includes: receiving a data packet of a media stream; writing the received data packet of the media stream into a shared memory; and responding to a request of a user terminal, reading the data packet of the media stream requested by the user terminal from the shared memory, and sending the data packet.
Claims13
A media stream delivery method, applied to a content delivery network (CDN) node server which runs in a Linux operating system, wherein the CDN node server supports a channel unicast live business, and the CDN node server comprises a network card, and the Linux operating system comprises an architecture divided into a user mode and a kernel mode, and wherein the method comprises:
- receiving a data packet of a media stream, wherein the data packet is received by a network card driver process from the network card and written to a data cache area in the kernel mode of the network card;
- establishing a shared memory through a memory mapping function mmap provided by the Linux operating system, wherein data in the data cache area in the kernel mode of the network card is copied to the shared memory by a media packet reception process through a system call function recvmsg provided by the Linux operating system, and the shared memory is mapped as a memory file at the same time, wherein the shared memory refers to a memory area shared by an application cache area of a streaming media service software in the user mode and a packet sending buffer area of a network card driver process in the kernel mode;
- and
- responding to requests of multiple user terminals, reading the data packet of the media stream requested by the multiple user terminals from the memory file mapped by the shared memory by using a SENDFILE function provided by the Linux operating system, and submitting the data packet to the network card driver process for direct packet sending.
A content delivery network (CDN) node server, which runs in a Linux operating system, wherein the CDN node server supports a channel unicast live business, and the CDN node server comprises a network card, and the Linux operating system comprises an architecture divided into a user mode and a kernel mode, wherein the CDN node server further comprises a memory, a processor and a computer program stored in the memory and executable by the processor, wherein the processor, when executing the computer program, is configured to:
- receive a data packet of a media stream, wherein the data packet is received by a network card driver process from the network card and written to a data cache area in the kernel mode of the network card;
- establish a shared memory through a memory mapping function mmap provided by the Linux operating system, wherein data in the data cache area in the kernel mode of the network card is copied to the shared memory by a media packet reception process through a system call function recvmsg provided by the Linux operating system, and the shared memory is mapped as a memory file at the same time, wherein the shared memory refers to a memory area shared by an application cache area of a streaming media service software in the user mode and a packet sending buffer area of a network card driver process in the kernel mode;
- and
- respond to requests of multiple user terminals, read the data packet of the media stream requested by the multiple user terminals from the memory file mapped by the shared memory by using a SENDFILE function provided by the Linux operating system, and submit the data packet to the network card driver process for direct packet sending.
A content delivery network (CDN) system, comprising an origin server, a CDN node server and multiple user terminals, wherein the CDN node server is configured to receive a media stream from the origin server for delivery to the multiple user terminals, the CDN node server which runs in a Linux operating system, wherein the CDN node server supports a channel unicast live business, and the CDN node server comprises a network card, and the Linux operating system comprises an architecture divided into a user mode and a kernel mode, the CDN node server further comprises a memory, a processor and a computer program stored in the memory and executable by the processor, wherein the processor, when executing the computer program, is configured to:
- receive a data packet of the media stream, wherein the data packet is received by a network card driver process from the network card and written to a data cache area in the kernel mode of the network card;
- establish a shared memory through a memory mapping function mmap provided by the Linux operating system, wherein data in the data cache area in the kernel mode of the network card is copied to the shared memory by a media packet reception process through a system call function recvmsg provided by the Linux operating system, and the shared memory is mapped as a memory file at the same time, wherein the shared memory refers to a memory area shared by an application cache area of a streaming media service software in the user mode and a packet sending buffer area of a network card driver process in the kernel mode;
- and
- respond to requests of the multiple user terminals, read the data packet of the media stream requested by the multiple user terminals from the memory file mapped by the shared memory by using a SENDFILE function provided by the Linux operating system, and submit the data packet to the network card driver process for direct packet sending.
Dependencies are inferred from the claim text.