What is the difference between TCP and UDP protocols? Which method should I choose in LiteCVR?

TCP (Transmission Control Protocol) and UDP (User Datagram Protocol) are the two most commonly used protocols in Internet transmission protocols. When users use our platform, they often have questions about ports and do not understand the differences between ports. Today we will explain the instructions and differences between the TCP and UDP modes of the LiteCVR platform under the national standard GB28181 protocol access.

1. The difference between TCP and UDP

There are related TCP and UDP instructions on the camera's GB28181 access configuration page and the LiteCVR configuration page:

1) Connectivity:

TCP is a connection-oriented protocol. It needs to establish a connection before data transmission, and then ensures reliable data transmission through a three-way handshake. The establishment and maintenance of connections will add a certain amount of overhead.

UDP is a connectionless protocol and does not require a connection to be established in advance. Each UDP message is sent and processed encrypted, and the sending end does not retain any information about the message transmission status.

2) Reliability:

TCP provides reliable transmission. It uses methods such as acknowledgment mechanism, timeout retransmission, and flow control to ensure data integrity and sequence. If data is lost or corrupted, TCP will automatically resend it.

UDP has no confirmation mechanism and retransmission mechanism. It simply sends the datagram to the target and does not care whether it arrives successfully. Therefore, UDP does not guarantee the reliability of data.

3) Speed ​​and efficiency:

TCP requires a lot of control and management during the transmission process, making its transmission speed relatively slow, especially in long-distance, high-latency network environments.

UDP does not perform operations such as connection establishment and data management, and has high transmission efficiency. It is suitable for some real-time applications, such as instant messaging, video streaming, etc.

4) Message size:

TCP segments the data during transmission and adjusts the segment size according to the situation at the receiving end. TCP can handle larger message sizes.

UDP data packets are smaller and limited to 64KB.

2. Is it appropriate to choose TCP or UDP?

By comparing the differences between TCP and UDP, we can choose the appropriate protocol according to actual needs. If reliability and sequential transmission are required, choose TCP; for scenarios requiring transmission efficiency and real-time performance, you can choose UDP.

3. National standard GB28181 protocol LiteCVR video surveillance platform

The LiteCVR video surveillance integrated cloud platform is based on the cloud-edge-end integrated architecture. In terms of access to the national standard GB/T28181 protocol, the platform can support both TCP and UDP modes. The access method is flexible and users can choose according to their own project needs. The platform has high compatibility and scalability, and can support multiple types of devices and multi-protocol access, including the national standard GB/T28181, RTMP, RTSP/Onvif protocols, and manufacturers’ private protocols, such as: Hikvision Ehome protocol, Hikvision SDK , Dahua SDK, Huawei SDK, Uniview SDK, Lecheng SDK, EZVIZ SDK.

LiteCVR has strong video surveillance live broadcast, recording, cloud storage, retrieval and playback, alarm, clustering, cascading, sharing and other capabilities. It has been applied in many practical scenarios, such as: smart construction sites, smart campuses, smart campuses, etc. Communities, smart buildings, etc.

Guess you like

Origin blog.csdn.net/LiteMedia/article/details/135155370