WO2022241990A1 - 一种媒体传输链路管理方法、装置及存储介质 - Google Patents
一种媒体传输链路管理方法、装置及存储介质 Download PDFInfo
- Publication number
- WO2022241990A1 WO2022241990A1 PCT/CN2021/119993 CN2021119993W WO2022241990A1 WO 2022241990 A1 WO2022241990 A1 WO 2022241990A1 CN 2021119993 W CN2021119993 W CN 2021119993W WO 2022241990 A1 WO2022241990 A1 WO 2022241990A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- target
- transcoding
- media
- session module
- request
- Prior art date
Links
- 230000005540 biological transmission Effects 0.000 title claims abstract description 198
- 238000000034 method Methods 0.000 title claims abstract description 33
- 238000007726 management method Methods 0.000 claims description 43
- 238000013507 mapping Methods 0.000 claims description 27
- 238000012544 monitoring process Methods 0.000 claims description 22
- 230000002159 abnormal effect Effects 0.000 claims description 19
- 238000004891 communication Methods 0.000 claims description 14
- 238000001514 detection method Methods 0.000 claims description 10
- 238000012545 processing Methods 0.000 claims description 9
- 238000005538 encapsulation Methods 0.000 claims description 7
- 230000008707 rearrangement Effects 0.000 claims description 7
- 238000010586 diagram Methods 0.000 description 14
- 230000008569 process Effects 0.000 description 14
- 230000008878 coupling Effects 0.000 description 9
- 238000010168 coupling process Methods 0.000 description 9
- 238000005859 coupling reaction Methods 0.000 description 9
- 230000004044 response Effects 0.000 description 7
- 230000008901 benefit Effects 0.000 description 5
- 238000004590 computer program Methods 0.000 description 5
- 230000003068 static effect Effects 0.000 description 5
- 230000000977 initiatory effect Effects 0.000 description 4
- 238000012546 transfer Methods 0.000 description 4
- 230000002457 bidirectional effect Effects 0.000 description 3
- 230000006855 networking Effects 0.000 description 2
- 230000001133 acceleration Effects 0.000 description 1
- 238000013473 artificial intelligence Methods 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000013500 data storage Methods 0.000 description 1
- 230000009977 dual effect Effects 0.000 description 1
- 239000000835 fiber Substances 0.000 description 1
- 230000010354 integration Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 239000004065 semiconductor Substances 0.000 description 1
- 230000011664 signaling Effects 0.000 description 1
- 239000007787 solid Substances 0.000 description 1
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L65/00—Network arrangements, protocols or services for supporting real-time applications in data packet communication
- H04L65/1066—Session management
- H04L65/1101—Session protocols
- H04L65/1104—Session initiation protocol [SIP]
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L69/00—Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
- H04L69/16—Implementation or adaptation of Internet protocol [IP], of transmission control protocol [TCP] or of user datagram protocol [UDP]
- H04L69/164—Adaptation or special uses of UDP protocol
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N5/00—Details of television systems
- H04N5/76—Television signal recording
- H04N5/765—Interface circuits between an apparatus for recording and another apparatus
- H04N5/77—Interface circuits between an apparatus for recording and another apparatus between a recording apparatus and a television camera
Definitions
- the embodiments of the present application relate to the technical field of media transmission, and in particular, to a method, device, and storage medium for media transmission link management.
- a service terminal wants to invite a camera’s video
- two links need to be maintained, one is the session initiation protocol (Session initiation Protocol, SIP) uplink to initiate a session invitation to the camera
- SIP Session initiation Protocol
- the established SIP communication link the other is the media link between the camera and the media server (used to send video to the media server), but the process of establishing the SIP communication link takes a long time, if there are other services in this process
- the terminal requests the camera's video, it will cause network congestion in the camera's data stream transmission.
- Embodiments of the present application provide a media transmission link management method, device, and storage medium, which can effectively avoid network congestion in camera data stream transmission.
- the embodiment of the present application provides a media transmission link management method, including:
- the transcoding server receives the request information for requesting the data stream of the target camera sent by the service terminal; detects whether there is a transcoding session module corresponding to the target camera, and if not, sends the request information to the dispatcher center, and create a target transcoding session module based on the target camera, cache the request information into the target request cache list of the target transcoding session module, and send a session invitation to the target camera at the scheduling center until the completion During the session, cache all received request information for the data stream of the target camera into the target request cache list;
- the dispatch center creates a target dispatch session module based on the target camera, sends the session invitation to the target camera based on the target dispatch session module, and if the normal status code returned by the target camera based on the session invitation is received , then send the normal status code to the transcoding server, and send a notification message to the target camera to notify the target camera to send the data stream, and send the request information to the media server to causing the media server to create a target media session module based on the target camera to receive the data stream;
- the transcoding server creates a first media transmission link between the target transcoding session module and each service terminal corresponding to each request information in the target request cache list, and creates the target transcoding session module and a second media transmission link between the target media session modules;
- the media server sends the data stream received by the target media session module to the target transcoding session module based on the second media transmission link;
- the transcoding server distributes the data stream received by the target transcoding session module to each service terminal based on the first media transmission link.
- the step of the transcoding server creating the first media transmission link between the target transcoding session module and each service terminal corresponding to each request information in the target request cache list includes:
- the transcoding server traverses the target request cache list, and creates a corresponding video transmission service for each request information in the target request cache list;
- the transcoding server sends the address information of the video transmission service to each service terminal corresponding to each request information through the request identifier of each request information in the target request cache list, so that the Each service terminal sends access request information based on the address information;
- the transcoding server creates a first media transmission link between the target transcoding session module and each service terminal based on the access request information.
- the media transmission link management method further includes:
- the dispatch center If the dispatch center receives the abnormal status code returned by the target camera based on the session invitation, then send the abnormal status code to the transcoding server;
- the transcoding server After receiving the abnormal status code, the transcoding server releases the target transcoding session module, generates a request failure message, and sends the request failure message to each service terminal.
- the step of the transcoding server receiving the request information sent by the service terminal for requesting the data stream of the target camera includes:
- the transcoding server receives the text data sent by the business terminal based on the full-duplex communication protocol websocket, the text data includes a target request identifier and a target camera identifier, and the target request identifier is used to identify the request corresponding to the text data, so The target camera identifier is used to identify the target camera.
- the step of the transcoding server sending the request information to the dispatch center includes:
- the transcoding server converts the text data into binary data
- the transcoding server sends the binary data to the dispatch center.
- the media transmission link management method further includes:
- the transcoding server adds the target transcoding session module to a transcoding session mapping table, and the transcoding session mapping table is used to characterize the correspondence between camera identifiers and transcoding session modules; and/or,
- the dispatching center adds the target dispatching session module to a dispatching session mapping table, and the dispatching session mapping table is used to characterize the correspondence between camera identifiers and dispatching session modules.
- the media transmission link management method further includes: if the transcoding server detects that there is a transcoding session module corresponding to the target camera, then detecting whether the data stream has been accessed; access, create the first media transmission link, and send the address information of the first media transmission link to the service terminal.
- the step of creating the second media transmission link between the target transcoding session module and the target media session module by the transcoding server includes:
- the transcoding server sends a registration packet to the registration monitoring service unit of the target media session module through the target transcoding session module to create a data stream forwarding service between the target transcoding session module and the target media session module A second media transport link between units.
- the step of the transcoding server sending the registration packet to the registration monitoring service unit of the target media session module through the target transcoding session module it also includes:
- the media server receives the logout packet sent by the transcoding server through the target transcoding session module through the registration monitoring service unit, remove the target transcoding session module from the distribution list.
- the step of the transcoding server distributing the data stream received by the target transcoding session module to the service terminals based on the first media transmission link includes:
- the transcoding server performs packet loss detection, rearrangement, packet assembly and encapsulation processing on the data stream to obtain media serialization packets;
- the transcoding server distributes the media serialization package to each service terminal based on the first media transmission link.
- the embodiment of the present application provides a media transmission link management device, including:
- Transcoding server dispatch center and media server
- the transcoding server is used to receive the request information sent by the service terminal for requesting the data flow of the target camera; detect whether there is a transcoding session module corresponding to the target camera, and if not, send the request information to send to the dispatching center, and create a target transcoding session module based on the target camera, cache the request information into the target request cache list of the target transcoding session module, and send the request information to the dispatching center to the When the target camera sends a session invitation until the session is completed, all received request information for the data stream of the target camera is cached in the target request cache list;
- the scheduling center is configured to create a target scheduling session module based on the target camera, and send the session invitation to the target camera based on the target scheduling session module, and if the target camera returns based on the session invitation normal status code, send the normal status code to the transcoding server, and send a notification message to the target camera to notify the target camera to send the data stream, and send the request message to the target camera
- the media server so that the media server creates a target media session module based on the target camera to receive the data stream;
- the transcoding server is further configured to create a first media transmission link between the target transcoding session module and each service terminal corresponding to each request information in the target request cache list, and create the target transcoding A second media transmission link between the code session module and the target media session module;
- the media server is configured to send the data stream received by the target media session module to the target transcoding session module based on the second media transmission link;
- the transcoding server is further configured to distribute the data stream received by the target transcoding session module to each service terminal based on the first media transmission link.
- transcoding server is specifically used for:
- the dispatching center is further configured to send the abnormal status code to the transcoding server if the abnormal status code returned by the target based on the session invitation is received; the transcoding server further uses After receiving the abnormal status code, release the target transcoding session module, generate a request failure message, and send the request failure message to each service terminal.
- the transcoding server is specifically used to receive the text data sent by the service terminal based on the full-duplex communication protocol websocket, the text data includes the target request identifier and the target camera identifier, and the target request identifier is used to identify the text In the request corresponding to the data, the target camera identifier is used to identify the target camera.
- the transcoding server is specifically configured to convert the text data into binary data; and send the binary data to the dispatch center.
- the transcoding server is further configured to add the target transcoding session module to a transcoding session mapping table, and the transcoding session mapping table is used to characterize the correspondence between camera identifiers and transcoding session modules; and/ Or, the dispatching center is further configured to add the target dispatching session module to a dispatching session mapping table, and the dispatching session mapping table is used to represent a correspondence between camera identifiers and dispatching session modules.
- the transcoding server is further configured to detect whether the data stream has been accessed if it is detected that there is a transcoding session module corresponding to the target camera, and if the data stream has been accessed, create the the first media transmission link, and send the address information of the first media transmission link to the service terminal.
- the transcoding server is specifically configured to send a registration packet to the registration monitoring service unit of the target media session module through the target transcoding session module, so as to create a session between the target transcoding session module and the target media session
- the data flow of the modules is forwarded to the second media transmission link between the service units.
- the media server is further configured to set the target transcoding session
- the module is added to the distribution list; if the logout packet sent by the transcoding server through the target transcoding session module is received through the registration monitoring service unit, the target transcoding session module is removed from the distribution list .
- the transcoding server is specifically configured to perform packet loss detection, rearrangement, packetization, and encapsulation processing on the data stream to obtain a media serialization packet; based on the first media transmission link, transfer the media The serialized package is distributed to each service terminal.
- Still another aspect of the embodiments of the present application provides a storage medium, which includes instructions, which, when run on a computer, cause the computer to execute the method in any embodiment of the first aspect above.
- the solution provided by the embodiment of the present application firstly create a transcoding session module, a scheduling session module, and a media session module corresponding to the camera, and request the data stream of the camera based on the created modules, using a modular
- the media transmission link management method ensures the independence of the business and has the characteristics of low coupling; then, the request cache list provided by the transcoding session module is used to cache all the request information for the camera data stream, so that only one channel needs to be reserved Request to ensure the uniqueness of the media link between the dispatch center and the camera; finally, make full use of the distribution advantages brought by the high bandwidth of the media server to solve the problem of insufficient distribution capabilities caused by the small network bandwidth of the camera. Therefore, the problem of network congestion in the data stream transmission of the camera can be effectively avoided.
- Figure 1a is a system architecture diagram of the operation of a media transmission link management device provided by the embodiment of the present application
- FIG. 1b is a schematic diagram of request caching through the ws request caching list of the transcoding session module provided by the embodiment of the present application;
- FIG. 2 is an architecture diagram of a media transmission link management system provided by an embodiment of the present application
- FIG. 3 is a flow chart of a method for managing a media transmission link provided in an embodiment of the present application
- FIG. 4 is a schematic diagram of a transcoding session mapping table provided by an embodiment of the present application.
- FIG. 5 is a schematic diagram of a scheduling session mapping table provided by an embodiment of the present application.
- FIG. 6 is a schematic diagram of a link between a dispatch center, a camera, and a media server provided in an embodiment of the present application;
- FIG. 7 is a schematic structural diagram of a media transmission link management device provided by an embodiment of the present application.
- modules or sub-modules described as separate components may or may not be physically separated, may or may not be physical modules, or may be distributed into multiple circuit modules, and some or all of them may be selected according to actual needs module to achieve the purpose of the embodiment of the application.
- the embodiment of the present application provides a media transmission link management method, which is applied to a media transmission link management device.
- the media transmission link management method is mainly used in urban monitoring and alarm networking systems, intelligent transportation systems, Surveillance system, used to build a bridge between traditional security surveillance video and Internet video, to achieve the purpose of converting traditional surveillance video into Internet video stream (data stream), simplifying the acquisition of national standard (GB) equipment video stream, and effectively avoiding GB
- the transmission link of the device data flow is congested.
- Traditional surveillance video refers to the video data collected by the front-end camera (front-end camera).
- the terminal (user terminal) calls the video data.
- the user terminal includes the client and the platform terminal that are registered and authorized by the urban monitoring and alarm network system or the intelligent transportation system, and have operation requirements for the data and equipment in the system.
- the client includes Traffic police terminals
- platform terminals include terminals included in other platforms in the system, such as terminals of transcoding platforms, etc.
- the user terminal includes, but is not limited to, a smart phone, a tablet computer, a notebook computer, a smart TV, a smart robot, a personal computer (PC, Personal Computer), a wearable device, a server computer, and the like.
- the media transmission link management method provided by the embodiment of this application is executed by a media transmission link management device, which can run on the system architecture shown in Figure 1a, please refer to Figure 1a, which is an embodiment of this application Provided is a system architecture diagram for the operation of a media transmission link management device.
- the system includes service terminals (such as service terminal 1 and service terminal N), a transcoding server, a dispatch center, a media server, and a camera.
- the link between the service terminal and the transcoding server includes a full dual Industrial communication protocol (websocket, ws) transmission control link and ws video transmission link.
- the ws transmission control link is used to send information. It is a two-way transmission link with a long connection.
- the life cycle is controlled by the business terminal, and the transcoding server will not Actively close the link.
- the ws video transmission link is created by the transcoding server after the transcoding server receives the normal status code (200). It is a one-way transmission link (from the transcoding server to the business terminal).
- the link between the transcoding server and the dispatch center is a Transmission Control Protocol (Transmission Control Protocol, TCP) link, which is a bidirectional transmission link.
- TCP Transmission Control Protocol
- the link between the dispatch center and the camera is a session initiation protocol (Session initiation Protocol, SIP) link, which is a bidirectional transmission link.
- the link between the dispatch center and the media server is a TCP link, which is a two-way transmission link.
- the link between the camera and the media server is a video transmission link, such as a User Datagram Protocol (UDP) link (UDP command control link), which is a one-way transmission link (camera to media server).
- the link between the media server and the transcoding server includes a video transmission link and a UDP command control link.
- the video transmission link is a one-way transmission link (from the media server to the transcoding server), and the UDP command control link is a one-way transmission link.
- Transport link (transcoding server to media server).
- the embodiment of the present application provides the following media transmission link management solution: the service terminal sends a ws target request for requesting the data stream of the camera to the transcoding server, and the transcoding server determines whether the ws target request is For the first ws request of the data stream of the camera (the transcoding server will create a corresponding transcoding session module (transcoding session) based on the identity of the camera for the ws request of the data stream of different cameras, if there is no corresponding transcoding session module, it means that it is the first ws request), if the transcoding server determines that the ws target request is the first request, it will create a transcoding session module, and the transcoding session module provides a ws request cache list, and the ws request cache list not only The ws target request is cached, and all subsequent received ws requests for the data stream of the camera will be cached.
- the transcoding server determines whether the ws target request is For the first ws request of the data stream of the camera (
- the ws request usually carries the request identifier and the camera identifier, so the ws request cache list will also include the request identifier and the camera identifier, where the request identifier is used to help the service terminal distinguish which request the corresponding response is from.
- Figure 1b is a schematic diagram of request caching provided by the embodiment of the present application through the ws request cache list of the transcoding session module. In the figure, the first ws request, the second ws request, and the third ws request requests for request caching.
- the transcoding server only when the transcoding server creates a transcoding session module when ws is requested for the first time, when the subsequent transcoding server receives a ws request, the transcoding server does not need to create a transcoding session module again, and directly caches the ws request to the ws request cache list In this way, all the ws requests for multiple requests for the data stream of the same camera are managed in a unified manner, and only one request is reserved, thus ensuring the uniqueness of the SIP video link between the dispatch center and the camera.
- the transcoding server will send the ws target request to the scheduling center, and the scheduling center will create a scheduling session module (scheduling session) associated with the camera, and the scheduling center will send a session invitation to the camera.
- Normal status code send the normal status code to the transcoding server, and notify the camera to start sending data streams, and convert the ws target request into a binary request and send it to the media server, so that the media server creates a media session module associated with the camera (media session) to receive the data stream sent by the camera.
- the transcoding server After the transcoding server receives the normal status code, the transcoding server creates the first media transmission link between the transcoding session module and the service terminal (the transcoding server traverses the ws request cache list of the transcoding session module, and the ws request cache list Create a corresponding ws video transmission service (ws video service) for each ws request in , and then pass the address of the ws video transmission service to the service terminal corresponding to each ws request through the ws request identifier (ws handle) of the ws request cache list , after receiving the address, each service terminal actively accesses in to build the first media transmission link), and creates a second media transmission link between the transcoding session module and the media session module (as shown in Figure 1a , there are two transmission links between the transcoding server and the media server, one is the UDP command control link, which is to register with the media session module of the media server, after the registration is completed, the media server will transfer the data transmitted by the camera sent to the transcoding server
- the media server sends the data stream received by the media session module to the transcoding session module through the second media transmission link. Based on the address sent by the transcoding server, each service terminal accesses the ws video transmission service created by the transcoding server, and obtains the data stream provided by the ws video transmission service through the web page.
- Figure 2 is an architecture diagram of a media transmission link management system provided by the embodiment of this application, as many ws requests are opened in the ws request cache list ws video service, constructing the media transmission link between the business terminal and the transcoding server, such as ws1, ws2 and wsN in Figure 2, ws1 corresponds to video service 1, ws2 corresponds to video service 2, wsN corresponds to video service N, and the packet service is used for Carry out packet loss detection, rearrangement, grouping and encapsulation processing on the data flow, and the media session module includes a registration monitoring service unit and a data flow forwarding service unit.
- the video service 1 in the transcoding session module will be disconnected. If all service terminals are detected Close the webpage, then disconnect all video services in the transcoding session module, and the transcoding server will notify the media server, so that the media server removes the data stream forwarding service unit in the media session module, and the media server will notify the dispatching center again, After receiving the notification, the dispatch center closes the link with the camera.
- Figure 3 is a flow chart of a media transmission link management method provided by the embodiment of the application, the embodiment of the application at least includes follows the steps below:
- the transcoding server receives the request information sent by the service terminal for requesting the data stream of the target camera; detects whether there is a transcoding session module corresponding to the target camera, and if not, sends the request information to the dispatcher center, and create a target transcoding session module based on the target camera, cache the request information into the target request cache list of the target transcoding session module, and send a session invitation to the target camera at the dispatch center Until the process of completing the session, cache all received request information for the data stream of the target camera into the target request cache list;
- the user when the user needs to call the data stream of a certain front-end camera, the user can send a ws request for the data stream of the target camera to the transcoding server on the client side of the service terminal, and the ws request can be controlled by ws transmission
- the link is sent to the transcoding server, so that the transcoding server can receive the ws request sent by the business terminal.
- the transcoding server will check whether there is a transcoding session module corresponding to the target camera.
- the ws request is the first request for the data stream of the target camera, and then based on the target
- the camera creates a target transcoding session module, caches the ws request into the target request cache list of the target transcoding session module, and sends all received requests for the target camera during the process of sending the session invitation to the target camera until the session is completed by the dispatch center.
- the request information of the data stream is cached in the target request cache list; the request information is sent to the dispatch center.
- the purpose of the dispatch center sending the session invitation to the target camera is to coordinate resources to ensure that the camera can send data streams to the media server. If the session invitation is successful, it means that the camera can send data streams to the media server.
- the transcoding session module will only be created when the first request is made. Assuming that the ws1 request is the first request, when the transcoding server receives ws1 When requesting, a transcoding session module will be created, and the ws1 request will be stored in the request cache list provided by the transcoding session module (including the request ID of the ws1 request and the camera ID of the target camera a), and the ws2 request will be received on the transcoding server And after the ws3 request, store the ws2 request and ws3 request in the request cache list (including the request ID of the ws2 request and the request ID of the ws3 request), and all the ws requests stored in the request cache list correspond to the target camera a .
- the transcoding server may receive a lot of request information for the data stream of the target camera, so the transcoding server The code server can cache these request information into the target request cache list, so as to uniformly manage all the requests requesting the data stream of the same target camera.
- the transcoding server only sends the request information of one channel to the dispatch center, that is, for multiple requests for the data stream of the same target camera, the transcoding server deduplicates the multiple requests and only keeps one request. Request to request the dispatching center to send a session invitation to the target camera.
- each service terminal accesses the ws video transmission service created by the transcoding server based on the address sent by the transcoding server. Get the data stream provided by the ws video delivery service. That is, the transcoding server only needs to maintain one transmission channel to control the distribution of data streams to multiple service terminals, realizing real-time preview of the real-time data stream of the same camera by multiple service terminals.
- ws is a long connection based on TCP transmission, compared to Hypertext Transfer Protocol (Hyper The request-response model of Text Transfer Protocol (HTTP) is more in line with the GB/T28181 application scenario of this application, because after the GB/T28181 request (request information) is sent, there is a response delay, and the ws long connection can be used in GB/T28181 Wait for a long time while the request is being processed.
- HTTP Hypertext Transfer Protocol
- the transcoding server can use the saved ws request handle (target request identifier) to pass the ws long
- the connection returns the response data to the user terminal, thereby improving the service terminal's understanding efficiency of the request information and improving the user experience.
- the transcoding server For ws requests, the transcoding server is responsible for processing them instead of the scheduling center.
- the main reasons are as follows: 1. Uniformity. In order to avoid maintaining two ws requests on the transcoding server and scheduling center at the same time, the transcoding 2. To maintain the scalability of the system, in a practical application scenario, each public security department only needs to allocate one transcoding server, and the transmission between the public security department and the transcoding server is internal transmission, and the speed is guaranteed , avoiding problems such as network crossing and opening up borders.
- the transcoding server will receive multiple request information, and each business terminal can request the data stream of the same front-end camera, and each business terminal It is also possible to request data streams from different front-end cameras.
- the data stream of the front-end camera can be called by the cascading platform, and then the cascading platform will send the data stream to the media server.
- the cascading platform includes upper-level platforms and lower-level platforms. It is composed of a provincial level platform, a city level platform and a district level platform.
- the national level platform can actively call the data of the city level platform, and the city level platform can actively call the data of the district level platform.
- the platforms are based on GB /T28181 signaling for data transmission, and the cascading between platforms realizes the interconnection and intercommunication between different platforms and realizes effective resource integration.
- the device list includes device 1, device 2, and device 3, among which , Device 1, Device 2, and Device 3 respectively correspond to three different front-end cameras.
- the user triggers any of the devices, such as device 1, according to the information of the front-end camera corresponding to device 1, a request (request information) for obtaining the data stream of the front-end camera is generated, and the request is sent to the transcoding server.
- the data stream can be a real-time data stream or a historical data stream
- the request information usually carries the front-end identification information of the target camera (target camera ID).
- the transcoding server will save the front-end identification information of the target camera corresponding to the data stream, and the transmission of the real-time data stream can be understood as a 1-to-N link transmission;
- the data stream is a historical data stream, The transcoding server will save the front-end identification information of the target camera corresponding to the data stream, and assign a static value and save it.
- the transmission of the historical data stream can be understood as a 1-to-1 link transmission.
- the transcoding server saves the following four sets of information: (front-end camera 1, static value 1), (front-end camera 1, static value 2), (front-end camera 1, Static value 3), (front-end camera 1, static value 4); if there are 4 real-time data streams for obtaining front-end camera 1, the transcoding server saves the following set of information: (front-end camera 1).
- the step of the transcoding server receiving the request information sent by the service terminal for requesting the data stream of the target camera includes:
- the transcoding server receives the text data sent by the business terminal based on the full-duplex communication protocol websocket, the text data includes a target request identifier and a target camera identifier, and the target request identifier is used to identify the request corresponding to the text data, so The target camera identifier is used to identify the target camera.
- step of the transcoding server sending the request information to the dispatch center includes:
- the transcoding server converts the text data into binary data
- the transcoding server sends the binary data to a dispatch center
- the transcoding server After receiving the text data, the transcoding server will encrypt and binary convert the text data to obtain binary encrypted data, and then send the encrypted data to the dispatch center through a private protocol. It should be noted that the use of private protocols and encryption algorithms can improve the security of link transmission and avoid transmission packet loss. It should be noted that the dispatch center in this embodiment performs link transmission with the transcoding server and the media server respectively through a proprietary protocol, and the link transmission between the dispatch center and the target camera is performed through the GB/T28181 protocol.
- the method also includes:
- transcoding session mapping table is used to characterize the correspondence between camera identifiers and transcoding session modules
- the target scheduling session module is added to the scheduling session mapping table, and the scheduling session mapping table is used to represent the corresponding relationship between the camera identifier and the scheduling session module.
- Fig. 4 is a schematic diagram of a transcoding session mapping table provided by the embodiment of the present application.
- the camera identifier a corresponds to the transcoding session module A (transcoding session A)
- the camera identifier b corresponds to the transcoding session Session module B (transcoding session B).
- Figure 5 is a schematic diagram of a scheduling session mapping table provided by the embodiment of the present application. Camera ID a corresponds to scheduling session module A (scheduling session A), and camera ID b corresponds to transcoding session module B (scheduling session B).
- the scheduling session module in the scheduling session mapping table is used to represent the GB/T28181 link (SIP link) between the camera and the scheduling center.
- the GB/T28181 link is shown as link a and link b in the figure.
- the GB/T28181 link depends on the status code. If the status code received by the dispatch center is not 200 (indicating that the session invitation failed), the GB/T28181 link needs to be removed from the dispatch session mapping table, that is, the dispatch session module needs to be removed , the dispatching center removes the relevant dispatching session module in the dispatching session mapping table, and tells the transcoding server at the same time, the transcoding server will release the relevant transcoding session module synchronously, and notify the session invitation failure message by requesting the cache list, so as to Indicates that the session invitation failed.
- the dispatch center If the status code received by the dispatch center is 200 (indicating that the session invitation is successful), it will tell the transcoding server that the transcoding server knows that the session invitation is successful, and the transcoding server will not release the relevant transcoding session module. Therefore, in some possible embodiments, it further includes: if the dispatch center receives the abnormal status code returned by the target camera based on the session invitation, sending the abnormal status code to the transcoding server ; After receiving the abnormal status code, the transcoding server releases the target transcoding session module, generates a request failure message, and sends the request failure message to each service terminal.
- it also includes:
- the transcoding server detects that there is a transcoding session module corresponding to the target camera, then detect whether the data stream has been accessed, and if the data stream has been accessed, then create the first media transmission chain and send the address information of the first media transmission link to the service terminal.
- the transcoding server detects that there is a transcoding session module corresponding to the target camera, it further includes:
- the transcoding server caches the request information into the target request cache list.
- the transcoding server detects that there is a transcoding session module corresponding to the target camera, it means that the current request information is not the first request, and the transcoding server needs to further determine whether the data stream has been accessed, if the data stream has been accessed , the transcoding server directly creates the first media transmission link between the service terminal and the transcoding server, and sends the address information of the first media transmission link to the service terminal, so that the service terminal obtains the data flow.
- the transcoding server needs to add the request information to the target request cache list (including the target request ID (handle)). After receiving the data stream, the transcoding server will also add the target request ID Return to the service terminal to help the service terminal distinguish which request corresponds to.
- the dispatch center creates a target dispatch session module based on the target camera, sends the session invitation to the target camera based on the target dispatch session module, and if the target camera returns a normal response based on the session invitation, status code, then send the normal status code to the transcoding server, and send a notification message to the target camera to notify the target camera to send the data stream, and send the request information to the media server , so that the media server creates a target media session module based on the target camera to receive the data stream;
- the dispatch center can create a target dispatch session module based on the target camera corresponding to the request information, and send a session invitation to the target camera based on the target dispatch session module, if the dispatch center receives the target camera based on The normal status code returned by the session invitation (indicating that the session invitation is successful, and the target camera can send data stream), then the normal status code is sent to the transcoding server, and an acknowledgment (Acknowledge, ACK) message is sent to the target camera to notify the target camera
- the data stream can be sent, and the request information is sent to the media server, so that the media server creates a target media session module based on the target camera to receive the data stream.
- FIG. 6 is a schematic diagram of a link between a dispatch center, a camera, and a media server provided in an embodiment of the present application, wherein a tcp bidirectional transmission link is used between the dispatch center and the media server, and the target media session created by the media server
- the module corresponds to the camera, and the target media session module includes a registration monitoring service unit and a data stream forwarding service unit.
- the camera starts to transmit the data stream to the media server, and the media server will perform the following operations: 1. Enable the registration monitoring service of the registration monitoring service unit; 2. Enable the data stream forwarding of the data stream forwarding server unit Serve. It should be noted that there will be N media session modules similar to the target media session module in the media server.
- Different media session modules correspond to different cameras. The essence is to solve the problem of small network bandwidth of the camera.
- the small bandwidth of the camera does not have a good distribution capability, but the media server has a high network bandwidth, so it has a strong distribution capability.
- the registration monitoring service plays a role of communicating with the transcoding server, including registration and logout functions.
- the transcoding server sends a registration packet to the registration monitoring service unit of the target media session module through the target transcoding session module
- the media server will The target transcoding session module is added to the distribution list, and the media server sends the data stream to the target transcoding session module in the distribution list after receiving the data stream.
- the media server when the transcoding server sends a logout packet to the registration monitoring service unit of the target media session module through the target transcoding session module, the media server will remove the transcoding session module from the distribution list.
- the media server determines the life cycle of the communication link between the dispatch center and the camera. For this reason, the media server starts the following two detection logics: detection logic 1, which detects the link between the media server and the camera. For example, the media server detects 10s If the number of received packets is 0, the dispatch center will be notified to close the link with the camera, and the dispatch center will also notify the transcoding server to close the corresponding link.
- Detection logic 2 after the transcoding server sends a logout packet and the media server logs out, the media server detects whether the number of transcoding session modules in the distribution list is 0, if it is 0 (indicating that no business terminal currently requests the video stream of the camera), Then tell the dispatch center to close the link with the camera, and at the same time the dispatch center will also inform the transcoding server to close the corresponding link.
- the target camera After the target camera receives the session invitation sent by the dispatch center, if the target camera determines that it can send the data stream, it will return the status code of the target camera to the dispatch center.
- a three-digit code such as a status code of 200, means normal, and a status code of 404, means the device is offline.
- the main purpose of the status code returned by the target camera to the dispatch center is: 1. To inform the dispatch center whether the session invitation is reasonable and legal; 2. To inform the dispatch center whether the target camera can normally process the session invitation.
- the dispatch center can obtain the target camera ID carried in the request information, and the dispatch center will cache the target camera ID so that when the status code is returned to the transcoding server later, the transcoding The server knows which transcoding session module corresponds to.
- the transcoding server can create a key based on the target camera ID, and cache in the form of a key.
- cache in the form of a key in the dispatching center.
- both the transcoding server and the dispatch center will cache the request information, and at the same time cache the request information, they will also cache the target request ID and target camera ID contained therein.
- the dispatch center receives the abnormal status code returned by the target camera (indicating that the session invitation failed), it will directly return the status code 404 to the transcoding server to notify the transcoding server that the request is over.
- the transcoding server creates a first media transmission link between the target transcoding session module and each service terminal corresponding to each request information in the target request cache list, and creates the target transcoding session a second media transmission link between the module and the target media session module;
- the transcoding server after the transcoding server receives the normal status code returned by the target camera, the transcoding server will actively register with the target media session module of the media server to create a link between the target transcoding session module and the target media session module.
- the step of the transcoding server creating a first media transmission link between the target transcoding session module and each service terminal corresponding to each request information in the target request cache list include:
- the transcoding server traverses the target request cache list, and creates a corresponding video transmission service for each request information in the target request cache list;
- the transcoding server sends the address information of the video transmission service to each service terminal corresponding to each request information through the request identifier of each request information in the target request cache list, so that the Each service terminal sends access request information based on the address information;
- the transcoding server creates a first media transmission link between the target transcoding session module and each service terminal based on the access request information.
- the transcoding server will traverse the target request cache list of the transcoding session module, create a corresponding video transmission service for each request information in the target request cache list, and then send the The address of the video transmission service is passed to the service terminal corresponding to each request information through the request identifier (ws handle) in the target request cache list. After receiving the address, each service terminal actively accesses it to build the first media transmission link .
- the transcoding server after receiving the status code returned by the target camera, traverses the target request cache list, and then sends the status code to the service terminal corresponding to each request information in the target request cache list.
- the business terminal After receiving the status code, the business terminal knows the link transmission status of the current data stream. If the status code is 404, it means that the link transmission of the current data stream has failed to be established, and the business terminal knows that there is no need to continue to wait for the current data stream. If the status code is 200, it means that the link transmission of the current data stream is successfully established, and the business terminal can wait to obtain the current data stream, so that the perfect status notification is realized before the business terminal receives the data stream, which is convenient for the business terminal to understand the current data stream. The link transmission status of the data flow.
- the media server sends the data stream received by the target media session module to the target transcoding session module based on the second media transmission link;
- the camera sends the data stream to the target media session module, and after receiving the data stream, the target media session module sends the data stream to the transcoding module through the second media transmission link server.
- the transcoding server distributes the data stream received by the target transcoding session module to each service terminal based on the first media transmission link.
- the transcoding server after receiving the data stream sent by the media server, the transcoding server distributes the data stream to each service terminal through the first media transmission link.
- the step of the transcoding server distributing the data stream received by the target transcoding session module to each service terminal based on the first media transmission link includes:
- the transcoding server performs packet loss detection, rearrangement, packet assembly and encapsulation processing on the data stream to obtain media serialization packets;
- the transcoding server distributes the media serialization package to each service terminal based on the first media transmission link.
- the transcoding server After the transcoding server obtains the data stream, it performs packet loss detection, rearrangement, grouping, and encapsulation processing to obtain data packets, such as fmp4 media data packets.
- data packets such as fmp4 media data packets.
- the advantage of encapsulating the data stream into fmp4 media data packets is that h5 is perfect Support, no plug-in is required, only a device that supports h5, and a play button can realize the playback of the data stream, which is easy to use.
- the fmp4 media data packet After obtaining the fmp4 media data packet, the fmp4 media data packet is transmitted to the service terminal through the first media transmission link, and the service terminal can use the MSR component to play the fmp4 media data packet.
- the transcoding session module first create a transcoding session module, a scheduling session module, and a media session module corresponding to the camera, request the data stream of the camera based on the created modules, and use a modular media transmission link management method to ensure service Independence, with low coupling characteristics; then through the request cache list provided by the transcoding session module, it is used to cache all the request information for the camera data stream, so that only one request needs to be reserved to ensure the media link between the dispatch center and the camera The uniqueness; Finally, make full use of the distribution advantages brought by the high bandwidth of the media server to solve the problem of insufficient distribution capacity caused by the small network bandwidth of the camera. Therefore, the problem of network congestion in the data stream transmission of the camera can be effectively avoided.
- Figure 7 is a schematic structural diagram of a media transmission link management device provided by the embodiment of the application , the media transmission link management device includes:
- the transcoding server 701 is configured to receive the request information sent by the service terminal for requesting the data stream of the target camera; detect whether there is a transcoding session module corresponding to the target camera, and if not, send the request The information is sent to the dispatching center 702, and a target transcoding session module is created based on the target camera, and the request information is cached in the target request cache list of the target transcoding session module, and stored in the dispatching center 702 In the process of sending a session invitation to the target camera until the session is completed, cache all received request information for the data stream of the target camera into the target request cache list;
- the scheduling center 702 is configured to create a target scheduling session module based on the target camera, send the session invitation to the target camera based on the target scheduling session module, and return the target camera based on the session invitation if receiving the target camera normal status code, send the normal status code to the transcoding server 701, and send a notification message to the target camera to notify the target camera to send the data stream, and send the request information To the media server 703, so that the media server 703 creates a target media session module based on the target camera to receive the data stream;
- the transcoding server 701 is further configured to create a first media transmission link between the target transcoding session module and each service terminal corresponding to each request information in the target request cache list, and create the target A second media transmission link between the transcoding session module and the target media session module;
- the media server 703 is configured to send the data stream received by the target media session module to the target transcoding session module based on the second media transmission link;
- the transcoding server 701 is further configured to distribute the data stream received by the target transcoding session module to each service terminal based on the first media transmission link.
- the transcoding session module first create a transcoding session module, a scheduling session module, and a media session module corresponding to the camera, request the data stream of the camera based on the created modules, and use a modular media transmission link management method to ensure service Independence, with low coupling characteristics; then through the request cache list provided by the transcoding session module, it is used to cache all the request information for the camera data stream, so that only one request needs to be reserved to ensure the media link between the dispatch center and the camera The uniqueness; Finally, make full use of the distribution advantages brought by the high bandwidth of the media server to solve the problem of insufficient distribution capacity caused by the small network bandwidth of the camera. Therefore, the problem of network congestion in the data stream transmission of the camera can be effectively avoided.
- the transcoding server 701 is specifically configured to traverse the target request cache list, and create a corresponding video transmission service for each request information in the target request cache list ; sending the address information of the video transmission service to each service terminal corresponding to each request information through the request identifier of each request information in the target request cache list, so that each service terminal is based on Sending access request information based on the address information; establishing a first media transmission link between the target transcoding session module and each service terminal based on the access request information.
- the transcoding server 701 is specifically configured to receive the text data sent by the service terminal based on the full-duplex communication protocol websocket, and the text data includes the target request identifier and the target camera An identifier, the target request identifier is used to identify a request corresponding to the text data, and the target camera identifier is used to identify the target camera.
- the transcoding server 701 is specifically configured to convert the text data into binary data; and send the binary data to a dispatch center.
- the transcoding server 701 is further configured to add the target transcoding session module to a transcoding session mapping table, and the transcoding session mapping table is used to represent The corresponding relationship between the camera ID and the transcoding session module; and/or, the scheduling center 702 is further configured to add the target scheduling session module to the scheduling session mapping table, and the scheduling session mapping table is used to represent the camera ID and Correspondence of scheduling session modules.
- the transcoding server 701 is further configured to detect whether the data stream has been accessed if it is detected that there is a transcoding session module corresponding to the target camera , if the data stream has been accessed, create the first media transmission link, and send the address information of the first media transmission link to the service terminal.
- the transcoding server 701 is further configured to cache the request information in the target request cache list.
- the transcoding server 701 is specifically configured to send a registration packet to the registration monitoring service unit of the target media session module through the target transcoding session module to create A second media transmission link between the target transcoding session module and the data stream forwarding service unit of the target media session module.
- the media server 703 is further configured to add the target transcoding session module to a distribution list; if the transcoding session module is received through the registration monitoring service unit The server 701 removes the target transcoding session module from the distribution list through the logout packet sent by the target transcoding session module.
- the embodiments of the present application also provide a non-transitory computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, it is implemented to perform the methods provided by the above-mentioned embodiments, for example, including:
- the transcoding server receives the request information for requesting the data stream of the target camera sent by the service terminal; detects whether there is a transcoding session module corresponding to the target camera, and if not, sends the request information to the dispatcher center, and create a target transcoding session module based on the target camera, cache the request information into the target request cache list of the target transcoding session module, and send a session invitation to the target camera at the scheduling center until the completion During the session, all received request information for the data stream of the target camera is buffered into the target request cache list; the dispatch center creates a target scheduling session module based on the target camera, and based on the target The scheduling session module sends the session invitation to the target camera, and if a normal status
- the disclosed device may be implemented in other ways.
- the device embodiments described above are only illustrative.
- the division of the modules is only a logical function division. In actual implementation, there may be other division methods.
- multiple modules or components can be combined or May be integrated into another system, or some features may be ignored, or not implemented.
- the mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces, and the indirect coupling or communication connection of devices or modules may be in electrical, mechanical or other forms.
- the modules described as separate components may or may not be physically separated, and the components displayed as modules may or may not be physical modules, that is, they may be located in one place, or may be distributed to multiple network modules. Part or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
- each functional module in each embodiment of the embodiment of the present application may be integrated into one processing module, each module may exist separately physically, or two or more modules may be integrated into one module.
- the above-mentioned integrated modules can be implemented in the form of hardware or in the form of software function modules. If the integrated modules are realized in the form of software function modules and sold or used as independent products, they can be stored in a computer-readable storage medium.
- all or part of them may be implemented by software, hardware, firmware or any combination thereof.
- software When implemented using software, it may be implemented in whole or in part in the form of a computer program product.
- the computer program product includes one or more computer instructions.
- the computer can be a general purpose computer, a special purpose computer, a computer network, or other programmable devices.
- the computer instructions may be stored in or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions may be transmitted from a website, computer, server, or data center Transmission to another website site, computer, server, or data center by wired (eg, coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (eg, infrared, wireless, microwave, etc.) means.
- wired eg, coaxial cable, fiber optic, digital subscriber line (DSL)
- wireless eg, infrared, wireless, microwave, etc.
- the computer-readable storage medium may be any available medium that can be stored by a computer, or a data storage device such as a server or a data center integrated with one or more available media.
- the available medium may be a magnetic medium (for example, a floppy disk, a hard disk, or a magnetic tape), an optical medium (for example, DVD), or a semiconductor medium (for example, a Solid State Disk (SSD)).
Landscapes
- Engineering & Computer Science (AREA)
- Signal Processing (AREA)
- Multimedia (AREA)
- Computer Networks & Wireless Communication (AREA)
- Computer Security & Cryptography (AREA)
- Business, Economics & Management (AREA)
- General Business, Economics & Management (AREA)
- Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)
Abstract
本申请公开了一种媒体传输链路管理方法、装置及存储介质,该方法包括:转码服务器接收业务终端发送的请求信息;若转码服务器确定该请求信息为目标相机的数据流的首次请求,则转码服务器、调度服务器、媒体服务器基于目标相机分别创建目标转码会话模块、目标调度会话模块以及媒体会话模块;基于该目标转码会话模块、目标调度会话模块以及媒体会话模块将数据流分发至业务终端。
Description
本申请要求于2021年05月20日提交中国专利局、申请号为202110549989.1、发明名称为“一种媒体传输链路管理方法及装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
本申请实施例涉及媒体传输技术领域,尤其涉及一种媒体传输链路管理方法、装置及存储介质。
随着安防行业网络化进程的不断加快,依托于大数据和人工智能的互联网视频对传统的安防监控的优势不断展现出来,因此如何将传统监控行业里的高清网络摄像机、网络视频录像机(Network Video Recorde,NVR)等GB/T28181输出设备接入,并构建传统安防监控视频与互联网视频之间的桥梁,是当前亟需解决的问题。现有的媒体传输链路管理方案中如果某个业务终端要邀请某个相机的视频,需要维持两条链路,一条是会话发起协议(Session initiation Protocol,SIP)上联向相机发起会话邀请所建立的SIP通信链路,另一条是相机与媒体服务器之间的媒体链路(用于给媒体服务器发送视频),但是SIP通信链路建立的过程耗费时间较长,如果这个过程中存在其他业务终端请求该相机的视频,会造成相机的数据流传输出现网络拥塞。
本申请实施例提供了一种媒体传输链路管理方法、装置及存储介质,能够有效避免相机的数据流传输出现网络拥塞问题。
第一方面中,本申请实施例提供一种媒体传输链路管理方法,包括:
转码服务器接收业务终端发送的用于请求目标相机的数据流的请求信息;检测是否存在与所述目标相机对应的转码会话模块,若不存在,则将所述请求信息发送至所述调度中心,并基于所述目标相机创建目标转码会话模块,将所述请求信息缓存至所述目标转码会话模块的目标请求缓存列表中,并在调度中心向所述目标相机发送会话邀请直至完成会话的过程中,将接收到的所有针对所述目标相机的数据流的请求信息缓存至所述目标请求缓存列表中;
所述调度中心基于所述目标相机创建目标调度会话模块,基于所述目标调度会话模块向所述目标相机发送所述会话邀请,若接收到所述目标相机基于所述会话邀请返回的正常状态码,则将所述正常状态码发送至所述转码服务器,以及向所述目标相机发送通知消息,以通知所述目标相机发送所述数据流,并将所述请求信息发送至媒体服务器,以使得所述媒体服务器基于所述目标相机创建目标媒体会话模块,以接收所述数据流;
所述转码服务器创建所述目标转码会话模块与所述目标请求缓存列表中的各请求信息对应的各业务终端之间的第一媒体传输链路,并创建所述目标转码会话模块与所述目标媒体会话模块之间的第二媒体传输链路;
所述媒体服务器基于所述第二媒体传输链路,将所述目标媒体会话模块接收到的所述数据流发送至所述目标转码会话模块;
所述转码服务器基于所述第一媒体传输链路,将所述目标转码会话模块接收到的所述数据流分发至所述各业务终端。
其中,所述转码服务器创建所述目标转码会话模块与所述目标请求缓存列表中的各请求信息对应的各业务终端之间的第一媒体传输链路的步骤,包括:
所述转码服务器遍历所述目标请求缓存列表,针对所述目标请求缓存列表中的各请求信息创建对应的视频传输服务;
所述转码服务器将所述视频传输服务的地址信息,通过所述目标请求缓存列表中的所述各请求信息的请求标识,发送给所述各请求信息对应的各业务终端,以使得所述各业务终端基于所述地址信息发送接入请求信息;
所述转码服务器基于所述接入请求信息创建所述目标转码会话模块与所述各业务终端之间的第一媒体传输链路。
其中,所述媒体传输链路管理方法,还包括:
若所述调度中心接收到所述目标相机基于所述会话邀请返回的异常状态码,则将所述异常状态码发送至所述转码服务器;
所述转码服务器接收到所述异常状态码后,释放所述目标转码会话模块,并生成请求失败消息,将所述请求失败消息发送至所述各业务终端。
其中,所述转码服务器接收业务终端发送的用于请求目标相机的数据流的请求信息的步骤,包括:
所述转码服务器接收业务终端基于全双工通信协议websocket发送的文本数据,所述文本数据包含目标请求标识以及目标相机标识,所述目标请求标识用于标识所述文本数据对应的请求,所述目标相机标识用于标识所述目标相机。
其中,所述转码服务器将所述请求信息发送至调度中心的步骤,包括:
所述转码服务器将所述文本数据转换为二进制数据;
所述转码服务器将所述二进制数据发送至调度中心。
其中,所述媒体传输链路管理方法,还包括:
所述转码服务器将所述目标转码会话模块添加至转码会话映射表,所述转码会话映射表用于表征相机标识与转码会话模块的对应关系;和/或,
所述调度中心将所述目标调度会话模块添加至调度会话映射表,所述调度会话映射表用于表征相机标识与调度会话模块的对应关系。
其中,媒体传输链路管理方法,还包括:若所述转码服务器检测到存在与所述目标相机对应的转码会话模块,则检测所述数据流是否已经接入,若所述数据流已经接入,则创建所述第一媒体传输链路,将所述第一媒体传输链路的地址信息发送至所述业务终端。
其中,所述转码服务器创建所述目标转码会话模块与所述目标媒体会话模块之间的第二媒体传输链路的步骤,包括:
所述转码服务器通过所述目标转码会话模块向所述目标媒体会话模块的注册监听服务单元发送注册包,以创建所述目标转码会话模块与所述目标媒体会话模块的数据流转发服务单元之间的第二媒体传输链路。
其中,所述转码服务器通过所述目标转码会话模块向所述目标媒体会话模块的注册监听服务单元发送注册包的步骤之后,还包括:
所述媒体服务器将所述目标转码会话模块添加至分发列表;
若所述媒体服务器通过所述注册监听服务单元接收到所述转码服务器通过所述目标转码会话模块发送的注销包,则从所述分发列表中移除所述目标转码会话模块。
其中,所述转码服务器基于所述第一媒体传输链路,将所述目标转码会话模块接收到的所述数据流分发至所述各业务终端的步骤,包括:
所述转码服务器对所述数据流进行丢包检测、重排、组包以及封装处理,得到媒体序列化包;
所述转码服务器基于所述第一媒体传输链路,将所述媒体序列化包分发至各业务终端。
第二方面中,本申请实施例提供一种媒体传输链路管理装置,包括:
转码服务器、调度中心以及媒体服务器;
所述转码服务器,用于接收业务终端发送的用于请求目标相机的数据流的请求信息;检测是否存在与所述目标相机对应的转码会话模块,若不存在,则将所述请求信息发送至所述调度中心,并基于所述目标相机创建目标转码会话模块,将所述请求信息缓存至所述目标转码会话模块的目标请求缓存列表中,并在所述调度中心向所述目标相机发送会话邀请直至完成会话的过程中,将接收到的所有针对所述目标相机的数据流的请求信息缓存至所述目标请求缓存列表中;
所述调度中心,用于基于所述目标相机创建目标调度会话模块,基于所述目标调度会话模块向所述目标相机发送所述会话邀请,若接收到所述目标相机基于所述会话邀请返回的正常状态码,则将所述正常状态码发送至所述转码服务器,以及向所述目标相机发送通知消息,以通知所述目标相机发送所述数据流,并将所述请求信息发送至所述媒体服务器,以使得所述媒体服务器基于所述目标相机创建目标媒体会话模块,以接收所述数据流;
所述转码服务器,还用于创建所述目标转码会话模块与所述目标请求缓存列表中的各请求信息对应的各业务终端之间的第一媒体传输链路,并创建所述目标转码会话模块与所述目标媒体会话模块之间的第二媒体传输链路;
所述媒体服务器,用于基于所述第二媒体传输链路,将所述目标媒体会话模块接收到的所述数据流发送至所述目标转码会话模块;
所述转码服务器,还用于基于所述第一媒体传输链路,将所述目标转码会话模块接收到的所述数据流分发至所述各业务终端。
其中,所述转码服务器具体用于:
遍历所述目标请求缓存列表,针对所述目标请求缓存列表中的各请求信息创建对应的视频传输服务;
将所述视频传输服务的地址信息,通过所述目标请求缓存列表中的所述各请求信息的请求标识,发送给所述各请求信息对应的各业务终端,以使得所述各业务终端基于所述地址信息发送接入请求信息;
基于所述接入请求信息创建所述目标转码会话模块与所述各业务终端之间的第一媒体传输链路。
其中,所述调度中心,还用于若接收到所述目标基于所述会话邀请返回的异常状态码,则将所述异常状态码发送至所述转码服务器;所述转码服务器,还用于接收到所述异常状态码后,释放所述目标转码会话模块,并生成请求失败消息,将所述请求失败消息发送至所述各业务终端。
其中,所述转码服务器,具体用于接收业务终端基于全双工通信协议websocket发送的文本数据,所述文本数据包含目标请求标识以及目标相机标识,所述目标请求标识用于标识所述文本数据对应的请求,所述目标相机标识用于标识所述目标相机。
其中,所述转码服务器,具体用于将所述文本数据转换为二进制数据;将所述二进制数据发送至调度中心。
其中,所述转码服务器,还用于将所述目标转码会话模块添加至转码会话映射表,所述转码会话映射表用于表征相机标识与转码会话模块的对应关系;和/或,所述调度中心,还用于将所述目标调度会话模块添加至调度会话映射表,所述调度会话映射表用于表征相机标识与调度会话模块的对应关系。
其中,所述转码服务器,还用于若检测到存在与所述目标相机对应的转码会话模块,则检测所述数据流是否已经接入,若所述数据流已经接入,则创建所述第一媒体传输链路,将所述第一媒体传输链路的地址信息发送至所述业务终端。
其中,所述转码服务器,具体用于通过所述目标转码会话模块向所述目标媒体会话模块的注册监听服务单元发送注册包,以创建所述目标转码会话模块与所述目标媒体会话模块的数据流转发服务单元之间的第二媒体传输链路。
其中,在所述转码服务器通过所述目标转码会话模块向所述目标媒体会话模块的注册监听服务单元发送注册包的步骤之后,所述媒体服务器,还用于将所述目标转码会话模块添加至分发列表;若通过所述注册监听服务单元接收到所述转码服务器通过所述目标转码会话模块发送的注销包,则从所述分发列表中移除所述目标转码会话模块。
其中,所述转码服务器,具体用于对所述数据流进行丢包检测、重排、组包以及封装处理,得到媒体序列化包;基于所述第一媒体传输链路,将所述媒体序列化包分发至各业务终端。
本申请实施例又一方面提供了一种存储介质,其包括指令,当其在计算机上运行时,使得计算机执行上述第一方面任一实施例中的所述的方法。
相较于现有技术,本申请实施例提供的方案中,首先创建与相机相对应的转码会话模块、调度会话模块以及媒体会话模块,基于所创建的模块请求相机的数据流,采用模块化的媒体传输链路管理方式保证了业务的独立性,具有低耦合特点;然后通过转码会话模块提供的请求缓存列表,用于缓存所有的针对相机的数据流的请求信息,从而只需要保留一路请求,保证调度中心和相机的媒体链路的唯一性;最后充分利用媒体服务器的高带宽所带来的分发优势,以解决相机的网络带宽小所导致的分发能力不足的问题。从而能够有效避免相机的数据流传输出现网络拥塞问题。
为了更清楚地说明本发明实施例的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。
图1a为本申请实施例提供的一种媒体传输链路管理装置运行的***架构图;
图1b为本申请实施例提供的一种通过转码会话模块的ws请求缓存列表进行请求缓存的示意图;
图2为本申请实施例提供的一种媒体传输链路管理***架构图;
图3为本申请实施例提供的一种媒体传输链路管理方法的流程图;
图4为本申请实施例提供的一种转码会话映射表的示意图;
图5为本申请实施例提供的一种调度会话映射表的示意图;
图6为本申请实施例提供的一种调度中心、相机以及媒体服务器之间的链路示意图;
图7为本申请实施例提供的一种媒体传输链路管理装置的结构示意图。
本申请实施例的说明书和权利要求书及上述附图中的术语“第一”、“第二”等是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。应该理解这样使用的数据在适当情况下可以互换,以便这里描述的实施例能够以除了在这里图示或描述的内容以外的顺序实施。此外,术语“包括”和“具有”以及他们的任何变形,意图在于覆盖不排他的包含,例如,包含了一系列步骤或模块的过程、方法、***、产品或设备不必限于清楚地列出的那些步骤或模块,而是可包括没有清楚地列出的或对于这些过程、方法、产品或设备固有的其它步骤或模块,本申请实施例中所出现的模块的划分,仅仅是一种逻辑上的划分,实际应用中实现时可以有另外的划分方式,例如多个模块可以结合成或集成在另一个***中,或一些特征可以忽略,或不执行,另外,所显示的或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,模块之间的间接耦合或通信连接可以是电性或其他类似的形式,本申请实施例中均不作限定。并且,作为分离部件说明的模块或子模块可以是也可以不是物理上的分离,可以是也可以不是物理模块,或者可以分布到多个电路模块中,可以根据实际的需要选择其中的部分或全部模块来实现本申请实施例方案的目的。
本申请实施例提供了一种媒体传输链路管理方法,应用于媒体传输链路管理装置,在实际场景中,该媒体传输链路管理方法主要应用于城市监控报警联网***、智慧交通***、交警监控***,用于构建传统安防监控视频和互联网视频之间的桥梁,达到将传统监控视频转换为互联网视频流(数据流)、简化获取国家标准(GB)设备视频流的目的,以及有效避免GB设备数据流的传输链路出现拥塞的问题。传统监控视频指的是前端摄像头(前端相机)采集到的视频数据,前端摄像头可以为安装于监控现场的用于信息采集、编码、处理、存储、传输和安全控制的各类摄像头,用户通过业务终端(用户终端)进行视频数据的调用,用户终端包括经城市监控报警联网***或智慧交通***注册并授权的、对***内的数据和设备有操作需求的客户端以及平台终端,如客户端包括交警终端,平台终端包括***内其他平台内包括的终端,如转码平台的终端等。其中,用户终端包括但不限于智能手机、平板电脑、笔记本电脑、智能电视、智能机器人、个人计算机(PC,Personal Computer)、可穿戴设备、服务器计算机,等等。
本申请实施例提供的媒体传输链路管理方法通过媒体传输链路管理装置执行,媒体传输链路管理装置可以运行于图1a所示的***架构,请参阅图1a,图1a为本申请实施例提供的一种媒体传输链路管理装置运行的***架构图。如图1a所示,该***包括业务终端(比如业务终端1、业务终端N)、转码服务器、调度中心、媒体服务器以及相机,其中,业务终端与转码服务器之间的链路包括全双工通信协议(websocket,ws)传输控制链路以及ws视频传输链路,ws传输控制链路用于发送信息,属于长连接的双向传输链路,生命周期由业务终端控制,转码服务器不会主动关闭该链路,ws视频传输链路是在转码服务器接收到正常状态码(200)后,由转码服务器创建,属于单向传输链路(转码服务器到业务终端)。转码服务器和调度中心之间的链路为传输控制协议(Transmission Control Protocol,TCP)链路,属于双向传输链路。调度中心和相机之间的链路为会话发起协议(Session initiation Protocol,SIP)链路,属于双向传输链路。调度中心和媒体服务器之间的链路为TCP链路,属于双向传输链路。相机和媒体服务器之间的链路为视频传输链路,比如用户数据报协议(User Datagram Protocol,UDP)链路(UDP命令控制链路),属于单向传输链路(相机到媒体服务器)。媒体服务器和转码服务器之间的链路包括视频传输链路和UDP命令控制链路,视频传输链路属于单向传输链路(媒体服务器到转码服务器),UDP命令控制链路属于单向传输链路(转码服务器到媒体服务器)。基于图1a所示的***架构,本申请实施例提供如下媒体传输链路管理方案:业务终端向转码服务器发送用于请求相机的数据流的ws目标请求,转码服务器判定该ws目标请求是否为该相机的数据流的首次ws请求(转码服务器针对不同相机的数据流的ws请求,均会基于相机的标识创建对应的转码会话模块(转码会话),如果不存在与该相机对应的转码会话模块,则说明是首次ws请求),如果转码服务器判定该ws目标请求为首次请求,则会创建转码会话模块,转码会话模块提供ws请求缓存列表,ws请求缓存列表不仅缓存该ws目标请求,针对后续接收到的针对该相机的数据流的ws请求,均会对其进行缓存。另外,ws请求中通常会携带请求标识以及相机标识,所以ws请求缓存列表中也会包括该请求标识和相机标识,其中请求标识用于帮助业务终端区分对应的应答是哪次请求的。如图1b所示,图1b为本申请实施例提供的一种通过转码会话模块的ws请求缓存列表进行请求缓存的示意图,如图中对ws首次请求、ws第二次请求以及ws第三次请求进行请求缓存。可见,只有在ws首次请求时转码服务器创建转码会话模块,在后续转码服务器接收到ws请求的时候,转码服务器无需再创建转码会话模块,直接将ws请求缓存至ws请求缓存列表中,从而对多路请求同一个相机的数据流的所有ws请求进行统一管理,仅保留1路请求,从而保证了调度中心和相机的SIP视频链路的唯一性。转码服务器会将ws目标请求发送给调度中心,调度中心会创建与相机关联的调度会话模块(调度会话),调度中心会向相机发送会话邀请,在确定会话邀请成功后(接收到相机返回的正常状态码),将正常状态码发送给转码服务器,并通知相机开始发数据流,以及将ws目标请求转为二进制请求发送给媒体服务器,使得媒体服务器创建与相机关联的媒体会话模块(媒体会话),以接收相机发送的数据流。转码服务器接收到正常状态码后,转码服务器创建转码会话模块与业务终端之间的第一媒体传输链路(转码服务器遍历转码会话模块的ws请求缓存列表,针对ws请求缓存列表中的每个ws请求均创建对应的ws视频传输服务(ws视频服务),然后把ws视频传输服务的地址通过ws请求缓存列表的ws请求标识(ws句柄)传递给各ws请求对应的业务终端,各业务终端在接收到地址后,主动接入进来,以构建第一媒体传输链路),以及创建转码会话模块与媒体会话模块之间的第二媒体传输链路(如图1a所示,转码服务器和媒体服务器之间有2个传输链路,一个是UDP命令控制链路,就是向媒体服务器的媒体会话模块进行注册,注册完成后,媒体服务器就会将相机传输过来的数据流转发给转码服务器,另一个就是转码服务器和媒体服务器之间的视频传输通道,也就是第二媒体传输链路)。媒体服务器通过第二媒体传输链路将媒体会话模块接收到的数据流发送至转码会话模块。各业务终端基于转码服务器发送的地址,接入到转码服务器创建的ws视频传输服务后,通过网页获取ws视频传输服务提供的数据流。
基于图1a以及图1b的内容,如图2所示,图2为本申请实施例提供的一种媒体传输链路管理***架构图,ws请求缓存列表中有多少个ws请求,就开辟多少个ws视频服务,构建业务终端与转码服务器的媒体传输链路,如图2中的ws1、ws2和wsN,ws1对应视频服务1,ws2对应视频服务2,wsN对应视频服务N,封包服务用于对数据流进行丢包检测、重排、组包以及封装处理,媒体会话模块包括注册监听服务单元以及数据流转发服务单元。基于图2所示的媒体传输链路能够有效避免相机出现网络拥塞问题,另外,如果检测到业务终端1关闭网页,则断开转码会话模块中的视频服务1,如果检测到所有的业务终端关闭网页,则断开转码会话模块中的所有视频服务,并且转码服务器会通知媒体服务器,以使得媒体服务器移除媒体会话模块中的数据流转发服务单元,媒体服务器会再通知调度中心,调度中心接收到通知后,关闭与相机之间的链路。
需要说明的是,图1a、图1b以及图2所示的内容仅仅是一个示例,主要是为了更加清楚地说明本申请实施例的技术方案,并不构成对于本申请实施例提供的技术方案的限定。
结合上述内容,下面将对本申请中媒体传输链路管理方法进行介绍,请参阅图3,图3为本申请实施例提供的一种媒体传输链路管理方法的流程图,本申请实施例至少包括如下步骤:
301、转码服务器接收业务终端发送的用于请求目标相机的数据流的请求信息;检测是否存在与所述目标相机对应的转码会话模块,若不存在,则将所述请求信息发送至调度中心,并基于所述目标相机创建目标转码会话模块,将所述请求信息缓存至所述目标转码会话模块的目标请求缓存列表中,并在所述调度中心向所述目标相机发送会话邀请直至完成会话的过程中,将接收到的所有针对所述目标相机的数据流的请求信息缓存至所述目标请求缓存列表中;
本实施例中,当用户需要调用某个前端相机的数据流时,用户可以在业务终端的客户端向转码服务器发送用于请求目标相机的数据流ws请求,该ws请求可以通过ws传输控制链路发送至转码服务器,从而转码服务器能够接收到业务终端发送的ws请求。转码服务器会再检测是否存在与目标相机对应的转码会话模块,如果不存在与目标相机对应的转码会话模块,则说明该ws请求为首次请求目标相机的数据流,那么就基于该目标相机创建目标转码会话模块,将ws请求缓存至目标转码会话模块的目标请求缓存列表中,并在调度中心向目标相机发送会话邀请直至完成会话的过程中,将接收到的所有针对目标相机的数据流的请求信息缓存至目标请求缓存列表中;将请求信息发送至调度中心。需要说明的是,调度中心向目标相机发送会话邀请的目的是协调资源,保证相机可以向媒体服务器发送数据流,如果会话邀请成功,则说明相机可以向媒体服务器发送数据流。
例如,假如有ws1请求、ws2请求以及ws3请求,同时请求目标相机a的数据流,则只有首次请求时才会创建转码会话模块,假设ws1请求为首次请求,则当转码服务器接收到ws1请求时,会创建转码会话模块,同时将ws1请求存储至转码会话模块提供的请求缓存列表中(包含ws1请求的请求标识以及目标相机a的相机标识),在转码服务器接收到ws2请求以及ws3请求后,将ws2请求和ws3请求分别存储至该请求缓存列表中(包含ws2请求的请求标识以及ws3请求的请求标识),该请求缓存列表中存储的所有ws请求均对应该目标相机a。
考虑到调度中心向目标相机发送会话邀请直至完成会话的过程(建立目标相机的数据流传输链路的过程)中,转码服务器可能会接收到很多针对目标相机的数据流的请求信息,所以转码服务器可以将这些请求信息均缓存至目标请求缓存列表中,从而对请求同一个目标相机的数据流的所有请求进行统一管理。
转码服务器只将一路的请求信息发送至调度中心,即针对多路请求同一个目标相机的数据流的请求,转码服务器对多路请求进行去重,仅保留1路请求,基于该1路请求去请求调度中心向目标相机发送会话邀请,当转码服务器接收到目标相机的数据流后,各业务终端基于转码服务器发送的地址,接入到转码服务器创建的ws视频传输服务后,获取ws视频传输服务提供的数据流。即转码服务器仅需要维持1条传输通道就能控制数据流分发至多个业务终端,实现了多个业务终端对同一相机的实时数据流的实时预览。
应理解,ws是基于TCP传输的长连接,相对于超文本传输协议(Hyper
Text Transfer Protocol,HTTP)的请求应答模型更符合本申请的GB/T28181应用场景,因为GB/T28181请求(请求信息)发出去后,是存在应答延迟的,采用ws长连接,可以在GB/T28181请求被处理的过程中,进行长久等待。然后在等目标相机处理好了GB/T28181请求的应答后,且应答数据(数据流)转发至转码服务器后,转码服务器可以通过保存的ws请求的句柄(目标请求标识),通过ws长连接将应答数据返回给用户终端,从而提升了业务终端对请求信息的理解效率,提升了用户体验。
针对ws请求,统一由转码服务器负责处理,而不由调度中心负责处理,主要原因有如下两点:1、统一性,为了避免在转码服务器和调度中心同时维护两个ws请求,所以由转码服务器统一负责;2、保持***的扩展能力,在一种实际应用场景中,每个公安厅都只需要分配一个转码服务器,公安厅和转码服务器之间就属于内传输,速度有保障,避免了网络的跨越打通边界等问题。
需要说明的是,在实际场景中,业务终端的个数若为多个,则转码服务器会接收到多个请求信息,每个业务终端可以请求同一个前端相机的数据流,每个业务终端也可以请求不同前端相机的数据流。前端相机的数据流可以由级联平台调用,级联平台再将数据流发送给媒体服务器,级联平台包括上级平台和下级平台,1个上级平台可以接入多个下级平台,级联平台可以由省级联平台、市级联平台和区级联平台组成,省级联平台可以主动调用市级联平台的数据,市级联平台可以主动调用区级联平台的数据,平台之间基于GB/T28181信令进行数据传输,平台之间的级联实现了不同平台之间的互联互通,实现了有效的资源整合。
在一种场景下,在业务终端所在的能够调用设备的数据流的操作界面上,有业务终端权限范围内可看到的设备列表,如设备列表下包括设备1、设备2、设备3,其中,设备1、设备2、设备3分别对应3个不同的前端相机。当用户触发其中任意一个设备,如设备1,根据设备1所对应的前端相机的信息生成该前端相机的数据流的获取请求(请求信息),将该获取请求发送至转码服务器。
需要说明的是,数据流可以是实时数据流,也可以是历史数据流,请求信息中通常携带有目标相机的前端标识信息(目标相机标识)。如果数据流为实时数据流,则转码服务器会保存该数据流对应的目标相机的前端标识信息,实时数据流的传输可以理解为1对N的链路传输;如果数据流为历史数据流,则转码服务器会保存该数据流对应的目标相机的前端标识信息,并分配一个静态值并保存,历史数据流的传输可以理解为1对1的链路传输。例如,若存在4个获取前端相机1的历史数据流,则转码服务器保存如下四组信息:(前端相机1、静态值1)、(前端相机1、静态值2)、(前端相机1、静态值3)、(前端相机1、静态值4);若存在4个获取前端相机1的实时数据流,则转码服务器保存如下一组信息:(前端相机1)。
由此,在一些可能的实施例中,所述转码服务器接收业务终端发送的用于请求目标相机的数据流的请求信息的步骤,包括:
所述转码服务器接收业务终端基于全双工通信协议websocket发送的文本数据,所述文本数据包含目标请求标识以及目标相机标识,所述目标请求标识用于标识所述文本数据对应的请求,所述目标相机标识用于标识所述目标相机。
进一步地,所述转码服务器将所述请求信息发送至调度中心的步骤,包括:
所述转码服务器将所述文本数据转换为二进制数据;
所述转码服务器将所述二进制数据发送至调度中心;
具体地,转码服务器在接收到文本数据后,会对该文本数据进行加密以及二进制转换处理,得到二进制的加密数据,然后通过私有协议将加密数据发送至调度中心。需要说明的是,采用私有协议以及加密算法可以提高链路传输的安全性,以及避免传输丢包。需要说明的是,本实施例中的调度中心分别通过私有协议与转码服务器和媒体服务器进行链路传输,调度中心和目标相机之间通过GB/T28181协议进行链路传输。
进一步地,所述方法还包括:
将所述目标转码会话模块添加至转码会话映射表,所述转码会话映射表用于表征相机标识与转码会话模块的对应关系;和/或,
将所述目标调度会话模块添加至调度会话映射表,所述调度会话映射表用于表征相机标识与调度会话模块的对应关系。
具体地,如图4所示,图4为本申请实施例提供的一种转码会话映射表的示意图,相机标识a对应转码会话模块A(转码会话A),相机标识b对应转码会话模块B(转码会话B)。如图5所示,图5为本申请实施例提供的一种调度会话映射表的示意图,相机标识a对应调度会话模块A(调度会话A),相机标识b对应转码会话模块B(调度会话B)。调度会话映射表中的调度会话模块用于表征相机与调度中心之间的GB/T28181链路(SIP链路),GB/T28181链路如图中所示的链路a以及链路b,该GB/T28181链路依赖状态码,如果调度中心接收到的状态码非200(说明会话邀请失败),则GB/T28181链路需要从调度会话映射表中移除,即调度会话模块需要被移除,调度中心移除调度会话映射表中相关的调度会话模块,同时告诉转码服务器,转码服务器会同步释放相关的转码会话模块,并通过请求缓存列表把会话邀请失败的消息通知出去,以说明本次会话邀请失败。如果调度中心接收到的状态码为200(说明会话邀请成功),则告诉转码服务器,转码服务器获知会话邀请成功,转码服务器不会释放相关的转码会话模块。由此,在一些可能的实施例中,还包括:若所述调度中心接收到所述目标相机基于所述会话邀请返回的异常状态码,则将所述异常状态码发送至所述转码服务器;所述转码服务器接收到所述异常状态码后,释放所述目标转码会话模块,并生成请求失败消息,将所述请求失败消息发送至所述各业务终端。
在一些可能的实施例中,还包括:
若所述转码服务器检测到存在与所述目标相机对应的转码会话模块,则检测所述数据流是否已经接入,若所述数据流已经接入,则创建所述第一媒体传输链路,将所述第一媒体传输链路的地址信息发送至所述业务终端。
进一步地,所述转码服务器检测到存在与所述目标相机对应的转码会话模块的步骤之后,还包括:
所述转码服务器将所述请求信息缓存至所述目标请求缓存列表中。
具体地,如果转码服务器检测到存在与目标相机对应的转码会话模块,则说明当前的请求信息不是首次请求,则转码服务器需要进一步判断数据流是否已经接入,如果数据流已经接入,则转码服务器直接创建该业务终端与转码服务器之间的第一媒体传输链路,将该第一媒体传输链路的地址信息发送给业务终端,以使得业务终端基于该地址信息获取该数据流。另外无论数据流是否已经接入,转码服务器都需要将请求信息添加至目标请求缓存列表中(包含目标请求标识(句柄)),后面转码服务器接收到数据流后,同样会把目标请求标识返回给业务终端,以帮助业务终端区分对应哪个请求。
302、所述调度中心基于所述目标相机创建目标调度会话模块,基于所述目标调度会话模块向所述目标相机发送所述会话邀请,若接收到所述目标相机基于所述会话邀请返回的正常状态码,则将所述正常状态码发送至所述转码服务器,以及向所述目标相机发送通知消息,以通知所述目标相机发送所述数据流,并将所述请求信息发送至媒体服务器,以使得所述媒体服务器基于所述目标相机创建目标媒体会话模块,以接收所述数据流;
本实施例中,调度中心接收到请求信息后,调度中心可以基于请求信息对应的目标相机创建目标调度会话模块,基于该目标调度会话模块向目标相机发送会话邀请,如果调度中心接收到目标相机基于该会话邀请返回的正常状态码(说明会话邀请成功,目标相机可以发送数据流),则将正常状态码发送给转码服务器,以及向目标相机发送确认(Acknowledge,ACK)信息,以通知目标相机可以开始发送数据流,并将请求信息发送至媒体服务器,以使得媒体服务器基于目标相机创建目标媒体会话模块,以接收数据流。例如,图6为本申请实施例提供的一种调度中心、相机以及媒体服务器之间的链路示意图,其中,调度中心与媒体服务器之间为tcp双向传输链路,媒体服务器创建的目标媒体会话模块与相机对应,目标媒体会话模块包括注册监听服务单元以及数据流转发服务单元。基于图6所示的链路,相机开始把数据流传递给媒体服务器,媒体服务器会执行如下操作:1、开启注册监听服务单元的注册监听服务;2、开启数据流转发服务器单元的数据流转发服务。需要说明的是,媒体服务器会存在N个类似目标媒体会话模块的媒体会话模块,不同的媒体会话模块对应不同的相机,本质是解决相机的网络带宽小的问题,相机带宽小导致不具备较好的分发能力,但是媒体服务器拥有高网络带宽,从而具备极强的分发能力。其中注册监听服务扮演的是一个和转码服务器通信的角色,包括注册和注销功能,当转码服务器通过目标转码会话模块向目标媒体会话模块的注册监听服务单元发送注册包时,媒体服务器会将目标转码会话模块添加至分发列表,媒体服务器在接收到数据流后,将数据流发送给分发列表中的目标转码会话模块。同理,当转码服务器通过目标转码会话模块向目标媒体会话模块的注册监听服务单元发送注销包时,媒体服务器会将转码会话模块从分发列表中移除。媒体服务器决定了调度中心与相机之间的通信链路的生命周期,为此媒体服务器启动了如下两个检测逻辑:检测逻辑1,检测媒体服务器与相机之间的链路,比如媒体服务器检测10s内的收包数量,如果收包数量为0,那么就告知调度中心关闭与相机之间的链路,同时调度中心也会告知转码服务器,关闭对应的链路。检测逻辑2,在转码服务器发送注销包,媒体服务器注销后,媒体服务器检测分发列表中的转码会话模块的数量是否为0,如果是0(说明当前没有业务终端请求相机的视频流),那么就告知调度中心关闭与相机之间的链路,同时调度中心也会告知转码服务器,关闭对应的链路。
目标相机在接收到调度中心发送的会话邀请后,若目标相机确定可以发送数据流,则向调度中心返回目标相机的状态码,状态码也称错误代码,指为相机所接收每个请求分配的三位数代码,比如状态码为200,表示正常,状态码为404,表示设备不在线。目标相机向调度中心返回状态码的主要目的在于:1、向调度中心告知会话邀请是否合理合法;2、向调度中心告知目标相机是否能够正常地处理好会话邀请。
需要说明的是,调度中心在接收到请求信息后,调度中心可以获取请求信息中携带的目标相机标识,调度中心会缓存该目标相机标识,以便于后面给转码服务器返回状态码时,转码服务器知道是对应哪个转码会话模块。另外,在转码服务器端,针对目标相机标识,转码服务器可以基于该目标相机标识创建键key,以key的方式进行缓存,同理,在调度中心端,以key的方式进行缓存。
需要说明的是,无论是转码服务器以及调度中心,均会对请求信息进行缓存,在对请求信息进行缓存的同时,也会对其中包含的目标请求标识以及目标相机标识进行缓存。
需要说明的是,如果调度中心接收到目标相机返回的异常状态码(说明会话邀请失败),则直接向转码服务器返回状态码404,以向转码服务器通知本次请求结束。
303、所述转码服务器创建所述目标转码会话模块与所述目标请求缓存列表中的各请求信息对应的各业务终端之间的第一媒体传输链路,并创建所述目标转码会话模块与所述目标媒体会话模块之间的第二媒体传输链路;
本实施例中,转码服务器接收到目标相机返回的正常状态码后,转码服务器会主动向媒体服务器的目标媒体会话模块进行注册,以创建目标转码会话模块与目标媒体会话模块之间的第二媒体传输链路,以及建立目标转码会话模块与各业务终端之间的第一媒体传输链路。
在一些可能的实施例中,所述转码服务器创建所述目标转码会话模块与所述目标请求缓存列表中的各请求信息对应的各业务终端之间的第一媒体传输链路的步骤,包括:
所述转码服务器遍历所述目标请求缓存列表,针对所述目标请求缓存列表中的各请求信息创建对应的视频传输服务;
所述转码服务器将所述视频传输服务的地址信息,通过所述目标请求缓存列表中的所述各请求信息的请求标识,发送给所述各请求信息对应的各业务终端,以使得所述各业务终端基于所述地址信息发送接入请求信息;
所述转码服务器基于所述接入请求信息创建所述目标转码会话模块与所述各业务终端之间的第一媒体传输链路。
具体地,转码服务器在接收到正常状态码后,转码服务器会遍历转码会话模块的目标请求缓存列表,针对目标请求缓存列表中的每个请求信息均创建对应的视频传输服务,然后把视频传输服务的地址通过目标请求缓存列表中的请求标识(ws句柄)传递给各请求信息对应的业务终端,各业务终端在接收到地址后,主动接入进来,以构建第一媒体传输链路。
在一些可能的实施例中,转码服务器在接收到目标相机返回的状态码后,遍历目标请求缓存列表,然后将状态码发送给目标请求缓存列表中的每个请求信息对应的业务终端。业务终端在接收到状态码后,了解到当前数据流的链路传输状态,如果状态码为404,则说明当前数据流的链路传输建立失败,业务终端获知不用再继续等待获取当前数据流,如果状态码为200,则说明当前数据流的链路传输建立成功,业务终端获取可以等待获取当前数据流,从而在业务终端接收到数据流之前,实现了完美的状态告知,便于业务终端了解当前数据流的链路传输状态。
304、所述媒体服务器基于所述第二媒体传输链路,将所述目标媒体会话模块接收到的所述数据流发送至所述目标转码会话模块;
本实施例中,媒体服务器创建好目标媒体会话模块后,相机将数据流发送给目标媒体会话模块,目标媒体会话模块接收到数据流后,通过第二媒体传输链路将数据流发送至转码服务器。
305、所述转码服务器基于所述第一媒体传输链路,将所述目标转码会话模块接收到的所述数据流分发至所述各业务终端。
本实施例中,转码服务器接收到媒体服务器发送的数据流后,通过第一媒体传输链路将数据流分发至各业务终端。
在一些可能的实施例中,所述转码服务器基于所述第一媒体传输链路,将所述目标转码会话模块接收到的所述数据流分发至各业务终端的步骤,包括:
所述转码服务器对所述数据流进行丢包检测、重排、组包以及封装处理,得到媒体序列化包;
所述转码服务器基于所述第一媒体传输链路,将所述媒体序列化包分发至各业务终端。
具体地,转码服务器在得到数据流后,进行丢包检测、重排、组包以及封装处理,得到数据包,如fmp4 media数据包,将数据流封装为fmp4 media数据包的优势在于h5完美支持,不需要插件,只需要一台支持h5的设备,一个播放按键即可实现数据流的播放,简单易用。在得到fmp4 media数据包后,再通过第一媒体传输链路将fmp4 media数据包传输给业务终端,业务终端可以使用MSR组件播放fmp4 media数据包。
本实施例中,首先创建与相机相对应的转码会话模块、调度会话模块以及媒体会话模块,基于所创建的模块请求相机的数据流,采用模块化的媒体传输链路管理方式保证了业务的独立性,具有低耦合特点;然后通过转码会话模块提供的请求缓存列表,用于缓存所有的针对相机的数据流的请求信息,从而只需要保留一路请求,保证调度中心和相机的媒体链路的唯一性;最后充分利用媒体服务器的高带宽所带来的分发优势,以解决相机的网络带宽小所导致的分发能力不足的问题。从而能够有效避免相机的数据流传输出现网络拥塞问题。
为了更好地实施本申请实施例的上述方案,下面还提供用于实施上述方案的相关装置,请参阅图7,图7为本申请实施例提供的一种媒体传输链路管理装置的结构示意图,媒体传输链路管理装置包括:
转码服务器701、调度中心702以及媒体服务器703;
所述转码服务器701,用于接收业务终端发送的用于请求目标相机的数据流的请求信息;检测是否存在与所述目标相机对应的转码会话模块,若不存在,则将所述请求信息发送至所述调度中心702,并基于所述目标相机创建目标转码会话模块,将所述请求信息缓存至所述目标转码会话模块的目标请求缓存列表中,并在所述调度中心702向所述目标相机发送会话邀请直至完成会话的过程中,将接收到的所有针对所述目标相机的数据流的请求信息缓存至所述目标请求缓存列表中;
所述调度中心702,用于基于所述目标相机创建目标调度会话模块,基于所述目标调度会话模块向所述目标相机发送所述会话邀请,若接收到所述目标相机基于所述会话邀请返回的正常状态码,则将所述正常状态码发送至所述转码服务器701,以及向所述目标相机发送通知消息,以通知所述目标相机发送所述数据流,并将所述请求信息发送至所述媒体服务器703,以使得所述媒体服务器703基于所述目标相机创建目标媒体会话模块,以接收所述数据流;
所述转码服务器701,还用于创建所述目标转码会话模块与所述目标请求缓存列表中的各请求信息对应的各业务终端之间的第一媒体传输链路,并创建所述目标转码会话模块与所述目标媒体会话模块之间的第二媒体传输链路;
所述媒体服务器703,用于基于所述第二媒体传输链路,将所述目标媒体会话模块接收到的所述数据流发送至所述目标转码会话模块;
所述转码服务器701,还用于基于所述第一媒体传输链路,将所述目标转码会话模块接收到的所述数据流分发至所述各业务终端。
本实施例中,首先创建与相机相对应的转码会话模块、调度会话模块以及媒体会话模块,基于所创建的模块请求相机的数据流,采用模块化的媒体传输链路管理方式保证了业务的独立性,具有低耦合特点;然后通过转码会话模块提供的请求缓存列表,用于缓存所有的针对相机的数据流的请求信息,从而只需要保留一路请求,保证调度中心和相机的媒体链路的唯一性;最后充分利用媒体服务器的高带宽所带来的分发优势,以解决相机的网络带宽小所导致的分发能力不足的问题。从而能够有效避免相机的数据流传输出现网络拥塞问题。
可选地,在本申请一些可能的实施例中,所述转码服务器701,具体用于遍历所述目标请求缓存列表,针对所述目标请求缓存列表中的各请求信息创建对应的视频传输服务;将所述视频传输服务的地址信息,通过所述目标请求缓存列表中的所述各请求信息的请求标识,发送给所述各请求信息对应的各业务终端,以使得所述各业务终端基于所述地址信息发送接入请求信息;基于所述接入请求信息创建所述目标转码会话模块与所述各业务终端之间的第一媒体传输链路。
可选地,在本申请一些可能的实施例中,所述转码服务器701,具体用于接收业务终端基于全双工通信协议websocket发送的文本数据,所述文本数据包含目标请求标识以及目标相机标识,所述目标请求标识用于标识所述文本数据对应的请求,所述目标相机标识用于标识所述目标相机。
可选地,在本申请一些可能的实施例中,所述转码服务器701,具体用于将所述文本数据转换为二进制数据;将所述二进制数据发送至调度中心。
可选地,在本申请一些可能的实施例中,所述转码服务器701,还用于将所述目标转码会话模块添加至转码会话映射表,所述转码会话映射表用于表征相机标识与转码会话模块的对应关系;和/或,所述调度中心702,还用于将所述目标调度会话模块添加至调度会话映射表,所述调度会话映射表用于表征相机标识与调度会话模块的对应关系。
可选地,在本申请一些可能的实施例中,所述转码服务器701,还用于若检测到存在与所述目标相机对应的转码会话模块,则检测所述数据流是否已经接入,若所述数据流已经接入,则创建所述第一媒体传输链路,将所述第一媒体传输链路的地址信息发送至所述业务终端。
可选地,在本申请一些可能的实施例中,所述转码服务器701,还用于将所述请求信息缓存至所述目标请求缓存列表中。
可选地,在本申请一些可能的实施例中,所述转码服务器701,具体用于通过所述目标转码会话模块向所述目标媒体会话模块的注册监听服务单元发送注册包,以创建所述目标转码会话模块与所述目标媒体会话模块的数据流转发服务单元之间的第二媒体传输链路。
可选地,在本申请一些可能的实施例中,所述媒体服务器703,还用于将所述目标转码会话模块添加至分发列表;若通过所述注册监听服务单元接收到所述转码服务器701通过所述目标转码会话模块发送的注销包,则从所述分发列表中移除所述目标转码会话模块。
另一方面,本申请实施例还提供一种非暂态计算机可读存储介质,其上存储有计算机程序,该计算机程序被处理器执行时实现以执行上述各实施例提供的方法,例如包括:转码服务器接收业务终端发送的用于请求目标相机的数据流的请求信息;检测是否存在与所述目标相机对应的转码会话模块,若不存在,则将所述请求信息发送至所述调度中心,并基于所述目标相机创建目标转码会话模块,将所述请求信息缓存至所述目标转码会话模块的目标请求缓存列表中,并在调度中心向所述目标相机发送会话邀请直至完成会话的过程中,将接收到的所有针对所述目标相机的数据流的请求信息缓存至所述目标请求缓存列表中;所述调度中心基于所述目标相机创建目标调度会话模块,基于所述目标调度会话模块向所述目标相机发送所述会话邀请,若接收到所述目标相机基于所述会话邀请返回的正常状态码,则将所述正常状态码发送至所述转码服务器,以及向所述目标相机发送通知消息,以通知所述目标相机发送所述数据流,并将所述请求信息发送至媒体服务器,以使得所述媒体服务器基于所述目标相机创建目标媒体会话模块,以接收所述数据流;所述转码服务器创建所述目标转码会话模块与所述目标请求缓存列表中的各请求信息对应的各业务终端之间的第一媒体传输链路,并创建所述目标转码会话模块与所述目标媒体会话模块之间的第二媒体传输链路;所述媒体服务器基于所述第二媒体传输链路,将所述目标媒体会话模块接收到的所述数据流发送至所述目标转码会话模块;所述转码服务器基于所述第一媒体传输链路,将所述目标转码会话模块接收到的所述数据流分发至所述各业务终端。
在上述实施例中,对各个实施例的描述都各有侧重,某个实施例中没有详述的部分,可以参见其他实施例的相关描述。
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的装置的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。
在本申请实施例所提供的几个实施例中,应该理解到,所揭露的装置可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述模块的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个模块或组件可以结合或者可以集成到另一个***,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或模块的间接耦合或通信连接,可以是电性,机械或其它的形式。
所述作为分离部件说明的模块可以是或者也可以不是物理上分开的,作为模块显示的部件可以是或者也可以不是物理模块,即可以位于一个地方,或者也可以分布到多个网络模块上。可以根据实际的需要选择其中的部分或者全部模块来实现本实施例方案的目的。
另外,在本申请实施例各个实施例中的各功能模块可以集成在一个处理模块中,也可以是各个模块单独物理存在,也可以两个或两个以上模块集成在一个模块中。上述集成的模块既可以采用硬件的形式实现,也可以采用软件功能模块的形式实现。所述集成的模块如果以软件功能模块的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。
在上述实施例中,可以全部或部分地通过软件、硬件、固件或者其任意组合来实现。当使用软件实现时,可以全部或部分地以计算机程序产品的形式实现。
所述计算机程序产品包括一个或多个计算机指令。在计算机上加载和执行所述计算机程序时,全部或部分地产生按照本申请实施例所述的流程或功能。所述计算机可以是通用计算机、专用计算机、计算机网络、或者其他可编程装置。所述计算机指令可以存储在计算机可读存储介质中,或者从一个计算机可读存储介质向另一计算机可读存储介质传输,例如,所述计算机指令可以从一个网站站点、计算机、服务器或数据中心通过有线(例如同轴电缆、光纤、数字用户线(DSL))或无线(例如红外、无线、微波等)方式向另一个网站站点、计算机、服务器或数据中心进行传输。所述计算机可读存储介质可以是计算机能够存储的任何可用介质或者是包含一个或多个可用介质集成的服务器、数据中心等数据存储设备。所述可用介质可以是磁性介质,(例如,软盘、硬盘、磁带)、光介质(例如,DVD)、或者半导体介质(例如固态硬盘Solid State Disk(SSD))等。
以上对本申请实施例所提供的技术方案进行了详细介绍,本申请实施例中应用了具体个例对本申请实施例的原理及实施方式进行了阐述,以上实施例的说明只是用于帮助理解本申请实施例的方法及其核心思想;同时,对于本领域的一般技术人员,依据本申请实施例的思想,在具体实施方式及应用范围上均会有改变之处,综上所述,本说明书内容不应理解为对本申请实施例的限制。
Claims (20)
- 一种媒体传输链路管理方法,其包括:转码服务器接收业务终端发送的用于请求目标相机的数据流的请求信息;检测是否存在与所述目标相机对应的转码会话模块,若不存在,则将所述请求信息发送至调度中心,并基于所述目标相机创建目标转码会话模块,将所述请求信息缓存至所述目标转码会话模块的目标请求缓存列表中,并在所述调度中心向所述目标相机发送会话邀请直至完成会话的过程中,将接收到的所有针对所述目标相机的数据流的请求信息缓存至所述目标请求缓存列表中;所述调度中心基于所述目标相机创建目标调度会话模块,基于所述目标调度会话模块向所述目标相机发送所述会话邀请,若接收到所述目标相机基于所述会话邀请返回的正常状态码,则将所述正常状态码发送至所述转码服务器,以及向所述目标相机发送通知消息,以通知所述目标相机发送所述数据流,并将所述请求信息发送至媒体服务器,以使得所述媒体服务器基于所述目标相机创建目标媒体会话模块,以接收所述数据流;所述转码服务器创建所述目标转码会话模块与所述目标请求缓存列表中的各请求信息对应的各业务终端之间的第一媒体传输链路,并创建所述目标转码会话模块与所述目标媒体会话模块之间的第二媒体传输链路;所述媒体服务器基于所述第二媒体传输链路,将所述目标媒体会话模块接收到的所述数据流发送至所述目标转码会话模块;所述转码服务器基于所述第一媒体传输链路,将所述目标转码会话模块接收到的所述数据流分发至所述各业务终端。
- 根据权利要求1所述的媒体传输链路管理方法,其中,所述转码服务器创建所述目标转码会话模块与所述目标请求缓存列表中的各请求信息对应的各业务终端之间的第一媒体传输链路的步骤,包括:所述转码服务器遍历所述目标请求缓存列表,针对所述目标请求缓存列表中的各请求信息创建对应的视频传输服务;所述转码服务器将所述视频传输服务的地址信息,通过所述目标请求缓存列表中的所述各请求信息的请求标识,发送给所述各请求信息对应的各业务终端,以使得所述各业务终端基于所述地址信息发送接入请求信息;所述转码服务器基于所述接入请求信息创建所述目标转码会话模块与所述各业务终端之间的第一媒体传输链路。
- 根据权利要求1所述的媒体传输链路管理方法,其中,所述方法还包括:若所述调度中心接收到所述目标相机基于所述会话邀请返回的异常状态码,则将所述异常状态码发送至所述转码服务器;所述转码服务器接收到所述异常状态码后,释放所述目标转码会话模块,并生成请求失败消息,将所述请求失败消息发送至所述各业务终端。
- 根据权利要求1所述的媒体传输链路管理方法,其中,所述转码服务器接收业务终端发送的用于请求目标相机的数据流的请求信息的步骤,包括:所述转码服务器接收业务终端基于全双工通信协议websocket发送的文本数据,所述文本数据包含目标请求标识以及目标相机标识,所述目标请求标识用于标识所述文本数据对应的请求,所述目标相机标识用于标识所述目标相机。
- 根据权利要求4所述的媒体传输链路管理方法,其中,所述转码服务器将所述请求信息发送至调度中心的步骤,包括:所述转码服务器将所述文本数据转换为二进制数据;所述转码服务器将所述二进制数据发送至调度中心。
- 根据权利要求4所述的媒体传输链路管理方法,其中,所述方法还包括:所述转码服务器将所述目标转码会话模块添加至转码会话映射表,所述转码会话映射表用于表征相机标识与转码会话模块的对应关系;和/或,所述调度中心将所述目标调度会话模块添加至调度会话映射表,所述调度会话映射表用于表征相机标识与调度会话模块的对应关系。
- 根据权利要求1所述的媒体传输链路管理方法,其中,所述方法还包括:若所述转码服务器检测到存在与所述目标相机对应的转码会话模块,则检测所述数据流是否已经接入,若所述数据流已经接入,则创建所述第一媒体传输链路,将所述第一媒体传输链路的地址信息发送至所述业务终端。
- 根据权利要求1所述的媒体传输链路管理方法,其中,所述转码服务器创建所述目标转码会话模块与所述目标媒体会话模块之间的第二媒体传输链路的步骤,包括:所述转码服务器通过所述目标转码会话模块向所述目标媒体会话模块的注册监听服务单元发送注册包,以创建所述目标转码会话模块与所述目标媒体会话模块的数据流转发服务单元之间的第二媒体传输链路。
- 根据权利要求8所述的媒体传输链路管理方法,其中,所述转码服务器通过所述目标转码会话模块向所述目标媒体会话模块的注册监听服务单元发送注册包的步骤之后,还包括:所述媒体服务器将所述目标转码会话模块添加至分发列表;若所述媒体服务器通过所述注册监听服务单元接收到所述转码服务器通过所述目标转码会话模块发送的注销包,则从所述分发列表中移除所述目标转码会话模块。
- 根据权利要求1所述的媒体传输链路管理方法,其中,所述转码服务器基于所述第一媒体传输链路,将所述目标转码会话模块接收到的所述数据流分发至所述各业务终端的步骤,包括:所述转码服务器对所述数据流进行丢包检测、重排、组包以及封装处理,得到媒体序列化包;所述转码服务器基于所述第一媒体传输链路,将所述媒体序列化包分发至各业务终端。
- 一种媒体传输链路管理装置,其包括:转码服务器、调度中心以及媒体服务器;所述转码服务器,用于接收业务终端发送的用于请求目标相机的数据流的请求信息;检测是否存在与所述目标相机对应的转码会话模块,若不存在,则将所述请求信息发送至所述调度中心,并基于所述目标相机创建目标转码会话模块,将所述请求信息缓存至所述目标转码会话模块的目标请求缓存列表中,并在所述调度中心向所述目标相机发送会话邀请直至完成会话的过程中,将接收到的所有针对所述目标相机的数据流的请求信息缓存至所述目标请求缓存列表中;所述调度中心,用于基于所述目标相机创建目标调度会话模块,基于所述目标调度会话模块向所述目标相机发送所述会话邀请,若接收到所述目标相机基于所述会话邀请返回的正常状态码,则将所述正常状态码发送至所述转码服务器,以及向所述目标相机发送通知消息,以通知所述目标相机发送所述数据流,并将所述请求信息发送至所述媒体服务器,以使得所述媒体服务器基于所述目标相机创建目标媒体会话模块,以接收所述数据流;所述转码服务器,还用于创建所述目标转码会话模块与所述目标请求缓存列表中的各请求信息对应的各业务终端之间的第一媒体传输链路,并创建所述目标转码会话模块与所述目标媒体会话模块之间的第二媒体传输链路;所述媒体服务器,用于基于所述第二媒体传输链路,将所述目标媒体会话模块接收到的所述数据流发送至所述目标转码会话模块;所述转码服务器,还用于基于所述第一媒体传输链路,将所述目标转码会话模块接收到的所述数据流分发至所述各业务终端。
- 根据权利要求11所述的媒体传输链路管理装置,其中,所述转码服务器具体用于:遍历所述目标请求缓存列表,针对所述目标请求缓存列表中的各请求信息创建对应的视频传输服务;将所述视频传输服务的地址信息,通过所述目标请求缓存列表中的所述各请求信息的请求标识,发送给所述各请求信息对应的各业务终端,以使得所述各业务终端基于所述地址信息发送接入请求信息;基于所述接入请求信息创建所述目标转码会话模块与所述各业务终端之间的第一媒体传输链路。
- 根据权利要求11所述媒体传输链路管理装置,其中,所述调度中心,还用于若接收到所述目标基于所述会话邀请返回的异常状态码,则将所述异常状态码发送至所述转码服务器;所述转码服务器,还用于接收到所述异常状态码后,释放所述目标转码会话模块,并生成请求失败消息,将所述请求失败消息发送至所述各业务终端。
- 根据权利要求11所述媒体传输链路管理装置,其中,所述转码服务器具体用于:接收业务终端基于全双工通信协议websocket发送的文本数据,所述文本数据包含目标请求标识以及目标相机标识,所述目标请求标识用于标识所述文本数据对应的请求,所述目标相机标识用于标识所述目标相机。
- 根据权利要求1所述媒体传输链路管理装置,其中,所述转码服务器,还用于若检测到存在与所述目标相机对应的转码会话模块,则检测所述数据流是否已经接入,若所述数据流已经接入,则创建所述第一媒体传输链路,将所述第一媒体传输链路的地址信息发送至所述业务终端。
- 根据权利要求11所述媒体传输链路管理装置,其中,所述转码服务器,具体用于通过所述目标转码会话模块向所述目标媒体会话模块的注册监听服务单元发送注册包,以创建所述目标转码会话模块与所述目标媒体会话模块的数据流转发服务单元之间的第二媒体传输链路。
- 根据权利要求11所述媒体传输链路管理装置,其中,所述转码服务器,具体用于:对所述数据流进行丢包检测、重排、组包以及封装处理,得到媒体序列化包;基于所述第一媒体传输链路,将所述媒体序列化包分发至各业务终端。
- 一种存储介质,其包括指令,当所述指令在计算机上运行时,使得所述计算机执行如下步骤:转码服务器接收业务终端发送的用于请求目标相机的数据流的请求信息;检测是否存在与所述目标相机对应的转码会话模块,若不存在,则将所述请求信息发送至调度中心,并基于所述目标相机创建目标转码会话模块,将所述请求信息缓存至所述目标转码会话模块的目标请求缓存列表中,并在所述调度中心向所述目标相机发送会话邀请直至完成会话的过程中,将接收到的所有针对所述目标相机的数据流的请求信息缓存至所述目标请求缓存列表中;所述调度中心基于所述目标相机创建目标调度会话模块,基于所述目标调度会话模块向所述目标相机发送所述会话邀请,若接收到所述目标相机基于所述会话邀请返回的正常状态码,则将所述正常状态码发送至所述转码服务器,以及向所述目标相机发送通知消息,以通知所述目标相机发送所述数据流,并将所述请求信息发送至媒体服务器,以使得所述媒体服务器基于所述目标相机创建目标媒体会话模块,以接收所述数据流;所述转码服务器创建所述目标转码会话模块与所述目标请求缓存列表中的各请求信息对应的各业务终端之间的第一媒体传输链路,并创建所述目标转码会话模块与所述目标媒体会话模块之间的第二媒体传输链路;所述媒体服务器基于所述第二媒体传输链路,将所述目标媒体会话模块接收到的所述数据流发送至所述目标转码会话模块;所述转码服务器基于所述第一媒体传输链路,将所述目标转码会话模块接收到的所述数据流分发至所述各业务终端。
- 根据权利要求18所述的存储介质,其中,所述计算机在执行所述转码服务器创建所述目标转码会话模块与所述目标请求缓存列表中的各请求信息对应的各业务终端之间的第一媒体传输链路的步骤时,具体执行:所述转码服务器遍历所述目标请求缓存列表,针对所述目标请求缓存列表中的各请求信息创建对应的视频传输服务;所述转码服务器将所述视频传输服务的地址信息,通过所述目标请求缓存列表中的所述各请求信息的请求标识,发送给所述各请求信息对应的各业务终端,以使得所述各业务终端基于所述地址信息发送接入请求信息;所述转码服务器基于所述接入请求信息创建所述目标转码会话模块与所述各业务终端之间的第一媒体传输链路。
- 根据权利要求18所述的存储介质,其中,所述计算机还执行如下步骤:若所述调度中心接收到所述目标相机基于所述会话邀请返回的异常状态码,则将所述异常状态码发送至所述转码服务器;所述转码服务器接收到所述异常状态码后,释放所述目标转码会话模块,并生成请求失败消息,将所述请求失败消息发送至所述各业务终端。
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110549989.1 | 2021-05-20 | ||
CN202110549989.1A CN112995234B (zh) | 2021-05-20 | 2021-05-20 | 一种媒体传输链路管理方法及装置 |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2022241990A1 true WO2022241990A1 (zh) | 2022-11-24 |
Family
ID=76337064
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2021/119993 WO2022241990A1 (zh) | 2021-05-20 | 2021-09-23 | 一种媒体传输链路管理方法、装置及存储介质 |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN112995234B (zh) |
WO (1) | WO2022241990A1 (zh) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN117995332A (zh) * | 2024-04-07 | 2024-05-07 | 北方健康医疗大数据科技有限公司 | 一种值域代码标准化转换***及方法 |
Families Citing this family (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112995234B (zh) * | 2021-05-20 | 2021-07-20 | 武汉中科通达高新技术股份有限公司 | 一种媒体传输链路管理方法及装置 |
CN114679435B (zh) * | 2022-05-27 | 2022-08-30 | 武汉中科通达高新技术股份有限公司 | 会话管理***、方法、计算机设备及存储介质 |
CN114679433B (zh) * | 2022-05-27 | 2022-08-30 | 武汉中科通达高新技术股份有限公司 | 视频访问会话管理***、方法、计算机设备及存储介质 |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101079760A (zh) * | 2007-07-27 | 2007-11-28 | 华为技术有限公司 | 实现网络监控的方法、***及内容分发网络 |
US20120275444A1 (en) * | 2011-04-28 | 2012-11-01 | Salah Shahsavari | Push-to-multimedia method and system for sharing multimedia information |
US20130227060A1 (en) * | 2011-01-14 | 2013-08-29 | Research In Motion Limited | Mobile media content delivery |
CN104363472A (zh) * | 2014-10-20 | 2015-02-18 | 中兴通讯股份有限公司 | 基于hls的能力控制方法及服务***和slb服务器 |
CN112995234A (zh) * | 2021-05-20 | 2021-06-18 | 武汉中科通达高新技术股份有限公司 | 一种媒体传输链路管理方法及装置 |
Family Cites Families (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6101547A (en) * | 1998-07-14 | 2000-08-08 | Panasonic Technologies, Inc. | Inexpensive, scalable and open-architecture media server |
US9063562B2 (en) * | 2013-03-11 | 2015-06-23 | Verizon Patent And Licensing Inc. | Managing sessions between network cameras and user devices |
CN104284239A (zh) * | 2013-07-11 | 2015-01-14 | 中兴通讯股份有限公司 | 一种视频播放方法、装置、视频播放客户端和多媒体服务器 |
US11368753B2 (en) * | 2016-01-06 | 2022-06-21 | LiveView Technologies, LLC | Managing live video stream connections and data usage |
CN107734361A (zh) * | 2017-09-30 | 2018-02-23 | 深圳融创新技术有限公司 | 流媒体服务器调度方法、***、可读存储介质及服务器 |
CN110971975A (zh) * | 2019-12-06 | 2020-04-07 | 杭州视洞科技有限公司 | 一种实时流媒体转发与直连切换的优化方案 |
CN111464816B (zh) * | 2020-04-03 | 2020-11-17 | 广东利通科技投资有限公司 | 一种高速公路视频监控*** |
CN112188227A (zh) * | 2020-09-30 | 2021-01-05 | 武汉中科通达高新技术股份有限公司 | 一种流媒体数据分发方法和装置 |
-
2021
- 2021-05-20 CN CN202110549989.1A patent/CN112995234B/zh active Active
- 2021-09-23 WO PCT/CN2021/119993 patent/WO2022241990A1/zh active Application Filing
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101079760A (zh) * | 2007-07-27 | 2007-11-28 | 华为技术有限公司 | 实现网络监控的方法、***及内容分发网络 |
US20130227060A1 (en) * | 2011-01-14 | 2013-08-29 | Research In Motion Limited | Mobile media content delivery |
US20120275444A1 (en) * | 2011-04-28 | 2012-11-01 | Salah Shahsavari | Push-to-multimedia method and system for sharing multimedia information |
CN104363472A (zh) * | 2014-10-20 | 2015-02-18 | 中兴通讯股份有限公司 | 基于hls的能力控制方法及服务***和slb服务器 |
CN112995234A (zh) * | 2021-05-20 | 2021-06-18 | 武汉中科通达高新技术股份有限公司 | 一种媒体传输链路管理方法及装置 |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN117995332A (zh) * | 2024-04-07 | 2024-05-07 | 北方健康医疗大数据科技有限公司 | 一种值域代码标准化转换***及方法 |
Also Published As
Publication number | Publication date |
---|---|
CN112995234A (zh) | 2021-06-18 |
CN112995234B (zh) | 2021-07-20 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2022241990A1 (zh) | 一种媒体传输链路管理方法、装置及存储介质 | |
US8533346B2 (en) | SIP-based network video surveillance system and method | |
CN109525460B (zh) | 一种视联网号码资源监测的方法和装置 | |
CN109120962A (zh) | 软件终端连接视联网的方法和装置 | |
CN109167960B (zh) | 一种视频流数据的处理方法和*** | |
CN108881361B (zh) | 一种基于视联网的数据推送方法和装置 | |
CN112866303B (zh) | 一种级联媒体传输链路管理方法及装置 | |
CN105227418B (zh) | 数据通道建立方法和通信设备 | |
CN109547417A (zh) | 码流传输方法和装置 | |
EP3576371B1 (en) | Method and system for transmitting streaming media resource | |
CN109714527A (zh) | 一种在互联网中控制视联网摄像头的方法和装置 | |
US20230319689A1 (en) | Network information exposure method and apparatus, electronic device, and storage medium | |
WO2019218474A1 (zh) | 一种视频通话服务的响应方法及*** | |
CN110049280B (zh) | 监控数据的处理方法和装置 | |
WO2013159492A1 (zh) | 信息上报与下载的方法及*** | |
CN104994067A (zh) | Sip网络访问rtsp监控网络的***及方法 | |
CN111787078A (zh) | 一种基于电梯物联网的信令控制***及通讯方法 | |
CN110198384A (zh) | 一种基于视联网的通讯方法和中转服务器 | |
CN113726817B (zh) | 一种流媒体数据的传输方法、装置及介质 | |
CN109769126A (zh) | 一种在互联网中实时回放视联网录像的方法和装置 | |
CN110086772B (zh) | 一种监控视频的获取方法和*** | |
CN110620907B (zh) | 监控调取方法、装置、电子设备及存储介质 | |
US10298879B2 (en) | Method and system for switching a push-based video call between devices in a group | |
CN108881143B (zh) | 一种基于视联网的报警方法、装置和*** | |
CN110098993A (zh) | 一种信令报文的处理方法和装置 |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 21940438 Country of ref document: EP Kind code of ref document: A1 |
|
NENP | Non-entry into the national phase |
Ref country code: DE |
|
122 | Ep: pct application non-entry in european phase |
Ref document number: 21940438 Country of ref document: EP Kind code of ref document: A1 |