This standard was drafted according to the rules given in GB/T 1.1-2009.
This standard was proposed and is under the jurisdiction of National Technical Committee on Road Transport of Standardization Administration of China.
Drafting organizations of this standard: China Transport Telecommunications & Information Center, Research Institute of Highway Ministry of Transport and Fujian Provincial Communications Department.
Chief drafting staffs of this standard: Liu Jian, Cai Fengtian, Luo Guanwei, Feng Quan, Liu Yingji, Liang Jinyan, Wang Hongyu, Zhou Yi, Qiu Shejin, Niu Wenjiang, Dong Xuan, Lin Yuanhong, He Fanglin, Li Wenliang, Hong Maozhi, Li Mingying, Zhang Xuewen, Shen Bing and Shang Jiang.
GNSS System for Operating Vehicles - General Specifications for Data Exchange between Platforms
道路运输车辆卫星定位系统 平台数据交换
1 Scope
This standard specifies technical requirements for data exchange between monitoring and management platforms of the GNSS system for operating vehicles, including communication mode, safety certificate, function realization process, protocol message format and data entity format.
This standard is applicable to data exchange between monitoring and management platforms of GNSS system for operating vehicles.
2 Normative References
The following references are indispensable for the application of this standard. For dated reference, only the dated editions apply. For the undated normative references, the latest editions (including all amendments) apply.
GB/T 2260 Codes for the Administrative Divisions of the People's Republic of China
GB/T 19056 Vehicle Travelling Data Recorder
JT/T 415-2006 Electronic Government Platform for Administration of Road Transportation - Cataloguing and Coding Rules
JT/T 808-2011 GNSS System for Operational Vehicles - General Specifications for Vehicle Terminal Communication Protocol and Data Format
3 Terms, Definitions and Abbreviations
3.1 Terms and Definitions
For the purpose of this standard, the following terms and definitions apply.
3.1.1
Number plate
The number plate of the motor vehicle issued by the public security traffic management department, excluding color of the license plate, for example, Beijing AJ 3030.
3.1.2
Superior platform
Government monitoring and management platform that provides access to other platforms.
3.1.3
Inferior platform
Monitoring and management platforms, in the enterprise monitoring and management platform and government monitoring and management platform, that access to the superior platform.
3.1.4
Vehicle's positioning information
A general term for the current vehicle position information and vehicle warn state information received from the vehicle terminal to the navigation satellite and delivered to the surveillance & control center, including latitude/longitude, speed and direction.
3.1.5
Vehicle's dynamic information
Relevant vehicle information generated during the operation and traveling, including vehicle's positioning information, traveling state, personnel, goods and line information.
3.1.6
Vehicle's static information
Vehicle's administration and operation management information that is related to the road transportation and operation activities and remains constant during a given period, including operating vehicle, the owner, employees, operation management organization and operation line information.
3.1.7
Main links
Two TCP protocol-based virtual channels are adopted between superior and inferior platforms, including one-way uplink virtual channel constructed after the inferior platform, as the TCP server, is successfully connected to the TCP client of the superior platform.
3.1.8
Subordinate links
Two TCP protocol-based virtual channels are adopted between superior and inferior platforms, including one-way downlink virtual channel constructed after the superior platform, as the TCP client, is successfully connected to the TCP server of the inferior platform.
3.2 Abbreviations
For the purpose of this standard, the following abbreviations apply.
CCITT - Consultative Committee for International Telegraphy and Telephony
CRC - Cyclic Redundancy Check
CRC 16-CCITT - CRC-16 Code of CCITT Standard
UTC - Universal Time Coordinated
4 Technical Requirements
4.1 Communication mode
Double-link communication mode is adopted between the superior platform and the inferior platform; and the specific requirements are as follows:
a) TCP protocol-based long connection mode is adopted as the communication mode between the superior and inferior platforms;
b) The superior platform provides IP address, port No., user name and password for the access of the inferior platform;
c) The inferior platform initiates a request for the connection of the main link to the superior platform; after the main link is successfully established, the superior platform initiates a request for the connection of the subordinate link to the inferior platform;
d) The inferior platform may send data to the superior platform via main link while the superior platform may send data to the inferior platform via subordinate link;
e) In case of any interruption in either of the main or subordinate link, all the data will be transmitted via the other link; when the interrupted link is recovered, the data continues to be transmitted from the two links according to those stipulated in this standard;
f) The communication link is sent via the TCP client to maintain the connection of data package testing link and realize reliable connection between the links.
4.2 Safety certification
According to communication mode proposed in Section 4.1, the superior platform carries out the safety verification on the access request of the inferior platform so as to guarantee that reliable and creditable communication link is established; however, the inferior platform needn't carry out safety verification on the access request of the superior platform.
Safety verification process of the superior platform for the inferior platform shall comply with the following requirements:
a) The superior platform assigns corresponding access code, access user name, password and data encryption/decryption parameters to the inferior platform;
b) When the inferior platform and the superior platform are connected with each other, the "log-in request" message is sent. After the superior platform receives the connection request of the inferior platform, it will firstly verify the requested IP address. In case of any inconsistency between the requested IP address and stipulated access IP address, it will return to the verification failure result. Secondly, the superior platform verifies the access code, user name and password of the inferior platform and returns corresponding result value to the inferior platform according to verification results.
c) Encryption mode may be adopted for the data transmission between the superior and inferior platforms so as to realize instant encryption of the transmission data; specific encryption algorithm is in accordance with those specified in Article 4.4.7.
4.3 Function realization process
4.3.1 Link management process
4.3.1.1 Log-in and hold request of main link from inferior platform to the superior platform.
4.3.1.1.1 Log-in process of main link for the inferior platform
Log-in process of main link for the inferior platform shall comply with the following requirements:
a) The inferior platform sends a log-in request to the superior platform. The log-in request data package includes platform access code, log-in user name and password, TCP service IP address and port No. necessary for the establishment of subordinate link;
b) The superior platform carries out safety certification on the log-in request of the inferior platform and records log-in conditions in the log. If the certification is successful, response to successful log-in will be given; otherwise, the response to log-in failure will be given and failure reason code will be given.
c) After the inferior platform successfully logs in the superior platform, the superior platform requests to establish connection with the subordinate link according to the TCP service IP address and port No. provided during the log-in of the inferior platform;
d) After successful establishment of the subordinate link, follow-up downlink data package may be sent from the subordinate link.
4.3.1.1.2 Hold process of main link
Hold process of main link shall comply with the following requirements:
a) After successful log-in of the inferior platform, in case of any application service data package transmission between superior platforms, hold data package of the main link need not be sent; otherwise, the inferior platform shall send one hold request data package of the main link to the superior platform every 1min so as to keep link connection;
b) If there is without application data package transmission and the superior platform fails to receive the hold request data package of the main link sent from the inferior platform for consecutive 3min, it shall be considered that its connection with the inferior platform is interrupted and it will initiate to interrupt the main link of data transmission;
c) If there is without application data package transmission and the superior platform fails to receive the hold acknowledge data package of the subordinate link sent from the superior platform for consecutive 3min, it shall be considered that its connection with the superior platform is interrupted and it will initiate to interrupt the subordinate link of data transmission;
4.3.1.2 Log-out request of main link from inferior platform to superior platform
When the inferior platform initiates to exit, it will firstly send a log-out request of the main link. After the superior platform receives it, it will return to the link, log out the response and record it in the log. Then the superior platform interrupts the main link.
4.3.1.3 Inferior platform's initiative closure of the main-subordinate link connection with the superior platform
With the inferior platform as the server, in case of any abnormal connection of the subordinate link, the subordinate link initiates to send a message to close the main-subordinate link connection to the superior platform and records it in the log, and then the inferior platform interrupts the connection between the main and subordinate links.
4.3.1.4 Connection and hold request of the subordinate link from superior platform to inferior platform
4.3.1.4.1 Connection request process of subordinate link for superior platform
Connection request process of the subordinate link for the superior platform shall comply with the following requirements:
a) After the inferior platform successfully logs in the superior platform and the main link is established, the superior platform, by obtaining information such as TCP service IP address and port No. provided by the inferior platform, initiates a connection request of the subordinate link to the inferior platform;
b) After the inferior platform receives the connection request of the subordinate link sent from the superior platform, the connection between the subordinate link and the superior platform is immediately established.
4.3.1.4.2 Hold process of subordinate link
Hold process of the subordinate link shall comply with the following requirements:
a) After successful connection of the subordinate link, in case of any application service data package transmission between the superior platform and the inferior platform, hold data package of the subordinate link needs not be sent; otherwise, the inferior platform shall send one hold request data package of the subordinate link to the superior platform every 1min so as to keep connection of the subordinate link;
b) If there is without application data package transmission between the inferior platform and the superior platform, and the inferior platform fails to receive the hold acknowledge data package of the subordinate link sent from the superior platform for consecutive 3min, it shall be considered that its connection with the superior platform have been lost and it will initiate to interrupt the subordinate link of data transmission;
c) If there is without application data package transmission between the superior platform and the inferior platform, and the superior platform fails to receive the hold acknowledge data package of the subordinate link sent from the inferior platform for consecutive 3min, it shall be considered that its connection with the inferior platform have been lost and it will initiate to interrupt the subordinate link of data transmission.
4.3.1.5 Log-out request of main link from superior platform to inferior platform
When the inferior platform initiates to exit, it will firstly send a log-out request of the subordinate link. After the inferior platform receives it, it will return to the link, log out the response and record it in the log. Then the superior platform will interrupt the subordinate link.
4.3.1.6 Superior platform's initiative closure of the main-subordinate link connection with the inferior platform
With the superior platform as the server, in case of any abnormal connection of the main link, the main link initiates to send a message to close the main-subordinate link connection to the superior platform and records it in the log, and then the superior platform interrupts the connection between the main and subordinate links.
4.3.2 Information statistics service process
The reception of notification on the amount of the positioning information shall comply with the following requirements:
a) The superior platform will receive the amount of vehicle's positioning information, periodically conduct statistics on it and periodically notify the statistical data to the inferior platform;
b) The superior and inferior platforms shall receive vehicle's positioning information and check its amount according to the data.
4.3.3 Exchange service process of the vehicle's dynamic information
4.3.3.1 Uploading of the vehicle's registration information from inferior platform to superior platform
The inferior platform shall upload the vehicle's registration information after it receives the vehicle's terminal authentication information each time.
4.3.3.2 Real-time uploading of the vehicle's positioning information from inferior platform to superior platform
The inferior platform shall upload the vehicle's registration information in real time after it receives the vehicle's positioning information.
4.3.3.3 Real-time exchange of the vehicle's positioning information from superior platform to inferior platform
Before the superior platform exchanges the vehicle's positioning information with the inferior platform, it sends the request to start the exchange of the vehicle's positioning information. After the inferior platform receives and responds to the request, the superior platform starts the real-time exchange of vehicle's positioning information with the inferior platform.
The request to start exchange of the vehicle's positioning information from the superior platform to the inferior platform shall include the following conditions:
a) When the superior platform analyzes the geographic area of non-attribution area with any vehicle entry, it shall inform the inferior platform of the non-attribution area of the entry.
b) When the superior platform manually designates the vehicle's positioning information to be exchanged to the designated inferior platform, it shall notify the inferior platform that the vehicle's positioning information shall be exchanged to the superior platform;
c) When the superior platform monitors and manages certain vehicle in emergency state, it shall send the uploaded vehicle's positioning information to the inferior platform to which the vehicle is attributed and send the command to the inferior platform.
When the superior platform ends up sending vehicle's positioning information to the inferior platform, the exchange shall comply with the following requirements:
a) When the vehicle entering the geographic area of the non-attribution area leaves the geographic area, the superior platform shall send the request to end up the exchange of vehicle's positioning information to the inferior platform and notify it to stop the data exchange;
b) When the superior platform itself cancels exchanging of the designated vehicle's positioning information to the designated inferior platform, it shall send the request to end up the exchange of the vehicle's positioning information to the inferior platform and cancel the exchange;
c) When the superior platform completes the vehicle monitoring and management in emergency, it shall send the request to end up the exchange of the vehicle's positioning information to the inferior platform to which the vehicle is attributed and no longer send the vehicle's positioning information to the above inferior platform.
4.3.3.4 Supplementary report of the vehicle's positioning information from inferior platform to superior platform
If the main and subordinate communication links between the superior and inferior platforms are interrupted, the vehicle's positioning information during the interruption shall be supplemented after the recovery of the communication between the main and subordinate links.
The supplementary report process of the vehicle's positioning information from the inferior platform to the superior platform shall comply with the following requirements:
a) When the inferior platform link is interrupted with the superior platform link during the uploading of the positioning data to the superior platform, the interruption time shall be recorded (if without interaction of application service data package between the two platforms, the receipt time of the hold acknowledge data package of the last subordinate link from the superior platform shall prevail; otherwise, the last receipt time of complete interaction of application service data package with the superior platform prevails);
b) After the inferior platform log in again, vehicle's positioning information received during the interruption is automatically sent to the superior platform according to the interruption time.
4.3.3.5 Supplementary sending of the vehicle's positioning information from superior platform to inferior platform
If the main and subordinate communication links between the superior and inferior platforms are interrupted, the vehicle's positioning information during the interruption shall be supplemented to send after the recovery of the communication between the main and subordinate links.
The supplementary sending process of the vehicle's positioning information from the superior platform to the inferior platform shall comply with the following requirements:
a) When the inferior platform link is interrupted with the superior platform link during the exchanging of the data to the superior platform, the interruption time shall be recorded (if without interaction of application service data package between the two platforms, the receipt time of the hold acknowledge data package of the last subordinate link from the superior platform shall prevail; otherwise, the last receipt time of complete interaction of application service data package with the superior platform prevails);
b) After the main and subordinate communication links are established again, the inferior platform sends the request for supplementary sending of the vehicle's positioning information according to the recorded platform interruption time;
c) After the superior platform receives and responses to the request for supplementary sending of the vehicle's positioning information, it carries out the supplementary sending process of the vehicle's positioning information according to the requirements of Article 4.5.3.2.3.
Foreword I
1 Scope
2 Normative References
3 Terms, Definitions and Abbreviations
4 Technical Requirements
5 Constant Definition
道路运输车辆卫星定位系统
平台数据交换
1 范围
本标准规定了道路运输车辆卫星定位系统监管/监控平台之间数据交换的技术要求,包括通信方式、安全认证、功能实现流程、协议消息格式和数据实体格式等内容。
本标准适用于道路运输车辆卫星定位系统监管/监控平台之间的数据交换。
2 规范性引用文件
下列文件对于本文件的应用是必不可少的。凡是注日期的引用文件,仅注日期的版本适用于本文件。凡是不注日期的引用文件,其最新版本(包括所有的修改单)适用于本文件。
GB/T 2260 中华人民共和国行政区划代码
GB/T 19056 汽车行驶记录仪
JT/T 415—2006 道路运输电子政务平台 编目编码规则
JT/T 808—2011 道路运输车辆卫星定位系统终端通讯协议及数据格式
3 术语、定义和缩略语
3.1 术语和定义
下列术语和定义适用于本文件。
3.1.1
车牌号 number plate
公安交通管理部门颁发的机动车车牌号码,不包括车辆牌照的颜色。例:京AJ3030。
3.1.2
上级平台 superior platform
提供其他平台接入的政府监管平台。
3.1.3
下级平台 inferior platform
企业监控平台、政府监管平台中接入上级平台的监管/监控平台。
3.1.4
车辆定位信息 vehicle's positioning information
由车载终端从导航卫星接收并发送到监控中心的,与该车辆当前位置有关的信息以及车辆报警状态信息的统称,如经纬度、速度、方向等。
3.1.5
车辆动态信息 vehicle's dynamic information
车辆在运营行驶过程中产生的相关信息,包括车辆定位信息、运行状态、人员、货物、线路等方面的信息。
3.1.6
车辆静态信息 vehicle's static information
车辆从事道路运输经营活动相关的、在一定时期内固定不变的行政管理和经营管理信息,包括营运车辆、业户、从业人员、运管机构、营运线路等信息。
3.1.7
主链路 main links
在上下级平台之间采用两条基于TCP协议的虚拟通道,其中,因下级平台作为TCP客户端连接上级平台的TCP服务端成功后而构建的上行单向虚拟通道。
3.1.8
从链路 subordinate links
在上下级平台之间采用两条基于TCP协议的虚拟通道,其中,因上级平台作为TCP客户端连接下级平台的TCP服务端成功后而构建的下行单向虚拟通道。
3.2 缩略语
下列缩略语适用于本文件。
CCITT——国际电报电话咨询委员会
CRC——循环冗余校验(Cyclic Redundancy Check)
CRC16-CCITT——CCITT标准的CRC-16检验码
UTC——协调世界时(Universal Time Coordinated)
4 技术要求
4.1 通信方式
上级平台与下级平台之间采用双链路通信方式,具体要求如下:
a) 上下级平台间通信方式采用TCP协议长连接方式;
b) 上级平台提供服务的IP地址、端口号以及用户名、密码等信息,供下级平台接入;
c) 下级平台向上级平台发起建立主链路连接请求,主链路成功建立后,上级平台向下级平台发起从链路连接请求;
d) 下级平台可以通过主链路向上级平台发送数据,上级平台可以通过从链路向下级平台发送数据;
e) 主从链路中其中一条链路中断时,所有的数据都通过另外一条链路进行数据传输,断开的链路恢复时,继续按照标准的约定继续从两条链路进行数据传输;
f) 通信链路通过其中的TCP客户端方发送链路保持数据包检测链路连接状态,实现链路的可靠连接。
4.2 安全认证
根据4.1中提出的通信方式,上级平台对下级平台的接入请求进行安全验证,确保建立可靠、可信的通信链路,下级平台无需对上级平台的接入请求进行安全验证。
上级平台对下级平台安全验证流程应遵循以下规定:
a) 上级平台为下级平台分配相应的接入码、接入用户名、密码以及数据加解密相关参数;
b) 下级平台与上级平台连接时,发送“登录请求”消息,上级平台收到下级平台连接请求后,首先验证请求的IP地址,如果请求IP地址与约定的接入IP地址不一致,则返回验证失败结果;其次,上级平台对下级平台的接入码、用户名以及密码进行验证,根据验证的结果向下级平台返回相应的结果值;
c) 上下级平台间的数据传输可采用加密模式传输,实现对传输数据的即时加密,具体加密算法按照4.4.7中的规定。
4.3 功能实现流程
4.3.1 链路管理类流程
4.3.1.1 下级平台向上级平台请求登录和主链路保持
4.3.1.1.1 下级平台主链路登录流程
下级平台主链路登录流程应遵循以下规定:
a) 由下级平台向上级平台发送登录请求。登录请求数据包内容包括平台接入码、登录用户名、密码、建立从链路所需的TCP服务IP地址及端口号;
b) 上级平台对下级平台的登录请求进行安全认证,同时在日志中记录登录情况,如果认证成功,应答登录成功,否则应答登录失败及给出失败原因码;
c) 下级平台登录上级平台成功后,上级平台根据下级平台登录时提供的T CP服务IP地址、端口号请求建立从链路连接;
d) 从链路建立成功后,后续下行数据包可由从链路进行发送。
4.3.1.1.2 主链路保持流程
主链路保持流程应遵循以下规定:
a) 下级平台登录成功后,在与上级平台之间如果有应用业务数据包往来的情况下,不需要发送主链路保持数据包;否则,下级平台应每1min发送一个主链路保持请求数据包到上级平台,以保持链路连接;
b) 在没有应用数据包往来的情况下,上级平台连续3min未收到下级平台发送的主链路保持请求数据包,则认为与下级平台的连接中断,将主动断开数据传输主链路;
c) 在没有应用数据包往来的情况下,下级平台连续3min未收到上级平台发送的从链路保持应答数据包,则认为与上级平台的连接中断,将主动断开数据传输从链路。
4.3.1.2 下级平台向上级平台请求主链路注销
当下级平台主动退出时,首先发送主链路注销请求,上级平台收到注销请求后返回链路注销应答并记录日志,上级平台即断开该主链路。
4.3.1.3 下级平台主动关闭与上级平台之间的主从链路连接
当下级平台作为服务端发现从链路连接异常时,通过从链路主动向上级平台发送关闭主从链路连接的消息,并记录到日志,下级平台即中断主从链路连接。
4.3.1.4 上级平台向下级平台请求从链路连接和链路保持
4.3.1.4.1 上级平台从链路连接请求流程
上级平台从链路连接请求流程应遵循以下规定:
a) 下级平台成功登录上级平台并建立主链路后,上级平台通过获取来自下级平台提供的TCP服务IP地址和端口号等信息,向下级平台发起从链路连接请求;
b) 下级平台收到上级平台发送的从链路连接请求后,立即建立与上级平台之间的从链路连接关系。
4.3.1.4.2 从链路保持流程
从链路保持流程应遵循以下规定:
a) 从链路连接成功后,如果上级平台与下级平台之间有应用业务数据包往来的情况下,不需要发送从链路保持数据包;否则,上级平台应每1min发送一个从链路保持请求数据包到下级平台以保持从链路连接;
b) 如果与上级平台之间没有应用业务数据包往来的情况下,下级平台连续3min未收到上级平台发送的从链路保持请求数据包,则认为上级平台已经失去连接,将主动断开数据传输从链路;
c) 如果与下级平台之间没有应用业务数据包往来的情况下,上级平台连续3 min未收到下级平台发送的从链路保持应答数据包,则认为下级平台已经失去连接,将主动断开数据传输从链路。
4.3.1.5 上级平台向下级平台请求从链路注销
当上级平台主动退出时,首先发送从链路注销请求,下级平台收到注销请求后返回链路注销应答并记录日志,下级平台即断开该从链路。
4.3.1.6 上级平台主动关闭与下级平台之间的主从链路连接
当上级平台作为服务端发现主链路连接异常时,通过主链路主动向下级平台发送关闭主从链路连接的消息,并记录到日志,上级平台即中断主从链路连接。
4.3.2 信息统计业务类流程
接收定位信息数量通知应遵循以下规定:
a) 上级平台将收到来自下级平台的车辆定位信息数量定期予以统计,并定期给下级平台发送通知该统计数据;
b) 上下级平台根据此数据进行车辆定位信息接收与发送数量核对。
4.3.3 车辆动态信息交换业务类流程
4.3.3.1 下级平台向上级平台上传车辆注册信息
下级平台每次收到车载终端鉴权信息后,应向上级平台上传该车辆注册信息。
4.3.3.2 下级平台向上级平台实时上传车辆定位信息
下级平台在收到车辆定位信息后,应实时向上级平台上传该车辆定位信息。
4.3.3.3 上级平台向下级平台实时交换车辆定位信息
上级平台在向下级平台交换车辆定位信息前,向下级平台发送启动车辆定位信息交换请求消息。下级平台在收到该消息并应答后,上级平台开始向下级平台实时交换车辆定位信息。
上级平台向下级平台发出启动车辆定位信息交换请求消息包括以下三种情况:
a) 当上级平台分析有车辆进入非归属地区地理区域时,应向该非归属地区的下级平台下发该命令通知下级平台,有车辆进入该地理区域;
b) 当上级平台人工指定车辆交换到指定下级平台时,应向该指定下级平台下发该命令通知下级平台,指定车辆定位信息应交换到该平台;
c) 当上级平台在应急状态监控某车辆时,应将该车辆上传车辆定位信息下发给该车辆归属下级平台,并向该车辆归属下级平台下发该命令。
上级平台结束向下级平台发送车辆定位信息交换应遵循以下规定:
a) 当进入非归属地区地理区域的车辆离开该地理区域时,上级平台向下级平台发送结束车辆定位信息交换请求消息,通知下级平台将停止车辆定位信息数据交换;
b) 当上级平台人工取消指定车辆交换到指定下级平台时,应向该指定下级平台发送结束车辆定位信息交换请求消息,并取消该车辆定位信息交换到该平台;
c) 当上级平台结束应急状态完成某车辆监控时,应向该车辆归属的下级平台发送结束车辆定位信息交换请求消息,并不再向该车辆归属的下级平台发送车辆定位信息。
4.3.3.4 下级平台向上级平台补报车辆定位信息
如双方平台之间主从通信链路中断,需在双方主从链路通信恢复后补发链路中断期间的车辆定位信息。
下级平台向上级平台补报车辆定位信息流程应遵循以下规定:
a) 下级平台上传定位数据过程中与上级平台链路中断时,应记录断开时间(在双方没有应用业务数据包交互的情况下,以接收到上级平台最后一条从链路保持应答数据包的时间为准;否则,以最后一次与上级平台进行完整应用业务数据包交互的时间为准);
b) 下级平台重新登录后,根据断开时间自动向上级平台发送中断时间段内收到的车辆定位信息。
4.3.3.5 上级平台向下级平台补发车辆定位信息
如双方平台之间主从通信链路中断,需在双方主从链路通信恢复后补发链路中断期间的车辆定位信息。
上级平台向下级平台补发车辆定位信息流程应遵循以下规定:
a) 下级平台在交换数据过程中与上级平台链路中断时,应记录断开时间(在双方没有应用业务数据包交互的情况下,以接收到上级平台最后一条从链路保持应答数据包的时间为准;否则,以最后一次与上级平台进行完整应用业务数据包交互的时间为准);
b) 在主从通信链路再次建立后,下级平台根据记录的平台断开时间,向上级平台发送补发车辆定位信息请求;
c) 上级平台在收到下级平台的补发车辆定位信息请求后进行应答,并按照4.5.3.2.3的约定进行车辆定位信息的补发流程。
4.3.3.6 交换指定车辆定位信息
由于跨域车辆离开该跨域地区地理地域,上级平台即终止向下级平台的车辆f定位信息交换流程,若下级平台仍需要获得驶出本地理地域的指定车辆的实时定位信息,应按照交换指定车辆定位信息流程操作。
交换指定车辆定位信息流程应遵循以下规定:
a) 下级平台向上级平台发送“申请交换指定车辆定位信息”请求消息,上级平台对下级平台“申请交换指定车辆定位信息”请求消息进行应答后,开始实时向下级平台发送车辆定位信息;
b) 下级平台需要停止指定车辆定位信息的交换时,发送“取消申请交换指定车辆定位信息”请求消息,上级平台收到该消息后进行应答,并终止指定车辆定位信息的发送。
4.3.3.7 上报驾驶员身份识别信息
上级平台通过向下级平台发送某车辆上报驾驶员身份识别信息的请求,下级平台接收到请求后,应将指定车辆的当前营运驾驶员身份识别信息上报给上级平台。上级平台接收到驾驶员身份识别消息后,进行入库记载并给下级平台应答。
4.3.3.8 上报车辆电子运单
上级平台通过向下级平台发送上报车辆电子运单的请求,下级平台接收到请求后,应将指定车辆当前电子运单信息上报给上级平台,上级平台接收到电子运单信息后.进行入库记载并给下级平台应答。
4.3.4 平台间信息交互业务类流程
4.3.4.1 平台查岗
上级平台对于接入的下级平台进行平台值守情况查询,确保下级平台时刻处于人员值守状态。实现流程应遵循以下规定:
a) 上级平台不定期对接入平台下发相关常识性问题;
b) 下级平台接到信息后,通过监控客户端实时提醒在线值班人员;
c) 在线值班人员在查看信息后,根据信息要求回复相应内容。
4.3.4.2 下发平台间报文
上级平台不定期向下级平台下发报文信息,下级平台收到报文信息后向上级平台应答接收成功标识。
4.3.5 车辆报警信息交互业务类流程
营运车辆在运行过程中,产生的相关报警处理流程应遵循以下规定:
a) 车辆车载终端设备或下级平台产生报警信息后,即刻上报上级平台;
b) 下级平台对报警信息应及时做出处理,并将处理报警信息结果上报上级平台;
c) 上级平台在收到下级平台的报警信息后,等待下级平台上报相应的报警处理结果信息;若在一定时间间隔内未收到相应报警处理结果信息,则向下级平台下发报警督办请求;
d) 上级平台可根据车辆定位数据分析产生报警预警信息,或者将跨域车辆的报警信息,即刻下发到相关下级平台,下级平台不必处理报警预警信息和转发跨域车辆报警信息。
4.3.6 车辆监管业务类流程
4.3.6.1 单向监听
上级平台通过对下级平台下发单向监听请求,实现对指定车辆的监听。实现流程应遵循以下规定:
a) 下级平台在接收到上级平台的单向监听请求消息后,即刻对指定的车辆下发监听命令;
b) 车辆车载终端设备收到监听信息后,即刻与指定的监听电话号码进行连接,下级平台在收到车载终端反馈的连接结果后,将连接结果上报给上级平台。
4.3.6.2 车辆拍照
上级平台向下级平台下发拍照请求,下级平台转发上级平台发送的拍照请求参数到指定车辆的车载终端设备,由车载终端设备完成拍照并实现上传到下级平台,下级平台将收到的图片信息上报给上级平台。
4.3.6.3 下发车辆报文
上级平台向下级平台发送“下发车辆报文”请求,由下级平台向指定车辆的车载终端设备下发报文信息,信息发送状态返回给上级平台。
4.3.6.4 上报车辆行驶记录信息
上级平台向下级平台下发读取指定车辆行驶记录信息的请求,下级平台接收到请求后向相应的车辆下发行驶记录信息上报的指令,下级平台在收到车辆车载终端设备返回的行驶记录信息后,立即上报给上级平台。
4.3.6.5 车辆应急接入
在应急情况下,上级平台需要及时监控某车辆时,上级平台向下级平台下发车辆应急接人监管平台命令,下级平台转发上级平台发送的命令到指定车辆的车载终端,并将车载终端返回的信息上传到上级平台。车载终端按照命令要求向接人的政府监管平台申请鉴权,接人该监管平台并断开与原监控平台的连接。此时,被接入的政府监管平台按照监控平台的要求实现对车辆的监控。应急状态结束后,该政府监管平台应按照JT/T 808—2011中8.11的要求,直接向车载终端发送终端控制命令,将车载终端的控制权转交给车辆原监控平台。
4.3.7 车辆静态信息交换业务类流程
上级平台向下级平台请求补报车辆静态信息,流程应遵循以下规定:
a) 下级平台向上级平台进行车辆定位信息上报时,发现车辆的静态信息缺失后,即刻向下级平台发送补报车辆静态信息请求;
b) 下级平台在收到请求后,即刻将相应车辆的静态信息数据补报给上级平台;
c) 上级平台接收到车辆的静态信息数据后,进行入库记载并给下级平台应答。
4.4 协议消息格式
4.4.1 消息说明
每条信息包含数据头和数据体两部分。数据流遵循大端(big-endian,即高字节在前,低字节在后)排序方式的网络字节顺序,未使用的数据位皆填0x00。
4.4.2 数据类型
基本数据类型规定见表1。
表1 基本数据类型
time_t 64位无符号整型,8字节
BYTE 单字节
BYTES 多字节
Octet String 定长字符串,位数不足时,右补十六进制0x00,汉字采用CBK编码
uint16_t 16位无符号整型,2字节
uint32_t 32位无符号整型,4字节
4.4.3 数据结构
在两个平台之间进行数据交换时,采用的数据结构规定见表2。
表2 数据结构
Head Flag 头标识
Message Header 数据头
Message Body 数据体
CRC Code CRC校验码
End Flag 尾标识
4.4.4 头标识
头标识为字符0x5b。
4.4.5 尾标识
尾标识为字符0x5d。
数据内容进行转义判断,转义规则如下:
a) 若数据内容中有出现字符0x5b的,需替换为字符0x5a紧跟字符0x01;
b) 若数据内容中有出现字符0x5a的,需替换为字符0x5a紧跟字符0x02;
c) 若数据内容中有出现字符0x5d的,需替换为字符0x5e紧跟字符0x01;
d) 若数据内容中有出现字符0x5e的,需替换为字符0x5e紧跟字符0x02。
4.4.6 数据头
在两个平台之间进行数据交换时,采用数据结构的数据头部分规定见表3。
表3 数据头格式
字段 类型 描述及要求
MSC_LENGTH uint32_t 数据长度(包括头标识、数据头、数据体和尾标识)
MSG_SN uint32_t 报文序列号a
MSG_ID uint16_t 业务数据类型
MSG_GNSSCENTERID uint32_t 下级平台接入码,上级平台给下级平台分配的唯一标识号
VERSION_FLAG BYTES 协议版本号标识,上下级平台之间采用的标准协议版本编号;长度为三个字节来表示:0x01 0x02 0x0F表示的版本号是V1.2.15,依此类推
ENCRYPT_FLAG BYTE 报文加密标识位b:0表示报文不加密,1表示报文加密
ENCRYPT_KEY uint32_t 数据加密的密钥,长度为四个字节
注:
a 占用四个字节,为发送信息的序列号,用于接收方检测是否有信息的丢失。上级平台和下级平台按自己发送数据包的个数计数,互不影响。程序开始运行时等于零,发送第一帧数据时开始计数,到最大数后自动归零。
b 用来区分报文是否进行加密,如果标识为1,则说明对后续相应业务的数据体采用ENCRYPT_KEY对应的密钥进行加密处理。如果标识为0,则说明不进行加密处理。
4.4.7 数据加密
4.4.7.1 数据密钥格式
数据传输中所采用的数据密钥格式规定见表4。
表4 数据密钥格式
字 段 类 型 描述及要求
ENCRYPT_KEY uint32_t 数据加密的密钥,长度为四个字节
4.4.7.2 数据加密要求
数据加密具体要求如下:
a) 加密只针对报文的数据体部分进行。密钥通过网络进行传输,不同的报文可采用不同的密钥进行加密;
b) 在数据包发送之前,将数据包内容与伪随机序列按字节进行异或运算;
c) 加密算法如下:用N模伪随机序列发生器产生伪随机字节序列。将待传输的数据与伪随机码按字节进行异或运算;
d) 不同的上下级平台之间,加密的算法是一致的,但是针对M1、IA1、IC1的不同。数据先经过加密而后解密。
4.4.7.3 加密算法
加密算法见表5。
表5 加密算法
Const unsigned uint32_t M1 = A;
Const unsigned uint32_t IA1 = B;
Const unsigned uint32_t IC1 = C;
Void encrypt( uint32_t key , unsigned char * buffer, uint32_t size )
{
uint32_t idx = 0;
if( key = = 0 )
key = 1;
while(idx < size )
{
key = IAl * ( key % M1 ) + IC1;
buffer [ idx + + ]^ = ( unsigned char) (( key > > 20) &0xFF) ;
}
}
4.4.8 数据校验
从数据头到校验码前的CRC16_CClrIT的校验值,遵循大端排序方式的规定.,
数据CRC校验码格式规定见表6。
表6 校验码格式
字 段 字节数 类 型 描述及要求
CRC CODE 2 uint16_t 数据CRC校验码
4.5 数据实体格式
4.5.1链路管理业务类
4.5.1.1 主链路登录请求消息
链路类型:主链路。
消息方向:下级平台往上级平台。
业务数据类型标识:UP_CONNECT_REQ。
描述:下级平台向上级平台发送用户名和密码等登录信息。
下级平台登录请求消息数据体规定见表7。
表7 主链路登录请求消息数据体
字段名 字节数 类型 描述及要求
USERID 4 uint32_t 用户名
PASSWORD 8 Octet String 密码
DOWN_LINK_IP 32 Octet String 下级平台提供对应的从链路服务端IP地址
DOWN_LINK_PORT 2 uint16_t 下级平台提供对应的从链路服务端口号
4.5.1.2 主链路登录应答消息
链路类型:主链路。
消息方向:上级平台往下级平台。
业务数据类型标识:UP_CONNECT_RSP。
描述:上级平台对下级平台登录请求信息进行安全验证后,返回相应的验证结果。
主链路登录应答消息数据体规定见表8。