Disclosure of Invention
The technical problem to be solved by the invention is to provide a method for timely and reliably transmitting MSD (MSD over RTCP) through an RTCP protocol, which can accurately realize timeout retransmission.
In order to solve the technical problems, the invention discloses a method for reporting MSD through RTCP, which comprises the following steps. Step S1, adding 6 seed types, namely RTCP synchronous packets, into real-time transmission control protocol (RTCP) packets of an APP type, wherein the RTCP synchronous packets are used for handshake of an IVS of a vehicle-mounted system to a Public Safety Answering Point (PSAP), and a local time field is arranged for recording the current time point of the IVS when the IVS sends the RTCP synchronous packets. The system comprises a PSAP, an RTCP acknowledgement packet, a remote time field and a delay time field, wherein the PSAP is used for sending a response to the IVS after receiving the RTCP synchronous packet, the remote time field is used for recording the content of a local time field in the RTCP synchronous packet received by the PSAP, and the delay time field is used for recording the time delayed by the PSAP between the time of receiving the RTCP synchronous packet and the time of sending the RTCP acknowledgement packet. The RTCP notification reception confirmation packet is used for notifying the PSAP of reception after the IVS receives the RTCP confirmation packet, and a round trip time field is arranged in the RTCP notification reception confirmation packet and is used for recording the calculated round trip time of the RTCP synchronization packet and the RTCP confirmation packet transmitted in the network after the IVS receives the RTCP confirmation packet. -an MSD request packet for the PSAP to request the IVS to send the minimum data set MSD. The RTCP MSD data packet is used for the IVS to send MSD data to the PSAP, wherein the MSD data field is set for recording the MSD data sent by the IVS to the PSAP. -RTCP tells receipt of the MSD packet for the PSAP to tell the IVS that it has received after receipt of the MSD data. Step S2, after the emergency call eCall is established, the IVS sends an RTCP synchronous packet to the PSAP, the PSAP replies an RTCP confirmation packet to the IVS after receiving the RTCP synchronous packet, the IVS calculates round trip time RTT of the RTCP synchronous packet and the RTCP confirmation packet transmitted in the network after receiving the RTCP confirmation packet, and replies an RTCP notification received confirmation packet carrying the RTT to the PSAP. Step S31, in the eCall process, the IVS sends an RTCP MSD data packet to the PSAP, wherein the RTCP MSD data packet carries MSD data, if the PSAP successfully receives the RTCP MSD data packet, the IVS replies an RTCP notification to the IVS that the MSD data packet is received, when the IVS still does not receive the RTCP notification to the IVS after the retransmission time, the IVS retransmits the RTCP MSD data packet to the PSAP, wherein the RTCP MSD data packet carries MSD data, and the retransmission time is in direct proportion to RTT.
Further, the local time field, the remote time field, the delay time field or the absolute time of the record or the relative time of the record, wherein the lengths of the local time field, the remote time field and the delay time field are all 2 bytes, and if the time required to be recorded is represented by binary system and exceeds 2 bytes, only the lower 16 bits are taken to be recorded in the corresponding fields.
Further, in the step S2, the method of calculating RTT by the IVS is rtt=time_cur-time_last-time_delay, time_cur represents the current time, time_last represents the content of the remote time field in the RTCP acknowledgement packet, that is, the time when the IVS last transmitted the RTCP synchronization packet, and time_delay represents the content of the delay time field in the RTCP acknowledgement packet.
Further, in the step S3, if the maximum retransmission number is reached, the IVS does not receive the RTCP sent by the PSAP to inform the received MSD packet, and then the IVS tries to retransmit the RTCP MSD packet once every fixed time until the IVS receives the RTCP sent by the PSAP to inform the received MSD packet, where the fixed time is far longer than the retransmission time.
Further, in the step S31, if the IVS receives the MSD request packet sent from the PSAP, the IVS stops attempting to retransmit the RTCP MSD packet every fixed time, and immediately responds to the MSD request packet to send the RTCP MSD packet to the PSAP.
Further, in the step S31, if the MSD data of the IVS is updated, the IVS stops attempting to retransmit the RTCP MSD packet every fixed time.
Alternatively, step S31 is replaced with step S32. Step S32, in the eCall process, the PSAP actively transmits an MSD request packet to the IVS to request for obtaining MSD data, the IVS transmits an RTCP MSD data packet to the PSAP after receiving the MSD request packet, wherein the MSD data packet carries the MSD data, if the PSAP successfully receives the RTCP MSD data packet, the PSAP replies the RTCP to the IVS to inform that the MSD data packet is received, when the PSAP still does not receive the RTCP MSD data packet after the retransmission time, the PSAP retransmits the MSD request packet to the IVS to request for obtaining the MSD data, and the retransmission time is in direct proportion to RTT.
Further, in the step S32, if the maximum retransmission times are reached, the PSAP still does not receive the RTCP MSD packet sent by the IVS, and then the PSAP tries to retransmit the MSD request packet every fixed time until the PSAP receives the RTCP MSD packet sent by the IVS, where the fixed time is far longer than the retransmission time.
The invention also discloses a device for reporting the MSD through the RTCP, which comprises an added subtype unit, a synchronous handshake unit and a push data unit. The adding subtype unit is used for adding 6 seed types in real-time transmission control protocol (RTCP) packets of an APP type, and the added seed types are respectively an RTCP synchronous packet used for handshake of an IVS of a vehicle-mounted system to a Public Safety Answering Point (PSAP), an RTCP acknowledgement packet used for sending a response to the IVS after the PSAP receives the RTCP synchronous packet, an RTCP notification receipt acknowledgement packet used for sending the RTCP acknowledgement packet to the PSAP after the IVS receives the RTCP acknowledgement packet, an MSD request packet used for the PSAP to request the IVS to send a minimum data set (MSD), an RTCP MSD data packet used for the IVS to send MSD data to the PSAP, and an RTCP notification received MSD data packet used for sending acknowledgement information to the IVS after the PSAP receives the MSD data. And a local time field is arranged in the RTCP synchronous packet and is used for recording the current time point of the IVS when the IVS sends the RTCP synchronous packet. The RTCP acknowledgement packet is provided with a remote time field and a delay time field, wherein the remote time field is used for recording the content of a local time field in an RTCP synchronous packet received by the PSAP, and the delay time field is used for recording the time delayed between the time when the PSAP receives the RTCP synchronous packet and the time when the RTCP acknowledgement packet is sent. The RTCP notification receiving confirmation packet is provided with a round trip time field which is used for recording the calculated round trip time of the RTCP synchronous packet and the RTCP confirmation packet in the network transmission after the RTCP confirmation packet is received by the IVS. And the RTCP MSD data packet is provided with an MSD data field used for recording MSD data sent by the IVS to the PSAP. The synchronization handshake unit is used for sending an RTCP synchronization packet to the PSAP by the IVS after the emergency call eCall is established, replying an RTCP confirmation packet to the IVS after the RTCP synchronization packet is received by the PSAP, calculating round trip time RTT of the RTCP synchronization packet and the RTCP confirmation packet transmitted by the network after the RTCP confirmation packet is received by the IVS, and replying an RTCP notification received confirmation packet carrying the RTT to the PSAP. The push data unit is used for sending an RTCP MSD data packet to the PSAP by the IVS in the eCall process, wherein the RTCP MSD data packet carries MSD data, replying an RTCP to the IVS to inform that the MSD data packet is received if the RTCP MSD data packet is successfully received by the PSAP, informing that the MSD data packet is received when the RTCP is not received by the IVS after the retransmission time, and retransmitting the RTCP MSD data packet to the PSAP by the IVS, wherein the RTCP MSD data packet carries MSD data, and the retransmission time is in direct proportion to RTT.
Alternatively, the push data unit is replaced with the pull data unit. The pulling data unit is used for actively sending an MSD request packet to the IVS by the PSAP in the eCall process to request to acquire MSD data, sending an RTCP MSD data packet to the PSAP by the IVS after the MSD request packet is received, wherein the MSD data packet carries the MSD data, replying an RTCP to the IVS to inform that the MSD data packet is received if the RTCP MSD data packet is successfully received by the PSAP, retransmitting the MSD request packet to the IVS by the PSAP when the RTCP MSD data packet is not received by the PSAP after retransmission time, and requesting to acquire the MSD data by the PSAP, wherein the retransmission time is in direct proportion to RTT.
The invention has the technical effects that (1) MSD data is carried by RTCP packets for sending, and the RTCP packets have no too much control data except MSD data and are light for receiving and sending. (2) The sending and receiving of RTCP packets does not affect RTP (Real timeTransport Protocol, real-time transport protocol) packets and does not affect voice transmission. (3) The reliability of the RTCP packet in network transmission is improved, and the sender can judge whether the MSD data is received by the receiver through the RTCP informing the MSD data packet. And (4) the packet loss retransmission efficiency is improved. The round trip time of the RTCP packet in the network is calculated through the handshake of RTCP (step S2), and the retransmission time is set in proportion to the round trip time, so that the timeout retransmission is efficiently performed.
Detailed Description
Referring to fig. 1, a method for reporting MSD via RTCP according to an embodiment of the present invention includes the following steps.
Step S1, adding 6 seed types to the RTCP packet of the APP type (type=204), wherein the seed types are respectively an 'RTCP synchronous packet' (RTCP SYNC PACKET) used for the IVS to handshake to the PSAP, an 'RTCP acknowledgement packet' (RTCPconfirm packet) used for the PSAP to send a response to the IVS after receiving the RTCP synchronous packet, an 'RTCP notification receipt acknowledgement packet' (RTCP ack for confirm packet) used for the IVS to send the MSD after receiving the RTCP acknowledgement packet, an 'MSD request packet' (MSD request packet) used for the PSAP to request the IVS to send the MSD, an 'RTCP MSD data packet' (RTCP MSD DATA PACKET) used for the IVS to send the MSD data to the PSAP, and an 'RTCP notification MSD data packet' (RTCP ack for MSDDATA PACKET) used for the PSAP to send acknowledgement information to the IVS after receiving the MSD data. As an example, the subtype (subtype) fields of these 6 subtype RTCP packets have values of 0, 1, 2,3, 4, 5, respectively. These 6 sub-types of RTCP packets (or RTCP data frames) are essentially extensions within the framework of the RFC 3550 standard.
Referring to FIG. 2, an exemplary data structure of the newly added RTCP synchronization packet of the present invention is shown. The first row represents bytes (type) and the second row represents bits (bit). The subtype field in the third row has a value of, for example, 0, indicating that the RTCP packet is an RTCP sync packet. Some fields are defined in the RFC3550 standard, and the present invention is consistent with the RFC3550 standard and will not be described in detail. The invention adds a local time field in the RTCP synchronous packet to record the current time point of the IVS when the IVS sends the RTCP synchronous packet. The local time field may record absolute time, or may record relative time (e.g., time the device is powered on to the current time). Preferably, the local time field is 2 bytes in length, i.e., 16 bits, and ranges from 0 to 65535 in milliseconds. The field length of the current time recorded in the common network protocol is usually 4 bytes, and the local time field of 2 bytes is more space-saving. Typically, the current time of the IVS exceeds this range of values after being represented in binary form, and only the lower 16 bits (bits) of the binary form of the current time of the IVS are recorded in the local time field when the RTCP sync packet is constructed.
Referring to FIG. 3, an exemplary data structure of the newly added RTCP acknowledgement packet of the present invention is shown. The first row represents bytes and the second row represents bits. The subtype field in the third row has a value of, for example, 1, indicating that the RTCP packet is an RTCP acknowledgement packet. Some fields are defined in the RFC 3550 standard, and the present invention is consistent with the RFC 3550 standard and will not be described in detail. The present invention adds a remote time (remote time) field and a delay time (DELAY TIME) field to the RTCP acknowledgement packet. The remote time field is used to record the contents of the local time field within the RTCP sync packet received by the PSAP. The delay time field is used to record the time delayed by the PSAP between the receipt of the RTCP sync packet and the transmission of the RTCP acknowledgement packet. Preferably, the length of the remote time field is 2 bytes and the length of the delay time field is 2 bytes, all in milliseconds. The field length of the current time recorded in the common network protocol is usually 4 bytes, and the remote time field and the delay time field of 2 bytes are more space-saving.
Referring to FIG. 4, an exemplary data structure of the present invention for an additional RTCP notification acknowledgement packet is shown. The first row represents bytes and the second row represents bits. The subtype field in the third row has a value of, for example, 2, indicating that the RTCP packet is an RTCP notification receipt of an acknowledgement packet. Some fields are defined in the RFC 3550 standard, and the present invention is consistent with the RFC 3550 standard and will not be described in detail. The invention adds Round Trip Time (RTT) field in RTCP informing and receiving acknowledgement packet, which is used to record the calculated Round trip time of RTCP synchronous packet and RTCP acknowledgement packet transmitted by network after IVS receives RTCP acknowledgement packet, and this Round trip time is used in the following timeout retransmission mechanism.
Referring to fig. 5, an exemplary data structure for a new MSD request packet of the present invention is shown. The first row represents bytes and the second row represents bits. The subtype field in the third row has a value of, for example, 3, indicating that the RTCP packet is an MSD request packet. All fields are defined in the RFC 3550 standard, and the invention is consistent with the RFC 3550 standard and will not be described in detail. The present invention does not add a new field in the MSD request packet.
Referring to FIG. 6, an exemplary data structure of the newly added RTCP MSD packet of the present invention is shown. The first row represents bytes and the second row represents bits. The subtype field in the third row has a value of, for example, 4, indicating that the RTCP packet is an RTCP MSD packet. Some fields are defined in the RFC 3550 standard, and the present invention is consistent with the RFC 3550 standard and will not be described in detail. The present invention adds an MSD data (MSD data) field to the RTCP MSD packet to record the MSD data sent by the IVS to the PSAP, e.g., at the end of the RTCP MSD packet.
Referring to FIG. 7, an exemplary data structure of the present invention for an additional RTCP notification of the receipt of an MSD packet is shown. The first row represents bytes and the second row represents bits. The subtype field in the third row has a value of, for example, 5, indicating that the RTCP packet is RTCP to inform the receipt of the MSD packet. All fields are defined in the RFC 3550 standard, and the invention is consistent with the RFC 3550 standard and will not be described in detail. The invention informs the received MSD data packet of not adding new field in RTCP.
And step S2, after the eCall is established, the IVS sends an RTCP synchronization packet to the PSAP. After receiving the RTCP synchronization packet, the PSAP replies an RTCP acknowledgement packet to the IVS. After the IVS receives the RTCP acknowledgement packet, calculating the round trip time RTT of the RTCP synchronous packet and the RTCP acknowledgement packet transmitted by the network, and replying RTCP notification received acknowledgement packet carrying RTT to the PSAP. RTT is used for a subsequent timeout retransmission policy by the IVS or PSAP.
The method of calculating RTT is as follows. The IVS obtains the current time, noted as time_cur. The IVS obtains the content of the remote time field in the RTCP acknowledgement packet, i.e., the time the IVS last sent the RTCP sync packet, and marks it as time_last. The IVS obtains the content of the delay time field in the RTCP acknowledgement packet, denoted as time_delay. The calculation formula of RTT is rtt=time_cur-time_last-time_delay.
In step S31, in the eCall process, the IVS sends an RTCP MSD data packet to the PSAP, wherein the RTCP MSD data packet carries MSD data. If the PSAP receives the RTCP MSD data packet successfully, the IVS is replied with RTCP to inform that the MSD data packet is received. If the PSAP does not receive an RTCP MSD packet, e.g., an RTCP MSD packet is lost in the network, then the RTCP notification of receipt of the MSD packet is not sent to the IVS. When the IVS does not receive the RTCP after the retransmission time (timeout) and notifies the received MSD packet, the IVS retransmits (i.e., retransmits) the RTCP MSD packet, which carries the MSD data, to the PSAP. The retransmission time is typically set to 2 times RTT, or proportional. If the PSAP receives the retransmitted RTCP MSD data packet successfully, the RTCP is replied to the IVS to inform that the MSD data packet is received. The number of retransmissions is not limited. In general, it is preferable to multiplex a maximum of 3 times, plus a total of up to 4 times for the first transmission.
If the IVS does not receive RTCP from the PSAP to inform the MSD packet after the maximum number of retransmissions is reached, the transmission is considered to be failed, which indicates that the network condition is very poor. The later IVS attempts to retransmit the RTCP MSD packet every 5 seconds, and the RTCP MSD packet is transmitted every 5 seconds without taking up too much RTP bandwidth. After the network is restored, the MSD data can be sent out in time until the sending is successful (that is, the IVS informs that the MSD data packet is received after receiving the RTCP sent by the PSAP). But will terminate the above every 5 seconds attempt retransmission if there are 2 cases where (1) the IVS receives the MSD request packet from the PSAP. For example, immediately after the network recovers, the PSAP sends an MSD request packet. At this point, the IVS immediately responds to the MSD request packet by attempting retransmission every 5 seconds before stopping, and sends the RTCP MSD data packet to the PSAP. (2) The MSD data may be updated after a period of time, such as changes in vehicle information (vehicle position movement, vehicle angle change (rollover), temperature change in the vehicle (fire), etc.). If the MSD data of the IVS is updated, the previous attempt to retransmit every 5 seconds is stopped and the new MSD data is subsequently sent to the PSAP.
Referring to FIG. 8, a second embodiment of the method for reporting MSD over RTCP is disclosed. In the second embodiment, only the step S31 in the first embodiment is replaced with the step S32.
And step S32, in the eCall process, the PSAP actively transmits an MSD request packet to the IVS to request to acquire MSD data. After receiving the MSD request packet, the IVS sends an RTCP MSD data packet to the PSAP, wherein the RTCP MSD data packet carries MSD data. If the PSAP receives the RTCP MSD data packet successfully, the IVS is replied with RTCP to inform that the MSD data packet is received. If the PSAP does not receive an RTCP MSD packet, e.g., an MSD request packet is lost in the network, then the RTCP is not sent to the IVS informing of the receipt of the MSD packet. When the PSAP still does not receive the RTCP MSD data packet after the retransmission time, the PSAP retransmits (i.e., retransmits) the MSD request packet to the IVS, requesting acquisition of the MSD data. The retransmission time is typically chosen to be 2 times RTT, or proportional. After receiving the retransmitted MSD request packet, the IVS sends an RTCP MSD data packet to the PSAP, wherein the RTCP MSD data packet carries MSD data. If the PSAP receives the RTCP MSD data packet successfully, the IVS is replied with RTCP to inform that the MSD data packet is received. The number of retransmissions is not limited. In general, it is preferable to multiplex a maximum of 3 times, plus a total of up to 4 times for the first transmission.
If the PSAP does not receive the RTCP MSD data packet sent by the IVS after the maximum retransmission times are reached, the request transmission is considered to be failed, which indicates that the network condition is very bad at the moment. The PSAP then attempts to retransmit the MSD request packet every 5 seconds until the PSAP receives the RTCP MSD packet from the IVS.
Comparing the two embodiments, the first embodiment is that the IVS pushes (push) the MSD data to the PSAP, which includes a process of retransmitting the RTCP MSD packet in a specific scenario. The second embodiment is that the PSAP pulls (pull) MSD data from the IVS, which includes the process of retransmitting the MSD request packet in the specific scenario.
Referring to fig. 9, an embodiment of an apparatus for reporting MSD via RTCP according to the present invention includes an add subtype unit 1, a synchronization handshake unit 2, and a push data unit 31. The apparatus shown in fig. 9 corresponds to the method shown in fig. 1.
The adding subtype unit 1 is configured to add 6 seed types in an RTCP packet of an APP type, which are respectively a "RTCP synchronization packet" for handshake by the IVS to the PSAP, a "RTCP acknowledgement packet" for sending a response to the IVS after the PSAP receives the RTCP synchronization packet, a "RTCP notification receipt acknowledgement packet" for sending the PSAP after the IVS receives the RTCP acknowledgement packet, a "MSD request packet" for the PSAP to request the IVS to send the MSD, a "RTCP MSD data packet" for the IVS to send the MSD data to the PSAP, and a "RTCP notification receipt MSD data packet" for sending acknowledgement information to the IVS after the PSAP receives the MSD data.
And a local time field is arranged in the RTCP synchronous packet and is used for recording the current time point of the IVS when the IVS sends the RTCP synchronous packet.
The RTCP acknowledgement packet is provided with a remote time field and a delay time field. The remote time field is used to record the contents of the local time field within the RTCP sync packet received by the PSAP. The delay time field is used to record the time delayed by the PSAP between the receipt of the RTCP sync packet and the transmission of the RTCP acknowledgement packet.
The RTCP notification receiving confirmation packet is provided with a round trip time field which is used for recording the calculated round trip time of the RTCP synchronous packet and the RTCP confirmation packet in the network transmission after the RTCP confirmation packet is received by the IVS.
And the RTCP MSD data packet is provided with an MSD data field used for recording MSD data sent by the IVS to the PSAP.
The synchronization handshake unit 2 is configured to send an RTCP synchronization packet to the PSAP by the IVS after the eCall is established. After receiving the RTCP synchronization packet, the PSAP replies an RTCP acknowledgement packet to the IVS. After the IVS receives the RTCP acknowledgement packet, calculating the round trip time RTT of the RTCP synchronous packet and the RTCP acknowledgement packet transmitted by the network, and replying RTCP notification received acknowledgement packet carrying RTT to the PSAP.
The push data unit 31 is configured to send, during the eCall call, an RTCP MSD packet to the PSAP by the IVS, where the RTCP MSD packet carries MSD data. If the PSAP receives the RTCP MSD data packet successfully, the IVS is replied with RTCP to inform that the MSD data packet is received. When the IVS does not receive the RTCP after the retransmission time, the IVS informs that the MSD packet is received, and the IVS resends the RTCP MSD packet to the PSAP, where the RTCP MSD packet carries the MSD data. The retransmission time is proportional to RTT. Further, if the IVS does not receive the RTCP to inform the reception of the MSD packet after the maximum number of retransmissions is reached, the retransmission of the RTCP MSD packet is attempted every fixed time interval. The fixed time is much longer (greater than or equal to 10 times) than the retransmission time.
Referring to fig. 10, a second embodiment of the apparatus for reporting MSD via RTCP is disclosed. In the second embodiment, only the push data unit 31 in the first embodiment is replaced by the pull data unit 32. The apparatus shown in fig. 10 corresponds to the method shown in fig. 8.
The pull data unit 32 is configured to, during an eCall call, the PSAP actively sends an MSD request packet to the IVS to request for obtaining MSD data. After receiving the MSD request packet, the IVS sends an RTCP MSD data packet to the PSAP, wherein the RTCP MSD data packet carries MSD data. If the PSAP receives the RTCP MSD data packet successfully, the IVS is replied with RTCP to inform that the MSD data packet is received. When the PSAP still does not receive the RTCP MSD data packet after the retransmission time, the PSAP resends the MSD request packet to the IVS to request to acquire the MSD data. The retransmission time is proportional to RTT. Further, if the PSAP does not receive the RTCP MSD packet after the maximum number of retransmissions is reached, the MSD request packet is attempted to be retransmitted every fixed time interval until the PSAP receives the RTCP MSD packet. The fixed time is much longer than the retransmission time.
Compared with the prior art, the invention discloses a method for transmitting MSD data through an RTCP protocol and an RTCP packet, which comprises the steps of calculating the round trip time of the RTCP packet in a network, setting the round trip time of the time-out retransmission time to be 2 times, sending the time-out retransmission instance of the RTCP MSD data packet to a PSAP by an IVS, and sending the time-out retransmission instance of the MSD request packet to the IVS by the PSAP, so that the time-out retransmission can be timely and accurately realized. When retransmitting, firstly, the retransmission is carried out at a smaller time interval (namely retransmission time), and then the retransmission is carried out at a larger time interval (namely fixed time) after the maximum retransmission times are reached, so that normal RTP voice communication is not interfered, and successful retransmission can be realized in time after the network is recovered to be normal.
The above are only preferred embodiments of the present invention, and are not intended to limit the present invention. Various modifications and variations of the present invention will be apparent to those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention should be included in the protection scope of the present invention.