Summary of the invention
The present invention provides reliable communication when low latency is provided.Specifically, the present invention proposes a kind ofly in network, via a plurality of channels, from first node to Section Point, to transmit reliably the method for data, and wherein said data comprise a plurality of parts; Wherein said a plurality of channel comprises unreliable channel and reliable channel; Said method comprising the steps of: via described unreliable channel, described data are sent to Section Point; Via described reliable channel, described data are sent to Section Point; The data division that the data that identification receives at Section Point via described unreliable channel lack; From the data that receive at Section Point via described reliable channel, obtain the corresponding data division of data division lacking with the data that receive at Section Point via described unreliable channel.
The present invention has preferably combined the low latency of RTP transmission and the reliability of TCP, and a kind of like this method is preferably provided, and wherein unreliable channel carries data according to the RTP operating on UDP in a plurality of bags; And reliable channel carries data according to TCP in a plurality of bags.According to a modified example, the RTP that unreliable channel operates on UDP by multicast, basis works for a plurality of Section Points; And reliable channel is worked for each node in described a plurality of Section Points according to TCP.The bag that each TCP bag carries preferably matches with data and RTP header that corresponding RTP bag carries.
The concrete advantage that derivation is set in detail from each covers a plurality of Section Points.According to a further aspect in the invention, the RTP that unreliable channel operates on UDP by multicast, basis works to a plurality of (N) Section Point; And reliable channel works to the subset M < N of described a plurality of (N) Section Point on TCP; Wherein said a plurality of (N) Section Point adds ad-hoc network; Wherein the subset M of Section Point receives from first node the data division of losing the data that receive via unreliable channel via reliable channel; Wherein all the other N-M node of a plurality of (N) Section Point receives from one of the subset M of Section Point or other node the data division that the data via unreliable channel reception lack.
Alternatively, the RTP that unreliable channel operates on UDP by clean culture, basis works to a plurality of Section Points, wherein first node and each Section Point add ad-hoc network, the data division that this ad-hoc network lacks for the data that receive via unreliable channel from first node reception.
According on the other hand, the invention provides a plurality of (N) Section Point, wherein for each node in a plurality of (N) Section Point, provide the unreliable channel of working according to the RTP operating on UDP; For each Section Point in the subset M < N of a plurality of (N) Section Point, provide the reliable channel of working according to TCP; Wherein a plurality of (N) Section Point adds multicast group, and the subset M < N of Section Point is relayed in subset M < N and N-M Section Point of residue not to be covered via this multicast group by the bag receiving via reliable channel.
According on the other hand, the present invention includes: by the data that receive at Section Point via unreliable channel with via reliable channel, in the data of Section Point reception, merge into single stream; The data division that the data that identification receives at Section Point via unreliable channel from described single stream lack; And from described single stream, obtain the corresponding data division of data division that the data with receiving at Section Point via unreliable channel that receive at Section Point via reliable channel lack.
The present invention also provides a kind of communication network for low-latency data transmission, and it has obtained the reliability strengthening, and specifically, the invention provides a kind of communication network, and it comprises first node and Section Point; Wherein first node is set to Section Point, send data via two channels; The first unreliable channel is for sending data according to unreliable communication protocol to Section Point; The second reliable channel is for sending data according to reliable communication protocol to Section Point; Wherein said data comprise a plurality of parts; Wherein Section Point comprises data checks device, this data checks device is for identifying the data division lacking with respect to the data that receive from first node via unreliable channel, and obtains for the data from receiving from first node via reliable channel the data division that the data that receive via unreliable channel lack.
The present invention can utilize sequence numbering scheme to realize the detection to missing data part, specifically, in communication network, the data that send via unreliable channel comprise the first bag series, and wherein each Bao Douyu in the first bag series has specified the sequence number of the position in sequence to be associated; Wherein canonical sequence number is identified the data of loss.In this communication network, the data that send via reliable channel can also comprise the second bag series; Wherein each Bao Douyu in the second bag series has specified the sequence number of the position in sequence to be associated; Wherein each bag in the second bag series is corresponding to a bag in the first bag series; And wherein each Bao Douyu in the second bag series is associated with the identical sequence number of corresponding bag of the first bag series.
Embodiment
Fig. 1 shows the schematic diagram of the financial information system being applied to according to the first execution mode, the present invention.Market data sources 10 normally produces the financial transaction institute of this data.The destination of marketing data is the deal maker who is operated in financial institution, as broker, or more precisely, the transaction application 20 that deal maker uses.Market data delivery can be believed to comprise two Main Stage.In the first stage, using data as bringing in the network of financial institution from the data flow of financial transaction institute (it produces this data).Conventionally, data flow ends at the server 30 in data center, and server 30 can be arranged in the management place of financial institution or be co-located at exchange.The data flow processor 40 that data flow is followed on serviced device 30 is processed, and data flow processor 40 can be normalized to common format by data flow, then again publishes to the array of the application server 20 of operation transaction application.Each server can be processed a plurality of data flow.
Marketing data is extreme time-sensitive in essence, so any delay of the data path between exchange 10 and transaction application 20 50,60 all must be minimized.For example, in London, the ip multicast stream based on UDP of marketing data picks up in financial institution from LSE.Yet from financial institution server to transaction application, data flow is used more reliable TCP session to retransmit and is sent.In essence, this session is subject to the restriction of the round stand-by period between financial institution server and transaction application, send the frame of any loss or damage, so further extended the stand-by period due to TCP confirmation request and by requiring to retransmit.
RTP (RTP) is a kind of unreliable, nonsynchronous agreement, and it provides the end-to-end delivery service such as the data with real-time characteristic of interactive audio and video or emulated data in clean culture or multicast network service.The specific definition of RTP can find in the InternetEngineering Task in July, 2003 Force publication RFC 3550.
Application is (top) operation RTP above UDP conventionally.If bottom-layer network provides, RTP can support the data of using multicast to divide a plurality of destinations of orientation to transmit.RTP self does not provide any to be guaranteed the mechanism of sending in time or provides other service quality (QoS) to guarantee.On the contrary, it provides the information relevant with packet loss, shake and other link attribute to application, has left the task of compensation service quality problem for this information.RTP self does not guarantee to send or prevent unordered delivery, does not suppose that bottom-layer network is reliable yet.Although the function of the delivery order of providing is provided in some realizations, this is not that agreement institute is compulsory, and therefore, RTP is not suitable at a high speed, high reliability data is sent.
RTP is comprised of two tight associated parts: RTP (RTP) and RTP Control Protocol (RTCP).RTP (RTP) is designed to carrying and has the data of real-time characteristic and the time series data (timing data) that allows to calculate link statistics value.The major function of RTCP be allow entrant in RTP " session " notify other entrant its to the observation-delay of link-quality, shake, loss etc.In addition, it can also be for supporting some application controls requirements.
Fig. 2 show RTP bag with and the schematic diagram of associated header information.The real-time media being transmitted has formed " RTP payload ".RTP header comprises the information relevant with payload, such as source, size, type of coding etc.Yet RTP bag can not be transmitted by " in statu quo " on network, so we use the transportation protocol that is called as User Datagram Protoco (UDP) (UDP).As shown in Figure 2, use UDP UDP header need to be added in RTP bag after RTP header.UDP datagram is then given to IP packing device.As shown in Figure 2, use IP packing device IP header need to be added in RTP bag after UDP header.
Fig. 3 is the schematic diagram that is shown in further detail RTP header structure.In Fig. 3, used following label:
V---version, represents RTP version.
P---fill, while being set up, wrapping in end and comprise one or more extra eight bit byte of filling, it is not a part for payload.
X---extension bits, while being set up, an and then header extension after fixed header, has the form of definition.
CSRC counting---the quantity (referring to CSRC below) that comprises fixed header CSRC identifier afterwards.
M---marker character, the parsing of marker character is configured document definition.It is intended to allow the remarkable event such as frame boundaries to be marked in packet flow.
The form of PT Payload Type-expression RTP payload is also determined the parsing of application to it.Configuration file has been specified the default static mapping of PT Payload Type code to payload format.Extra PT Payload Type code can dynamically be defined by non-RTP mode.
Sequence number---RTP packet of every transmission adds 1, and the machine that can be received uses to detect packet loss and recovers packet sequence.
Timestamp---reflected the sampling instant of first eight bit byte in RTP packet.Sampling instant must derive to allow synchronous and Jitter Calculation from the clock that dull and linearity increases in time.
SSRC---synchronisation source, this identifier is random selection, it is intended to do not have two synchronisation sources to have identical SSRC identifier in same RTP session.
CSRC---the list of contribution source identifier, has identified the contributive source of payload to comprising in this bag.
Multicast is reliably the improvement that insecure multicast is sent, and wherein receiver can use outband channel to transmit leg request lost frames.The loss of frame is determined by whole frames being carried out to label with sequence number.Owing to lacking window and optionally confirming, for reliable multicast, from packet loss, recover than slow for TCP stream.Multicast is reliably suitable for replacing TCP as transmission (agreement) reliably, yet TCP is better at the higher environment performance of packet loss possibility.
Therefore multicast is not connection-oriented mechanism at it in essence, and unreliable inherently, such as allowing the agreement of TCP of retransmission of lost bag inapplicable.Basic multicast is for the application such as stream audio and video, wherein substitute and be not problem once in a while.But for the distribution of critical data, the mechanism that just needs a kind of request retransmission to send.
The PGM recording in IETF RFC 3208 is suggested, as a kind of suitable mechanism that request retransmission is sent in multicast.According to PGM, multicast is coated has distributed sequence number, makes recipient when packet loss can ask the bag that its sequence number is identified to carry out multicast again.Yet the safe and reliable and extendible system that lacks extensive employing has stoped extensive employing.
As above pointed with reference to Fig. 1, the data between data center server and transaction application are normally transmitted by TCP, and TCP provides order and wrapped and send reliably.Data are in the transmission over networks of underusing, and this network is worked at below 5 percent of its capacity (in some cases below one of percentage) conventionally.
According to the present invention, finance data central server is realized such as the corrupt data stream being provided by Real-time Transport Protocol to link 50 use of transaction application, and this data flow is backed up by the reliable data stream such as being provided by TCP.Discussed herein is two logic channels can sharing or can not share Same Physical medium.Logic channel can be shared Same Physical link also can use independent link (if any).Data flow is preferably carried with corrupt data and is flowed identical datagram and at least some corrupt datas stream header information reliably.Preferably, each TCP bag matches with the data that corresponding RTP bag carries.
Can accelerate flowing of order from transaction application to finance data server by identical method.According to a preferred implementation, have precedence over authentic data channel and send data via corrupt data channel.This preferentially can or support mark any other technology higher and more low priority to realize with priority queueing, class-based queuing when Business Stream transmits as a whole on network interface or in network.Use the data format defining in the agreement (such as RTP) of appropriate definition can collect performance statistic, encryption and checking.
According to another execution mode, exchange 10 to the data link 60 at finance data center 30 also/or realize according to the present invention.
Look at how above scheme is actually applied below.
According to preferred implementation, the UDP detectaphone of optimizing for low latency is selected for transaction application 20, for example the detectaphone based on event-oriented API.Being similar to poll family of functions on the platform of Unix and " epoll () " the I/O event notice instrument on Linux is suitable for.RTP code library is modified to receive from the Incoming swap data of the data center server 30 at transaction application 20 places and uses selected detectaphone.
Server 30 comprises RTP framer, and RTP framer generates the RTP frame that forms the data flow of going to transaction application.Frame from RTP framer is sent in RTP and TCP stream, in common link or on different links, all can.According to preferred implementation, at receiving terminal, before rtp streaming and TCP stream are forwarded to transaction application, they are merged into single stream.
Merging can realize by the buffer of the data for receiving via rtp streaming and the sequence counter of following the sequence number of received packet.If gap detected in sequence, the sequence number of expectation is lost from received bag, and system monitoring is flowed the packet receiving the appropriate location that the bag in TCP stream with the sequence number of loss is inserted into buffer via TCP.
According to preferred implementation, pooling function operates according to following order:
1, check the outstanding data of UDP (RTP) and TCP socket.
If 2 data exist, read and resolve RTP header.
3, RTP preamble sequence number and the RTP preamble sequence number finally seen are compared.
If the sequence number that i sequence number equals finally to see ,+1 is sent to application (seeing iii) together with any buffered data.
If ii sequence number is less than the sequence number of finally seeing, abandon.
If iii sequence number is greater than the sequence number of finally seeing, buffered data.
4, return to step 1.
From TCP stream, obtain due to the packet loss in rtp streaming or delay and non-existent data.Meanwhile, the RTP data that arrive are cushioned.As a result, transaction application 20 has been seen the uninterrupted data flow identical with the data flow only obtaining via TCP, and only the stand-by period is lower.Meanwhile, the recovery time after packet loss is equally good with the data of using normal TCP connection to send.
Statistics (such as the information that relates to round-trip delay, shake etc.) from RTP can be directly provided to transaction application by the API via independent.Statistics from RTP can be with other verification of data and for surveillance performance.
Alternatively, each stream is provided to transaction application by " in statu quo ", and transaction application flows and merges and pack processing loss.As pointed in Fig. 1, transaction application that destination transaction application 20 can comprise a plurality of (N), each transaction application receives data via unreliable RTP data flow.
According to another execution mode, the mode that reliable delivery not only flows by above-mentioned TCP realizes.According to another such execution mode, TCP stream provides data to the subset M < N of a plurality of transaction application reliably, and a plurality of transaction application 20 add ad-hoc network (not shown).Ad-hoc network provides the device that the data that received by the subset M of transaction application 20 via reliable TCP stream is sent to remaining N-M transaction application 20.Remaining N-M transaction application 20 from the subset M of transaction application one or other receive non-existent data in the data that receive via rtp streaming.Advantageously, N TCP of M < that present embodiment only requires data center to remain to ad-hoc network connects.Although have than previously described an execution mode that special TCP connects prefetch transaction application, the recovery of packet loss has been slowed down, and present embodiment is except to also providing the protection to some link failures the protection of packet loss.
According to another such execution mode, TCP stream only provides data and a plurality of transaction application 20 to add multicast group to the subset M < N of a plurality of transaction application reliably.There is each packet that comes relaying to use reliable TCP stream to receive via multicast group in M the transaction application connecting to the TCP of data center.Although than the execution mode having for the special TCP connection of each transaction application, the recovery time of packet loss is slower, this execution mode is except providing the protection to some link failures is also provided the protection of packet loss.
The RTP data flow that use has a TCP backup provides a plurality of remarkable advantages than TCP only, and these advantages comprise: in the lower end-to-end stand-by period of normal operation period (there is no packet loss); The built-in mechanism of detailed link performance statistical information is provided to each end points; Than pure TCP, for low probability data lost chains road, the re-transmission of data and reliably delivery order.
In addition, in alternative embodiment, when RTP and TCP stream is provided to application by " in statu quo ", can to logical transaction modify can be asynchronous move, and advantageously, even also continuous business of loss of data.
Although above, by example, with reference to finance and system data delivery service, be described, but the present invention can be applicable to any wherein accurate and high-speed very important communication system with capacity sufficient, as the communication network for emergency service, telemetry, Industry Control etc.
Any communication system and method all may be lost or corrupt data, are no matter due to intrinsic factor in external factor (and exceed system control beyond) or system, due to selected agreement.Due to intrinsic factor, lose or the probability that damages is the intrinsic property of each system, it can be assessed or obtain according to the measurement to systematic function in advance.It is reliable or unreliable that the mode that communication system (or operating in the communication protocol in this system) reply is lost causes system to be defined as.With reference to the present invention, technical staff will be interpreted as reliable communication protocol can on telecommunication system, send the intrinsic losing probability of data while based in concrete telecommunication system compensates the transmission of uncertainty loss with the speed of expectation.Communication protocol will not be supposed to compensate deterministic case reliably, as the manual intervention of telecommunication system or thorough fault.This proof, technical staff will regard non-reliable communication protocol as the agreement that can not lose with expectation rate compensation uncertainty.
Those skilled in the art should understand that, the present invention can realize with software, it can be included in various transmission and/or storage medium arbitrarily or all, as floppy disk, CD-ROM or magnetizing mediums, make calling program can be loaded on one or more all-purpose computers or can be used suitable transmission medium to download via computer network.For realize computer program of the present invention can be implemented in can be readable by suitable computer input unit any suitable carrier, as CD-ROM, optical readable mark, magnetizing mediums, punch card or band, or realize on electromagnetism or light signal.
It should be appreciated by those skilled in the art that data source 10, data center server 30 and transaction application 20 can realize on processing unit on the available server in one or more market or similarly.Fig. 4 shows a kind of typical structure that is suitable for realizing the processing unit of the communication system of another execution mode according to the present invention.In reality, conventionally need a plurality of this devices.Processing unit comprises the CPU (CPU) 40 for the operation of software program for execution and management and control processing unit.CPU 40 is connected to a plurality of devices via bus 41, and these devices comprise storage device 42 hard disk unit of storage system and application software (for example for) and storage arrangement (comprising ROM 44 and RAM 45).Computer also comprises the network interface 47 that is connected to external network 49 for interface.Computer can also comprise user's input/output device, as being connected to mouse and the keyboard (not shown) of bus 41 via input/output end port 46, and display 48.It will be understood by those skilled in the art that above framework is not restrictive, and be only the example of typical processing unit framework.Should also be understood that described processing unit has whole necessary operation and the application that can complete its object.
The word of summary is incorporated to herein: a kind ofly via two channels, carry out the communication network of authentic data transmission from first node and Section Point.The first unreliable channel transmits data according to the unreliable communication protocol such as RTP.The second unreliable channel transmits identical data according to the reliable communication protocol such as TCP.At Section Point place, the data division of losing the data that receive from first node via unreliable channel is detected, and the applicable corresponding data division receiving from first node via reliable channel.RTP channel can move by multicast or clean culture on UDP.TCP channel can supplement by multicast group or ad-hoc network.