CN114679435A - Session management system, method, computer device and storage medium - Google Patents

Session management system, method, computer device and storage medium Download PDF

Info

Publication number
CN114679435A
CN114679435A CN202210585778.8A CN202210585778A CN114679435A CN 114679435 A CN114679435 A CN 114679435A CN 202210585778 A CN202210585778 A CN 202210585778A CN 114679435 A CN114679435 A CN 114679435A
Authority
CN
China
Prior art keywords
session management
management module
sip
media
request
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
CN202210585778.8A
Other languages
Chinese (zh)
Other versions
CN114679435B (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.)
Wuhan Zhongke Tongda High New Technology Co Ltd
Original Assignee
Wuhan Zhongke Tongda High New Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Wuhan Zhongke Tongda High New Technology Co Ltd filed Critical Wuhan Zhongke Tongda High New Technology Co Ltd
Priority to CN202210585778.8A priority Critical patent/CN114679435B/en
Publication of CN114679435A publication Critical patent/CN114679435A/en
Application granted granted Critical
Publication of CN114679435B publication Critical patent/CN114679435B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L65/00Network arrangements, protocols or services for supporting real-time applications in data packet communication
    • H04L65/1066Session management
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/16Implementation or adaptation of Internet protocol [IP], of transmission control protocol [TCP] or of user datagram protocol [UDP]
    • H04L69/163In-band adaptation of TCP data exchange; In-band control procedures
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/60Network structure or processes for video distribution between server and client or between remote clients; Control signalling between clients, server and network components; Transmission of management data between server and client, e.g. sending from server to client commands for recording incoming content stream; Communication details between server and client 
    • H04N21/63Control signaling related to video distribution between client, server and network components; Network processes for video distribution between server and clients or between remote clients, e.g. transmitting basic layer and enhancement layers over different transmission paths, setting up a peer-to-peer communication via Internet between remote STB's; Communication protocols; Addressing
    • H04N21/643Communication protocols
    • H04N21/6437Real-time Transport Protocol [RTP]

Landscapes

  • Engineering & Computer Science (AREA)
  • Signal Processing (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Multimedia (AREA)
  • Computer Security & Cryptography (AREA)
  • Business, Economics & Management (AREA)
  • General Business, Economics & Management (AREA)
  • Computer And Data Communications (AREA)
  • Telephonic Communication Services (AREA)

Abstract

The application provides a session management system, a session management method, a computer device and a storage medium, comprising: a TCP session management module, an SIP session management module and an SIP protocol session management module; the TCP session management module is used for receiving and responding to a video access request of the client, and acquiring media information through the media server so as to send the media information to the SIP session management module; the SIP session management module is used for receiving the media information of the TCP session management module, acquiring the identity information of the target equipment to be accessed by the client, packaging the media information and the identity information into a data request, and then sending the data request to the SIP protocol session management module; the SIP protocol session management module is used for detecting and extracting the identity information in the data request according to the first state code of the SIP session management module, so that the SIP session request is generated by using the identity information, and then the SIP session request for establishing the SIP session is sent to the target equipment, so that the system stability can be ensured, and the system expansibility can be improved.

Description

Session management system, method, computer device and storage medium
Technical Field
The present application relates to the field of computer technologies, and in particular, to a session management system, a session management method, a computer device, and a storage medium.
Background
GB/T28181 is generally applied to the video monitoring industry, for example, in the existing video monitoring system, devices connected to the video monitoring system use the SIP (Session Initiation Protocol) in GB/T28181 to perform mutual communication, that is, establish a Session to implement Session management.
However, the existing video monitoring system sacrifices most of performance in order to ensure stability, and each service logic cannot be independent, resulting in poor system expansibility and high maintenance cost.
Therefore, the existing video monitoring system has the technical problem that the stability and the expansibility cannot be balanced.
Disclosure of Invention
The present application aims to provide a session management system, a session management method, a computer device, and a storage medium, so as to significantly improve the scalability of the system and ensure the stability of the session of the system in each service scenario, thereby reducing the maintenance cost of the system.
In a first aspect, the present application provides a session management system, including: a TCP session management module, an SIP session management module and an SIP protocol session management module; wherein, the first and the second end of the pipe are connected with each other,
the TCP session management module is used for receiving and responding to the video access request of the client, and acquiring media information for receiving the video stream through the media server so as to send the media information to the SIP session management module;
the SIP session management module is used for receiving the media information of the TCP session management module, acquiring the identity information of the target equipment to be accessed by the client, packaging the media information and the identity information into a data request, and then sending the data request to the SIP protocol session management module;
the SIP protocol session management module is used for detecting and responding to and extracting the identity information in the data request according to the first state code of the SIP session management module so as to send a session request to the target equipment after generating the session request by using the identity information; wherein the session request is for requesting that a SIP session be established between the client and the target device.
In some embodiments of the present application, the session management system further includes a transcoding server, a network package sending module, and a media server; the TCP session management module is also used for receiving a video access request of a client through the transcoding server; responding to a video access request, sequentially acquiring a media address and a media port for receiving a video stream through a network packet sending module and a media server as media information; the network packet sending module is used for indicating the media server to schedule the media resources to acquire the media information by utilizing the pre-configured connection pool elements; and sending the media information to the SIP session management module.
In some embodiments of the present application, a storage unit is disposed in the TCP session management module, and the storage unit includes a forwarding list unit, a second state code unit, a media address unit, and a media port unit; the TCP session management module is further used for responding to the video access request and determining a second state code in the second state code unit; if the second state code is failed, placing the subsequent video access request in a forwarding list unit until the second state code is updated successfully; the second state code is used for representing the response state of the video access request of the preamble, when the second state code is successful, the SIP session is established between the client and the target device, and when the second state code is failed, the SIP session is not established between the client and the target device; the media address unit is used for storing media addresses, and the media port unit is used for storing media ports.
In some embodiments of the present application, the TCP session management module is further configured to detect a request number of the video access requests in the forwarding list unit; if the request quantity is null, generating an access termination message; sending an access termination message to the target device through the SIP session management module and the SIP protocol session management module; when receiving the access termination message, the SIP session management module recovers the SIP protocol stack identifier generated for establishing the SIP session.
In some embodiments of the present application, the SIP session management module is further configured to receive media information of the TCP session management module; wherein, the media information comprises a media address and a media port; acquiring a target platform ID and a target equipment ID of target equipment to be accessed by a client as identity information; the session management system is pre-stored with at least one platform ID, and the at least one platform ID and the at least one equipment ID have a mapping relation; generating an SIP protocol stack identifier to package the media information, the identity information and the SIP protocol stack identifier into a data request; wherein, the SIP protocol stack mark represents the mark of SIP conversation; and sending a data request to the SIP protocol session management module.
In some embodiments of the present application, the SIP protocol session management module is further configured to receive a data request from the SIP session management module, and detect state information of a first state code of the SIP session management module; if the state information of the first state code is in an initial state, responding to the data request, and extracting the identity information and the SIP protocol stack identifier in the data request; wherein, the SIP protocol stack mark is generated by the SIP session management module; generating a session request according to the identity information and the SIP protocol stack identifier; and sending a session request to the target equipment for establishing the SIP session between the client and the target equipment.
In some embodiments of the present application, a thread pool for processing a request and a message list for storing the request are respectively configured in the TCP session management module, the SIP session management module, and the SIP protocol session management module.
In a second aspect, the present application provides a session management method, where the session management method is applied to a session management system, the session management system includes a TCP session management module, an SIP session management module, and an SIP protocol session management module, and the method includes:
receiving and responding to a video access request of a client through a TCP session management module, and further acquiring media information for receiving video streams through a media server so as to send the media information to an SIP session management module;
receiving media information of a TCP session management module through an SIP session management module, acquiring identity information of target equipment to be accessed by a client, packaging the media information and the identity information into a data request, and sending the data request to the SIP protocol session management module;
detecting and responding and extracting identity information in the data request according to a first state code of the SIP session management module through the SIP protocol session management module, so as to generate a session request by using the identity information and then send the session request to target equipment; wherein the session request is for requesting that a SIP session be established between the client and the target device.
In a third aspect, the present application further provides a computer device, comprising:
one or more processors;
a memory; and one or more application programs, one or more of which are stored in the memory and configured to be executed by the processor to implement the session management method of the second aspect described above.
In a fourth aspect, the present application further provides a computer readable storage medium, on which a computer program is stored, the computer program being loaded by a processor to perform the steps of the session management method.
In a fifth aspect, embodiments of the present application provide a computer program product or a computer program comprising computer instructions stored in a computer-readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions to cause the computer device to perform the method provided by the second aspect described above.
The session management system, the session management method, the computer equipment and the storage medium have the advantages that through the simplified modular design, the expansibility of the system is obviously improved, and meanwhile, the synchronous improvement of the session stability of the system in each service scene due to the service independence among the modules can be ensured, so that all service logics can be processed asynchronously, and the maintenance cost of the system is further reduced.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
FIG. 1 is a block diagram of a session management system according to an embodiment of the present application;
FIG. 2 is a basic framework diagram of a session management system in an embodiment of the present application;
fig. 3 is a schematic application flow diagram of a TCP session management module in an embodiment of the present application;
FIG. 4 is a schematic diagram illustrating an application flow of a thread pool in an embodiment of the present application;
fig. 5 is a schematic application flow diagram of an SIP session management module in the embodiment of the present application;
fig. 6 is a schematic application flow diagram of a session management module of an SIP protocol stack in the embodiment of the present application;
FIG. 7 is a business framework diagram of a session management system in an embodiment of the present application;
FIG. 8 is a flow chart illustrating a session management method in an embodiment of the present application;
fig. 9 is a schematic structural diagram of a computer device in an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
In the description of the present application, the terms "first", "second" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or implying any number of technical features indicated. Thus, features defined as "first", "second", may explicitly or implicitly include one or more of the described features. In the description of the present application, "a plurality" means two or more unless specifically limited otherwise.
In the description of the present application, the term "for example" is used to mean "serving as an example, instance, or illustration". Any embodiment described herein as "for example" is not necessarily to be construed as preferred or advantageous over other embodiments. The following description is presented to enable any person skilled in the art to make and use the invention. In the following description, details are set forth for the purpose of explanation. It will be apparent to one of ordinary skill in the art that the present invention may be practiced without these specific details. In other instances, well-known structures and processes are not shown in detail to avoid obscuring the description of the invention with unnecessary detail. Thus, the present invention is not intended to be limited to the embodiments shown, but is to be accorded the widest scope consistent with the principles and features disclosed herein.
Embodiments of the present application provide a session management system, a session management method, a computer device, and a storage medium, which are described in detail below.
Referring to fig. 1, fig. 1 is a schematic structural diagram of a session management system according to an embodiment of the present application, where the session management system 100 includes: a TCP session management module 102, a SIP session management module 104, and a SIP protocol session management module 106;
the TCP session management module 102 is configured to receive and respond to a video access request from a client, and obtain media information for receiving a video stream through a media server, so as to send the media information to the SIP session management module; the SIP session management module 104 is configured to receive the media information of the TCP session management module, acquire identity information of a target device to be accessed by the client, package the media information and the identity information into a data request, and send the data request to the SIP protocol session management module; the SIP protocol session management module 106 is configured to detect and respond to and extract the identity information in the data request according to the first status code of the SIP session management module, so as to generate a session request by using the identity information and then send the session request to the target device; wherein the session request is for requesting that a SIP session be established between the client and the target device.
Among them, TCP (Transmission Control Protocol) is a connection-oriented (connection-oriented) reliable Transport layer (Transport layer) communication Protocol based on a byte stream. In a simplified OSI (Open System Interconnection) model of a computer network, which implements functions specified by a fourth layer transport layer, UDP (User Datagram Protocol) is another important transport Protocol in the same layer, and is also a connectionless transport layer Protocol, providing a transaction-oriented simple unreliable information transfer service.
Wherein, SIP (Session Initiation Protocol) is a multimedia communication Protocol established by IETF (Internet Engineering Task Force). It is a text-based application-layer control protocol for creating, modifying and releasing sessions of one or more participants. The present invention is widely applied to CS (Circuit Switched), NGN (Next Generation Network) and IMS (IP Multimedia Subsystem) networks, and can support and apply to Multimedia services such as voice, video, data, and the like, and also can apply to feature services such as Presence, Instant Message, and the like. SIP is similar to HTTP (HyperText Transfer Protocol).
The client may be any terminal device, for example, the client may be a terminal device that includes both receiving and transmitting hardware, i.e., a device having receiving and transmitting hardware capable of performing two-way communication over a two-way communication link. Such a device may include: a cellular or other communication device having a single line display or a multi-line display or a cellular or other communication device without a multi-line display. The client may specifically be a desktop terminal or a mobile terminal, and may also be one of a mobile phone, a tablet computer, and a notebook computer. The client sends a video access request to the transcoding server, where the video access request is used to request video data of a target device, where the target device may be a camera, and particularly may be a national camera (also referred to as a GB camera), the target device may specifically be one of the cascaded devices, the data of the target device includes some data related to the target device, for example, the target device is a national camera, and the data of the target device includes a camera state, negotiation data between the target camera and the client or the session management system, and the like. The video access request may be text data in JSON (JavaScript Object Notation) format.
Among them, the media server is an important device of the next generation network. The device provides media resource functions required for implementing various services on an IP network under the control of control devices (soft switch devices, application servers), including service voice provision, conferencing, interactive response (IVR), notification, unified messaging, advanced voice services, etc. In the application Server, MSML (Media Server Markup Language, a special xml dedicated to Media Server interaction) is used to send commands such as playback to the Media Server. The media server has good tailorability and can flexibly realize one or more functions.
Specifically, referring to fig. 2 and 3, the session management system 100 further includes a transcoding server, a network packet sending module, and a media server; the TCP session management module 102 is further configured to receive, through the transcoding server, a video access request of the client; responding to a video access request, sequentially acquiring a media address and a media port for receiving a video stream through a network packet sending module and a media server as media information; the network packet sending module is used for indicating the media server to schedule the media resources to acquire the media information by utilizing the pre-configured connection pool elements; and sending the media information to the SIP session management module.
In one embodiment, a thread pool for processing the request and a message list for storing the request are respectively configured in the TCP session management module, the SIP session management module and the SIP protocol session management module.
As shown in fig. 2, the TCP session management module 102, the SIP session management module 104, and the SIP protocol session management module 106 are connected through respective message queues, that is, in the process of subsequently processing various types of requests, different modules may place requests to be processed by subsequent modules in corresponding message queues. Because each module is also configured with a thread pool, each module can instruct an idle thread in the thread pool to extract a request from a message queue managed and controlled by the previous module as a basis for subsequent processing.
Secondly, one end of the TCP session management module 102 is connected to the transcoding server through the message queue, and the other end is connected to the SIP session management module 104 through the message queue, after the client sends the video access request to the session management system 100, the client receives the video access request, and the transcoding server receives the video access request and then performs transcoding to obtain the request message that can be supported and processed by the subsequent module. For example, a video access request is transcoded into a request message in binary format. Then, the transcoding server will continue to send the request message to the message queue of the TCP session management module 102, and at least one idle thread (i.e. a thread that does not currently process any task) of the TCP session management module 102 extracts the request message from the message queue, and further transmits the request message to the network packet sending module, and the network packet sending module notifies the media server to schedule the media resource based on the pre-configured connection pool element, i.e. the connection link between the TCP session management module 102 and the network packet sending module, so as to obtain the sub-media returned by the media server as the media information.
It should be noted that the connection link between the TCP session management module 102 and the network packet sending module may be represented as a connection pool handle, and the sequence number is used to determine whether the client is continuously online, otherwise, the subsequent video access request may be processed.
In one embodiment, the TCP session management module 102 is provided with a storage unit, where the storage unit includes a forwarding list unit, a second state code unit, a media address unit, and a media port unit; the TCP session management module 102 is further configured to, in response to the video access request, determine a second state code in the second state code unit; if the second state code is failed, placing the subsequent video access request in a forwarding list unit until the second state code is updated successfully; the second state code is used for representing the response state of the video access request of the preamble, when the second state code is successful, the SIP session is established between the client and the target device, and when the second state code is failed, the SIP session is not established between the client and the target device; the media address unit is used for storing media addresses, and the media port unit is used for storing media ports.
Specifically, as shown in fig. 3, after the TCP session management module 102 extracts the request message from the message queue by using the idle thread managed by the TCP session management module, the TCP session management module may send the request message to the next SIP session management module 104 in response to the video access request corresponding to the request message. However, each video access request needs to establish a SIP session, but it takes time to establish the SIP session, and in the process, other video access requests may be received. Therefore, in order to avoid logic confusion, the remaining video access requests that are not responded need to be placed in the forwarding list unit until the processing of the previous video access request is completed, and after the SIP session is established between the client and the target device (such as a camera, especially a national standard camera), the state information of the second state code managed and controlled by the TCP session management module 102 is successfully converted, and then the remaining video access requests that are not responded can be processed according to the receiving sequence.
Further, the thread pool mentioned above can greatly utilize the efficiency of the system CPU on one hand, and can solve the problem of communication stability by combining the design of the present application on the other hand. Referring to fig. 4, when the thread pool is initialized, a request message contained in a message queue shared by all threads in the thread pool is usually "0", which means that all threads are in a state of waiting for wakeup in an initial state, and since 100 threads are required to create and start the threads, if there are 100 threads, the 100 threads must wait for the threads to enter the state of waiting for wakeup before entering the next logic, so as to ensure that all threads in the thread pool are started successfully.
Further, as shown in fig. 4, the thread pools of the three modules may be integrated into a thread pool module, and the thread pool module may be configured to determine whether a queue list "(the" list "is used to store a universal pointer" void ") is empty, if yes, wait for receiving the universal pointer and then wake up all threads, otherwise, notify an idle thread to take out and parse a request message from a message queue, and need to take out the request message from the head of the message queue. It should be noted that the request message received via the forwarding server may be inserted from the tail of the message queue, and all threads are woken up at the same time.
In one embodiment, the SIP session management module 104 is further configured to receive media information of the TCP session management module 102; wherein, the media information comprises a media address and a media port; acquiring a target platform ID and a target equipment ID of target equipment to be accessed by a client as identity information; the session management system 100 pre-stores at least one platform ID, and the at least one platform ID and the at least one device ID have a mapping relationship; generating an SIP protocol stack identifier to package the media information, the identity information and the SIP protocol stack identifier into a data request; wherein, the SIP protocol stack mark represents the mark of SIP conversation; a data request is sent to the SIP protocol session management module 106.
The media address and the media port are important parameters for positioning the sub-media resource, and at least one device can be mounted on one platform, that is, there is a platform ID associated with at least one device ID.
Specifically, referring to fig. 5, after the TCP session management module 102 sends the media information to the SIP session management module 104, the SIP session management module 104 not only receives the media information including the media address and the media port, but also extracts the target platform ID and the target device ID of the target device to be accessed, which are sent by the client, from the message queue of the TCP session management module 102, and uses the target platform ID and the target device ID as the positioning basis, i.e., the identity information, of the target device. It should be noted that, since SIP devices are all embedded devices and do not have high concurrency capability, if access requests are frequently sent to the SIP devices, network load of the SIP devices is easily caused, and a large amount of packet loss is caused.
Further, the SIP stack identifier "call-id" is generated by the SIP session management module 104 in real time, the state code managed by the SIP session management module 104 is actually bound to the state of the SIP session in the SIP protocol session management module 106, and the states mainly include the following four types: (1) the initial state is '0', the self-defined state code indicates that the SIP session is not established, and if the SIP session needs to be established, a session request needs to be sent; (2) 100 trying, which indicates that the SIP connection is being established and a session request is sent; (3) 200 ok, which indicates that the SIP session is established and the target device is sending the data required by the client to the sub-media resource; (4) 408, which indicates that the SIP session request was sent but the target device did not respond within a specified time (e.g., 3 seconds).
In one embodiment, the SIP protocol session management module 106 is further configured to receive a data request from the SIP session management module 104, and detect status information of the first status code of the SIP session management module 104; if the state information of the first state code is in an initial state, responding to the data request, and extracting the identity information and the SIP protocol stack identifier in the data request; wherein, the SIP stack identifier is generated by the SIP session management module 104; generating a session request according to the identity information and the SIP protocol stack identifier; and sending a session request to the target equipment for establishing the SIP session between the client and the target equipment.
Specifically, based on the description of the previous embodiment, if the state information of the first state code managed and controlled by the SIP session management module 104 is "0", which indicates that it is in an initial state, and further indicates that no SIP session is currently established, the SIP session may be established at this time, that is, as shown in fig. 6, the SIP protocol session management module 106 may, in response to a data request sent by the SIP session management module 104, extract the identity information and the SIP protocol stack identifier in the data request, and then package the extracted identity information and the SIP protocol stack identifier into a session request, so as to send the session request to a target device (e.g., a GB camera), so that an SIP session can be established between a client and the target device, and the target device can transmit video data required by the target device to the client based on the SIP session.
It should be noted that, in this embodiment, only how to establish the SIP session according to the first status code is described, and it can be seen from fig. 7 that the link sequence is from left to right, but if the link sequence is from right to left, the link sequence is to perform state change on the first status code and the second status code, the state change of the second status code may be successful or failed, and the state change of the first status code includes one of the above four states. Besides, the third status code managed by the SIP session management module 106 is the same.
In one embodiment, the TCP session management module 102 is further configured to detect a request number of the video access requests in the forwarding list unit; if the request quantity is null, generating an access termination message; sending an access termination message to the target device through the SIP session management module and the SIP protocol session management module 106; when receiving the access termination message, the SIP session management module 104 recovers the SIP stack identifier generated for establishing the SIP session.
Specifically, the above embodiments have described in detail how to establish the SIP session, and the present embodiment will further describe how to manage the SIP session, including terminating the SIP session. The termination of the SIP session may be in a left-to-right termination order as shown in fig. 2, or in a right-to-left termination order as shown in fig. 2.
For example, when the number of requests in the forwarding list unit is "0", an access termination message is generated, and the session termination from left to right of the above-mentioned three modules 102 to 106 is triggered, and all SIP sessions are to be sequentially recovered; when the target device transmits data to the client through the established SIP session, if BYE is sent, a state changing route from right to left is taken, the sessions are sequentially recovered, namely, no data is generated at the source of the data, and the client needs to be informed that the session is finished.
According to the session management system, through a simplified modular design, the expansibility of the system is obviously improved, and simultaneously, the session stability of the system in each service scene is synchronously improved due to the independence of services among modules, so that all service logics can be asynchronously processed, and the maintenance cost of the system is further reduced.
Referring to fig. 8, an embodiment of the present application provides a session management method, where the session management method is applied to a session management system, and the session management system includes a TCP session management module, an SIP session management module, and an SIP protocol session management module, which will be mainly illustrated below by applying the method to the session management system 100 in fig. 1, where the session management method includes steps S801 to S803, which are specifically as follows:
s801, receiving and responding to a video access request of a client through a TCP session management module, and further acquiring media information for receiving video streams through a media server to send the media information to an SIP session management module;
s802, receiving media information of a TCP session management module through an SIP session management module, acquiring identity information of a target device to be accessed by a client, packaging the media information and the identity information into a data request, and sending the data request to the SIP protocol session management module;
s803, detecting and responding to and extracting the identity information in the data request according to the first state code of the SIP session management module through the SIP protocol session management module, so as to generate a session request by using the identity information, and then sending the session request to the target device; wherein the session request is used for requesting the establishment of a SIP session between the client and the target device.
The session management method in the embodiment obviously improves the system expansibility through a simplified modular design, and simultaneously can ensure that the session stability of the system in each service scene is synchronously improved due to the independence of the services among the modules, so that all service logics can be asynchronously processed, and the system maintenance cost is further reduced.
In one embodiment, the session management system 100 may be implemented in the form of a computer program that is executable on a computer device such as that shown in FIG. 9. The memory of the computer device may store various program modules constituting the session management system 100, such as the TCP session management module 102, the SIP session management module 104, and the SIP protocol session management module 106 shown in fig. 1; the computer program constituted by the respective program modules causes the processor to execute the steps in the session management method of the respective embodiments of the present application described in the present specification.
For example, the computer device shown in fig. 9 may perform step S801 by the TCP session management module 102 in the session management system 100 shown in fig. 1. The computer device may perform step S802 by the SIP session management module 104. The computer device may perform step S803 by the SIP protocol session management module 106.
Wherein the computer device comprises a processor, a memory, and a network interface connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operating system and the computer program to run on the non-volatile storage medium. The network interface of the computer device is used for communicating with an external computer device through a network connection. The computer program is executed by a processor to implement a session management method.
Those skilled in the art will appreciate that the architecture shown in fig. 9 is merely a block diagram of some of the structures associated with the disclosed aspects and is not intended to limit the computing devices to which the disclosed aspects apply, as particular computing devices may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.
In one embodiment, a computer device is provided that includes one or more processors; a memory; and one or more application programs, wherein the one or more application programs are stored in the memory and configured to be executed by the processor to perform the steps of the session management method described above. Here, the steps of the session management method may be steps in the session management methods of the respective embodiments described above.
In one embodiment, a computer-readable storage medium is provided, in which a computer program is stored, which is loaded by a processor, so that the processor performs the steps of the above-mentioned session management method. Here, the steps of the session management method may be steps in the session management methods of the respective embodiments described above.
It will be understood by those of ordinary skill in the art that all or part of the processes of the methods of the embodiments described above can be implemented by a computer program, which can be stored in a non-volatile computer-readable storage medium, and can include the processes of the embodiments of the methods described above when executed. Any reference to memory, storage, database or other medium used in the embodiments provided herein can include at least one of non-volatile and volatile memory. Non-volatile Memory may include Read-Only Memory (ROM), magnetic tape, floppy disk, flash Memory, optical storage, or the like. Volatile Memory can include Random Access Memory (RAM) or external cache Memory. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM).
The technical features of the above embodiments can be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the above embodiments are not described, but should be considered as the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above detailed description is provided for a session management system, a session management method, a computer device, and a storage medium according to embodiments of the present application, and a specific example is applied in the present application to explain the principles and implementations of the present invention, and the description of the above embodiments is only used to help understanding the method and the core idea of the present invention; meanwhile, for those skilled in the art, according to the idea of the present invention, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present invention.

Claims (10)

1. A session management system, comprising: a TCP session management module, an SIP session management module and an SIP protocol session management module; wherein the content of the first and second substances,
the TCP session management module is used for receiving and responding to a video access request of a client, and acquiring media information for receiving video streams through a media server so as to send the media information to the SIP session management module;
the SIP session management module is used for receiving the media information of the TCP session management module and acquiring the identity information of a target device to be accessed by the client, so that after the media information and the identity information are packaged into a data request, the data request is sent to the SIP protocol session management module;
the SIP protocol session management module is used for detecting and responding to and extracting the identity information in the data request according to the first state code of the SIP session management module so as to send the session request to the target device after generating the session request by using the identity information; wherein the session request is for requesting that a SIP session be established between the client and the target device.
2. The system of claim 1, wherein the session management system further comprises a transcoding server, a network packetization module, and a media server; wherein the TCP session management module is further configured to,
receiving, by the transcoding server, a video access request of the client;
responding to the video access request, sequentially acquiring a media address and a media port for receiving a video stream through the network packet sending module and the media server as the media information; the network packet sending module is used for indicating the media server to schedule media resources to acquire the media information by utilizing a pre-configured connection pool element;
and sending the media information to the SIP session management module.
3. The system according to claim 1 or 2, wherein a storage unit is disposed in the TCP session management module, and the storage unit includes a forwarding list unit, a second state code unit, a media address unit, and a media port unit; wherein the TCP session management module is further configured to,
determining a second state code in the second state code unit in response to the video access request;
if the second state code is failed, placing subsequent video access requests in the forwarding list unit until the second state code is updated successfully;
the second state code is used for representing the response state of a video access request of a preamble, when the second state code is successful, the second state code represents that an SIP session is established between the client and the target device, and when the second state code is failed, the second state code represents that the SIP session is not established between the client and the target device; the media address unit is used for storing media addresses, and the media port unit is used for storing media ports.
4. The system of claim 3, wherein the TCP session management module is further configured to detect a request number of video access requests in the forwarding list unit;
if the request quantity is null, generating an access termination message;
sending the access termination message to the target device through the SIP session management module and the SIP protocol session management module;
and when receiving the access termination message, the SIP session management module recovers the SIP protocol stack identifier generated for establishing the SIP session.
5. The system of claim 1, wherein the SIP session management module is further configured to receive media information of the TCP session management module; wherein the media information comprises a media address and a media port;
acquiring a target platform ID and a target equipment ID of target equipment to be accessed by the client as the identity information; the session management system is pre-stored with at least one platform ID, and the at least one platform ID and the at least one equipment ID have a mapping relation;
generating an SIP protocol stack identifier to package the media information, the identity information and the SIP protocol stack identifier as a data request; wherein, the SIP protocol stack mark represents the mark of SIP conversation;
and sending the data request to the SIP protocol session management module.
6. The system of claim 1, wherein the SIP protocol session management module is further configured to receive a data request from the SIP session management module and detect status information of a first status code of the SIP session management module;
if the state information of the first state code is in an initial state, responding to the data request, and extracting the identity information and the SIP protocol stack identifier in the data request; wherein, the SIP protocol stack mark is generated by the SIP session management module;
generating a session request according to the identity information and the SIP protocol stack identifier;
and sending the session request to the target equipment for establishing the SIP session between the client and the target equipment.
7. The system of claim 1, wherein the TCP session management module, the SIP session management module, and the SIP protocol session management module are each configured with a thread pool for processing requests, and a message list for storing requests.
8. A session management method is applied to a session management system, the session management system comprises a TCP session management module, a SIP session management module and a SIP protocol session management module, and the method comprises the following steps:
receiving and responding to a video access request of a client through the TCP session management module, and further acquiring media information for receiving video streams through a media server so as to send the media information to the SIP session management module;
receiving media information of the TCP session management module through the SIP session management module, acquiring identity information of target equipment to be accessed by the client, packaging the media information and the identity information into a data request, and sending the data request to the SIP protocol session management module;
detecting and responding and extracting the identity information in the data request according to the first state code of the SIP session management module through the SIP protocol session management module so as to generate a session request by using the identity information and then send the session request to the target equipment; wherein the session request is for requesting that a SIP session be established between the client and the target device.
9. A computer device, characterized in that the computer device comprises:
one or more processors;
a memory; and one or more applications, wherein the one or more applications are stored in the memory and configured to be executed by the processor to implement the session management method of any of claim 8.
10. A computer-readable storage medium, having stored thereon a computer program which is loaded by a processor for performing the steps of the session management method according to any of the claims 8.
CN202210585778.8A 2022-05-27 2022-05-27 Session management system, method, computer device and storage medium Active CN114679435B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210585778.8A CN114679435B (en) 2022-05-27 2022-05-27 Session management system, method, computer device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210585778.8A CN114679435B (en) 2022-05-27 2022-05-27 Session management system, method, computer device and storage medium

Publications (2)

Publication Number Publication Date
CN114679435A true CN114679435A (en) 2022-06-28
CN114679435B CN114679435B (en) 2022-08-30

Family

ID=82080842

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210585778.8A Active CN114679435B (en) 2022-05-27 2022-05-27 Session management system, method, computer device and storage medium

Country Status (1)

Country Link
CN (1) CN114679435B (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110131332A1 (en) * 2009-05-26 2011-06-02 Nokia Corporation Method and apparatus for transferring a media session
CN102209069A (en) * 2010-03-31 2011-10-05 株式会社日立制作所 Communication system
CN102487341A (en) * 2010-12-02 2012-06-06 中兴通讯股份有限公司 Session detection method and apparatus thereof, and session initiation protocol (SIP) server
CN103428168A (en) * 2012-05-17 2013-12-04 北京信悦通科技有限公司 Method, system and signaling gateway for SIP client side to visit RTSP media resource
CN105338006A (en) * 2015-12-15 2016-02-17 烽火通信科技股份有限公司 Back-up recovery method for called side SIP stack session state in IMS
CN112866303A (en) * 2021-04-25 2021-05-28 武汉中科通达高新技术股份有限公司 Method and device for managing cascade media transmission link
CN112995234A (en) * 2021-05-20 2021-06-18 武汉中科通达高新技术股份有限公司 Media transmission link management method and device

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110131332A1 (en) * 2009-05-26 2011-06-02 Nokia Corporation Method and apparatus for transferring a media session
CN102209069A (en) * 2010-03-31 2011-10-05 株式会社日立制作所 Communication system
CN102487341A (en) * 2010-12-02 2012-06-06 中兴通讯股份有限公司 Session detection method and apparatus thereof, and session initiation protocol (SIP) server
CN103428168A (en) * 2012-05-17 2013-12-04 北京信悦通科技有限公司 Method, system and signaling gateway for SIP client side to visit RTSP media resource
CN105338006A (en) * 2015-12-15 2016-02-17 烽火通信科技股份有限公司 Back-up recovery method for called side SIP stack session state in IMS
CN112866303A (en) * 2021-04-25 2021-05-28 武汉中科通达高新技术股份有限公司 Method and device for managing cascade media transmission link
CN112995234A (en) * 2021-05-20 2021-06-18 武汉中科通达高新技术股份有限公司 Media transmission link management method and device

Also Published As

Publication number Publication date
CN114679435B (en) 2022-08-30

Similar Documents

Publication Publication Date Title
US9509745B2 (en) Java API for programming web real-time communication applications
US10601878B2 (en) Call processing method and control apparatus, automatic call distribution apparatus, and agent terminal
US9331967B2 (en) Browser/HTML friendly protocol for real-time communication signaling
US20140222894A1 (en) Javascript api for webrtc
US10476915B2 (en) Real-time communication signaling gateway
CN111479121B (en) Live broadcasting method and system based on streaming media server
CN101960822B (en) SIP-HTTP application correlator
US9648049B2 (en) System and method for extending IP multimedia subsystem to HTML5 environments
US9565218B2 (en) Resource management for WebRTC
US20140223452A1 (en) Generic model for customizing protocol behavior through javascript
US20120185561A1 (en) HTTP Notification Gateway
WO2020207091A1 (en) Management client, and device monitoring system and method
CN114679434B (en) Session message processing system, method, computer device and storage medium
EP2514139B1 (en) System and method of multi-media conferencing between universal plug and play (upnp) enabled telephony devices and wireless area network (wan) devices
US8601139B2 (en) Multiple core session initiation protocol (SIP)
CN103227788A (en) Method and system realizing communication between web-based application and SIP equipment
WO2008080849A1 (en) System, computer program product and method of communicating with session initiation protocol (sip) application sessions using a message-oriented middleware system
US20120233334A1 (en) Shared media access for real time first and third party control
US10601880B2 (en) Conference reconstruction in SIP networks
KR20070049587A (en) Automatic orchestration of dynamic multiple party, multiple media communications
US11843642B1 (en) Serverless signaling in peer-to-peer session initialization
US8416764B2 (en) System and method for object registration in a VoIP environment
US20070208804A1 (en) System for invoking web services by means of SIP signaling
CN114679435B (en) Session management system, method, computer device and storage medium
EP2863603A1 (en) A method for optimizing the capability discovery of terminals in an IMS network

Legal Events

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