A kind of mode that RTSP is converted to object storage
Technical field
The present invention relates to media data storage, more particularly to RTSP Streaming Medias are converted into the technology of object storage.
Background technology
RTP (Real-time Transport Protocol write a Chinese character in simplified form RTP) is a network transmission association
View, is described in detail the normal data bag form for transmitting Voice & Video on the internet.Real-time Transport Protocol is usually used in stream media system
(coordinating RTSP agreements).
Security Real Time Protocol (Secure Real-time Transport Protocol or SRTP) is passed in real time
A defined agreement on the basis of defeated agreement (RTP), it is intended to for the RTP in unicast and multicast application program
Data provide encryption, message authentication, completeness guarantee and protection of resetting.
Media business is a kind of new business for developing rapidly in recent years, and streaming media service utilizes streaming technology, in bag
Multimedia content data, such as data such as video, audio frequency are transmitted on exchange network.Streaming technology is mainly characterized by,
Continuous video and voice data are put into after treatment Website server, so, user can be downloaded while watching
With listen to, without just watching and listening to after whole file download to the user terminal for using.
Traditional stream media system is based on C/S (client/server) pattern, and all of client will take from Streaming Media
Business device obtains the streaming media resource required for it, therefore the performance requirement of streaming media is very high, and the number clients of its support
Amount is also very limited.
The stream media system being used widely in currently available technology is greatly reduced described based on P2P technologies
The calculating pressure and bandwidth occupancy of object storage.
Object is stored relative to NAS, SAN etc. traditional storage mode, in expansible row, security, high availability, economy
Property etc. convenient have greater advantage;The cloud storage almost all of main flow is set up on the basis of object storage.
RTSP (Real Time Streaming Protocol), RFC2326, real time streaming transport protocol is TCP/IP associations
An application layer protocol in view system, the IETF RFC submitted to by Columbia University, Netscape and RealNetworks companies
Standard.The protocol define how one-to-many application effectively transmits multi-medium data by IP network.RTSP is in system
It is located on RTP and RTCP in structure, it completes data transfer using TCP or UDP.HTTP compared with RTSP, HTTP request by
Client computer sends, and server responds;During using RTSP, client-server can send request, i.e. RTSP can be with
It is two-way.RTSP is the multimedia series flow agreement for controlling sound or image, and allows multiple crossfire demand modelings simultaneously,
Network communication used during transmission is reached an agreement on not in the range of its definition, and server end can voluntarily select to use TCP or UDP
To transmit streamed content, its grammer is similar with HTTP 1.1 with running, but is not specifically addressed by time synchronized, so comparing energy
Tolerant network postpones.And it is above-mentioned allow simultaneously multiple crossfire demand modelings (Multicast), except service can be reduced
The network consumption at device end, more further supports multi-party video conference (Video Conference).Because the running side with HTTP1.1
Formula is similar, so the cache function < Cache > of proxy server < Proxy > are applied equally to RTSP, and because RTSP has weight
New guide function, visual actual loading situation provides the server for servicing to change, to avoid excessive load centralization in same
Server and cause postpone.
The agreement is used for C/S models, is a text based agreement, for setting up and assisting at client and server end
The real-time streaming session of business.
Real-time streaming protocol (RTSP) is application level protocol, controls the transmission of real time data.RTSP is expansible there is provided one
Framework, the controlled program request for making real time data, such as audio & video is possibly realized.Data source includes field data and is stored in editing
Middle data.The agreement purpose is the multiple data is activation connections of control, is to select sendaisle, such as UDP, multicast UDP and TCP,
Offer approach, and to select based on transmission mechanism provider's method on RTP.
The continuous Streaming Media of one or several time synchronizeds is set up and controlled to real-time streaming protocol (RTSP).Although continuous media
It is possible that stream is exchanged with controlling stream, and usual itself does not send continuous stream.In other words, RTSP serves as multimedia server
Network remote is controlled.RTSP connections are not tied to transport layer connection, such as TCP.During RTSP connects, RTSP user can open
Or multiple connections transmitted to server are closed to send RTSP requests.Additionally, Connectionless Transport Protocal, such as UDP can be used.
The stream of RTSP flow controls may use RTP, but RTSP operations are not relying on the transmission mechanism for carrying continuous media.
The operation that agreement is supported is as follows:
(1) media are retrieved from media server:User can submit a demonstration description to by HTTP or other methods.Such as
Demonstration is multicast, demonstrates formula just comprising the multicast address for continuous media and port.As demonstration is only sent to by unicast
User, user should provide destination address for safety.
(2) media server is invited and enters meeting:Media server can be invited to participate in the meeting for just carrying out, or playback matchmaker
Body, or record a portion, or all.This pattern is very useful in distributed educational applications, it is several in meeting can be in turn
By remote control button.
(3) media are added in ready-made lecture:As server tells that user can obtain additional media content, to live lecture
Seem and be particularly useful.As being similar in HTTP/1.1, RTSP requests can be by agency, passage and caching process.
RTSP agreement features:
(1) extensibility:New method and parameter are easily added into RTSP.
(2) easily parsing:RTSP can be parsed by standard HTTP or MIME resolvers.
(3) safety:RTSP uses safe web page mechanism.
(4) independently of transmission:RTSP can use unreliable datagram protocol (EDP), reliability datagram protocol (RDP);Such as
Application layer reliability is realized, RSP can be used.
(5) multiserver is supported:Each stream can be placed on different server, and user side sets up several with different server automatically
Individual con current control connection, media sync is performed in transport layer.
(6) recording equipment control:The controllable record of agreement and playback apparatus.
(7) stream control is initially separated with meeting:The offer of conference initiation agreement is provided, or be can be used to create and only can be assessed a bid for tender
Knowledge number.In particular cases, invitation service device membership can be carried out with SIP or H.323.
(8) it is adapted to professional application:By SMPTE markers, RTSP supports frame level precision, it is allowed to remote digital editing.
(9) demonstration description is neutral:Agreement does not force special demonstration or meta file, can transmit Format Type used;However, drilling
Show that description must at least include a RTSP URL.
(10) agency is friendly with fire wall:Agreement can be processed by application and transport layer fire wall.Fire wall it is understood that
SETUP methods, are that UDP Media Streams open one " breach ".
(11) HTTP is friendly:Herein, RTSP advisably adopts HTTP ideas, makes present structure all reusable.Structure includes
Internet content selection platforms (PICS).Server state, RTSP are needed due in most of the cases controlling continuous media
Not only to HTFP adding methods.
(12) appropriate server controls:As user starts a stream, it is necessary to a stream can also be stopped.
(13) transmission is coordinated:Before actual treatment continuous media, user's tunable transmission method.
(14) performance is coordinated:Such as essential characteristic is invalid, it is necessary to have some cleaning mechanism to allow user to determine which kind of method is not given birth to
Effect.This allows user to propose suitable user interface.
The present invention provides a kind of mode that RTSP is converted to object storage.The system includes data source of stream media, processes
Server, streaming media clients, system is identified and deposited by the data addition that processing server sends data source of stream media
In storing up object storage, streaming media clients can direct play stream media data source media, the also playable matchmaker for having stored
Volume data, access the media data that stored preferentially can access other streaming media clients by way of P2P, otherwise just can be to
Object storage sends request.
The rear end storage of traditional Streaming Media is used mostly centralised storage, and Single Point of Faliure easily occurs, once first number of key
Go wrong according to server, performance and availability all can be greatly affected;In addition the performance and capacity of rear end storage also cannot be flexible
Extension.Traditional Streaming Media rear end storage server generally cannot quick response client the control command such as broadcasting, exist higher
Delay.
The content of the invention
It is an object of the invention to overcome the shortcoming and defect of prior art, there is provided a kind of that RTSP is converted into object storage
Mode.
A kind of mode that RTSP is converted to object storage that the present invention is provided, it is characterised in that including stream medium data
The storage of source, processing server, streaming media clients and object;Data source of stream media connection processing server, streaming media clients
With object storage, the storage of processing server connecting object and streaming media clients, the storage of streaming media clients connecting object;
The data source of stream media, is the offer equipment of streaming media resource;
The processing server, is that the stream medium data that the data source of stream media sends is received and processed, most
Client is served data to eventually checks or be sent to that object is stored;
The streaming media clients, are the instruments of streaming media resource requester requests resource;
The object storage, is the equipment for being stored the stream medium data after processing server process.
Further, the processing server receives the stream medium data from data source of stream media, is carried out using Real-time Transport Protocol
Data transfer.
Further, the streaming media clients can directly play the Streaming Media from data source of stream media, using RTSP
And Real-time Transport Protocol.
Further, the processing server can add identification information after stream medium data is received in media data, with
Just access.
Further, comprising multiple streaming media clients, between adopt P2P mode shared datas.
Further, the streaming media clients preferentially can send request when data storage is asked to other clients,
If other clients do not have desired data just can send request of data to object storage.
Further, stored stream media information is carried out using object storage.
Further, stored stream media information is carried out using Amazon S3 as object storage.
Preferably, the Streaming Media processing server, including:
Receiver module, for obtaining stream media information from the data source of stream media;
According to mark module, by from the data that obtain of data source of stream media be identified, such as add timestamp etc. specific
Information;
Object storage module, by the information that Data Identification resume module is crossed object storage is sent to;
Data dispatch module, processes the request of client and by the place feedback of the information of the data asked to client.
Preferably, the streaming media clients, including:
Playing module, for obtaining stream matchmaker from the data source of stream media, other clients or object storage request data
Body information, and decoding broadcasting is carried out to the stream media information;
Data cache module, the streaming media data cache and stream medium data identification list for setting up supplies data interaction mould
Block is inquired about;
Data interaction module, for managing and safeguarding data buffer storage, sends to data processing server or other clients
Request of data;Receive and process the request of data from other clients.
The present invention by RTSP be converted to object storage mode, streaming media clients ask data storage when, including
Following steps:
S1, client send stream medium data request to other clients first;
S2, the request of other client process, have data is activation if requested data in caching;
If without requested data in S3, other client-caches, former client then stores request data to object.
It is an advantage of the invention that:Media data is optimized in object storing process, adds channel number or index to carry
High digital independent performance;Operation is merged to IO using caching process data, it is to avoid frequently write disk, extend bottom storage medium
Life-span simultaneously improves write performance;Client is preferentially searched in all clients caching when data are read, miss again to right
As storage request, it is possible to increase reading efficiency is further capable of the operation such as broadcasting, drag and drop of quick response client, and reduces reading
Impact of the operation to rear end object storage performance.
Description of the drawings
Accompanying drawing described herein is used for providing a further understanding of the present invention, constitutes the part of the application, this
Bright schematic description and description does not constitute inappropriate limitation of the present invention for explaining the present invention.In the accompanying drawings:
Fig. 1 is total frame diagram that RTSP is converted to the present invention object storage;
Fig. 2 is the schematic flow sheet of client request of the present invention data storage.
Specific embodiment
Be referred to accompanying drawing 1-2 below and word content understand present disclosure and the present invention and prior art it
Between distinctive points.Hereafter accompanying drawing and enumerate the present invention some alternative embodiments by way of, to the present invention technical side
Case (including optimal technical scheme) is described in further detail.It should be noted that:Any technical characteristic in the present embodiment,
Any technical scheme is one or more in the technical characteristic of plurality of optional or optional technical scheme, succinct in order to describe
Need in presents cannot the exhaustive present invention all alternative technical characteristic and alternative technical scheme, also inconvenience
Emphasize that it is one of optional numerous embodiments in the embodiment of each technical characteristic, so those skilled in the art should
This knows:Can by the present invention provide any technological means be replaced or by the present invention provide any two or more
Technological means or technical characteristic are combined mutually and obtain new technical scheme.Any technical characteristic in the present embodiment and
Any technical scheme is not limited the scope of the invention, and protection scope of the present invention should include those skilled in the art not
Pay creative work thinkable any alternate embodiments and those skilled in the art by the present invention provide it is any
Two or more technological means or technical characteristic technical scheme new obtained from being combined mutually.
The technical scheme that the present invention is provided is illustrated in more detail with reference to Fig. 1-2.
A kind of mode that RTSP is converted to object storage, it is characterised in that including data source of stream media, process service
The storage of device, streaming media clients and object;Data source of stream media connection processing server, streaming media clients and object storage,
Processing server connecting object is stored and streaming media clients, the storage of streaming media clients connecting object;The stream medium data
Source, is the offer equipment of streaming media resource;The processing server, is the stream medium data for sending the data source of stream media
Receive and processed, finally serve data to client and check or be sent to that object is stored;The streaming media clients, be
The instrument of streaming media resource requester requests resource, the present embodiment includes streaming media clients 1 and streaming media clients 2;It is described
Object is stored, and is the equipment for being stored the stream medium data after processing server process;Streaming media clients 1 or
2 need not move through processing server when data are read, and directly reading from object storage just can be so that where data store client
End can be calculated on main frame of the concrete data object in which object storage by a set of algorithm.
Embodiment 2
A kind of as described in Example 1 that RTSP is converted into the mode that object is stored, the processing server receives to flow automatically
The stream medium data of media data source, is carried out data transmission using Real-time Transport Protocol;The streaming media clients can directly be played and
From the Streaming Media of data source of stream media, using RTSP and Real-time Transport Protocol;Processing server meeting after stream medium data is received exists
Add identification information in media data, to access;Comprising multiple streaming media clients, between adopt P2P mode shared datas;
The streaming media clients preferentially can send request when data storage is asked to other clients, if other clients do not have
There is desired data just can send request of data to object storage;Carry out stored stream media letter as object storage using Amazon S3
Breath.
Embodiment 3
A kind of mode that RTSP is converted to object storage as described in embodiment 1 or 2, the Streaming Media processing server,
Including:Receiver module, for obtaining stream media information from the data source of stream media;According to mark module, by from Streaming Media number
The data obtained according to source are identified, such as add the customizing messages such as timestamp;Object storage module, at Data Identification module
The information managed is sent to object storage;Data dispatch module, processes the request of client and by the place of the data asked
Feedback of the information is to client.
Embodiment 4
A kind of mode that RTSP is converted to object storage, the streaming media clients, bag as described in embodiment 1 or 2 or 3
Include:Playing module, for obtaining Streaming Media letter from the data source of stream media, other clients or object storage request data
Breath, and decoding broadcasting is carried out to the stream media information;Data cache module, the streaming media data cache and stream matchmaker for foundation
Volume data identification list is inquired about for data interaction module;Data interaction module, for managing and safeguarding data buffer storage, at data
Reason server or other clients send request of data;Receive and process the request of data from other clients.
The present invention by RTSP be converted to object storage mode, streaming media clients ask data storage when, including
Following steps:
S1, client send stream medium data request to other clients first;
S2, the request of other client process, have data is activation if requested data in caching;
If without requested data in S3, other client-caches, former client then stores request data to object.
Finally it should be noted that:Above example is only to illustrate technical scheme rather than a limitation;To the greatest extent
Pipe has been described in detail with reference to preferred embodiment to the present invention, and those of ordinary skill in the art should be understood:Still
The specific embodiment of the present invention can be modified or equivalent is carried out to some technical characteristics;Without deviating from this
The spirit of bright technical scheme, it all should cover in the middle of the technical scheme scope being claimed in the present invention.