[Technical Tutorial] National Standard GB28181 Protocol Video Intelligent Analysis National Standard Streaming Media Platform EasyGBS Device Positioning Function Update Optimization

Since the Ministry of Public Security has been implementing the GB28181 video streaming protocol, the GB28181 protocol will be used in many government affairs and public security surveillance video streaming transmissions. At the same time, GB28181 can also support cascading between platforms through the protocol, which is required on multiple different platforms. Among the projects to obtain information from each other, the GB28181 protocol is very popular. The national standard EasyGBS video intelligent analysis platform developed by TSINGSEE Qingxi Video is a video platform that supports the GB28181 protocol, and currently supports voice intercom, alarm reporting and other functions.

The EasyGBS video intelligent analysis platform has the positioning function of the access device. For the use of this function, some users have reported that the device has been subscribed, and the location update is still not timely, and there is a delay in obtaining the location information of the device.

37.png

After packet capture and analysis, the cmdtype field in the notification message returned by the device after the subscription is MobilePosition, and then the code is checked, and it is found that no processing is added to the cmdtype field for positioning.

38.png

Need to add the following code:

case "mobileposition":
		deviceId := ""
		if el := doc.Root().SelectElement("DeviceID"); el != nil {
			deviceId = el.Text()
		}
		positionTime := ""
		if el := doc.Root().SelectElement("Time"); el != nil {
			positionTime = el.Text()
		}
		longitude := ""
		if el := doc.Root().SelectElement("Longitude"); el != nil {
			longitude = el.Text()
		}
		latitude := ""
		if el := doc.Root().SelectElement("Latitude"); el != nil {
			latitude = el.Text()
		}
		speed := ""
		if el := doc.Root().SelectElement("Speed"); el != nil {
			speed = el.Text()
		}
		direction := ""
		if el := doc.Root().SelectElement("Direction"); el != nil {
			direction = el.Text()
		}
 

Again, when the latitude and longitude of the device changes, the acquired device information can be changed in time, and this problem has been resolved.

39.png

The EasyGBS video intelligent analysis platform has good adaptability in traffic, security and other scenarios, and the national standard push platform EasyGBD just launched by the TSINGSEE green rhino video research and development team this year makes the video push of the national standard protocol more convenient. About EasyGBS and You are welcome to find us about the use of EasyGBD.

Guess you like

Origin blog.csdn.net/Black_3717/article/details/111505274