CN103701790B - Method and device for generating session identifier in real time streaming protocol (RTSP) - Google Patents
Method and device for generating session identifier in real time streaming protocol (RTSP) Download PDFInfo
- Publication number
- CN103701790B CN103701790B CN201310713823.4A CN201310713823A CN103701790B CN 103701790 B CN103701790 B CN 103701790B CN 201310713823 A CN201310713823 A CN 201310713823A CN 103701790 B CN103701790 B CN 103701790B
- Authority
- CN
- China
- Prior art keywords
- session
- client
- real time
- time streaming
- character set
- 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
Links
Abstract
The invention provides a method and a device for generating a session identifier in a real time streaming protocol (RTSP). The method comprises the following steps: receiving a session establishing request sent by a client, wherein the session establishing request comprises character set information supported by the client; judging whether the number of characters in the character set information is larger than or equal to a first preset threshold value; if the number of characters in the character set information is larger than or equal to the first preset threshold value, generating the session identifier according to the character set information. According to the method and the device for generating the session identifier in the RTSP provided by the invention, all generated session identifiers can be processed and identified by the client, so that the successful establishment of an RTSP session between the client and a server side is effectively ensured.
Description
Technical field
The present invention relates to multimedia technology field, more particularly to a kind of generation session identification in real time streaming transport protocol
The method of symbol and a kind of device generating Session ID in real time streaming transport protocol.
Background technology
RTSP(Real Time Streaming Protocol, real time streaming transport protocol)It is in ICP/IP protocol system
One application layer protocol, RTSP is used to control the multimedia series flow agreement of sound or image.This agreement uses client/service
Device model, is a text based agreement, for setting up at client and server end and consulting real-time streaming session.
In the rtsp protocol, Session ID(Session Identifier)For one RTSP session of unique mark.
In RTSP agreement to the definition of Session ID it is:The character string of the random length of non-direct-reading, linear space must be URL escape
's.Namely Session ID can be made up of any character, as 0~9, a~z, A~Z, also various symbols etc..So meeting
Lead to following problem:Some spcial characters, such as "@", " & ", " $ " etc. it may be possible to server can process but client is not recognized
Know, or client think these characters have particular meaning, cannot be used as Session ID.If server produces
Session ID in contain such spcial character, client just cannot process this Session ID(Or think this
Identifier is invalid), thus leading to the failure of RTSP session establishment.
Content of the invention
Based on this, the present invention provides a kind of method and device generating Session ID in real time streaming transport protocol, energy
Enough generate the manageable Session ID of client, thus avoiding the problem of RTSP session establishment failure.
For achieving the above object, the present invention adopts the following technical scheme that:
A kind of method generating Session ID in real time streaming transport protocol, comprises the following steps:
Receive client transmission sets up session request;Described session request of setting up includes the word that described client is supported
Symbol aggregate information;
Judge whether the number of characters in described character set information is more than or equal to the first predetermined threshold value;
If so, then Session ID is generated according to described character set information.
A kind of device generating Session ID in real time streaming transport protocol, including:
Request receiving module, for receive client transmission set up session request;Described session request of setting up includes
The character set information that described client is supported;
Judge module, for judging whether the number of characters in described character set information is more than or equal to the first default threshold
Value;
Session ID generation module, for described judge module judged result be in the case of, according to described
Character set information generates Session ID.
By above scheme as can be seen that the present invention a kind of in real time streaming transport protocol generate Session ID method
And device, by setting up the character that the form adding new parameter in session request notifies this client of server to be supported
Collection, then generates Session ID by server according to these character set.The Session ID generating in the present invention is all client
End can process and identify, be therefore effectively guaranteed being successfully established of client and server end RTSP session.
Brief description
Fig. 1 is a kind of method flow schematic diagram generating Session ID in real time streaming transport protocol of the present invention;
Fig. 2 is a kind of apparatus structure schematic diagram generating Session ID in real time streaming transport protocol of the present invention.
Specific embodiment
In order that the objects, technical solutions and advantages of the present invention become more apparent, below in conjunction with drawings and Examples, right
The present invention is further elaborated.It should be appreciated that specific embodiment described herein is only in order to explain the present invention, and
It is not used in the restriction present invention.
Shown in Figure 1, a kind of method generating Session ID in real time streaming transport protocol, comprise the following steps:
Step S101, receives " setting up session " request that client sends(I.e. " SETUP " request);Described " setting up session "
Request includes the character set information " SessionIdCharSet " that described client is supported, this parameter is in order to identify this
The character set that can form Session ID that client is supported.
Step S102, judges whether the number of characters in described character set information is more than or equal to the first predetermined threshold value;If
It is then to judge that this character set information effectively, enters step S103;Otherwise explanation character set information is invalid, now can lead to
Know client, requesting client resends a character set information and comes.
Step S103, if the number of characters in character set information is more than or equal to the first predetermined threshold value, according to described word
Symbol aggregate information generates Session ID, that is, adopt character specified in described character set information to be that this RTSP session produces one
Individual random unique Session ID.
It should be noted that described first predetermined threshold value can make different settings according to user's request.As wherein
In one embodiment, can arrange this first predetermined threshold value is 8, needs in this step to judge the character in character set information
Whether number is more than or equal to 8.The number of characters limiting in character set information is no less than 8, to ensure that it is difficult to be guessd out.
As a preferable embodiment, described client can also be included in described " setting up session " request and support
Big session identifier length information " SessionIdLength ", this parameter is in order to identify the conference of this client support
Words identifier length.On this basis, specifically can be included according to the process that described character set information generates Session ID
As follows:
Step S1031, judges whether the numerical value of described max-session identifier length information is preset more than or equal to second
Threshold value;If so, then judge that above-mentioned max-session identifier length information effectively, enters step S1032;Max-session is otherwise described
Identifier length information is invalid, now can notify client, and it is long that requesting client resends a max-session identifier
Degree information comes.
Step S1032, if the numerical value of described max-session identifier length information is more than or equal to the second predetermined threshold value,
Described Session ID is generated according to described character set information and max-session identifier length information, on the one hand adopts
Character specified in described character set information produces a random unique Session ID, limits the session of this generation simultaneously
The length of identifier must not exceed numerical value specified in described max-session identifier length information.
It should be noted that described second predetermined threshold value is similar with the first predetermined threshold value, can be made according to user's request
Different settings.It is 8 as the first predetermined threshold value as this second predetermined threshold value in an embodiment wherein, can be arranged,
It is in this step, to need to judge whether the numerical value of max-session identifier length information is more than or equal to 8.Limit Session ID
At least it is made up of 8 bytes, to ensure that it is difficult to be guessd out.
As a preferable embodiment, the present invention, after generating Session ID, can also comprise the steps:
Step S104, by the Session ID generating insertion " setting up conversational response " message(I.e. " SETUPResponse " disappears
Breath)In, and message returns to described client " should to set up conversational response ".
It is the increase in the SETUP request message of both the above parameter and corresponding SETUP Response message example below
Son.Video " rtsp on client vod server in this example://10.1.24.125:554/duck”.
Client issues server:
SETUP rtsp://10.1.24.125:554/duck RTSP/1.0
CSeq:3
Transport:RTP/AVP/UDP;unicast;client_port=12202-12203
SessionIdCharSet:
a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,A,B,C,D,E,F,G,J,K,L,M,R,S,0,1,
2,3,4,5,6,7,8,9
SessionIdLength:64
Server returns to client:
RTSP/1.0200OK
CSeq:3
Date:18Oct201315:35:06GMT
Transport:RTP/AVP;unicast;client_port=4588-4589;server_port=6256-6257
Session:47abd24D008sdAE.
Corresponding with a kind of above-mentioned method of generation Session ID in real time streaming transport protocol, the present invention also provides one
Plant the device generating Session ID in real time streaming transport protocol, as shown in Fig. 2 including:
Request receiving module 101, for receive client transmission set up session request;Described foundation in session request is wrapped
Include the character set information that described client is supported;
Judge module 102, for judging whether the number of characters in described character set information is preset more than or equal to first
Threshold value;
Session ID generation module 103, for described judge module judged result be in the case of, according to institute
State character set information and generate Session ID.
As a preferable embodiment, described set up the maximum that can also include in session request that described client is supported
Session ID length information.
As a preferable embodiment, described Session ID generation module can include:
Numerical value judging submodule, whether the numerical value for judging described max-session identifier length information is more than or equal to
Second predetermined threshold value;
Generate submodule, for described numerical value judging submodule judged result be in the case of, according to described word
Symbol aggregate information and max-session identifier length information generate described Session ID.
It should be noted that described first predetermined threshold value, the second predetermined threshold value all can make difference according to user's request
Setting, and the two could be arranged to identical numerical value.
As a preferable embodiment, the present invention generates the device of Session ID also in real time streaming transport protocol
Can include:
Message returns module, for setting up the Session ID insertion of generation in conversational response message, and this is set up
Conversational response message returns to described client.
A kind of above-mentioned other technical characteristics of device generating Session ID in real time streaming transport protocol and the present invention
A kind of in real time streaming transport protocol generate Session ID method identical, it will not go into details herein.
It should be noted that description, the element in the present invention and the assembly of specific distinct unless the context otherwise, quantity was both
Can single presented in it is also possible to presented in multiple, the present invention is not defined to this.Step in the present invention
Although being arranged with label, be not used to limit the precedence of step, unless expressly stated the order of step or
Based on the execution of person's step needs other steps, otherwise the relative rank of step is adjustable in.
By above scheme as can be seen that the present invention a kind of in real time streaming transport protocol generate Session ID side
Method and device, by setting up the word that the form adding new parameter in session request notifies this client of server to be supported
Symbol collection, then generates Session ID by server according to these character set.The Session ID generating in the present invention is all visitor
Family end can process and identify, be therefore effectively guaranteed being successfully established of client and server end RTSP session.
Embodiment described above only have expressed the several embodiments of the present invention, and its description is more concrete and detailed, but simultaneously
Therefore the restriction to the scope of the claims of the present invention can not be interpreted as.It should be pointed out that for those of ordinary skill in the art
For, without departing from the inventive concept of the premise, some deformation can also be made and improve, these broadly fall into the guarantor of the present invention
Shield scope.Therefore, the protection domain of patent of the present invention should be defined by claims.
Claims (8)
1. a kind of method of Session ID that generates in real time streaming transport protocol is it is characterised in that comprise the following steps:
Receive client transmission sets up session request;Described session request of setting up includes the character set that described client is supported
Conjunction information;
Judge whether the number of characters in described character set information is more than or equal to the first predetermined threshold value;
If so, then Session ID is generated according to described character set information.
2. the method for Session ID that generates in real time streaming transport protocol according to claim 1 is it is characterised in that institute
State and set up the max-session identifier length information also including in session request that described client is supported.
3. the method for Session ID that generates in real time streaming transport protocol according to claim 2 is it is characterised in that root
Include according to the process that described character set information generates Session ID:
Judge whether the numerical value of described max-session identifier length information is more than or equal to the second predetermined threshold value;
If so, then described Session ID is generated according to described character set information and max-session identifier length information.
4. the method generating Session ID in real time streaming transport protocol according to claim 1 or 2 or 3, its feature
It is, after generating Session ID, also include step:
The insertion of the Session ID of generation is set up in conversational response message, and by this set up conversational response message return to described
Client.
5. a kind of device generating Session ID in real time streaming transport protocol is it is characterised in that include:
Request receiving module, for receive client transmission set up session request;Described set up session request include described
The character set information that client is supported;
Judge module, for judging whether the number of characters in described character set information is more than or equal to the first predetermined threshold value;
Session ID generation module, for described judge module judged result be in the case of, according to described character
Aggregate information generates Session ID.
6. the device of Session ID that generates in real time streaming transport protocol according to claim 5 is it is characterised in that institute
State and set up the max-session identifier length information also including in session request that described client is supported.
7. the device of Session ID that generates in real time streaming transport protocol according to claim 6 is it is characterised in that institute
State Session ID generation module to include:
Numerical value judging submodule, for the judged result in described judge module for, in the case of being, judging described max-session
Whether the numerical value of identifier length information is more than or equal to the second predetermined threshold value;
Generate submodule, for described numerical value judging submodule judged result be in the case of, according to described character set
Conjunction information and max-session identifier length information generate described Session ID.
8. the device generating Session ID in real time streaming transport protocol according to claim 5 or 6 or 7, its feature
It is, also include:
Message returns module, for setting up the Session ID insertion of generation in conversational response message, and this is set up session
Response message returns to described client.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201310713823.4A CN103701790B (en) | 2013-12-20 | 2013-12-20 | Method and device for generating session identifier in real time streaming protocol (RTSP) |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201310713823.4A CN103701790B (en) | 2013-12-20 | 2013-12-20 | Method and device for generating session identifier in real time streaming protocol (RTSP) |
Publications (2)
Publication Number | Publication Date |
---|---|
CN103701790A CN103701790A (en) | 2014-04-02 |
CN103701790B true CN103701790B (en) | 2017-02-08 |
Family
ID=50363187
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201310713823.4A Active CN103701790B (en) | 2013-12-20 | 2013-12-20 | Method and device for generating session identifier in real time streaming protocol (RTSP) |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN103701790B (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112804716B (en) * | 2020-12-29 | 2023-04-28 | 联想未来通信科技(重庆)有限公司 | Configuration method and device of data limit value and storage medium |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1269649A (en) * | 1999-04-07 | 2000-10-11 | 深圳市华为技术有限公司 | Automatic distribution method of session mark for network equipment |
CN1656772A (en) * | 2002-05-21 | 2005-08-17 | 通用仪表公司 | Association of security parameters for a collection of related streaming protocols |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20050197854A1 (en) * | 2004-02-06 | 2005-09-08 | Grosvenor Edwin S. | Method and system for providing a numbering system for identifying conferences |
-
2013
- 2013-12-20 CN CN201310713823.4A patent/CN103701790B/en active Active
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1269649A (en) * | 1999-04-07 | 2000-10-11 | 深圳市华为技术有限公司 | Automatic distribution method of session mark for network equipment |
CN1656772A (en) * | 2002-05-21 | 2005-08-17 | 通用仪表公司 | Association of security parameters for a collection of related streaming protocols |
Also Published As
Publication number | Publication date |
---|---|
CN103701790A (en) | 2014-04-02 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN106162062B (en) | Obtain the method and system of monitor video | |
ATE542350T1 (en) | INTERNET PROTOCOL TELEVISION (IPTV) METHOD AND CONTENT MANAGEMENT SERVER FOR IPTV SERVICE | |
WO2016210109A1 (en) | Mechanisms to support adaptive constrained application protocol (coap) streaming for internet of things (iot) systems | |
CN108965912B (en) | A kind of method, client and the server of video data processing | |
CN109309806B (en) | Video conference management method and system | |
CN109348171A (en) | A kind of view networking monitoring video acquiring method and device | |
CN109167960B (en) | Method and system for processing video stream data | |
JP2008182707A5 (en) | ||
CN104009938A (en) | Method and system for long connections based on router level | |
US20120197847A1 (en) | Method and System for Monitoring and Tracing Multimedia Resource Transmission | |
ATE471037T1 (en) | IP UNICAST STREAMING SERVICE DELIVERY | |
JP2009021759A5 (en) | ||
CN103401946A (en) | HTTP (hyper text transfer protocol) uploading acceleration method and system | |
CN109495794A (en) | A kind of view networked terminals control method and system | |
CN103533395A (en) | Method and system for realizing playback of hyper text transfer protocol (HTTP) live streaming (HLS) channel | |
EP2514139A4 (en) | System and method of multi-media conferencing between universal plug and play (upnp) enabled telephony devices and wireless area network (wan) devices | |
CN103841140A (en) | Inter-terminal information mutual-transmission method, system and device | |
CN108810579A (en) | A kind of video data requesting method, association turn server and regard networked server | |
CN110572433A (en) | Video scheduling method, system and device | |
CN102624878A (en) | Method and system for identifying P2P (peer-to-peer) protocol on basis of DNS (domain name server) protocol | |
CN103701790B (en) | Method and device for generating session identifier in real time streaming protocol (RTSP) | |
EP3576371A1 (en) | Method and system for transmitting streaming media resource | |
CN103039054A (en) | Method and apparatus for transmitting an application identifier across application elements | |
CN110049269A (en) | A kind of method, server and the client of view networking conference management | |
CN108881140A (en) | A kind of document down loading method and device based on view networking |
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 | ||
CP03 | Change of name, title or address | ||
CP03 | Change of name, title or address |
Address after: Kezhu road high tech Industrial Development Zone, Guangzhou city of Guangdong Province, No. 233 510670 Patentee after: Wei Chong group Limited by Share Ltd Address before: 510663 Guangzhou province high tech Industrial Development Zone, Guangdong, Cai road, No. 6, No. Patentee before: Guangdong Weichuangshixun Science and Technology Co., Ltd. |