Introduction to GB/T28181 protocol

Introduction to GB/T28181 protocol


Speaking of the GB/T28181 protocol, if you are engaged in the field of video surveillance, you must be familiar with it. In public security, urban governance, government supervision, enterprise supervision and other scenarios involving video aggregation and video surveillance, it is already a The video protocol that video terminal equipment and surveillance platforms must support can be said to be the number one player in the video surveillance industry and is used to stipulate how the video surveillance system transmits, exchanges and controls information. This article mainly introduces the basic knowledge of the protocol. Later, I will write an article specifically from the perspective of video streaming to introduce in detail how the GB/T28181 protocol applies for video streaming protocol, stream encapsulation and transmission.

General introduction

The GB/T28181 protocol, whose full name is "Technical Requirements for Information Transmission, Exchange, and Control of Security Video Surveillance Networking Systems," is a national standard issued by the China National Standards Committee. It mainly stipulates all aspects of the video surveillance system, enabling video surveillance equipment produced by different manufacturers to connect with each other, share information, and improve the efficiency and reliability of the entire surveillance system. The 28181 protocol has iterated three consecutive versions since the first version was released in 2011. The latest released version is GB/T28181-2016. The latest protocol document can be obtained by clicking on the original text at the end of the article. In video surveillance projects such as public security, government, enterprises and institutions, the 28181 protocol is basically a streaming media protocol that must be supported by IPC, NVR, platforms, and video border gateways.

28181 protocol includes device registration, real-time audio and video on demand, device control, alarm time notification and distribution, device information query, status information reporting, historical audio and video file retrieval, historical audio and video file playback and download, and network calibration time, subscription and notification, voice intercom and voice broadcast, etc. For detailed introduction, please refer to "GB/T28181-2016 Technical Requirements for Information Transmission, Exchange and Control of Security Video Surveillance Networking System", and the specification document can be followed publicpublicNo.: zerowarehouse, send: Protocol specification, get . This article mainly introduces the basic structure, key protocol processes and application scenarios of 28181.

GB/T28181 basic structure

The basic structure of the 28181 protocol is as follows:
1

28181 protocol includes terminal side protocol and platform side protocol. The terminal side includes terminal equipment such as IPC and NVR, and the platform side includes NVR, video platform, gatekeeper, etc. IPC connects to the video surveillance platform or NVR through the 28181 protocol; the NVR can connect downward to the IPC and upward to the video surveillance platform; GB28181 supports multi-level cascading, so video surveillance platforms can be cascaded through the 28181 protocol to achieve protocol exchange and video transmission. Here, the video gatekeeper serves as the network security boundary and serves as a network isolation facility between the secure network area and the non-secure network area during cross-network transmission by public security. It supports the 28181 protocol channel, so the upper and lower level video surveillance platforms can directly implement cross-connection through the 28181 protocol. Gatekeeper communications.
The 28181 protocol structure is shown in the figure below:
1
The protocol includes two channels, the session channel and the media streaming channel. The session channel includes signaling interaction and video session, and is mainly based on SIP is extended, and the streaming media channel is transmitted through RTP/RTCP. The latest version of the transport layer protocol 28181 specification can support both TCP and UDP. The following introduces the three types of protocols: signaling interaction, audio and video conversation, and audio and video transmission:

  • Signaling interaction: The signaling interaction protocol is the basis of the 28181 protocol. It is extended on the basis of the sip protocol. The extended protocol is implemented by the MESSAGE method specified in IETF RFC3428. The protocol body is in xml format. The main SIP messages include registration, heartbeat, device search, device status query, device control, etc.
  • Audio and video session: includes video preview and video playback. Video preview is implemented using SIP's INVITE, ACK, and BYE methods, and the media protocol is carried through the SDP protocol. Video playback uses SIP INVITE to implement session connection, and SIP INFO method is used to implement playback command control. , the control protocol commands refer to the PLAY, PARUSE, TREADOWN and other commands of MANSRTSP.
  • Audio and video transmission: After establishing a video transmission channel through a video session, the video is transmitted through RTP/RTCP. The transmitted audio and video packets are PS stream. For a detailed explanation of the PS stream encapsulation method, followpublicpublicNo.:zerowarehouse, send: ps to get related articles.

GB/T28181 key agreement process

This article mainly introduces the key protocol processes, including device registration, device directory query, video playback and other processes. The interaction of streaming media protocols must be realized through the 28181 protocol. These protocol processes cannot be avoided. Details about 28181 video stream interaction Analysis, I will write a separate article to introduce it later.

Device registration

Here we take IPC registration to the video platform as an example. The device registration process is as follows:

1

  1. IPC initiates a Register registration request to the video platform, carrying device information.
  2. After receiving the registration request, the video platform determines whether the authentication information is carried. If not, it returns 401 and the authentication fails.
  3. IPC carries the Anthorization authentication information and re-initiates the registration request according to the platform authentication requirements.
  4. The platform authenticates the authentication information. After the authentication is passed, 200 is returned, indicating successful registration.

Pay attention to the authentication method here. When the platform replies 401, it will carry the WWW-Authenticate header field. This field contains the authentication methods supported by the platform. Common methods include basic, digest, etc. IPC needs to encapsulate authentication information according to the authentication method supported by the platform.

Equipment catalog query

Device directory query mainly queries the directory structure of the device/subordinate platform. After querying the directory structure, the device camera list information is obtained. Through the camera list information, the platform can select the camera for camera video playback and other operations, 28181 all signaling The operation process is basically similar. Once you understand this protocol process, you can refer to it for other signaling interactions.
1
28181 signaling interaction adopts asynchronous interaction, and request messages and response messages are performed asynchronously.

1. The platform initiates a directory query request (catlog) to the IPC, carrying the query device ID.
2. The device directly returns 200 OK, without carrying the response
3. The device sends directory query response information to the platform, carrying the device directory information
4. The platform receives the response information and returns 200 OK

Real-time video playback process

Video playback uses the INVITE, ACK, and BYE methods specified in SIP IETF RFC 3216. Let’s take the video platform’s application for video from IPC as an example to illustrate the 28181 video playback process:
1

  1. The video platform initiates an INVITE request to IPC, and SDP carries video playback information.
  2. After receiving the INVITE request, IPC prepares to push the video stream based on the information carried by SDP, and returns response information carrying SDP audio and video description information.
  3. After receiving the response information, the video platform prepares to receive the video stream based on the SDP audio and video description information and returns ACK to the IPC.
  4. After IPC receives the ACK, it pushes the audio and video streams. The audio and video streams are encapsulated in PS format and transmitted through RTP/RTCP.

GB/T28181 protocol summary

The application of GB/T 28181 protocol can be said to be everywhere, such as in public security, urban management, enterprises and institutions and other monitoring fields. Next let’s talk about its application scenarios.
As one of the important standards in the field of public safety, the GB/T 28181 protocol standardizes the information transmission, exchange and control of video surveillance network systems, and improves the interconnection of video surveillance equipment produced by different manufacturers. Interoperability and information sharing. It not only plays an important role in the field of public safety, but also has extensive applications in smart homes, enterprise applications, and urban management. By following the provisions of the GB/T 28181 protocol, we can effectively improve the reliability and effectiveness of the video surveillance system and protect our safety and living order.


有关GB28181More sentences, notespublicissue:Zero,Transfer:28181,Take.

Guess you like

Origin blog.csdn.net/water1209/article/details/134041202