CN105827588B - A kind of stream medium data dissemination system based on network driver layer - Google Patents

A kind of stream medium data dissemination system based on network driver layer Download PDF

Info

Publication number
CN105827588B
CN105827588B CN201510988936.4A CN201510988936A CN105827588B CN 105827588 B CN105827588 B CN 105827588B CN 201510988936 A CN201510988936 A CN 201510988936A CN 105827588 B CN105827588 B CN 105827588B
Authority
CN
China
Prior art keywords
module
data
network
interface
command reception
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.)
Active
Application number
CN201510988936.4A
Other languages
Chinese (zh)
Other versions
CN105827588A (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.)
Guangdong Eshore Technology Co Ltd
Original Assignee
Guangdong Eshore Technology Co Ltd
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 Guangdong Eshore Technology Co Ltd filed Critical Guangdong Eshore Technology Co Ltd
Priority to CN201510988936.4A priority Critical patent/CN105827588B/en
Publication of CN105827588A publication Critical patent/CN105827588A/en
Application granted granted Critical
Publication of CN105827588B publication Critical patent/CN105827588B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L65/00Network arrangements, protocols or services for supporting real-time applications in data packet communication
    • H04L65/60Network streaming of media packets
    • H04L65/65Network streaming protocols, e.g. real-time transport protocol [RTP] or real-time control protocol [RTCP]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/16Implementation or adaptation of Internet protocol [IP], of transmission control protocol [TCP] or of user datagram protocol [UDP]
    • H04L69/161Implementation details of TCP/IP or UDP/IP stack architecture; Specification of modified or new header fields
    • H04L69/162Implementation details of TCP/IP or UDP/IP stack architecture; Specification of modified or new header fields involving adaptations of sockets based mechanisms
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/16Implementation or adaptation of Internet protocol [IP], of transmission control protocol [TCP] or of user datagram protocol [UDP]
    • H04L69/168Implementation or adaptation of Internet protocol [IP], of transmission control protocol [TCP] or of user datagram protocol [UDP] specially adapted for link layer protocols, e.g. asynchronous transfer mode [ATM], synchronous optical network [SONET] or point-to-point protocol [PPP]

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Multimedia (AREA)
  • Computer Security & Cryptography (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The invention discloses a kind of stream medium data dissemination system based on network driver layer, it includes application management module, instruction sending module, command reception module and data distribution module, movement demand is transmitted to system kernel by call instruction sending module after parsing external demand for interacting with applications by the application management module;Described instruction sending module is preset with configuration interface and calls for application management module;Described instruction receiving module will be in the network instruction chained list of command reception function hooks to system when initializing;Data packet is handled into function hooks to the network N AT interface of system when the data distribution module initialization, the function is called when enabling system receive network data, and data distribution is carried out according to the distributing list of command reception module setting.The present invention have the characteristics that forward efficiency is high, Forwarding Latency is small, to server performance require it is low, be suitble to minimize, can transmit on the internet, Information Security it is strong.

Description

A kind of stream medium data dissemination system based on network driver layer
Technical field
The present invention relates to application-level flow media delivery service more particularly to a kind of stream medium datas based on network driver layer Dissemination system.
Background technique
Currently, the streaming media server of mainstream is all based on the forwarding of application layer network data to realize, technology phase is realized To simple, but data forwarding low efficiency, Forwarding Latency are larger, to the more demanding of server performance, are unfavorable for stream media technology Popularization.
Existing application-level flow media network data dissemination process as shown in figure 3, link layer, network layer and transport layer work Work is completed by operating system, does not need to develop, therefore development is completed in application layer by application program completely.Network data Packet be at least replicated in the whole process four times: be for the first time link layer NIC driver from network transmission mediums receive When data;It is that transport layer copies data to application layer for the second time;Third time is that transport layer from application layer copies data to inner nuclear layer; It is for 4th time that link layer copies data to network interface card and sent.Duplication work is also then carried out in application layer if it is one-to-many distribution Make.Wherein: link layer: receiving the raw network data sent from network transmission mediums by network interface card when receiving data, knows Other data frame, and detect mistake;Network layer is sent into IP data packet when sending data and carries out network frame encapsulation, and passes through net Card is sent on network transmission mediums.Network layer: being responsible for parsing IP data packet when receiving data, and IP packet is resolved into kind of network and is assisted View packet, and it is transmitted to transport layer;Transport layer is transmitted through to the network protocol encapsulating come when sending data and dresses up IP packet, and is transmitted to chain Road floor.Transport layer: be responsible for copying to the user data part of network protocol packet when receiving data corresponding application layer receive into Journey;Application layer data is encapsulated as network protocol packet and is transmitted to network layer when sending data.Application layer: application program is according to matching The UDP message packet received the work such as is forwarded, is replicated by the distribution policy set, and the data packet to be sent enters transmission Layer is sent.However that there are forward efficiencies is low, Forwarding Latency is big, server performance is wanted for above-mentioned application-level flow distribution of media process It asks high, be difficult to the defects of minimizing.
Existing UDP multicast data delivery process is as shown in figure 4, management system needs to determine one to every road stream medium data A unique multicast ip address needs to initiate to multicast switch when streaming media clients need to receive the road stream medium data The distribution management work of data application, multicast packets is completed by multicast switch.Therefore, performance of this mode to the network switch It is required that relatively high;Meanwhile the biography hair of multicast packets has been truncated in the considerations of for network storm, internet router, on the internet Multicast packets cannot be received and dispatched normally.
Summary of the invention
The technical problem to be solved in the present invention is that in view of the deficiencies of the prior art, provide that a kind of forward efficiency is high, forwarding Be delayed it is small, to server performance require it is low, be suitble to miniaturization, can transmit on the internet, the Streaming Media that Information Security is strong Data distribution systems.
In order to solve the above technical problems, the present invention adopts the following technical scheme that.
A kind of stream medium data dissemination system based on network driver layer comprising there is application management module, instruction to send Module, command reception module and data distribution module, in which: the application management module, will be outer for interacting with applications Movement demand is transmitted to by system kernel by call instruction sending module after the parsing of portion's demand;Described instruction sending module is default There is configuration interface to call for application management module, described instruction sending module is by calling setsockopt system interface and instruction Receiving module interaction;By the network instruction chained list of command reception function hooks to system when described instruction receiving module initializes In, with enable application layer call setsockopt or getsockopt interface when, command reception function can receive the instruction and The instruction is handled;By the network N AT of data packet processing function hooks to system when the data distribution module initialization Interface calls the function, and is carried out according to the distributing list of command reception module setting when enabling system receive network data Data distribution.
Preferably, the application management module is directed to different applications, is preset with different parsing modules.
Preferably, described instruction sending module includes as given an order: distribution module initialization, adds distribution module release Add camera, deletes camera, addition forwarding routing, deletes forwarding routing and query routing.
Preferably, described instruction sending module in the process of implementation, initially sets up Socket, data call is arranged later Setsockopt interface obtains data call getsockopt interface.
Preferably, when the data distribution module carries out data distribution, first determine whether data packet whether from input network interface into Enter, then judge whether data packet is UDP packet, calculates HASH value later to obtain source data object table, finally according to source data pair As the Distribution List in table carries out data distribution.
Stream medium data dissemination system disclosed by the invention based on network driver layer, is made of four modules, that is, applies Management module, instruction sending module, command reception module and data distribution module, wherein instruction module passes through system kernel Network interface carrys out interaction data, and response application management module is transmitted through the instruction such as the data distribution come and inquiry, data distribution module It is realized by network driver, being distributed, modify, deleting to corresponding network data according to data distribution strategy, network drives Dynamic model block has been taken over stream medium data in network layer and has directly been distributed, and reduces data from network layer to transport layer again to answering The process then successively returned again with layer, the forwarding of the same data packet reduces four transmitting and twice data copy, by net The forward efficiency of network data improves an order of magnitude.By the above as can be seen that the present invention not only realizes Streaming Media The big data quantities of data is distributed, also have forward efficiency is high, Forwarding Latency is small, to server performance require it is low, be suitble to miniaturization, It can transmit on the internet, the features such as Information Security is strong.
Detailed description of the invention
Fig. 1 is that the present invention is based on the composition block diagrams of the stream medium data dissemination system of network driver layer.
Fig. 2 is flow chart of the present invention in network data repeating process.
Fig. 3 is the flow chart of existing application-level flow media network data dissemination process.
Fig. 4 is the flow chart of existing UDP multicast data delivery process.
Specific embodiment
The present invention is described in more detail with reference to the accompanying drawings and examples.
The invention discloses a kind of stream medium data dissemination system based on network driver layer, as shown in Figure 1, it includes Application management module 1, instruction sending module 2, command reception module 3 and data distribution module 4, in which:
The application management module 1 is sent after parsing external demand by call instruction for interacting with applications Movement demand is transmitted to system kernel by module 2;
Described instruction sending module 2 is preset with configuration interface and calls for application management module 1, described instruction sending module 2 By calling setsockopt system interface to interact with command reception module 3;
By in the network instruction chained list of command reception function hooks to system when described instruction receiving module 3 initializes, with When application layer being enabled to call setsockopt or getsockopt interface, command reception function can receive the instruction and refer to this Order is handled;
By the network N AT interface of data packet processing function hooks to system when the data distribution module 4 initializes, to enable System calls the function when receiving network data, and carries out data distribution according to the distributing list that command reception module 3 is arranged.
Further, the application management module 1 is directed to different applications, is preset with different parsing modules.
Described instruction sending module 2 includes as given an order as a preferred method: distribution module initialization, distribution Module release, addition camera delete camera, addition forwarding routing, delete forwarding routing and query routing.
In the present embodiment, described instruction sending module 2 in the process of implementation, initially sets up Socket, it may be assumed that
Sd=socket (AF_INET, SOCK_RAW, IPPROTO_IGMP);
Data call setsockopt interface is set later, obtains data call getsockopt interface.
In the present embodiment, when the data distribution module 4 carries out data distribution, first determine whether data packet whether from input net Mouth enters, then judges whether data packet is UDP packet, calculates HASH value later to obtain source data object table, finally according to source number Data distribution is carried out according to the Distribution List in Object table.
Stream medium data dissemination system disclosed by the invention based on network driver layer, is made of four modules, that is, applies Management module 1, instruction sending module 2, command reception module 3 and data distribution module 4, wherein instruction module passes through in system The network interface of core carrys out interaction data, and response application management module is transmitted through the instruction such as the data distribution come and inquiry, data distribution Module is realized by network driver, is distributed, modifies, is deleted to corresponding network data according to data distribution strategy, net Network drive module has been taken over stream medium data in network layer and has directly been distributed, and reduces data from network layer to transport layer again The process then successively returned again to application layer, the forwarding of the same data packet reduce four transmitting and twice data copy, The forward efficiency of network data is improved into an order of magnitude.By the above as can be seen that the present invention not only realizes stream The big data quantity of media data is distributed, also have forward efficiency is high, Forwarding Latency is small, to server performance require it is low, be suitble to it is small Type can transmit, the features such as Information Security is strong on the internet.
The present invention provides the forwarding solution of the UDP message packet based on LINUX operating system, and distribution module uses NAT Network driver mode realizes that kernel is loaded into the system kernel when starting, and the work of module is carried out by application layer program Control.When realizing based on Windows operating system, and identical principle is used, distribution module is driven by window networking Program is realized, is then added in network port driving in system configuration.
About network data forwarding process of the invention as shown in Fig. 2, when distribution module receives data packet, how quickly One of the difficult point that corresponding distribution purpose chained list is system high efficiency rate is taken from distributing list, this system is calculated using quick HASH Positioning mode is realized, is specifically comprised the following steps:
Step S1, definition is up to the distributing list array of pointers of 16 bit lengths, to reduce the repetition amount of HASH value, it may be assumed that
PPACKETIN_STRUCT g_pPacketIn[0xFFFF];
Step S2, HASH calculating, it may be assumed that HASH=
(source IP is 16 low) exclusive or (source IP is 16 high) exclusive or (source port) exclusive or (destination port);
Step S3 when adding camera, calculates HASH according to step S2, new source is then inserted into g_LanIn array Object has being suspended to behind the pNext of existing object for identical HASH;
Step S4 when receiving data packet, calculates HASH according to step S2, corresponding source object is found, from source object PDst pointer obtains distribution purpose object, to be distributed.
Stream medium data dissemination system disclosed by the invention based on network driver layer forwards, bottom compared to application layer Data distribution efficiency can be improved an order of magnitude by forwarding, secondly, system bottom is distributed immediately, reduced system buffer, reduced number According to distribution be delayed, enhance system real time, in addition, the present invention reduce system performance requirements, it can be achieved that streaming media server it is embedding Enter formula, improves reliability.
The above is preferred embodiments of the present invention, is not intended to restrict the invention, all in technology model of the invention Interior done modification, equivalent replacement or improvement etc. are enclosed, should be included in the range of of the invention protect.

Claims (4)

1. a kind of stream medium data dissemination system based on network driver layer, which is characterized in that include application management module (1), instruction sending module (2), command reception module (3) and data distribution module (4), in which:
The application management module (1) sends mould by call instruction after parsing external demand for interacting with applications Movement demand is transmitted to system kernel by block (2);
Described instruction sending module (2) is preset with configuration interface and calls for application management module (1), described instruction sending module (2) by calling setsockopt system interface to interact with command reception module (3);
By in the network instruction chained list of command reception function hooks to system when described instruction receiving module (3) initializes, to enable When application layer calls setsockopt or getsockopt interface, command reception function can receive the instruction and to the instruction It is handled;
It is to enable to the network N AT interface of system by data packet processing function hooks when the data distribution module (4) initializes System calls the function when receiving network data, and carries out data distribution according to the distributing list of command reception module (3) setting; It when the data distribution module (4) carries out data distribution, first determines whether data packet enters from input network interface, then judges data Whether packet is UDP packet, calculates HASH value later to obtain source data object table, is finally arranged according to the distribution in source data object table Table carries out data distribution.
2. the stream medium data dissemination system based on network driver layer as described in claim 1, which is characterized in that the application Management module (1) is directed to different applications, is preset with different parsing modules.
3. the stream medium data dissemination system based on network driver layer as described in claim 1, which is characterized in that described instruction Sending module (2) includes as given an order: distribution module initialization, distribution module release, addition camera, delete camera, Forwarding routing and query routing are deleted in addition forwarding routing.
4. the stream medium data dissemination system based on network driver layer as described in claim 1, which is characterized in that described instruction Sending module (2) in the process of implementation, initially sets up Socket, and data call setsockopt interface is arranged later, obtains number According to calling getsockopt interface.
CN201510988936.4A 2015-12-23 2015-12-23 A kind of stream medium data dissemination system based on network driver layer Active CN105827588B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510988936.4A CN105827588B (en) 2015-12-23 2015-12-23 A kind of stream medium data dissemination system based on network driver layer

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510988936.4A CN105827588B (en) 2015-12-23 2015-12-23 A kind of stream medium data dissemination system based on network driver layer

Publications (2)

Publication Number Publication Date
CN105827588A CN105827588A (en) 2016-08-03
CN105827588B true CN105827588B (en) 2019-03-15

Family

ID=56514706

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510988936.4A Active CN105827588B (en) 2015-12-23 2015-12-23 A kind of stream medium data dissemination system based on network driver layer

Country Status (1)

Country Link
CN (1) CN105827588B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107707422A (en) * 2017-08-24 2018-02-16 四川天邑康和通信股份有限公司 The network speed-measuring method replied based on the quick ACK of ONU driving layers
CN108155999B (en) * 2017-12-27 2020-08-07 乐自科技(南京)有限公司 Intelligent UDP multicast file distribution system and method with TCP (transmission control protocol) packet supplementing mechanism

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101217464A (en) * 2007-12-28 2008-07-09 北京大学 UDP data package transmission method
US7587510B1 (en) * 2003-04-21 2009-09-08 Charles Schwab & Co., Inc. System and method for transferring data between a user space and a kernel space in a server associated with a distributed network environment
CN101893959A (en) * 2010-06-22 2010-11-24 中科方德软件有限公司 Method for implementing touch direction identification in linux kernel
CN102447627A (en) * 2011-12-05 2012-05-09 上海顶竹通讯技术有限公司 Message encapsulation/decapsulation device and method
CN102592076A (en) * 2011-12-20 2012-07-18 北京神州绿盟信息安全科技股份有限公司 Data tamper-proof method and device
CN102638453A (en) * 2012-03-13 2012-08-15 广州华多网络科技有限公司 Voice data kernel forwarding method based on Linux system server
CN102662910A (en) * 2012-03-23 2012-09-12 浙江大学 Network interaction system based on embedded system and network interaction method
CN103327025A (en) * 2013-06-28 2013-09-25 北京奇虎科技有限公司 Method and device for network access control
CN104657676A (en) * 2015-03-05 2015-05-27 北京安普诺信息技术有限公司 File mandatory access control method and system thereof based on minifilter drive

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101413295B1 (en) * 2010-11-04 2014-06-30 한국전자통신연구원 DDS structure and node composing DDS with scalability and adaptability

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7587510B1 (en) * 2003-04-21 2009-09-08 Charles Schwab & Co., Inc. System and method for transferring data between a user space and a kernel space in a server associated with a distributed network environment
CN101217464A (en) * 2007-12-28 2008-07-09 北京大学 UDP data package transmission method
CN101893959A (en) * 2010-06-22 2010-11-24 中科方德软件有限公司 Method for implementing touch direction identification in linux kernel
CN102447627A (en) * 2011-12-05 2012-05-09 上海顶竹通讯技术有限公司 Message encapsulation/decapsulation device and method
CN102592076A (en) * 2011-12-20 2012-07-18 北京神州绿盟信息安全科技股份有限公司 Data tamper-proof method and device
CN102638453A (en) * 2012-03-13 2012-08-15 广州华多网络科技有限公司 Voice data kernel forwarding method based on Linux system server
CN102662910A (en) * 2012-03-23 2012-09-12 浙江大学 Network interaction system based on embedded system and network interaction method
CN103327025A (en) * 2013-06-28 2013-09-25 北京奇虎科技有限公司 Method and device for network access control
CN104657676A (en) * 2015-03-05 2015-05-27 北京安普诺信息技术有限公司 File mandatory access control method and system thereof based on minifilter drive

Also Published As

Publication number Publication date
CN105827588A (en) 2016-08-03

Similar Documents

Publication Publication Date Title
KR101900536B1 (en) Implementing a 3g packet core in a cloud computer with openflow data and control planes
EP2378720B1 (en) Extranet networking method, system and device for multicast virtual private network
US9609065B2 (en) Bridge for implementing a converged network protocol to facilitate communication between different communication protocol networks
EP2843906B1 (en) Method, apparatus, and system for data transmission
WO2019134383A1 (en) Method for controlling network congestion, access device, and computer readable storage medium
CN103391296B (en) A kind of controller, transponder and Path Setup method and system
JP6544401B2 (en) PACKET TRANSFER DEVICE, CONTROL DEVICE, COMMUNICATION SYSTEM, COMMUNICATION METHOD, AND PROGRAM
US20150245115A1 (en) Methods and apparatus to route fibre channel frames using reduced forwarding state on an fcoe-to-fc gateway
EP3069471B1 (en) Optimized multicast routing in a clos-like network
KR102025680B1 (en) SDN based ARP implementation method and device
WO2015180040A1 (en) Flow table management method and relevant device and system
CN103392324B (en) To the source end node forwarding messages in converging network environment
US10609125B2 (en) Method and system for transmitting communication data
CN101252527B (en) Method for transferring network, network transfer server and inner core managing module
KR100793349B1 (en) Multicast forwarding apparatus and control method in system for using PPP multi-link
WO2016184283A1 (en) Data stream management method and system for virtual machine
WO2015127892A1 (en) Communication method, optical module and network device
CN101834783A (en) Method and device for forwarding messages and network equipment
CN104301252A (en) Data sending system and method
WO2010145091A1 (en) Method for implementing virtual network port and embedded device for implementing virtual network port
CN105827588B (en) A kind of stream medium data dissemination system based on network driver layer
CN104486217A (en) Cross network message transmitting method and equipment
WO2024001701A1 (en) Data processing method, apparatus and system
WO2008037202A1 (en) Method and apparatus for transmitting data
CN104320322A (en) Message control method and equipment

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant