CN1972192A - User-level communication method for stream media server - Google Patents

User-level communication method for stream media server Download PDF

Info

Publication number
CN1972192A
CN1972192A CNA2006101442866A CN200610144286A CN1972192A CN 1972192 A CN1972192 A CN 1972192A CN A2006101442866 A CNA2006101442866 A CN A2006101442866A CN 200610144286 A CN200610144286 A CN 200610144286A CN 1972192 A CN1972192 A CN 1972192A
Authority
CN
China
Prior art keywords
streaming media
application program
core
hardware
media application
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CNA2006101442866A
Other languages
Chinese (zh)
Other versions
CN100428670C (en
Inventor
朱子玉
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tsinghua University
Original Assignee
Tsinghua University
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Tsinghua University filed Critical Tsinghua University
Priority to CNB2006101442866A priority Critical patent/CN100428670C/en
Publication of CN1972192A publication Critical patent/CN1972192A/en
Application granted granted Critical
Publication of CN100428670C publication Critical patent/CN100428670C/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

This invention relates to one user layer communication method of outer service of flow media in flow media communication technique field, which is characterized by the following: flow media application program processes flow media data package according to agreement into network hardware device for direct identification form; then program fills these data package into send queen and directly operates network hardware and to inform hardware device to send data to network.

Description

User-level communication method for stream media server
Technical field
The present invention relates to the method that a kind of streaming media server sends flow media data packet, be meant that especially a kind of streaming media server directly sends the method for flow media data packet at client layer.
Background technology
Along with the development of technology such as 3G mobile, Digital Television, IPV6, the speed of network is more and more fast.But in actual applications, the resources shared content is a key factor on the network.In these resource contents, Streaming Media is a kind of most important content.The raising of network speed and user increase, and have proposed very high requirement with regard to the performance of convection media server.
But the performance of present streaming media server also is not very high, and one of its performance bottleneck is exactly the network service performance.Present streaming media communication client layer agreement is used RTP usually, and the communication protocol of bottom is used the UDP/IP agreement usually.But present UDP/IP agreement is often implemented in the core layer of operating system (as shown in Figure 1).This is the performance of the network performance of restriction greatly just.The first, Streaming Media is applied in and must be absorbed in the core transmission when sending stream medium data, and time overhead is very big.The second, send data in core layer, just must there be data repeatedly to duplicate, time overhead is very big.The 3rd, send data in core layer, complicated buffer management is arranged, time overhead is very big.The operation that these time overheads are very big has taken most of processing time of streaming media server processor, adds the scheduling time and the reading and writing data time of Streaming Media request, just makes streaming media server can not utilize the network bandwidth fully.
Summary of the invention
The purpose of this invention is to provide the method that a kind of high efficiency streaming media server sends flow media data packet, solve the low problem of stream medium data transmit port network bandwidth utilance of streaming media server.
The objective of the invention is to realize by the following technical solutions.
The present invention uses the method for exchanges such as user plane communication to send flow media data packet.Streaming media server is at client layer process flow media data bag, then, directly sends flow media data packet by the operational network hardware device at client layer, and without the core layer of operating system.This method just can overcome the shortcoming at core layer transmission packet described in the background technology.The first, when Streaming Media is applied in client layer transmission stream medium data, need not to be absorbed in core and send (as shown in Figure 2, being embodied as example) with the UDP/IP client layer, time overhead is little.The second, send data at client layer, the data number of copy times is few, even accomplishes that 0-duplicates, and time overhead is little.The 3rd, send data at client layer, buffer management is simple, and time overhead is little.
The invention is characterized in that described streaming media server is as follows in the concrete steps that client layer sends flow media data packet:
1, initialization: system forms (as shown in Figure 3) by network interface controller (NIC) driver, core Agent and user agent program aspect software.The NIC driver is responsible for the management of NIC hardware device resources.The NIC hardware device resources comprises hardware doorbell, transmit queue address register group, reception formation address register group, transmit queue status register group, receives the quene state registers group, or the like.The hardware doorbell is the approach that application notification NIC transmits and receive data.Send (reception) formation and preserve transmission (reception) descriptor.Send (reception) descriptor and be used for describing (reception) task of transmission.Preserve the various information of (reception) task of transmission in the descriptor, comprise transmission (reception) destination address, data buffer address, or the like.Send (reception) formation address register and be used for storing transmission (reception) formation address.Send (reception) quene state registers group and be used for preserving the state that sends (reception) formation, comprise the situation of finishing the work and do not finish the work, or the like.The core agency is in charge of the core resource in the data communication process.Core resource comprises transmit queue group state, receives set of queues state, ATT, or the like.The user agent is used for packing client layer and sends and receive the supervisor interface.Application program just can send (reception) data by these routine interfaces, and does not need packet by oneself.When system start-up, core the agency at first start, and the device registration file.Application program will use these device files to shine upon core resource and NIC hardware device resources.NIC driver scan N IC hardware device.If the transmission hardware device, then registration one by one, these equipment of initialization, and distribute transmission (reception) formation.Then, the NIC driver will be to the core agency of trademark registration.After finishing initial work, will wait for that application program sends (reception) data.The Streaming Media application program operates in the user's space.
2, the Streaming Media application program is mapped to user address space to core resource and NIC hardware device resources from the core address space;
3, the Streaming Media application program is the stream medium data transmission buffering area that is responsible for assigning arbitrarily at user address space;
4, the Streaming Media application program is registered in the core space sending buffer address, and in registration process, will become physics (linearity) address to the virtual address translation of buffering area;
5, the Streaming Media application program requires the process flow media data bag at client layer according to the network communication protocol of appointment, and flow media data packet is packaged into communication data packet;
6, the Streaming Media application program is decomposed communication data packet according to the network hardware equipment requirement of appointment, is packaged into the hardware data bag;
Whether 7, the Streaming Media application program is by being mapped to one of NIC hardware device resources of user's space---transmit queue status register group---inquires about idle transmission descriptor in the transmit queue, if do not have, then wait for, if having, then continues.
8, the Streaming Media application program is responsible for assigning for each hardware data and fills in descriptor in the transmit queue;
9, the Streaming Media application program is pressed doorbell, the packet in the informing network hardware device transmission transmit queue;
10, whether the Streaming Media application queries has all resolved into the hardware data bag to communication data packet, if, then continue, if not, then forward 6 to;
11, whether inquiry all has been packaged into communication data packet to stream medium data, if, then finish, if not, then forward 5 to;
12, network hardware equipment is handled descriptor, and sends its data designated bag.
Preceding 10 steps are finished by the processor of streaming media server, and step 11 item is to be finished by network hardware equipment.Step 11 is carried out with preceding 10 steps are parallel.
The actual test result of following embodiment is test time of delay as shown in Figure 8 shown in the figure.On behalf of the core udp that realizes in the operating system, the exchanges such as user plane communication system that on behalf of embodiment, " uudp " realize, " kudp " realize.Want far time of delay the time of delay of uudp as can be seen less than kudp.For example, when the small data packets of 16 bytes sent, be 1.4 microseconds the time of delay of uudp, and be 9.3 microseconds the time of delay of kudp.When the big packet of 9216 bytes sent, be 8.0 microseconds the time of delay of uudp, and be 50.3 microseconds the time of delay of kudp.
As can be seen, lifting effect of the present invention is quite remarkable.
Description of drawings:
Fig. 1: conventional flow media server communication structure key diagram.
Fig. 2: streaming media server communication structure key diagram of the present invention.
Fig. 3: streaming media server communication structure of the present invention is implemented figure.
Fig. 4: address mapping relation figure: SDQ among the embodiment: send the descriptor formation, ATPT: ATT; DB: doorbell; D: descriptor; P: port; NIC: network interface controller.
Fig. 5: address registration graph of a relation: VAddr among the embodiment: virtual address; PAddr: physical address; Ptag: protection label; Flag: sign.
Fig. 6: embodiment detail flowchart.
Fig. 7: descriptor key diagram.
The actual test result figure of Fig. 8: embodiment.
Embodiment:
The present invention is described in further detail below in conjunction with drawings and Examples:
Description of drawings:
Fig. 6 is the detail flowchart of one embodiment of the invention.In this embodiment, what data communication protocol used is the UDP/IP agreement, and what network hardware equipment used is ethernet network device.
1, Streaming Media application program mapping core resource and network hardware equipment resource (as shown in Figure 4);
Core resource comprises transmit queue, ATT, and the network hardware equipment resource comprises doorbell, quene state registers group or the like.Transmit queue is formed by sending descriptor.Send descriptor and describe photos and sending messages.In the present embodiment, because what will send is the Ethernet data bag, so, send and only need data packet addressed information in the descriptor and data packet length information is just passable, as shown in Figure 7.Transmit queue is distributed by operating system kernel, and the formation physical address is informed network hardware equipment.Transmit queue is used for the information exchange of Streaming Media application program and network hardware equipment.The Streaming Media application program is filled in the descriptor in the transmit queue.Network hardware equipment just can read these descriptors.ATT is used for the Streaming Media application program virtual address translation of stream medium data buffering area is become physical address, and is filled up in the transmission descriptor.Doorbell is used for Streaming Media application notification network hardware equipment has stream medium data to send.The quene state description scheme is used for the transmit status of Streaming Media application queries flow media data packet.
2, Streaming Media application assigned flow media data packet sends buffering area;
3, Streaming Media application program registration flow media data packet sends buffering area (as shown in Figure 5);
It is for the virtual address translation buffering area becomes physical address that the registration flow media data packet sends buffering area, and is filled up in the ATT.ATT is mapped to user's space, can be used by the Streaming Media application program.
4, the Streaming Media application program is packaged into the UDP message bag to stream medium data at client layer, is packaged into the IP packet again;
5, the Streaming Media application program is wrapped IP to decompose again and is packaged into the Ethernet data bag;
6, whether idle transmission descriptor is arranged in the Streaming Media application queries transmit queue,, then wait for,, then continue if having if do not have.
7, the Streaming Media application program is responsible for assigning for each Ethernet data and fills in descriptor in the transmit queue;
8, the Streaming Media application program is pressed doorbell, the packet in the informing network hardware device transmission transmit queue;
9, whether inquiry has all resolved into the Ethernet data bag to the IP packet, if, then continue, if not, then forward 5 to;
10, whether inquiry all has been packaged into the UDP/IP packet to stream medium data, if, then finish, if not, then forward 4 to;
11, network hardware equipment is handled descriptor, and sends its data designated bag.
Preceding 10 steps are finished by the processor of streaming media server, and step 11 item is to be finished by network hardware equipment.Step 11 is carried out with preceding 10 steps are parallel.

Claims (1)

1, user-level communication method for stream media server is characterized in that, described method realizes according to the following steps at the client layer of streaming media server.
Step (1), initialization:
At streaming media server network interface controller driver, core Agent and user agent program are set, concrete:
The network controller driver, be positioned at the core layer of streaming media server, be responsible for comprising hardware doorbell, transmit queue address register group, receive formation address register group, transmit queue status register group, receive the management of the hardware device resources of quene state registers group, in described transmission or receive the transmission that formation preserves or receive in the descriptor and contain data packet addressed information and data packet length information;
The core Agent is positioned at the core layer of streaming media server, is in charge of the core resource that the data communication that comprises transmit queue group state, receive set of queues state and ATT is used;
User agent program is positioned at the client layer of streaming media server, comprises to be used to pack client layer used program and routine interface when sending and receiving information, and sends or receive data for the streaming media server application program;
Step (2), system start-up:
Start the core Agent, and registration is used to shine upon the device file of described core resource and network interface controller hardware device resources;
The initialization of network interface controller driver comprises the network interface controller hardware device that sends hardware device, and distributes transmission arbitrarily and receive formation, and this driver is registered to described core Agent then;
Step (3), the Streaming Media application program is mapped to user address space to the hardware device resources in core resource and the network interface controller from the core address space; The Streaming Media application program becomes physical address to the virtual address translation of stream medium data buffering area by described ATT, and is filled up in the transmission descriptor, mails to network hardware equipment by network interface controller; Network hardware equipment reads these transmission descriptors that has physical address;
Step (4), the Streaming Media application program that operates in user's space is the stream medium data transmission buffering area that is responsible for assigning arbitrarily at user address space;
Step (5), the Streaming Media application program is registered to core space sending buffer address, and is the virtual address translation of buffering area physical address, and is filled up in the ATT;
Step (6), the Streaming Media application program requires the process flow media data bag according to the network communication protocol of appointment earlier at client layer, again flow media data packet is packaged into communication data packet;
Step (7), the Streaming Media application program is decomposed described communication data packet according to the network hardware equipment requirement of appointment, is packaged into the hardware data bag;
Step (8), the Streaming Media application program inquires about by the transmit queue status register group of the user's space that shone upon whether idle transmission descriptor is arranged in the transmit queue, if do not have, then waits for, if having, then carries out next step;
Step (9), Streaming Media application program are responsible for assigning for each hardware data and fill in descriptor in the described transmit queue;
Step (10), the Streaming Media application program is pressed the hardware doorbell, and the informing network hardware device transmits the hardware data bag in the described transmit queue;
Step (11), whether the Streaming Media application queries has all resolved into the hardware data bag to communication data packet, if not, then changes step (7), if then change next step;
Step (12), whether the Streaming Media application queries all has been packaged into communication data packet to flow media data packet, if not, then changes step (6), if then stop.
CNB2006101442866A 2006-12-01 2006-12-01 User-level communication method for stream media server Expired - Fee Related CN100428670C (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CNB2006101442866A CN100428670C (en) 2006-12-01 2006-12-01 User-level communication method for stream media server

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CNB2006101442866A CN100428670C (en) 2006-12-01 2006-12-01 User-level communication method for stream media server

Publications (2)

Publication Number Publication Date
CN1972192A true CN1972192A (en) 2007-05-30
CN100428670C CN100428670C (en) 2008-10-22

Family

ID=38112808

Family Applications (1)

Application Number Title Priority Date Filing Date
CNB2006101442866A Expired - Fee Related CN100428670C (en) 2006-12-01 2006-12-01 User-level communication method for stream media server

Country Status (1)

Country Link
CN (1) CN100428670C (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102123144A (en) * 2011-02-22 2011-07-13 中兴通讯股份有限公司 Streaming media data transmission method and streaming transmission device

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7054949B2 (en) * 2001-01-19 2006-05-30 World Streaming Network, Inc. System and method for streaming media
CN1214592C (en) * 2002-08-06 2005-08-10 华为技术有限公司 Direct internal storage access system and method of multiple path data
US7325122B2 (en) * 2004-02-20 2008-01-29 International Business Machines Corporation Facilitating inter-DSP data communications
CN100493091C (en) * 2006-03-10 2009-05-27 清华大学 Flow-media direct-broadcasting P2P network method based on conversation initialization protocol

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102123144A (en) * 2011-02-22 2011-07-13 中兴通讯股份有限公司 Streaming media data transmission method and streaming transmission device
WO2012113255A1 (en) * 2011-02-22 2012-08-30 中兴通讯股份有限公司 Stream media data transmission method and streaming transmission apparatus
CN102123144B (en) * 2011-02-22 2016-09-14 中兴通讯股份有限公司 The method of transmission stream medium data and fluidisation transmitting device

Also Published As

Publication number Publication date
CN100428670C (en) 2008-10-22

Similar Documents

Publication Publication Date Title
US8392565B2 (en) Network memory pools for packet destinations and virtual machines
EP2312807B1 (en) Method and system for enabling zero-copy transmission of streaming media data
US8005022B2 (en) Host operating system bypass for packets destined for a virtual machine
US7499457B1 (en) Method and apparatus for enforcing packet destination specific priority using threads
US7499463B1 (en) Method and apparatus for enforcing bandwidth utilization of a virtual serialization queue
CN101340574B (en) Method and system realizing zero-copy transmission of stream media data
US6757746B2 (en) Obtaining a destination address so that a network interface device can write network data without headers directly into host memory
US8458280B2 (en) Apparatus and method for packet transmission over a high speed network supporting remote direct memory access operations
US7739736B1 (en) Method and apparatus for dynamically isolating affected services under denial of service attack
US5983274A (en) Creation and use of control information associated with packetized network data by protocol drivers and device drivers
US7792140B2 (en) Reflecting the bandwidth assigned to a virtual network interface card through its link speed
US7515596B2 (en) Full data link bypass
US7733890B1 (en) Network interface card resource mapping to virtual network interface cards
US7746783B1 (en) Method and apparatus for monitoring packets at high data rates
US7613132B2 (en) Method and system for controlling virtual machine bandwidth
RU2589398C2 (en) Data-fast-distribution method and device
US20040213243A1 (en) Transmission components for processing VLAN tag and priority packets supported by using single chip's buffer structure
US8539112B2 (en) TCP/IP offload device
WO2024037296A1 (en) Protocol family-based quic data transmission method and device
CN104717189A (en) Network data package sending method and device
CN113127139B (en) Memory allocation method and device based on DPDK of data plane development kit
US7591011B1 (en) Assigning higher priority to transactions based on subscription level
US20080118065A1 (en) Hardware acceleration for large volumes of channels
CN100428670C (en) User-level communication method for stream media server
CN111698274B (en) Data processing method and device

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
C17 Cessation of patent right
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20081022

Termination date: 20100104