CN103701790A - 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 PDF

Info

Publication number
CN103701790A
CN103701790A CN201310713823.4A CN201310713823A CN103701790A CN 103701790 A CN103701790 A CN 103701790A CN 201310713823 A CN201310713823 A CN 201310713823A CN 103701790 A CN103701790 A CN 103701790A
Authority
CN
China
Prior art keywords
session
character set
client
real time
time streaming
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201310713823.4A
Other languages
Chinese (zh)
Other versions
CN103701790B (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.)
Vtron Group Co Ltd
Original Assignee
Vtron Technologies 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 Vtron Technologies Ltd filed Critical Vtron Technologies Ltd
Priority to CN201310713823.4A priority Critical patent/CN103701790B/en
Publication of CN103701790A publication Critical patent/CN103701790A/en
Application granted granted Critical
Publication of CN103701790B publication Critical patent/CN103701790B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Computer And Data Communications (AREA)

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

In real time streaming transport protocol, generate method and the device of Session ID
Technical field
The present invention relates to multimedia technology field, particularly relate to a kind of method and a kind of device that generates Session ID in real time streaming transport protocol that generates Session ID in real time streaming transport protocol.
Background technology
RTSP(Real Time Streaming Protocol, real time streaming transport protocol) be an application layer protocol in ICP/IP protocol system, RTSP is for controlling the multimedia series flow agreement of sound or image.This agreement is used client/server model, is a text based agreement, for set up and consult real-time streams session at client and server end.
In RTSP agreement, Session ID (Session Identifier) is used for RTSP session of unique identification.Definition to Session ID in RTSP agreement is: the character string of the random length of non-direct-reading, linear space must be URL escape.Namely Session ID can be comprised of any character, as 0~9, a~z, A~Z, also has various symbols etc.Can cause following problem like this: some spcial character, as "@", " & ", " $ " etc., may be that server can be processed but client is unacquainted, or client think these characters have particular meaning, cannot be as Session ID.If contain such spcial character in the Session ID that server produces, client just cannot be processed this Session ID (or thinking that this identifier is invalid), thereby causes the failure of RTSP session establishment.
Summary of the invention
Based on this, the invention provides a kind of method and device that generates Session ID in real time streaming transport protocol, can generate the manageable Session ID of client, thereby avoid the problem of RTSP session establishment failure.
For achieving the above object, the present invention adopts following technical scheme:
A method that generates Session ID in real time streaming transport protocol, comprises the following steps:
Receive the session request of setting up that client sends; Describedly set up the character set information that session request comprises that described client is supported;
Judge whether the number of characters in described character set information is more than or equal to the first predetermined threshold value;
If so, according to described character set Information generation Session ID.
A device that generates Session ID in real time streaming transport protocol, comprising:
Request receiving module, the session request of setting up sending for receiving client; Describedly set up the character set information that session request comprises that described client is supported;
Judge module, for judging whether the number of characters of described character set information is more than or equal to the first predetermined threshold value;
Session ID generation module, in the situation that judgment result is that of described judge module be, according to described character set Information generation Session ID.
By above scheme, can be found out, a kind of method and device that generates Session ID in real time streaming transport protocol of the present invention, by the character set that adds the form of new parameter to come this client of announcement server to support, then by server, according to these character set, generate Session ID in setting up session request.The Session ID generating in the present invention is all that client can be processed and identify, and has therefore effectively guaranteed the successful foundation of client and server end RTSP session.
Accompanying drawing explanation
Fig. 1 is a kind of method flow schematic diagram that generates Session ID in real time streaming transport protocol of the present invention;
Fig. 2 is a kind of apparatus structure schematic diagram that generates Session ID in real time streaming transport protocol of the present invention.
Embodiment
In order to make object of the present invention, technical scheme and advantage clearer, below in conjunction with drawings and Examples, the present invention is further elaborated.Should be appreciated that specific embodiment described herein, only in order to explain the present invention, is not intended to limit the present invention.
Shown in Figure 1, a kind of method that generates Session ID in real time streaming transport protocol, comprises the following steps:
Step S101, receives " setting up session " request (i.e. " SETUP " request) that client sends; Described " setting up session " request comprises character set information---" SessionIdCharSet " that described client is supported, this parameter is in order to identify the character set that can form Session ID of this client support.
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 so, judge that this character set information is effective, enter step S103; Otherwise description character aggregate information is invalid, now can notify 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 character set Information generation Session ID, adopt the character stipulated in described character set information for this reason RTSP session produce a random unique Session ID.
It should be noted that, described the first predetermined threshold value can be made different settings according to user's request.As in an embodiment therein, it is 8 that this first predetermined threshold value can be set, and in this step, needs to judge whether the number of characters in character set information is more than or equal to 8.The number of characters limiting in character set information is no less than 8, to guarantee that it is difficult to be guessd out.
As a good embodiment, in described " setting up session " request, can also comprise max-session identifier length information---" SessionIdLength " that described client is supported, the max-session identifier length that this parameter is supported in order to identify this client.On this basis, according to the process of described character set Information generation Session ID, specifically can comprise as follows:
Step S1031, judges whether the numerical value of described max-session identifier length information is more than or equal to the second predetermined threshold value; If so, judge that above-mentioned max-session identifier length information is effective, enter step S1032; Otherwise illustrate that max-session identifier length information is invalid, now can notify client, requesting client resends a max-session identifier length information and 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, according to Session ID described in described character set information and max-session identifier length Information generation, adopt on the one hand the character of stipulating in described character set information to produce a random unique Session ID, the length that simultaneously limits the Session ID of this generation must not surpass the numerical value of stipulating in described max-session identifier length information.
It should be noted that, described the second predetermined threshold value and the first predetermined threshold value are similar, can make different settings according to user's request.As in an embodiment therein, this second predetermined threshold value can be set the same with the first predetermined threshold value is 8, in this step, needs the numerical value that judges max-session identifier length information whether to be more than or equal to 8.Limit Session ID and at least by 8 bytes, formed, to guarantee that it is difficult to be guessd out.
As a good embodiment, the present invention, after generating Session ID, can also comprise the steps:
Step S104, the Session ID generating is inserted in " setting up conversational response " message (i.e. " SETUPResponse " message), and message returns to described client should " to set up conversational response ".
To have increased SETUP request message and the corresponding SETUP Response message instances of two parameters above below.Video in this example on client vod server " rtsp: // 10.1.24.125:554/duck ".
Client is issued 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 that generates Session ID in real time streaming transport protocol, the present invention also provides a kind of device that generates Session ID in real time streaming transport protocol, as shown in Figure 2, comprising:
Request receiving module 101, the session request of setting up sending for receiving client; Describedly set up the character set information that session request comprises that described client is supported;
Judge module 102, for judging whether the number of characters of described character set information is more than or equal to the first predetermined threshold value;
Session ID generation module 103, in the situation that judgment result is that of described judge module be, according to described character set Information generation Session ID.
As a good embodiment, described foundation in session request can also comprise the max-session identifier length information that described client is supported.
As a good embodiment, described Session ID generation module can comprise:
Numerical value judgement submodule, for judging whether the numerical value of described max-session identifier length information is more than or equal to the second predetermined threshold value;
Generate submodule, in the situation that judgment result is that of submodule of described numerical value judgement be, according to Session ID described in described character set information and max-session identifier length Information generation.
It should be noted that, described the first predetermined threshold value, the second predetermined threshold value all can be made different settings according to user's request, and the two can be set to identical numerical value.
As a good embodiment, the device that generates Session ID in real time streaming transport protocol of the present invention can also comprise:
Message is returned to module, for the Session ID of generation is inserted and sets up conversational response message, and this is set up to conversational response message returns to described client.
Other technical characterictic of above-mentioned a kind of device that generates Session ID in real time streaming transport protocol is identical with a kind of method that generates Session ID in real time streaming transport protocol of the present invention, and it will not go into details herein.
It should be noted that, unless context separately has the description of specific distinct, the element in the present invention and assembly, the form that quantity both can be single exists, and form that also can be a plurality of exists, and the present invention does not limit this.Although the step in the present invention is arranged with label, and be not used in the precedence that limits step, unless expressly stated the order of step or the execution of certain step need other steps as basis, otherwise the relative order of step is adjustable.
By above scheme, can find out, a kind of method and device that generates Session ID in real time streaming transport protocol of the present invention, by the character set that adds the form of new parameter to come this client of announcement server to support, then by server, according to these character set, generate Session ID in setting up session request.The Session ID generating in the present invention is all that client can be processed and identify, and has therefore effectively guaranteed the successful foundation of client and server end RTSP session.
The above embodiment has only expressed several execution mode of the present invention, and it describes comparatively concrete and detailed, but can not therefore be interpreted as the restriction to the scope of the claims of the present invention.It should be pointed out that for the person of ordinary skill of the art, without departing from the inventive concept of the premise, can also make some distortion and improvement, these all belong to protection scope of the present invention.Therefore, the protection range of patent of the present invention should be as the criterion with claims.

Claims (8)

1. in real time streaming transport protocol, generate a method for Session ID, it is characterized in that, comprise the following steps:
Receive the session request of setting up that client sends; Describedly set up the character set information that session request comprises that described client is supported;
Judge whether the number of characters in described character set information is more than or equal to the first predetermined threshold value;
If so, according to described character set Information generation Session ID.
2. the method that generates Session ID in real time streaming transport protocol according to claim 1, is characterized in that, the described max-session identifier length information that also comprises described client support in session request of setting up.
3. the method that generates Session ID in real time streaming transport protocol according to claim 2, is characterized in that, according to the process of described character set Information generation Session ID, comprises:
Whether the numerical value that judges described max-session identifier length information is more than or equal to the second predetermined threshold value;
If so, according to Session ID described in described character set information and max-session identifier length Information generation.
4. according to the method that generates Session ID in real time streaming transport protocol described in claim 1 or 2 or 3, it is characterized in that, after generating Session ID, also comprise step:
The Session ID of generation is inserted and set up in conversational response message, and this is set up to conversational response message return to described client.
5. in real time streaming transport protocol, generate a device for Session ID, it is characterized in that, comprising:
Request receiving module, the session request of setting up sending for receiving client; Describedly set up the character set information that session request comprises that described client is supported;
Judge module, for judging whether the number of characters of described character set information is more than or equal to the first predetermined threshold value;
Session ID generation module, in the situation that judgment result is that of described judge module be, according to described character set Information generation Session ID.
6. the device that generates Session ID in real time streaming transport protocol according to claim 5, is characterized in that, the described max-session identifier length information that also comprises described client support in session request of setting up.
7. the device that generates Session ID in real time streaming transport protocol according to claim 6, is characterized in that, described Session ID generation module comprises:
Numerical value judgement submodule, for judging whether the numerical value of described max-session identifier length information is more than or equal to the second predetermined threshold value;
Generate submodule, in the situation that judgment result is that of submodule of described numerical value judgement be, according to Session ID described in described character set information and max-session identifier length Information generation.
8. according to the device that generates Session ID in real time streaming transport protocol described in claim 5 or 6 or 7, it is characterized in that, also comprise:
Message is returned to module, for the Session ID of generation is inserted and sets up conversational response message, and this is set up to conversational response message returns to described client.
CN201310713823.4A 2013-12-20 2013-12-20 Method and device for generating session identifier in real time streaming protocol (RTSP) Active CN103701790B (en)

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 true CN103701790A (en) 2014-04-02
CN103701790B 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)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112804716A (en) * 2020-12-29 2021-05-14 联想未来通信科技(重庆)有限公司 Method and device for configuring data limit value and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
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
US20050197854A1 (en) * 2004-02-06 2005-09-08 Grosvenor Edwin S. Method and system for providing a numbering system for identifying conferences

Patent Citations (3)

* Cited by examiner, † Cited by third party
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
US20050197854A1 (en) * 2004-02-06 2005-09-08 Grosvenor Edwin S. Method and system for providing a numbering system for identifying conferences

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112804716A (en) * 2020-12-29 2021-05-14 联想未来通信科技(重庆)有限公司 Method and device for configuring data limit value and storage medium

Also Published As

Publication number Publication date
CN103701790B (en) 2017-02-08

Similar Documents

Publication Publication Date Title
CN108023910B (en) A kind of terminal monitoring method and system based on view networking
ATE542350T1 (en) INTERNET PROTOCOL TELEVISION (IPTV) METHOD AND CONTENT MANAGEMENT SERVER FOR IPTV SERVICE
CN106162062B (en) Obtain the method and system of monitor video
CN105706425B (en) Method for distributing the identifier of multicast source
CN109167960B (en) Method and system for processing video stream data
CN108881361B (en) A kind of data push method and device based on view networking
KR102132266B1 (en) Secondary node type based control for data streaming
CN109309806B (en) Video conference management method and system
ATE471037T1 (en) IP UNICAST STREAMING SERVICE DELIVERY
CN109495794A (en) A kind of view networked terminals control method and system
WO2016210109A1 (en) Mechanisms to support adaptive constrained application protocol (coap) streaming for internet of things (iot) systems
CN109547417A (en) Code stream transmission method and device
CN103533395A (en) Method and system for realizing playback of hyper text transfer protocol (HTTP) live streaming (HLS) channel
CN103401946A (en) HTTP (hyper text transfer protocol) uploading acceleration method and system
CN102694864A (en) Method for achieving streaming media function by utilizing HTTP, streaming media server and system
CN108809921A (en) A kind of audio-frequency processing method regards networked server and regards networked terminals
CN104994067A (en) System and method for SIP network to access RTSP monitoring network
CN110519331B (en) Method and device for processing resources of video network
CN103701790B (en) Method and device for generating session identifier in real time streaming protocol (RTSP)
CN104518988A (en) Method and system for priority processing of messages
CN108965219B (en) Data processing method and device based on video network
CN110830751B (en) Method and device for accessing video networking terminal to conference
CN103039054A (en) Method and apparatus for transmitting an application identifier across application elements
CN109640194A (en) A kind of method and apparatus that terminal authorization is obtained by two dimensional code based on view networking
CN110049269A (en) A kind of method, server and the client of view networking conference management

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.