TRANSMISSION METHOD, SYSTEM, AND RELATED APPARATUS

A transmission method includes generating, by a first device, a first authentication code based on first information, a first key, and first data. The first information includes at least one of sending time information or first context information. The method further includes generating, by the first device, a first data packet based on the first authentication code and the first data. The method further includes sending, by the first device, the first data packet, the first device being part of a first transmission system.

TECHNICAL FIELD

The present application relates to the field of satellite communication, and in particular, to a transmission method, a system, and a related apparatus.

BACKGROUND

A satellite communication service may be used for positioning and communication in areas where mobile communication is unavailable or cannot be implemented, or where a communication system is damaged, such as oceans, deserts, grasslands, or uninhabited areas. At present, a satellite communication system does not provide civil terminals with a secure transmission mechanism for use. To securely transmit data between a terminal and a satellite, a communication protocol needs to be designed specific for civil service and device features and features of the satellite communication system.

Although there is a mature secure transmission mechanism in a cellular network, steps of the secure transmission mechanism in the cellular network are complex, and a large quantity of air interface resources are required for signaling exchange. The satellite communication system cannot support the secure transmission mechanism in the cellular network due to a long delay and limited air interface resources.

SUMMARY

One or more embodiments of the present application disclose a transmission method, a system, and a related apparatus. A sending device may generate an authentication code A based on information A and original data. The sending device may send, to a receiving device in a first transmission system, a data packet including the authentication code A. After receiving the data packet, the receiving device may generate an authentication code B based on information B and the data packet. The receiving device may determine a receiving status of the data packet based on the authentication code B. The information A is sending time information and the information B is receiving time information, or the information A is context information A and the information B is context information B. In this way, after the receiving device receives a repeatedly sent data packet, the receiving device cannot parse the data packet, so that problems of repeated processing and charging do not occur.

According to a first aspect, this application provides a transmission method, including: a first device generates a first authentication code based on first information, a first key, and first data, where the first information is sending time information or first context information; the first device generates a first data packet based on the first authentication code and the first data; and the first device sends the first data packet to a second device in a first transmission system.

In some embodiments, before the first device generates the first authentication code based on the first information, the first key, and the first data, the method further includes: the first device obtains the first key, where the first key is obtained by the first device through negotiation with the second device in a second transmission system, and the first transmission system is different from the second transmission system.

In some embodiments, before the first device generates the first authentication code based on the first information, the first key, and the first data, the method further includes: the first device establishes a communication connection to a fourth device; and the first device obtains the first key through the fourth device.

In some embodiments, the first key is a key preset by the first device.

In some embodiments, the second transmission system is a cellular transmission system or a wireless local area network WLAN transmission system, and the first transmission system is a satellite transmission system.

In some embodiments, the first device obtains the first key by negotiating with the second device by using a generic bootstrapping architecture GBA procedure in the second transmission system.

In some embodiments, that the first device sends the first data packet to a second device in a first transmission system specifically includes: after processing the first data packet into at least one second data packet at a message data convergence protocol MDCP layer of the first device and/or a satellite link control SLC layer of the first device, sending the at least one second data packet to the second device through a third device.

In some embodiments, the sending time information indicates time at which the first device sends the first data packet.

In some embodiments, the time at which the first device sends the first data packet is time at which an application AP layer of the first device sends the first data packet to the message data convergence protocol MDCP layer, or is time estimated by the first device for sending the first data packet to the second device.

In some embodiments, the first device obtains the sending time information through positioning timing.

In some embodiments, the first data packet includes packaged first data and the first authentication code.

In some embodiments, a format of sending time of a data packet is universal time coordinated UTC or Greenwich mean time GMT.

In some embodiments, a specified time granularity of the sending time of the data packet includes any one of a year, a month, a day, an hour, a minute, or a second. The first device and the second device update the specified time granularity through negotiation in the second transmission system.

In some embodiments, the first device obtains the sending time information through the fourth device.

In some embodiments, the first device obtains the first information based on the sending time information and a specified time granularity in a preset coding manner.

In some embodiments, after the first device sends the first data packet, the method further includes: the first device receives a first application layer receipt sent by the second device, where the first application layer receipt indicates a status of receiving the first data packet by the second device.

In some embodiments, the first information is the first context information, and the first context information indicates information about a quantity of first data packets successfully sent by the first device, information about a quantity of application receipts successfully received by the first device, or a count value or a sequence number of the first data packet sent by the first device.

In some embodiments, the first data packet further includes first indication information, and the first indication information indicates a first message ID of the first data packet, or the first indication information indicates a first count value or a first sequence number of the first data packet.

In some embodiments, an AP layer of the first device associates the first message ID, the first count value, or the first sequence number with the first data packet, and the first device adds a preset value to a value of the first message ID, the first count value, or the first sequence number.

In some embodiments, the first data packet further includes third indication information, and the third indication information indicates that the first data packet is a newly transmitted data packet or a retransmitted data packet.

In some embodiments, when a value of the third indication information is a first value, the third indication information indicates that the first data packet is a newly transmitted data packet; or when a value of the third indication information is a second value, the third indication information indicates that the first data packet is a retransmitted data packet.

In some embodiments, before the first device generates the first authentication code based on the first information, the first key, and the first data, the method further includes:the first device obtains an initial value of the first information in the second transmission system; orthe first device obtains an initial value of the first information through the fourth device.

In some embodiments, after the first device sends the first data packet, the method further includes:the first device receives a first application layer receipt sent by the second device, where the first application layer receipt indicates a status of receiving the first data packet by the second device.

In some embodiments, after the first device receives the first application layer receipt sent by the second device, the method further includes:the first device adds a preset value to a value of the first information, where an adjusted value of the first information is different from the value of the first information.

In some embodiments, after the first device receives the first application layer receipt sent by the second device, the method further includes: when the first application receipt indicates that the second device fails to receive the first data packet, the first device adjusts the value of the first information to the initial value.

In some embodiments, after the first device adjusts the value of the first information to the initial value, the method further includes: the first device sends third information to the second device, where a value of the third information is the same as the adjusted value of the first information.

In some embodiments, after the first device receives the first application layer receipt sent by the second device, the method further includes: when the first application receipt indicates that the first data packet is successfully sent, the first device displays success prompt information, where the success prompt information prompts a user that a message corresponding to the first data packet is successfully sent.

In some embodiments, after the first device receives the first application layer receipt sent by the second device, the method further includes: when the first application receipt indicates that the first data packet fails to be sent, the first device displays failure prompt information, where the failure prompt information prompts a user that a message corresponding to the first data packet fails to be sent.

In some embodiments, after the first device receives the first application layer receipt sent by the second device, the method further includes: when the first application receipt includes second message ID information, the first device displays success prompt information, where the success prompt information prompts a user that a data packet indicated by the second message ID information is successfully sent.

In some embodiments, that the application layer of the first device generates a first data packet based on the first authentication code and the first data specifically includes: the application layer of the first device encrypts the first authentication code and the first data based on the first key, to generate the first data packet, where the first data packet includes an encrypted first authentication code and encrypted first data.

In some embodiments, the application layer of the first device encrypts the first data based on the first key, to generate the first data packet, where the first data packet includes encrypted first data.

In some embodiments, after the first device sends the first data packet to the second device in the first transmission system, the method further includes: the first device receives second application receipt information in the second transmission system, where the second application receipt information indicates a status of sending the first data packet by the first device in the first transmission system.

In some embodiments, after the first device sends the first data packet to the second device in the first transmission system, the method further includes: the first device displays sending prompt information, where the sending prompt information prompts the user that the first device has sent the first data packet to the second device.

According to a second aspect, this application provides a transmission method, including: a second device receives, in a first transmission system, a first data packet sent by a first device; the second device generates a second authentication code based on second information, a first key, and the first data packet, where the second information is receiving time information or second context information; and the second device determines a receiving status of the first data packet based on the second authentication code.

In some embodiments, before the second device generates the second authentication code based on the second information, the first key, and the first data packet, the method further includes: the second device obtains the first key, where the first key is obtained by the second device through negotiation with the first device in a second transmission system, and the second transmission system is different from the first transmission system.

In some embodiments, the second transmission system is a cellular transmission system or a WLAN transmission system, and the first transmission system is a satellite transmission system.

In some embodiments, the second device obtains the first key by negotiating with the first device by using a generic bootstrapping architecture GBA procedure in the second transmission system.

In some embodiments, the first key is a key preset by the first device.

In some embodiments, that a second device receives a first data packet in a first transmission system specifically includes: the second device receives, in the first transmission system, the first data packet sent by a third device.

In some embodiments, the second device determines a first authentication code based on the first data packet.

In some embodiments, the receiving time information indicates receiving time of the first data packet.

In some embodiments, before the second device generates the second authentication code based on the second information, the first key, and the first data packet, the method further includes: the second device receives the second information sent by the third device.

In some embodiments, before the second device generates the second authentication code based on the second information, the first key, and the first data packet, the method further includes: the second device receives third information sent by the third device; and the second device generates the second information based on the third information.

In some embodiments, the second context information indicates information about a quantity of first data packets successfully received by the second device, or a count value or a sequence value of the first data packet received by the second device.

In some embodiments, the first data packet includes first indication information, and the first indication information indicates a first message ID/a first sequence number/a first count value of the first data packet.

In some embodiments, the first data packet includes third indication information, and the third indication information indicates that the first data packet is a newly transmitted data packet/a retransmitted data packet.

In some embodiments, before the second device generates the second authentication code based on the second information, the first key, and the first data packet, the method further includes: the second device obtains an initial value of the second information in the second transmission system.

In some embodiments, that the second device determines a receiving status of the first data packet based on the second authentication code specifically includes: the second device determines the receiving status of the first data packet based on whether the first authentication code is the same as the second authentication code.

In some embodiments, that the second device compares the first authentication code with the second authentication code specifically includes: when the first authentication code is the same as the second authentication code, the second device determines that the first data packet is successfully received;when the first authentication code is different from the second authentication code, the second device determines that the first data packet fails to be received; orwhen the first authentication code is different from the second authentication code, the second device updates the second information and generates an updated second authentication code based on updated second information, and the second device compares the updated second authentication code with the first authentication code to determine the receiving status of the first data packet.

In some embodiments, when the updated second authentication code is the same as the first authentication code, the second device determines that the first data packet is successfully received, and the second device adds a preset value to a value of the updated second information.

In some embodiments, when the updated second authentication code is the same as the first authentication code, the second device generates and sends, to the first device, a first application receipt including second indication information, where the second indication information indicates a message ID of a latest successfully received data packet.

In some embodiments, when the updated second authentication code is the same as the first authentication code, the second device generates and sends, to the first device, a first application receipt indicating that the first data packet is successfully sent.

In some embodiments, when the updated second authentication code is different from the first authentication code, the second device generates and sends, to the first device, a first application receipt indicating that the first data packet fails to be received.

In some embodiments, that the second device compares the first authentication code with the second authentication code specifically includes: when the first authentication code is the same as the second authentication code, the second device determines that the first data packet is successfully received; when the first authentication code is different from the second authentication code, the second device determines that the first data packet fails to be received; or when the first authentication code is different from the second authentication code, the second device updates the second information and generates a temporary authentication code based on updated second information, and the second device compares the temporary authentication code with the first authentication code to determine the receiving status of the first data packet.

When the temporary authentication code is the same as the first authentication code, the second device generates and sends, to the first device, a first application receipt including second indication information, where the second indication information indicates a message ID of a latest successfully received data packet; or when the temporary authentication code is different from the first authentication code, the second device generates and sends, to the first device, a first application receipt indicating that the first data packet fails to be received.

In some embodiments, after the second device determines that the first data packet is successfully received, the method further includes:recording information about time at which the first data packet is successfully received;recording a message ID corresponding to the first data packet; and/orthe second device adds a preset value to a value of the second information, where an adjusted value of the second information is different from the value of the second information.

In some embodiments, that the second device compares the second authentication code with the first authentication code specifically includes: when the second authentication code is the same as the first authentication code, the second device determines that the first data packet is successfully received, and generates a first application layer receipt indicating that the first data packet is successfully received; or when the second authentication code is different from the first authentication code, the second device determines that the first data packet fails to be received, and generates a first application layer receipt indicating that the first data packet fails to be received.

In some embodiments, that the second device compares the second authentication code with the first authentication code specifically includes: when the second authentication code is the same as the first authentication code, the second device determines that the first data packet fails to be received, and generates a first application layer receipt indicating that the first data packet fails to be received, where the first application layer receipt includes a message ID corresponding to a successfully received data packet; or when the second authentication code is different from the first authentication code, the second device determines that the first data packet fails to be received, and generates a first application layer receipt indicating that the first data packet fails to be received.

In some embodiments, after the second device determines the receiving status of the first data packet based on the second authentication code, the method further includes: when the second device determines, based on the second authentication code, that the first data packet is successfully received, the second device sends a first application receipt to the first device, where the first application receipt indicates that the first data packet is successfully received.

In some embodiments, after the second device determines the receiving status of the first data packet based on the second authentication code, the method further includes: when the second device determines, based on the second authentication code, that the first data packet fails to be received, the second device sends a first application receipt to the first device, where the first application receipt further includes a second message ID, and the second message ID indicates a message ID corresponding to a latest successfully transmitted data packet.

In some embodiments, after the second device determines the receiving status of the first data packet based on the second authentication code, the method further includes: when the second device determines, based on the second authentication code, that the first data packet fails to be received, the second device sends a first application receipt to the first device, where the first application receipt indicates that the first data packet fails to be received.

In some embodiments, when the second device determines, based on the second authentication code, that the first data packet is successfully received, the method further includes: the second device adds a preset value to a value of the second information, where an adjusted value of the second information is different from the value of the second information.

In some embodiments, when the second device determines, based on the second authentication code, that the first data packet fails to be received, the method further includes: the second device adjusts a value of the second information to a preset value.

In some embodiments, when the second device determines, based on the second authentication code, that the first data packet fails to be received, the method further includes: the second device receives the third information sent by the first device; and the second device adjusts a value of the second information to a value of the third information.

In some embodiments, after the second device determines the receiving status of the first data packet based on the second authentication code, the method further includes: the second device sends second application receipt information to the first device in the second transmission system, where the second application receipt information indicates a status of receiving the first data packet by the second device in the first transmission system.

According to a third aspect, this application provides a transmission method, including:a third device receives at least one second data packet sent by a first device;the third device generates a first data packet based on the at least one second data packet; andthe third device sends the first data packet to a second device.

In some embodiments, the third device sends second information or fourth information to the second device, where the second information or the fourth information is receiving time information.

In some embodiments, the receiving time information indicates corresponding time at which the third device receives the 1stdata packet in the at least one second data packet.

According to a fourth aspect, this application provides a transmission method, including:a first device receives a third data packet in a first transmission system; andthe first device generates a third authentication code based on fifth information and the third data packet, where the fifth information is receiving time information or fifth context information; and the first device determines a receiving status of the third data packet based on the third authentication code.

In some embodiments, that the first device generates a third authentication code based on fifth information and the third data packet specifically includes: the first device generates the third authentication code based on the fifth information, the third data packet, and a first key.

In some embodiments, before the first device generates the third authentication code based on the fifth information, the first key, and the third data packet, the method further includes:the first device obtains the first key, where the first key is obtained by the first device through negotiation with a second device in a second transmission system, and the first transmission system is different from the second transmission system.

In some embodiments, before the first device generates the third authentication code based on the fifth information, the first key, and the third data packet, the method further includes: the first device establishes a communication connection to a fourth device; and the first device obtains the first key through the fourth device.

In some embodiments, the first key is a key preset by the first device.

In some embodiments, the first transmission system is a satellite transmission system, and the second transmission system is a non-satellite transmission system.

In some embodiments, the second transmission system is a cellular transmission system or a wireless local area network WLAN transmission system.

In some embodiments, the first device obtains the first key by negotiating with the second device by using a generic bootstrapping architecture (GBA) procedure in the second transmission system.

In some embodiments, the first device determines a fourth authentication code based on the third data packet.

In some embodiments, that a first device receives a third data packet in a first transmission system specifically includes: the first device receives at least one fourth data packet sent by a third device; and a satellite link control SLC layer of the first device and/or a message data convergence protocol MDCP layer of the first device process/processes the at least one fourth data packet into the third data packet.

In some embodiments, the fifth information is the receiving time information.

In some embodiments, the receiving time information indicates time at which the first device receives the third data packet.

In some embodiments, the time at which the first device receives the third data packet is time at which the first device receives the 1stfourth data packet in the at least one fourth data packet.

In some embodiments, the first device obtains the fifth information through positioning timing.

In some embodiments, the first device obtains the fifth information based on the receiving time information and a specified time granularity in a preset coding manner.

In some embodiments, the fifth information is the fifth context information, and the fifth context information indicates information about a quantity of third data packets successfully received by the first device, or a count value or a sequence number of the third data packet received by the first device.

In some embodiments, the third data packet includes sixth indication information, and the sixth indication information indicates a fourth message ID/a fourth sequence number/a fourth count value of the third data packet.

In some embodiments, the third data packet includes fourth indication information, and the fourth indication information indicates that the third data packet is a newly transmitted data packet or a retransmitted data packet.

In some embodiments, before the first device generates the third authentication code based on the fifth information, the first key, and the third data packet, the method further includes: the first device obtains an initial value of the fifth information in the second transmission system.

In some embodiments, that the first device determines a receiving status of the third data packet based on the third authentication code specifically includes: the first device determines the receiving status of the third data packet based on whether the third authentication code is the same as the fourth authentication code.

In some embodiments, that the first device determines the receiving status of the third data packet based on whether the third authentication code is the same as the fourth authentication code specifically includes:when the third authentication code is the same as the fourth authentication code, the first device determines that the third data packet is successfully received;when the third authentication code is different from the fourth authentication code, the first device determines that the third data packet fails to be received; orwhen the third authentication code is different from the fourth authentication code, the first device generates temporary information based on the fifth information and generates a temporary authentication code based on the temporary information, and the first device compares the fourth authentication code with the temporary authentication code to determine the receiving status of the third data packet.

When the fourth authentication code is the same as the temporary authentication code, the first device generates and sends, to the second device, a third application receipt including fifth indication information; or when the fourth authentication code is different from the temporary authentication code, the first device generates and sends, to the second device, a failure application receipt.

In some embodiments, when the third authentication code is different from the fourth authentication code, the first device updates a value of the fifth information and generates an updated third authentication code based on updated fifth information, and the first device compares the updated third authentication code with the fourth authentication code to determine the receiving status of the third data packet.

In some embodiments, when the updated third authentication code is the same as the fourth authentication code, the first device generates and sends, to the second device, a third application receipt including fifth indication information; or when the updated third authentication code is different from the fourth authentication code, the first device generates and sends, to the second device, a third application receipt indicating that the third data packet fails to be sent.

In some embodiments, when the updated third authentication code is the same as the fourth authentication code, the first device generates and sends, to the second device, a third application receipt indicating that the third data packet is successfully sent.

In some embodiments, when the updated third authentication code is the same as the fourth authentication code, the first device adds a preset value to a value of the updated fifth information.

In some embodiments, an indication application receipt includes the fifth indication information, and a value of the fifth indication information is the same as a value of sixth indication information of a latest successfully received data packet.

In some embodiments, after the first device determines that the third data packet is successfully received, the method further includes:recording information about time at which the third data packet is successfully received;recording a message ID corresponding to the third data packet; and/oradding a preset value to a value of the fifth information, where an adjusted value of the fifth information is different from the value of the fifth information.

In some embodiments, after the first device determines the receiving status of the third data packet based on the third authentication code, the method further includes: the first device sends a third application receipt to the second device, where the third application receipt indicates the receiving status of the third data packet.

In some embodiments, after the first device determines the receiving status of the third data packet based on the third authentication code, the method further includes: when the first device determines that the receiving status of the third data packet is correct receiving, the first device adds a preset value to a value of the fifth information, where an adjusted value of the fifth information is different from the value of the fifth information.

In some embodiments, after the first device determines the receiving status of the third data packet based on the third authentication code, the method further includes: when the first device determines that the receiving status of the third data packet is failed receiving, the first device updates a value of the fifth information to a preset value. In some embodiments, the preset value is the initial value.

In some embodiments, the method further includes: the first device receives seventh information sent by the second device; and the first device updates the value of the fifth information to a value of the seventh information based on the seventh information.

In some embodiments, after the first device determines that the third data packet is successfully received, the method further includes: the first device displays third data.

In some embodiments, after the first device determines the receiving status of the third data packet based on the third authentication code, the method further includes:the first device sends third application receipt information to the second device in the second transmission system, where the third application receipt information indicates a status of receiving the third data packet by the first device in the first transmission system.

According to a fifth aspect, this application provides a transmission method, including: a second device generates a fourth authentication code based on sixth information and third data, where the sixth information is sending time information or sixth context information; an application AP layer of the second device generates a third data packet based on the fourth authentication code and the first data; and the second device sends the third data packet to a first device in a first transmission system.

In some embodiments, that a second device generates a fourth authentication code based on sixth information and first data specifically includes: the second device generates the fourth authentication code based on the sixth information, a first key, and the first data.

In some embodiments, before the second device generates the fourth authentication code based on the sixth information, the first key, and the first data, the method further includes:the second device obtains the first key, where the first key is obtained by the first device through negotiation with the second device in a second transmission system, and the first transmission system is different from the second transmission system.

In some embodiments, the first key is a preset key.

In some embodiments, the second device obtains the first key by negotiating with the first device by using a generic bootstrapping architecture (GBA) procedure in the second transmission system.

In some embodiments, that the second device sends the third data packet to a first device in a first transmission system specifically includes: the second device sends the third data packet to the first device through a third device.

In some embodiments, the sixth information indicates the sending time information.

In some embodiments, the sending time information indicates time at which the fourth authentication code is generated or time at which the second device sends the third data packet.

In some embodiments, the time at which the second device sends the third data packet is time at which the second device delivers the third data packet to the third device, or is time estimated by the second device for sending the third data packet to the first device.

In some embodiments, after obtaining the third data packet through packaging, the second device adds the fourth authentication code to the third data packet.

In some embodiments, a format of the generation time of the fourth authentication code is universal time coordinated UTC or Greenwich mean time GMT.

In some embodiments, a minimum time granularity of the generation time of the fourth authentication code includes any one of a year, a month, a day, an hour, a minute, or a second.

In some embodiments, the second device obtains the sixth information based on the sending time information and a specified time granularity in a specified encoding manner.

In some embodiments, before the second device generates the fourth authentication code based on the sixth information, the first key, and the first data, the method further includes: the second device obtains the sixth information through the third device.

In some embodiments, before the second device generates the fourth authentication code based on the sixth information, the first key, and the first data, the method further includes: the second device receives eighth information sent by the third device; and the second device generates the sixth information based on the eighth information.

In some embodiments, the second device receives the sixth information sent by the third device.

In some embodiments, the sixth information is the sixth context information, and the sixth context information indicates information about a quantity of third data packets successfully sent by the second device, information about a quantity of application receipts successfully received by the second device, or a count value or a sequence value of the third data packet sent by the second device.

In some embodiments, the method further includes: the second device obtains an initial value of the sixth information in the second transmission system; or the second device resets the sixth information to a preset value in the second transmission system.

In some embodiments, the third data packet further includes sixth indication information, and the sixth indication information indicates a fourth message ID of the third data packet, or the sixth indication information indicates a fourth count value or a fourth sequence number of the third data packet.

In some embodiments, when the sixth indication information indicates the fourth count value or the fourth sequence number of the third data packet, the method further includes: the application layer of the second device associates the fourth count value or the fourth sequence number with the third data packet, and the second device adds a preset value to a value of the fourth count value or the fourth sequence number.

In some embodiments, the third data packet further includes fourth indication information, and the fourth indication information indicates new transmission/retransmission information of the third data packet.

In some embodiments, that an application AP layer of the second device generates a third data packet based on the fourth authentication code and the first data specifically includes: the application layer of the second device encrypts the fourth authentication code and the first data based on the first key, to generate the third data packet, where the third data packet includes an encrypted fourth authentication code and encrypted first data.

In some embodiments, after the second device sends the third data packet, the method further includes:the second device receives a third application layer receipt sent by the first device, where the third application layer receipt indicates a status of receiving the third data packet by the first device.

In some embodiments, after the second device receives the third application layer receipt sent by the first device, the method further includes: the second device adds a preset value to a value of the sixth information, where an adjusted value of the sixth information is different from the value of the sixth information.

In some embodiments, the second device receives fourth application receipt information in the second transmission system, where the fourth application receipt information indicates a status of sending the third data packet by the second device in the first transmission system; andthe second device updates a sending status based on the fourth application receipt information.

In some embodiments, the second device deletes the successfully sent third data packet.

According to a sixth aspect, this application provides a transmission method, including:a third device receives a third data packet sent by a second device;the third device generates at least one fourth data packet based on the third data packet; andthe third device sends the at least one fourth data packet to a first device.

In some embodiments, before the third device receives the third data packet sent by the second device, the method further includes: the third device sends second information or fourth information to the second device, where the second information or the fourth information is time information.

According to a seventh aspect, this application provides a transmission method, including:a first device generates a first authentication code based on first information, a first key, and first data, where the first information is sending time information or first context information; the first device generates a first data packet based on the first authentication code and the first data; and the first device sends the first data packet to a second device in a first transmission system.

In some embodiments, before the first device generates the first authentication code based on the first information, the first key, and the first data, the method further includes: the first device obtains the first key, where the first key is obtained by the first device through negotiation with the second device in a second transmission system, and the first transmission system is different from the second transmission system.

In some embodiments, before the first device generates the first authentication code based on the first information, the first key, and the first data, the method further includes: the first device establishes a communication connection to a fourth device; and the first device obtains the first key through the fourth device.

In some embodiments, the first key is a key preset by the first device.

In some embodiments, the second transmission system is a cellular transmission system or a wireless local area network WLAN transmission system, and the first transmission system is a satellite transmission system.

In some embodiments, the first device obtains the first key by negotiating with the second device by using a generic bootstrapping architecture GBA procedure in the second transmission system.

In some embodiments, the sending time information indicates time at which the first authentication code is generated, or indicate time at which the first device sends the first data packet.

In some embodiments, the time at which the first device sends the first data packet is time at which an application AP layer of the first device sends the first data packet to a message data convergence protocol MDCP layer, or is time estimated by the first device for sending the first data packet to the second device.

In some embodiments, the first device obtains the sending time information through positioning timing.

In some embodiments, the first data packet includes packaged first data and the first authentication code.

In some embodiments, a format of sending time of a data packet is universal time coordinated UTC or Greenwich mean time GMT.

In some embodiments, a specified time granularity of the sending time of the data packet includes any one of a year, a month, a day, an hour, a minute, or a second. The first device and the second device update the specified time granularity through negotiation in the second transmission system.

In some embodiments, the first device obtains the sending time information through the fourth device.

In some embodiments, the first device obtains the first information based on the sending time information and a specified time granularity in a preset coding manner.

In some embodiments, after the first device sends the first data packet, the method further includes:the first device receives a first application layer receipt sent by the second device, where the first application layer receipt indicates a status of receiving the first data packet by the second device.

In some embodiments, the first information is the first context information, and the first context information indicates information about a quantity of first data packets successfully sent by the first device, information about a quantity of application receipts successfully received by the first device, or a count value or a sequence number of the first data packet sent by the first device.

In some embodiments, the first data packet further includes first indication information, and the first indication information indicates a first message ID of the first data packet, or the first indication information indicates a first count value or a first sequence number of the first data packet.

In some embodiments, an AP layer of the first device associates the first message ID, the first count value, or the first sequence number with the first data packet, and the first device adds a preset value to a value of the first message ID, the first count value, or the first sequence number.

In some embodiments, the first data packet further includes third indication information, and the third indication information indicates that the first data packet is a newly transmitted data packet or a retransmitted data packet.

In some embodiments, when a value of the third indication information is a first value, the third indication information indicates that the first data packet is a newly transmitted data packet; or when a value of the third indication information is a second value, the third indication information indicates that the first data packet is a retransmitted data packet.

In some embodiments, before the first device generates the first authentication code based on the first information, the first key, and the first data, the method further includes:the first device obtains an initial value of the first information in the second transmission system; orthe first device obtains an initial value of the first information through the fourth device.

In some embodiments, after the first device sends the first data packet, the method further includes:the first device receives a first application layer receipt sent by the second device, where the first application layer receipt indicates a status of receiving the first data packet by the second device.

In some embodiments, after the first device receives the first application layer receipt sent by the second device, the method further includes:the first device adds a preset value to a value of the first information, where an adjusted value of the first information is different from the value of the first information.

In some embodiments, after the first device receives the first application layer receipt sent by the second device, the method further includes: when the first application receipt indicates that the second device fails to receive the first data packet, the first device adjusts the value of the first information to the initial value.

In some embodiments, after the first device adjusts the value of the first information to the initial value, the method further includes: the first device sends third information to the second device, where a value of the third information is the same as the adjusted value of the first information.

In some embodiments, after the first device receives the first application layer receipt sent by the second device, the method further includes: when the first application receipt indicates that the first data packet is successfully sent, the first device displays success prompt information, where the success prompt information prompts a user that a message corresponding to the first data packet is successfully sent.

In some embodiments, after the first device receives the first application layer receipt sent by the second device, the method further includes: when the first application receipt indicates that the first data packet fails to be sent, the first device displays failure prompt information, where the failure prompt information prompts a user that a message corresponding to the first data packet fails to be sent.

In some embodiments, after the first device receives the first application layer receipt sent by the second device, the method further includes: when the first application receipt includes second message ID information, the first device displays success prompt information, where the success prompt information prompts a user that a data packet indicated by the second message ID information is successfully sent.

In some embodiments, that the application layer of the first device generates a first data packet based on the first authentication code and the first data specifically includes: the application layer of the first device encrypts the first authentication code and the first data based on the first key, to generate the first data packet, where the first data packet includes an encrypted first authentication code and encrypted first data.

In some embodiments, the application layer of the first device encrypts the first data based on the first key, to generate the first data packet, where the first data packet includes encrypted first data.

In some embodiments, after the first device sends the first data packet to the second device in the first transmission system, the method further includes: the first device receives second application receipt information in the second transmission system, where the second application receipt information indicates a status of sending the first data packet by the first device in the first transmission system.

In some embodiments, after the first device sends the first data packet to the second device in the first transmission system, the method further includes: the first device displays sending prompt information, where the sending prompt information prompts the user that the first device has sent the first data packet to the second device.

According to an eighth aspect, this application provides a transmission method, including: a second device receives, in a first transmission system, a first data packet sent by a first device; the second device generates a second authentication code based on second information, a first key, and the first data packet, where the second information is receiving time information or second context information; and the second device determines a receiving status of the first data packet based on the second authentication code.

In some embodiments, before the second device generates the second authentication code based on the second information, the first key, and the first data packet, the method further includes: the second device obtains the first key, where the first key is obtained by the second device through negotiation with the first device in a second transmission system, and the second transmission system is different from the first transmission system.

In some embodiments, the second transmission system is a cellular transmission system or a WLAN transmission system, and the first transmission system is a satellite transmission system.

In some embodiments, the second device obtains the first key by negotiating with the first device by using a generic bootstrapping architecture GBA procedure in the second transmission system.

In some embodiments, the first key is a key preset by the first device.

In some embodiments, that a second device receives a first data packet in a first transmission system specifically includes: a satellite link control SLC layer of the second device receives at least one second data packet sent by the first device; and a message data convergence protocol MDCP layer of the second device and/or the satellite link control layer SLC layer of the second device obtain/obtains the first data packet based on the at least one second data packet.

In some embodiments, the second device determines a first authentication code based on the first data packet.

In some embodiments, the receiving time information indicates receiving time of the first data packet.

In some embodiments, before the second device generates the second authentication code based on the second information, the first key, and the first data packet, the method further includes: the second device obtains the receiving time of the first data packet at the MDCP layer/the SLC layer; and the second device generates the second information based on the receiving time of the first data packet at the MDCP layer/the SLC layer.

In some embodiments, before the second device generates the second authentication code based on the second information, the first key, and the first data packet, the method further includes: the second device obtains the receiving time of the first data packet at the MDCP layer/the SLC layer; the second device determines that the receiving time of the first data packet is eighth information, and uploads the eighth information to an AP layer; and the second device generates the second information based on the eighth information at the AP layer.

In some embodiments, the second context information indicates information about a quantity of first data packets successfully received by the second device, or a count value or a sequence value of the first data packet received by the second device.

In some embodiments, the first data packet includes first indication information, and the first indication information indicates a first message ID/a first sequence number/a first count value of the first data packet.

In some embodiments, the first data packet includes third indication information, and the third indication information indicates that the first data packet is a newly transmitted data packet/a retransmitted data packet.

In some embodiments, before the second device generates the second authentication code based on the second information, the first key, and the first data packet, the method further includes: the second device obtains an initial value of the second information in the second transmission system.

In some embodiments, that the second device determines a receiving status of the first data packet based on the second authentication code specifically includes: the second device determines the receiving status of the first data packet based on whether the first authentication code is the same as the second authentication code.

In some embodiments, that the second device compares the first authentication code with the second authentication code specifically includes: when the first authentication code is the same as the second authentication code, the second device determines that the first data packet is successfully received;when the first authentication code is different from the second authentication code, the second device determines that the first data packet fails to be received; orwhen the first authentication code is different from the second authentication code, the second device updates the second information and generates a temporary authentication code based on updated second information, and the second device compares the temporary authentication code with the first authentication code to determine the receiving status of the first data packet.

When the temporary authentication code is the same as the first authentication code, the second device generates and sends, to the first device, a first application receipt including second indication information, where the second indication information indicates a message ID of a latest successfully received data packet; or when the temporary authentication code is different from the first authentication code, the second device generates and sends, to the first device, a first application receipt indicating that the first data packet fails to be received.

In some embodiments, after the second device determines that the first data packet is successfully received, the method further includes:recording information about time at which the first data packet is successfully received;recording a message ID corresponding to the first data packet; and/orthe second device adds a preset value to a value of the second information, where an adjusted value of the second information is different from the value of the second information.

In some embodiments, that the second device compares the second authentication code with the first authentication code specifically includes: when the second authentication code is the same as the first authentication code, the second device determines that the first data packet is successfully received, and generates a first application layer receipt indicating that the first data packet is successfully received; or when the second authentication code is different from the first authentication code, the second device determines that the first data packet fails to be received, and generates a first application layer receipt indicating that the first data packet fails to be received.

In some embodiments, that the second device compares the second authentication code with the first authentication code specifically includes: when the second authentication code is the same as the first authentication code, the second device determines that the first data packet fails to be received, and generates a first application layer receipt indicating that the first data packet fails to be received, where the first application layer receipt includes a message ID corresponding to a successfully received data packet; or when the second authentication code is different from the first authentication code, the second device determines that the first data packet fails to be received, and generates a first application layer receipt indicating that the first data packet fails to be received.

In some embodiments, after the second device determines the receiving status of the first data packet based on the second authentication code, the method further includes: when the second device determines, based on the second authentication code, that the first data packet is successfully received, the second device sends a first application receipt to the first device, where the first application receipt indicates that the first data packet is successfully received.

In some embodiments, after the second device determines the receiving status of the first data packet based on the second authentication code, the method further includes: when the second device determines, based on the second authentication code, that the first data packet fails to be received, the second device sends a first application receipt to the first device, where the first application receipt further includes a second message ID, and the second message ID indicates a message ID corresponding to a latest successfully transmitted data packet.

In some embodiments, after the second device determines the receiving status of the first data packet based on the second authentication code, the method further includes: when the second device determines, based on the second authentication code, that the first data packet fails to be received, the second device sends a first application receipt to the first device, where the first application receipt indicates that the first data packet fails to be received.

In some embodiments, when the second device determines, based on the second authentication code, that the first data packet is successfully received, the method further includes: the second device adds a preset value to a value of the second information, where an adjusted value of the second information is different from the value of the second information.

In some embodiments, when the second device determines, based on the second authentication code, that the first data packet fails to be received, the method further includes: the second device adjusts a value of the second information to a preset value.

In some embodiments, when the second device determines, based on the second authentication code, that the first data packet fails to be received, the method further includes: the second device receives third information sent by the first device; and the second device adjusts a value of the second information to a value of the third information.

In some embodiments, after the second device determines the receiving status of the first data packet based on the second authentication code, the method further includes: the second device sends second application receipt information to the first device in the second transmission system, where the second application receipt information indicates a status of receiving the first data packet by the second device in the first transmission system.

According to a ninth aspect, this application provides a transmission method, including:a first device receives a third data packet in a first transmission system; andthe first device generates a third authentication code based on fifth information and the third data packet, where the fifth information is sending time information or fifth context information; and the first device determines a receiving status of the third data packet based on the third authentication code.

In some embodiments, that the first device generates a third authentication code based on fifth information and the third data packet specifically includes: the first device generates the third authentication code based on the fifth information, the third data packet, and a first key.

In some embodiments, before the first device generates the third authentication code based on the fifth information, the first key, and the third data packet, the method further includes: the first device obtains the first key, where the first key is obtained by the first device through negotiation with a second device in a second transmission system, and the first transmission system is different from the second transmission system.

In some embodiments, before the first device generates the third authentication code based on the fifth information, the first key, and the third data packet, the method further includes: the first device establishes a communication connection to a fourth device; and the first device obtains the first key through the fourth device.

In some embodiments, the first key is a key preset by the first device.

In some embodiments, the first transmission system is a satellite transmission system, and the second transmission system is a non-satellite transmission system.

In some embodiments, the second transmission system is a cellular transmission system or a wireless local area network WLAN transmission system.

In some embodiments, the first device obtains the first key by negotiating with the second device by using a generic bootstrapping architecture (Generic Bootstrapping Architecture, GBA) procedure in the second transmission system.

In some embodiments, the first device determines a fourth authentication code based on the third data packet.

In some embodiments, that a first device receives a third data packet in a first transmission system specifically includes: the first device receives at least one fourth data packet sent by the second device; and a satellite link control SLC layer of the first device and/or a message data convergence protocol MDCP layer of the first device process/processes the at least one fourth data packet into the third data packet.

In some embodiments, the fifth information is the receiving time information.

In some embodiments, the receiving time information indicates time at which the first device receives the third data packet.

In some embodiments, the time at which the first device receives the third data packet is time at which the first device receives the 1stfourth data packet in the at least one fourth data packet.

In some embodiments, the first device obtains the fifth information through positioning timing.

In some embodiments, the first device obtains the fifth information based on the receiving time information and a specified time granularity in a preset coding manner.

In some embodiments, the fifth information is the fifth context information, and the fifth context information indicates information about a quantity of third data packets successfully received by the first device, or a count value or a sequence number of the third data packet received by the first device.

In some embodiments, the third data packet includes sixth indication information, and the sixth indication information indicates a fourth message ID/a fourth sequence number/a fourth count value of the third data packet.

In some embodiments, the third data packet includes fourth indication information, and the fourth indication information indicates that the third data packet is a newly transmitted data packet or a retransmitted data packet.

In some embodiments, before the first device generates the third authentication code based on the fifth information, the first key, and the third data packet, the method further includes:the first device obtains an initial value of the fifth information in the second transmission system.

In some embodiments, that the first device determines a receiving status of the third data packet based on the third authentication code specifically includes: the first device determines the receiving status of the third data packet based on whether the third authentication code is the same as the fourth authentication code.

In some embodiments, that the first device determines the receiving status of the third data packet based on whether the third authentication code is the same as the fourth authentication code specifically includes:when the third authentication code is the same as the fourth authentication code, the first device determines that the third data packet is successfully received;when the third authentication code is different from the fourth authentication code, the first device determines that the third data packet fails to be received; orwhen the third authentication code is different from the fourth authentication code, the first device generates temporary information based on the fifth information and generates a temporary authentication code based on the temporary information, and the first device compares the fourth authentication code with the temporary authentication code to determine the receiving status of the third data packet.

When the fourth authentication code is the same as the temporary authentication code, the first device generates and sends, to the second device, an indication application receipt; or when the fourth authentication code is different from the temporary authentication code, the first device generates and sends, to the second device, a failure application receipt.

In some embodiments, the indication application receipt includes fifth indication information, and a value of the fifth indication information is the same as a value of sixth indication information of a latest successfully received data packet.

In some embodiments, after the first device determines that the third data packet is successfully received, the method further includes:recording information about time at which the third data packet is successfully received;recording a message ID corresponding to the third data packet; and/oradding a preset value to a value of the fifth information, where an adjusted value of the fifth information is different from the value of the fifth information.

In some embodiments, after the first device determines the receiving status of the third data packet based on the third authentication code, the method further includes: the first device sends a third application receipt to the second device, where the third application receipt indicates the receiving status of the third data packet.

In some embodiments, after the first device determines the receiving status of the third data packet based on the third authentication code, the method further includes: when the first device determines that the receiving status of the third data packet is correct receiving, the first device adds a preset value to a value of the fifth information, where an adjusted value of the fifth information is different from the value of the fifth information.

In some embodiments, after the first device determines the receiving status of the third data packet based on the third authentication code, the method further includes: when the first device determines that the receiving status of the third data packet is failed receiving, the first device updates a value of the fifth information to a preset value. In some embodiments, the preset value is the initial value.

In some embodiments, the method further includes: the first device receives seventh information sent by the second device; and the first device updates the value of the fifth information to a value of the seventh information based on the seventh information.

In some embodiments, after the first device determines that the third data packet is successfully received, the method further includes: the first device displays third data.

In some embodiments, after the first device determines the receiving status of the third data packet based on the third authentication code, the method further includes:the first device sends third application receipt information to the second device in the second transmission system, where the third application receipt information indicates a status of receiving the third data packet by the second device in the first transmission system.

According to a tenth aspect, this application provides a transmission method, including:a second device generates a fourth authentication code based on sixth information and first data, where the sixth information is sending time information or sixth context information; an application AP layer of the second device generates a third data packet based on the fourth authentication code and the first data; and the second device sends the third data packet to a first device in a first transmission system.

In some embodiments, that a second device generates a fourth authentication code based on sixth information and first data specifically includes: the second device generates the fourth authentication code based on the sixth information, a first key, and the first data.

In some embodiments, before the second device generates the fourth authentication code based on the sixth information, the first key, and the first data, the method further includes:the second device obtains the first key, where the first key is obtained by the first device through negotiation with the second device in a second transmission system, and the first transmission system is different from the second transmission system.

In some embodiments, the first key is a preset key.

In some embodiments, the second device obtains the first key by negotiating with the first device by using a generic bootstrapping architecture (GBA) procedure in the second transmission system.

In some embodiments, that the second device sends the third data packet to a first device in a first transmission system specifically includes: the second device sends the third data packet to the first device through a third device.

In some embodiments, the sixth information indicates the sending time information.

In some embodiments, the sending time information indicates time at which the fourth authentication code is generated or time at which the second device sends the third data packet.

In some embodiments, the time at which the second device sends the third data packet is time at which the second device delivers the third data packet to the third device, or is time estimated by the second device for sending the third data packet to the first device.

In some embodiments, after obtaining the third data packet through packaging, the second device adds the fourth authentication code to the third data packet.

In some embodiments, a format of the generation time of the fourth authentication code is universal time coordinated UTC or Greenwich mean time GMT.

In some embodiments, a minimum time granularity of the generation time of the fourth authentication code includes any one of a year, a month, a day, an hour, a minute, or a second.

In some embodiments, the second device obtains the sixth information based on the sending time information and a specified time granularity in a specified encoding manner.

In some embodiments, before the second device generates the fourth authentication code based on the sixth information, the first key, and the first data, the method further includes: the second device obtains the sixth information through the third device.

In some embodiments, before the second device generates the fourth authentication code based on the sixth information, the first key, and the first data, the method further includes: an MDCP layer/an SLC layer of the second device obtains eighth information; and the second device generates the sixth information based on the eighth information at the AP layer.

In some embodiments, the second device generates the sixth information at the MDCP layer/the SLC layer.

In some embodiments, the sixth information is the sixth context information, and the sixth context information indicates information about a quantity of third data packets successfully sent by the second device, information about a quantity of application receipts successfully received by the second device, or a count value or a sequence value of the third data packet sent by the second device.

In some embodiments, the method further includes: the second device obtains an initial value of the sixth information in the second transmission system; or the second device resets the sixth information to a preset value in the second transmission system.

In some embodiments, the third data packet further includes sixth indication information, and the sixth indication information indicates a fourth message ID of the third data packet, or the sixth indication information indicates a fourth count value or a fourth sequence number of the third data packet.

In some embodiments, when the sixth indication information indicates the fourth count value or the fourth sequence number of the third data packet, the method further includes: the application layer of the second device associates the fourth count value or the fourth sequence number with the third data packet, and the second device adds a preset value to a value of the fourth count value or the fourth sequence number.

In some embodiments, the third data packet further includes fourth indication information, and the fourth indication information indicates new transmission/retransmission information of the third data packet.

In some embodiments, that an application AP layer of the second device generates a third data packet based on the fourth authentication code and the first data specifically includes:the application layer of the second device encrypts the fourth authentication code and the first data based on the first key, to generate the third data packet, where the third data packet includes an encrypted fourth authentication code and encrypted first data.

In some embodiments, after the second device sends the third data packet, the method further includes:the second device receives a third application layer receipt sent by the first device, where the third application layer receipt indicates a status of receiving the third data packet by the first device.

In some embodiments, after the second device receives the third application layer receipt sent by the first device, the method further includes: the second device adds a preset value to a value of the sixth information, where an adjusted value of the sixth information is different from the value of the sixth information.

In some embodiments, the second device receives fourth application receipt information in the second transmission system, where the fourth application receipt information indicates a status of sending the third data packet by the second device in the first transmission system; andthe second device updates a sending status based on the fourth application receipt information.

In some embodiments, the second device deletes the successfully sent third data packet.

According to an eleventh aspect, this application provides a transmission method, including:a sending device generates an authentication code A based on information A and original data, where the information A is sending time information or context information A; the sending device obtains a data packet based on the authentication code A and the original data; and the sending device sends the data packet to a receiving device in a first transmission system.

In some embodiments, that a sending device generates an authentication code A based on information A and original data specifically includes: the sending device generates the authentication code A based on the information A, a specified key, and the original data.

In some embodiments, the sending device obtains the specified key by negotiating with the receiving device in a second transmission system.

In some embodiments, the first transmission system is different from the second transmission system.

In some embodiments, the specified key is a key preset by the sending device.

In some embodiments, the second transmission system is a cellular transmission system or a wireless local area network WLAN transmission system, and the first transmission system is a satellite transmission system.

In some embodiments, the sending device obtains the specified key by negotiating with the receiving device by using a generic bootstrapping architecture GBA procedure in the second transmission system.

In some embodiments, the information A is the sending time information, and the information A indicates sending time of the data packet.

In some embodiments, time at which the sending device sends the data packet is time at which an application AP layer of the sending device sends the data packet to a message data convergence protocol MDCP layer, or is time estimated by the sending device for sending the data packet to the receiving device.

In some embodiments, the information A is the context information A, and the information A indicates information about a quantity of sent data packets, or a sequence number or a count value of the data packet.

In some embodiments, the data packet further includes a message ID field A, and the message ID field A is used to identify the data packet.

In some embodiments, the data packet further includes a sequence number field A, and the sequence number field A is used to identify the data packet and further indicates the information A.

In some embodiments, the sending device associates a sequence number A with the data packet, and generates the sequence number field A based on the sequence number A.

In some embodiments, the sending device associates a message ID with the data packet, and generates the message ID field A based on the message ID.

In some embodiments, the data packet further includes a retransmission indication field, and the retransmission indication field indicates that the data packet is a retransmitted data packet or a newly transmitted data packet.

In some embodiments, the sending device encrypts the original data and the authentication code A by using the specified key, and then adds packet header information in front of encrypted original data and an encrypted authentication code A, to obtain the data packet. The packet header information includes an encryption indication field, and the encryption indication field indicates an encryption algorithm used by the sending device.

In some embodiments, after the sending device sends the data packet to the receiving device in the first transmission system, the method further includes: the sending device adds a preset value to the sequence number A; and the sending device adjusts a value of the context information A based on an adjusted sequence number A.

In some embodiments, that the sending device adjusts a value of the context information A based on an adjusted sequence number A specifically includes: the sending device determines a value of a hyper frame number A based on the adjusted sequence number A, and adjusts the value of the context information A based on the adjusted sequence number A and the hyper frame number A.

In some embodiments, the sending device is a terminal, and the receiving device is a satellite network device.

In some embodiments, the sending device is a satellite network device, and the receiving device is a terminal.

In some embodiments, after the sending device sends the data packet to the receiving device in the first transmission system, the method further includes: after receiving a success application receipt sent by the receiving device, the sending device adds a preset value to a value of the context information A, where the success application receipt indicates that the receiving device successfully receives the data packet.

In some embodiments, when the sending device is a terminal, after the sending device sends the data packet to the receiving device in the first transmission system, the method further includes: after the sending device receives the success application receipt sent by the receiving device, the sending device displays success prompt information, where the success prompt information prompts a user that the data packet is successfully sent.

In some embodiments, when the sending device is a satellite network device, after the sending device sends the data packet to the receiving device in the first transmission system, the method further includes: after the sending device receives the success application receipt sent by the receiving device, the sending device deletes the data packet in a memory.

In some embodiments, after the sending device sends the data packet to the receiving device in the first transmission system, the method further includes: after receiving a failure application receipt sent by the receiving device, the sending device adds a preset value to a value of the context information A, where the failure application receipt indicates that the receiving device fails to receive the data packet.

In some embodiments, after the sending device sends the data packet to the receiving device in the first transmission system, the method further includes: after receiving a failure application receipt sent by the receiving device, the sending device adjusts a value of the context information A to a preset value.

In some embodiments, after the sending device adjusts the value of the context information A to the preset value, the method further includes: the sending device sends the value of the context information A to the receiving device.

In some embodiments, after the sending device sends the data packet to the receiving device in the first transmission system, the method further includes: after the sending device receives a failure application receipt sent by the receiving device, the sending device negotiates with the receiving device about a value of the context information A in the second transmission system.

In some embodiments, when the sending device is a terminal, after the sending device sends the data packet to the receiving device in the first transmission system, the method further includes: after the sending device receives the failure application receipt sent by the receiving device, the sending device displays failure prompt information, where the failure prompt information prompts a user that the data packet fails to be sent.

In some embodiments, after the sending device sends the data packet to the receiving device in the first transmission system, the method further includes: after the sending device receives an indication application receipt sent by the receiving device, the sending device adds a preset value to a value of the context information A, where the indication application receipt indicates that the current data packet fails to be sent, the indication application receipt includes a message ID field B, and the message ID field B indicates a latest successfully sent data packet.

In some embodiments, when the sending device is a terminal, after the sending device sends the data packet to the receiving device in the first transmission system, the method further includes: after the sending device receives the indication application receipt sent by the receiving device, the sending device displays success prompt information and failure prompt information, where the success prompt information prompts a user that the data packet indicated by the message ID field B is successfully sent, and the failure prompt information prompts the user that the current data packet fails to be sent.

In some embodiments, when the sending device is a terminal, after the sending device sends the data packet to the receiving device in the first transmission system, the method further includes: the sending device displays sending prompt information, where the sending prompt information prompts the user that the sending device has sent the data packet to the receiving device.

In some embodiments, after the sending device sends the data packet to the receiving device in the first transmission system, the method further includes: after receiving, in the second transmission system, a set application receipt sent by the receiving device, the sending device determines, based on the set application receipt, a receiving status of the data packet sent in the first transmission system.

According to a twelfth aspect, this application provides a transmission method, including: a receiving device receives, in a first transmission system, a data packet sent by a sending device; the receiving device generates an authentication code B based on information B and the data packet, where the information B is receiving time information or context information B; and the receiving device determines a receiving status of the data packet based on the authentication code B.

In some embodiments, that the receiving device generates an authentication code B based on information B and original data specifically includes: the receiving device generates the authentication code B based on the information B, a specified key, and the original data.

In some embodiments, the receiving device obtains the specified key by negotiating with the sending device in a second transmission system.

In some embodiments, the first transmission system is different from the second transmission system.

In some embodiments, the specified key is a key preset by the receiving device.

In some embodiments, the second transmission system is a cellular transmission system or a wireless local area network WLAN transmission system, and the first transmission system is a satellite transmission system.

In some embodiments, the receiving device obtains the specified key by negotiating with the sending device by using a generic bootstrapping architecture GBA procedure in the second transmission system.

In some embodiments, the information B is the receiving time information, and the information B indicates receiving time of the data packet.

In some embodiments, time at which the receiving device receives the data packet is time at which a satellite link control SLC layer of the receiving device receives the first satellite link control protocol data unit SLC PDU of the data packet.

In some embodiments, the information B is the context information B, and the information B indicates information about a quantity of received data packets, or a sequence number or a count value of the data packet.

In some embodiments, the data packet further includes a sequence number field A, and the sequence number field A is used to identify the data packet and further indicates the context information B.

In some embodiments, the receiving device determines a value of the context information B based on the sequence number field A and a stored sequence number B.

In some embodiments, that the receiving device determines a value of the context information B based on the sequence number field A and a stored sequence number B specifically includes: the receiving device determines a value of a hyper frame number B based on the sequence number field A and a value of the sequence number B; and the receiving device obtains the context information B based on the sequence number field A and the hyper frame number B.

In some embodiments, when a value of the sequence number field A is less than or equal to the value of the sequence number B, the receiving device adds a preset value to the value of the hyper frame number B.

In some embodiments, the receiving device concatenates the hyper frame number B and the sequence number field A, to obtain the context information B.

In some embodiments, after obtaining the context information B, the receiving device may adjust the value of the sequence number B to the value of the sequence number field A.

In some embodiments, the data packet further includes a message ID field A, and the message ID field A is used to identify the data packet.

In some embodiments, the receiving device is a satellite network device, and the sending device is a terminal.

In some embodiments, the receiving device is a terminal, and the sending device is a satellite network device.

In some embodiments, the receiving device obtains an authentication code A based on the data packet.

In some embodiments, that the receiving device determines a receiving status of the data packet based on the authentication code B specifically includes: the receiving device compares the authentication code A with the authentication code B to determine the receiving status of the data packet.

In some embodiments, that the receiving device compares the authentication code A with the authentication code B to determine the receiving status of the data packet specifically includes: when the authentication code B is the same as the authentication code A, the receiving device determines that the data packet is successfully received.

In some embodiments, after the receiving device determines that the data packet is successfully received, the method further includes: the receiving device generates a success application receipt, where the success application receipt indicates that the receiving device successfully receives the data packet; and the receiving device sends the success application receipt to the sending device.

In some embodiments, the data packet includes the message ID field A; and after the receiving device determines that the data packet is successfully received, the method further includes: the receiving device adjusts a value of a message ID field B to a value of the message ID field A.

In some embodiments, when the receiving device is a terminal, after the receiving device determines that the data packet is successfully received, the method further includes: the receiving device displays the original data.

In some embodiments, when the receiving device is a satellite network device, after the receiving device determines that the data packet is successfully received, the method further includes: the receiving device sends the original data to an electronic device in the second transmission system through the second transmission system.

In some embodiments, that the receiving device compares the authentication code A with the authentication code B to determine the receiving status of the data packet specifically includes: when the authentication code B is different from the authentication code A, the receiving device determines that the data packet fails to be received.

In some embodiments, after the receiving device determines that the data packet fails to be received, the method further includes: the receiving device generates a failure application receipt, where the failure application receipt indicates that the receiving device fails to receive the data packet; and the receiving device sends the failure application receipt to the sending device.

In some embodiments, after the receiving device determines that the data packet fails to be received, the method further includes: the receiving device generates an indication application receipt based on a message ID field B, where the indication application receipt indicates that the receiving device fails to receive the data packet, and the message ID field B indicates a latest data packet successfully received by the receiving device; and the receiving device sends the indication application receipt to the sending device.

In some embodiments, when the authentication code B is different from the authentication code A, after the receiving device determines that the data packet fails to be received, the method further includes: the receiving device generates information C based on the information B and generates an authentication code C based on the information C; and the receiving device determines, based on the authentication code C, whether the sending device does not receive a latest success application receipt.

In some embodiments, when the authentication code C is the same as the authentication code A, that is, the receiving device determines that the sending device does not receive the latest sent success application receipt, the receiving device sends a success application receipt to the sending device.

In some embodiments, when the authentication code C is different from the authentication code A, the receiving device sends a failure application receipt to the sending device.

In some embodiments, the data packet further includes a retransmission indication field, and the retransmission indication field indicates that the data packet is a retransmitted data packet or a newly transmitted data packet.

In some embodiments, when the authentication code B is different from the authentication code A, after the receiving device determines that the data packet fails to be received, the method further includes: the receiving device determines that the data packet includes a retransmission indication field indicating that the data packet is a newly transmitted data packet, and the receiving device generates and sends, to the sending device, a failure application receipt.

In some embodiments, when the authentication code B is different from the authentication code A, after the receiving device determines that the data packet fails to be received, the method further includes: the receiving device determines that the data packet includes a retransmission indication field indicating that the data packet is a retransmitted data packet; the receiving device generates information C based on the information B and generates an authentication code C based on the information C; and the receiving device determines, based on the authentication code C, whether the sending device does not receive a latest success application receipt.

In some embodiments, when the authentication code C is the same as the authentication code A, that is, the receiving device determines that the sending device does not receive the latest sent success application receipt, the receiving device sends a success application receipt to the sending device.

In some embodiments, when the authentication code C is different from the authentication code A, the receiving device sends a failure application receipt to the sending device.

In some embodiments, the receiving device sends, in the second transmission system, a set application receipt to the sending device, where the set application receipt indicates a status of receiving the data packet of the sending device by the receiving device in the first transmission system.

According to a thirteenth aspect, this application provides a satellite communication system, including a sending device and a receiving device.

The sending device is configured to generate an authentication code A based on information A and original data, where the information A is sending time information or context information A.

The sending device is further configured to obtain a data packet based on the authentication code A and the original data.

The sending device is further configured to send the data packet to the receiving device in a first transmission system.

The receiving device is configured to receive, in the first transmission system, the data packet sent by the sending device.

The receiving device is further configured to generate an authentication code B based on the information B and the data packet, where the information B is receiving time information or context information B.

The receiving device is further configured to determine a receiving status of the data packet based on the authentication code B.

In some embodiments, this application provides a communication apparatus, including one or more processors, one or more memories, and a transceiver. The transceiver and the one or more memories are coupled to the one or more processors, the one or more memories are configured to store computer program code, the computer program code includes computer instructions, and when the one or more processors execute the computer instructions, the communication apparatus is enabled to perform the method according to either of the eleventh aspect or the twelfth aspect.

In some embodiments, the communication apparatus is a terminal or a satellite network device.

In some embodiments, this application provides a computer-readable storage medium. The computer-readable storage medium stores instructions, and when the instructions are run on a computer, the computer is enabled to perform the method according to either of the eleventh aspect or the twelfth aspect.

In some embodiments, this application provides a chip or a chip system. The chip or the chip system is applied to a terminal and includes a processing circuit and an interface circuit. The interface circuit is configured to receive code instructions and transmit the code instructions to the processing circuit. The processing circuit is configured to run the code instructions to perform the method according to either of the eleventh aspect or the twelfth aspect.

According to a fourteenth aspect, this application provides a communication apparatus, including one or more processors, one or more memories, and a transceiver. The transceiver and the one or more memories are coupled to the one or more processors, the one or more memories are configured to store computer program code, the computer program code includes computer instructions, and when the one or more processors execute the computer instructions, the communication apparatus is enabled to perform the method in any one of the first aspect, the fourth aspect, the seventh aspect, or the ninth aspect or the possible implementations of the first aspect, the fourth aspect, the seventh aspect, or the ninth aspect.

The communication apparatus may be a terminal or a device in another product form.

According to a fifteenth aspect, this application provides a communication apparatus, including one or more processors, one or more memories, and a transceiver. The transceiver and the one or more memories are coupled to the one or more processors, the one or more memories are configured to store computer program code, the computer program code includes computer instructions, and when the one or more processors execute the computer instructions, the communication apparatus is enabled to perform the method in any one of the second aspect, the fifth aspect, the eighth aspect, or the tenth aspect or the possible implementations of the second aspect, the fifth aspect, the eighth aspect, or the tenth aspect.

The communication apparatus may be a satellite network device, or any network element or a combination of a plurality of network elements in the satellite network device.

According to a sixteenth aspect, this application provides a communication apparatus, including one or more processors, one or more memories, and a transceiver. The transceiver and the one or more memories are coupled to the one or more processors, the one or more memories are configured to store computer program code, the computer program code includes computer instructions, and when the one or more processors execute the computer instructions, the communication apparatus is enabled to perform the method in any one of the third aspect or the sixth aspect or the possible implementations of the third aspect or the sixth aspect.

The communication apparatus may be any network element or a combination of a plurality of network elements in a satellite network device.

According to a seventeenth aspect, this application provides a computer storage medium, including computer instructions. When the computer instructions are run on a computer, the computer is enabled to perform the method in any one of the first aspect, the fourth aspect, the seventh aspect, or the ninth aspect or the possible implementations of the first aspect, the fourth aspect, the seventh aspect, or the ninth aspect.

According to an eighteenth aspect, this application provides a computer storage medium, including computer instructions. When the computer instructions are run on a computer, the computer is enabled to perform the method in any one of the second aspect, the fifth aspect, the eighth aspect, or the tenth aspect or the possible implementations of the second aspect, the fifth aspect, the eighth aspect, or the tenth aspect.

According to a nineteenth aspect, this application provides a computer storage medium, including computer instructions. When the computer instructions are run on a computer, the computer is enabled to perform the method in any one of the third aspect or the sixth aspect or the possible implementations of the third aspect or the sixth aspect.

According to a twentieth aspect, this application provides a computer program product. When the computer program product runs on a computer, the computer is enabled to perform the method in any one of the first aspect, the fourth aspect, the seventh aspect, or the ninth aspect or the possible implementations of the first aspect, the fourth aspect, the seventh aspect, or the ninth aspect.

According to a twenty-first aspect, this application provides a computer program product. When the computer program product runs on a computer, the computer is enabled to perform the method in any one of the second aspect, the fifth aspect, the eighth aspect, or the tenth aspect or the possible implementations of the second aspect, the fifth aspect, the eighth aspect, or the tenth aspect.

According to a twenty-second aspect, this application provides a computer program product. When the computer program product runs on a computer, the computer is enabled to perform the method in any one of the third aspect or the sixth aspect or the possible implementations of the third aspect or the sixth aspect.

According to a twenty-third aspect, this application provides a chip or a chip system. The chip or the chip system is applied to a terminal and includes a processing circuit and an interface circuit. The interface circuit is configured to receive code instructions and transmit the code instructions to the processing circuit. The processing circuit is configured to run the code instructions to perform the method in any one of the first aspect, the fourth aspect, the seventh aspect, or the ninth aspect or the possible implementations of the first aspect, the fourth aspect, the seventh aspect, or the ninth aspect.

DETAILED DESCRIPTION

The following clearly describes technical solutions in embodiments of this application in detail with reference to the accompanying drawings. In description of embodiments of this application, “/” means “or” unless otherwise specified. For example, A/B may represent A or B. In this specification, “and/or” describes only an association relationship for describing associated objects and indicates that three relationships may exist. For example, A and/or B may indicate the following three cases: Only A exists, both A and B exist, and only B exists.

The following terms “first” and “second” are merely intended for a purpose of description, and shall not be understood as an indication or implication of relative importance or implicit indication of a quantity of indicated technical features. Therefore, a feature limited by “first” or “second” may explicitly or implicitly include one or more features. In description of embodiments of this application, “a plurality of” means two or more unless otherwise specified.

The following describes a satellite communication system10according to an embodiment of this application.

As shown inFIG.1A, the satellite communication system10may include but is not limited to a terminal100, a satellite21, a satellite network device200, a cellular network device400, a terminal300, and the like.

The terminal100in a satellite network may send a satellite message to the terminal300in a cellular network. Specifically, the terminal100may first send a satellite message to the satellite21. The satellite21performs only relay, and may directly forward, to the satellite network device200on the ground, the satellite message sent by the terminal100. The satellite network device200may parse, according to a satellite communication protocol, the satellite message forwarded by the satellite21, and forward, to the cellular network device400, message content parsed out from the satellite message. The cellular network device400may forward the message content to the terminal300by using a cellular communication network of some approaches.

The terminal300in the cellular network may also send a satellite message to the terminal100in the satellite network. In an outbound process, the terminal300may send an SMS message to a short message service center25over a cellular communication network of some approaches. The short message service center25may forward the SMS message of the terminal300to the satellite network device200. The satellite network device200may relay the SMS message of the terminal300to the terminal100by using the satellite21.

In some embodiments, the satellite communication system10may further include an emergency rescue platform and an emergency rescue center. The satellite network device200may send, to the emergency rescue center by using the emergency rescue platform, a satellite message that is of an emergency rescue type and that is sent by the terminal100.

The satellite network device200may include but is not limited to a ground transceiver station22, a central station23, and a converged communication platform24. The ground transceiver station22may include one or more devices each having a sending function and one or more devices each having a receiving function, or may include one or more devices each having a sending function and a receiving function. This is not limited herein. The ground transceiver station22may be configured to perform a data processing function of the satellite network device200at a physical (PHY) layer. The central station23may be configured to perform a data processing function of the satellite network device200at a satellite link control (SLC) layer and a message data convergence protocol (MDCP) layer. The converged communication platform24may be configured to perform a data processing function at an application (AP) layer. The converged communication platform24may also be referred to as a converged communication gateway24.

The cellular network device400may include but is not limited to the short message service center (SMSC)25, a home location register (HLR)28, a telecommunication business and operation support system (BOSS)29, a bootstrapping server (BSF)41, and a home subscriber server (HSS)42. The bootstrapping server41and the home subscriber server42are not shown inFIG.1A.

The short message service center25may be configured to forward, to a terminal in the cellular network, data sent by the satellite network device200, or may be configured to forward data in the cellular network to the satellite network device200.

The telecommunication business and operation support system29may be configured to perform terminal registration. The telecommunication business and operation support system29may allocate a corresponding personal identity (ID) number or the like to a terminal (for example, the terminal100) during registration. The ID number may be a mobile number of the terminal.

The bootstrapping server41may be configured to receive service requests of the terminal100and the satellite network device200. The bootstrapping server41may be further configured to store authentication parameters obtained from the home subscriber server42. The authentication parameters may include but are not limited to a random (RAND), an authentication token (AUTN), an expected response (XRES), a cipher key (CK), and an integrity key (IK). The bootstrapping server41may further generate a session key_network application function (Ks_NAF) based on the authentication parameters. The bootstrapping server41may further send the Ks_NAF to the satellite network device200. The bootstrapping server41may further send some authentication parameters (the RAND and the AUTN) to the terminal100.

The home location register28and/or the home subscriber server42may be configured to generate the authentication parameters and send the authentication parameters to the bootstrapping server41. The RAND and the AUTN may be used by the terminal100to calculate the CK, the IK, and a response (RES). The XRES in the authentication parameters may be used by the satellite network device200to authenticate whether the terminal100is a valid terminal. Only when the satellite network device200determines that the XRES is the same as the RES, the satellite network device200determines that the terminal100is a valid terminal (authentication performed by the satellite network device200succeeds), and the satellite network device200and the terminal100may encrypt/decrypt communication data by using the Ks_NAE The CK and the IK in the authentication parameters may be used to calculate the Ks_NAF.

It should be noted that the Ks_NAF is a specified key (also referred to as a first key) in the following embodiments of this application. The specified key may be used to encrypt/decrypt data. In some embodiments, the specified key may be further used to generate an authentication code.

It should be noted that a process in which the terminal100sends data to the satellite network device200is inbound. A process in which the satellite network device200sends data to the terminal100is outbound.

In some embodiments, the ground transceiver station22and the central station23may be a same device. For example, the device may be a ground central station31in a satellite communication system20shown inFIG.1B. The ground central station31may be configured to perform a data processing function of a satellite network device200at a physical layer, a satellite link control layer, and a message data convergence protocol layer.

In some embodiments, a sending device and a receiving device may obtain a specified key in a second transmission system. The sending device may obtain an authentication code A based on the specified key and original data, and send, to the receiving device in a first transmission system, a data packet including the authentication code A. The receiving device may generate an authentication code B based on the specified key and the data packet. The receiving device may determine a receiving status of the data packet based on the authentication code B. In this way, the sending device and the receiving device can update and obtain the specified key by using an abundant supply of air interface resources of a cellular network, thereby saving an air interface resource that is of a satellite network and that is required for negotiating about the specified key. The sending device and the receiving device may alternatively transmit the authentication code and the original data together, to reduce interaction steps required for authentication, thereby further saving an air interface resource of the satellite network.

It should be noted that the first transmission system may be a satellite transmission system (also referred to as a satellite network or a satellite communication system), for example, the foregoing satellite communication system10. In some embodiments, the first transmission system may be a BeiDou network transmission system. It should be further noted that the second transmission system is a transmission system that is not the first transmission system. For example, the second transmission system may be a cellular transmission system (also referred to as a cellular network), or the second transmission system may be a wireless local area network (wireless local area network, WLAN) transmission system. This is not limited in embodiments of this application.

In the following embodiments of this application, a satellite network and a cellular network are used as an example to describe a transmission method.

The following describes a protocol architecture of inbound data in a satellite communication system10according to an embodiment of this application.

FIG.2A(1) andFIG.2A(2) are a schematic diagram of a protocol encapsulation architecture of inbound data in a satellite communication system10according to an embodiment of this application.

As shown inFIG.2A(1) andFIG.2A(2), transmission protocol layers in a terminal100may be divided into an application layer, a message data convergence protocol layer, a satellite link control layer, and a physical layer.

When the terminal100sends data to a satellite network device200, a working procedure of transmission protocols in the terminal100may be as follows:

At the AP layer, the terminal100generates a first data packet. The first data packet includes original data and a first authentication code generated based on a specified key and the original data. For example, the terminal100may generate the first authentication code based on the original data (also referred to as first data) and the specified key, concatenate the first authentication code and the original data together, and perform processing (for example, add a packet header), to obtain the first data packet. The original data may include but is not limited to data entered by a user, a receiving user quantity indication, a receiving user ID, location information of the terminal100, a voice, an image, an animation, and the like.

In some embodiments, the terminal100may encrypt, by using the specified key, the first authentication code and the original data that are concatenated together, to obtain encrypted data. The terminal100may add packet header information in front of the encrypted data, to obtain the first data packet. The packet header information may include but is not limited to an encryption indication field. The encryption indication field may indicate an encryption algorithm used by the terminal100to encrypt data.

In some embodiments, before the terminal100encrypts the first authentication code and the original data that are concatenated together, the terminal100may first compress the first authentication code and the original data that are concatenated together. It may be understood that the packet header information may further include a compression indication field. The compression indication field may indicate a compression algorithm used by the terminal100to compress data.

In some embodiments, the terminal100may encrypt only the original data, to obtain encrypted data. The terminal100may add packet header information in front of the encrypted data, to obtain the first data packet. The packet header information may include but is not limited to an encryption indication field. Finally, the terminal100adds the first authentication code to the first data packet, to obtain the first data packet including the first authentication code and the encrypted data.

At the MDCP layer, the terminal100may obtain, through an inter-layer interface, the first data packet delivered by the AP layer, and use the first data packet as an MDCP SDU. At the MDCP layer, the terminal100may add padding (padding) data to a trailer of the MDCP SDU to a specified length, and add a redundant length indication field to the MDCP SDU. The redundant length indication field may indicate a length of the padding data. The terminal100may split an MDCP SDU to which the padding data and the redundant length indication field are added into one or more pieces of fixed-length MDCP segment data (M_segment), and add a successor indication field to a header of each piece of MDCP segment data, to obtain an MDCP PDU. In other words, the MDCP PDU includes M_segment and the successor indication field. The successor indication field may indicate a sequence of the current MDCP PDU in a plurality of MDCP PDUs in the same MDCP SDU, whether there is an MDCP PDU behind the current MDCP PDU, or whether the current MDCP PDU is a unique MDCP PDU in the MDCP SDU.

At the SLC layer, the terminal100may obtain, through an inter-layer interface, the MDCP PDUs delivered by the MDCP layer, and use the MDCP PDUs as SLC SDUs. At the SLC layer, the terminal100may segment the SLC SDU into one or more (for example, four) pieces of fixed-length SLC segment data (S_segment), and add frame header information (also referred to as frame format indication information) to a header of each S_segment, to obtain an SLC PDU. The frame header information may include but is not limited to a user ID field, a total frame quantity field, and a frame sequence number field. The user ID field may indicate a terminal (for example, the terminal100) that generates the SLC PDU. The total frame quantity field may indicate a total quantity of SLC PDUs included in the SLC SDU to which the SLC PDU belongs. The frame sequence number field may indicate a sequence number of the SLC PDU in the SLC SDU to which the SLC PDU belongs.

It should be noted that herein, the SLC PDU may be referred to as a second data packet. That is, the terminal100may process the first data packet into at least one second data packet by using the MDCP layer and the SLC layer. Alternatively, the MDCP segment may be referred to as a second data packet, and the terminal100may process the first data packet into at least one second data packet by using the MDCP layer.

At the PHY layer, the terminal100may obtain, through an inter-layer interface, SLC PDUs delivered by the SLC layer. The terminal100may perform a sending processing (for example, encoding, modulation, and spreading) operation on the SLC PDUs, to obtain inbound data. Then, the terminal100may send the inbound data to a satellite21, and the satellite21relays the inbound data to the satellite network device200.

FIG.2B(1) andFIG.2B(2) are a schematic diagram of a protocol parsing architecture of inbound data in a satellite communication system10according to an embodiment of this application.

As shown inFIG.2B(1) andFIG.2B(2), transmission protocol layers in a satellite network device200may be divided into an application layer, a message data convergence protocol layer, a satellite link control layer, and a physical layer. The satellite network device200may include but is not limited to a ground transceiver station22, a central station23, and a converged communication platform24. The ground transceiver station22may be configured to be responsible for protocol processing at the PHY layer. The central station23may be configured to be responsible for protocol processing at the SLC layer and the MDCP layer. The converged communication platform24may be configured to be responsible for protocol processing at the AP layer.

When the satellite network device200receives data sent by a terminal100, a working procedure of a BeiDou packet transfer protocol in the satellite network device200may be as follows:

At the PHY layer, the satellite network device200may obtain inbound data sent by the terminal100. The satellite network device200may deliver data obtained by performing a receiving processing (for example, despreading, demodulation, and decoding) operation on the inbound data to the SLC layer through an inter-layer interface, and use the data as SLC PDUs at the SLC layer.

At the SLC layer, the satellite network device200may concatenate, into one SLC SDU based on frame header information of the SLC PDUs, SLC PDUs belonging to a same SLC SDU of a same terminal. The satellite network device200may deliver the SLC SDU to the MDCP layer through an inter-layer interface, and use the SLC SDU as an MDCP PDU at the MDCP layer.

At the MDCP layer, the satellite network device200may concatenate, together in a receiving sequence, all MDCP PDUs belonging to a same MDCP SDU, and remove padding data and a redundant length indication field from the concatenated MDCP PDUs, to obtain an MDCP SDU. The satellite network device200may deliver the MDCP SDU to the AP layer through an inter-layer interface, and use the MDCP SDU as a first data packet received at the AP layer. In this case, the SLC layer and the MDCP layer of the satellite network device200process the at least one second data packet (the SLC PDUs) to obtain the first data packet, or the MDCP layer of the satellite network device200processes at least one second data packet (the MDCP PDUs) to obtain the first data packet.

At the AP layer, the satellite network device200may generate a second authentication code based on a specified key and the first data packet, and determine a receiving status of the first data packet based on the second authentication code. Specifically, the satellite network device200may obtain original data in the first data packet, and then generate the second authentication code based on the specified key and the original data. The satellite network device200may obtain a first authentication code in the first data packet, and determine the receiving status of the first data packet by determining, through comparison, whether the first authentication code is the same as the second authentication code. When the first authentication code is the same as the second authentication code, the satellite network device200determines that the first data packet is successfully received. That is, the satellite network device200determines that the original data in the first data packet is data sent by the terminal100, and the satellite network device200may perform a corresponding operation on the original data (for example, forward the original data to called user equipment in a cellular network). When the first authentication code is different from the second authentication code, the satellite network device200determines that the first data packet fails to be received. That is, the satellite network device200determines that the original data in the first data packet is not data sent by the terminal100, and the satellite network device200may discard the first data packet.

In some embodiments, the first data packet includes encrypted data, and the encrypted data includes an encrypted first authentication code and encrypted original data. The satellite network device200may determine, based on a packet header of the first data packet, an encryption algorithm used by the terminal100. The satellite network device200may decrypt the first data packet based on the specified key and the encryption algorithm, to obtain the original data and the first authentication code. The satellite network device200may generate the second authentication code based on the specified key and the original data.

In some embodiments, after decrypting the encrypted data, the satellite network device200may obtain compressed data. After decompressing the compressed data, the satellite network device200obtains the first authentication code and the original data.

In some embodiments, the first data packet includes encrypted data and the first authentication code. The satellite network device200may directly obtain the first authentication code in the first data packet. The satellite network device200may perform a decryption operation on the encrypted data based on the specified key and an encryption indication field in packet header information, to obtain the original data.

In this embodiment of this application, the foregoing protocol processing process is merely an example for description, and a specific protocol processing operation is not limited in this application.

The following describes a protocol architecture of outbound data in a satellite communication system10according to an embodiment of this application.

FIG.3A(1) toFIG.3A(3) are a schematic diagram of a protocol encapsulation architecture of outbound data in a satellite communication system10according to an embodiment of this application.

As shown inFIG.3A(1) toFIG.3A(3), transmission protocol layers in a satellite network device200may be divided into an application layer, a message data convergence protocol layer, a satellite link control layer, and a physical layer.

When the satellite network device200sends data to a terminal100, a working procedure of a packet transfer protocol in the satellite network device200may be as follows:

At the AP layer, the satellite network device200generates a third data packet. The third data packet includes original data and a fourth authentication code. For example, the satellite network device200may generate the fourth authentication code based on the original data (also referred to as third data) and a specified key, concatenate the fourth authentication code and the original data, and perform processing (for example, add a packet header), to obtain the third data packet. The original data may include but is not limited to data, a text, a flag, a voice, an image, an animation, and the like that are sent by a third-party server (for example, a short message service center25).

In some embodiments, the satellite network device200may generate the fourth authentication code based on only the original data.

In some embodiments, the satellite network device200may encrypt, based on the specified key and an encryption algorithm, the original data and the fourth authentication code that are concatenated together, to obtain encrypted data. The satellite network device200may add a packet header in front of the encrypted data, to obtain the third data packet. The packet header may include but is not limited to an encryption indication field. The encryption indication field may indicate the encryption algorithm used by the satellite network device200to encrypt data.

In some embodiments, before encrypting the fourth authentication code and the original data that are concatenated together, the satellite network device200may first compress the fourth authentication code and the original data that are concatenated together. It may be understood that the packet header may further include a compression indication field. The compression indication field may indicate a compression algorithm used by the satellite network device200to compress data.

Further, in some embodiments, the satellite network device200may compress the fourth authentication code and the original data that are concatenated together, to obtain compressed data. The satellite network device200may add the compression indication field in front of the compressed data, and then encrypt, by using the specified key, the compressed data to which the compression indication field is added, to obtain encrypted data.

In some embodiments, the satellite network device200may encrypt only the original data, to obtain encrypted data. The satellite network device200may add packet header information in front of the encrypted data, to obtain the third data packet. The packet header information may include but is not limited to an encryption indication field. Finally, the satellite network device200adds the fourth authentication code to the third data packet, to obtain the third data packet including the fourth authentication code and the encrypted data.

At the MDCP layer, the satellite network device200may obtain, through an inter-layer interface, the third data packet delivered by the AP layer, and use the third data packet as an MDCP SDU. The satellite network device200may split the MDCP SDU into one or more pieces of MDCP segment data (M_segment), and add a successor indication field to a header of each piece of MDCP segment data, to obtain an MDCP PDU. In other words, the MDCP PDU includes M_segment and the successor indication field. The successor indication field may indicate a sequence of the current MDCP PDU in the same MDCP SDU, for example, whether the current MDCP PDU is a unique PDU, whether there is an MDCP PDU behind the current MDCP PDU, or whether the current MDCP PDU is the first MDCP PDU.

For example, a data length of the successor indication field may occupy 2 bits (bit). A meaning of a value of the successor indication field may be as follows:01: indicating that the MDCP PDU is a start MDCP PDU in a plurality of MDCP PDUs in the MDCP SDU;10: indicating that the MDCP PDU is an intermediate MDCP PDU in the plurality of MDCP PDUs in the MDCP SDU, namely, another MDCP PDU other than the start MDCP PDU and the last MDCP PDU in the MDCP SDU;11: indicating that the MDCP PDU is the last MDCP PDU in the plurality of MDCP PDUs in the MDCP SDU; and00: indicating that the MDCP PDU is a unique MDCP PDU in the MDCP SDU.

It should be noted that the successor indication field is merely an example, and does not constitute a specific limitation on this embodiment of this application.

At the SLC layer, the satellite network device200may obtain, through an inter-layer interface, the MDCP PDUs delivered by the MDCP layer, and use the MDCP PDUs as SLC SDUs. The satellite network device200may segment the SLC SDU into one or more (for example, four) pieces of SLC segment data (S_segment), and add frame header information to a header of each S_segment, to obtain an SLC PDU. The frame header information may include but is not limited to a user ID field, a total frame quantity field, and a frame sequence number field. The user ID field may be used to identify a receiving device (for example, the terminal100), and a value of the user ID field is an ID number of the receiving device. For detailed descriptions of the total frame quantity field and the frame sequence number field, refer to the foregoing embodiment in FIG.2A(1) andFIG.2A(2). Details are not described herein again. It should be noted that herein, the SLC PDU may be referred to as a fourth data packet. The satellite device200may process the third data packet into at least one fourth data packet at the MDCP layer and the SLC layer. Alternatively, the MDCP segment may be referred to as a fourth data packet, and the satellite device200may process the third data packet into at least one fourth data packet at the MDCP layer.

At the PHY layer, the satellite network device200may obtain, through an inter-layer interface, SLC PDUs delivered by the SLC layer, and use the SLC PDUs as user frames. The satellite network device200may concatenate user frames (also referred to as data frames) of one or more users together, and then add a frame header (for example, a version number) and a check bit, to obtain a physical frame. The satellite network device200may perform a sending processing (for example, encoding, modulation, and spreading) operation on the physical frame, to obtain encoded data of a message tributary (an S2C_d tributary). The satellite network device200may combine the encoded data of the S2C_d tributary and pilot data (also referred to as a secondary code) of a pilot tributary (an S2C_p tributary) into pilot encoded data, namely, outbound data, and sends the outbound data to a satellite21. The satellite21relays the outbound data to one or more terminals. It may be understood that the pilot data of the S2C_p tributary is related to a satellite beam. When the satellite beam is known information, the pilot data of the S2C_p tributary is also known, and does not need to be decoded. The encoded data of the S2C_d tributary needs to be decoded.

FIG.3B(1) toFIG.3B(3) are a schematic diagram of a protocol parsing architecture of outbound data in a satellite communication system10according to an embodiment of this application.

As shown inFIG.3B(1) toFIG.3B(3), transmission protocol layers in a terminal100may be divided into an application layer, a message data convergence protocol layer, a satellite link control layer, and a physical layer.

At the PHY layer, the terminal100may capture encoded data of an S2C_d tributary based on a secondary code that is of an S2C_p tributary and that is sent by a satellite network device200. After capturing the encoded data of the S2C_d tributary, the terminal100may perform a receiving processing (for example, despreading, demodulation, and decoding) operation on the encoded data of the S2C_d tributary, to obtain a physical frame. The terminal100may extract, from the physical frame, user frames belonging to the terminal100. The terminal100may deliver the user frames to the SLC layer through an inter-layer interface, and use the user frames as SLC PDUs at the SLC layer.

At the SLC layer, when the user frames received by the terminal100are universal data frames, the terminal100may concatenate, into one SLC SDU, SLC PDUs belonging to a same SLC SDU. The terminal100may deliver the SLC SDU to the MDCP layer through an inter-layer interface, and use the SLC SDU as an MDCP PDU at the MDCP layer. When the user frames received by the terminal100are ACK frames, the terminal100may retransmit data/send a next SLC SDU based on a value of a bitmap field.

At the MDCP layer, the terminal100may concatenate, into one MDCP SDU, one or more MDCP PDUs whose packet headers are removed. The terminal100may deliver the MDCP SDU to the AP layer through an inter-layer interface, and use the MDCP SDU as a third data packet received at the AP layer. In this case, the SLC layer and the MDCP layer of the terminal100process at least one fourth data packet (SLC PDU), to obtain the third data packet.

At the AP layer, the terminal100may generate a third authentication code based on a specified key and the third data packet, and determine a receiving status of the third data packet based on the third authentication code. Specifically, the terminal100may obtain original data in the third data packet, and then generate the third authentication code based on the specified key and the original data. The terminal100may obtain a fourth authentication code in the third data packet, and determine the receiving status of the third data packet by determining, through comparison, whether the fourth authentication code is the same as the third authentication code. When the fourth authentication code is the same as the third authentication code, the terminal100determines that the third data packet is successfully received. That is, the terminal100determines that the original data in the third data packet is data sent by the satellite network device200, and the terminal100may perform a corresponding operation on the original data (for example, display the original data on a display screen of the terminal100in a form of an SMS message). When the fourth authentication code is different from the third authentication code, the terminal100determines that the third data packet fails to be received. That is, the terminal100determines that the original data in the third data packet is not data sent by the satellite network device200, and the terminal100may discard the third data packet.

In some embodiments, the terminal100may generate the third authentication code based on only the original data in the third data packet.

In some embodiments, the third data packet includes encrypted data, and the encrypted data includes an encrypted fourth authentication code and encrypted original data. The terminal100may determine, based on an encryption indication field of the third data packet, an encryption algorithm used by the satellite network device200, and then decrypt the encrypted data based on the specified key and the encryption algorithm, to obtain the original data and the fourth authentication code. The terminal100may generate the third authentication code based on the specified key and the original data obtained through decryption.

In some embodiments, after decrypting the encrypted data, the terminal100may obtain compressed data. After decompressing the compressed data, the terminal100obtains the fourth authentication code and the original data.

In some embodiments, the third data packet includes encrypted data and the fourth authentication code. The terminal100may directly extract the fourth authentication code in the third data packet. The terminal100may perform a decryption operation on the encrypted data based on the specified key and an encryption indication field in packet header information, to obtain the original data. Then, the terminal100obtains the third authentication code based on the original data and the specified key.

In this embodiment of this application, the foregoing protocol processing process is merely an example for description, and a specific protocol processing operation is not limited in this application.

The following describes a transmission method in a satellite communication system according to an embodiment of this application.

FIG.4is a schematic diagram of an authentication verification procedure during inbound transmission in a satellite communication system according to an embodiment of this application.

S401: A terminal100, a satellite network device200, and a cellular network device400negotiate about a specified key.

Specifically, for detailed descriptions of negotiating about the specified key, refer to the embodiment inFIG.5. Details are not described herein again. After obtaining the specified key by using the cellular network device400, the terminal100and the satellite network device200may store the specified key. The terminal100and the satellite network device200may encrypt/decrypt data by using the specified key.

In some embodiments, the specified key obtained by the terminal100and the satellite network device200in a cellular network can be used within only preset time (for example, 15 days), and available time of the specified key may be referred to as a specified key validity period. After the specified key validity period ends, the terminal100and the satellite network device200need to return to the cellular network to update the specified key and the specified key validity period.

The original data may include but is not limited to data (such as text data, image data, audio data, or video data) entered by a calling user (a user of the terminal100), a called user quantity indication, a called user ID, location information of the terminal100, and the like.

In some embodiments, after receiving first input of the calling user, the terminal100may obtain the original data in response to the first input, and send the original data to the satellite network device200. In this embodiment of this application, the input may include but is not limited to a gesture, a voice, and the like. The gesture may include a gesture (for example, tapping) of directly touching a display screen of the terminal100and a floating gesture of not directly touching the display screen.

S403: The terminal100generates a first authentication code based on the specified key and the original data.

The terminal100may generate the first authentication code based on the specified key and the original data by using a specified algorithm. For example, the terminal100may obtain the first authentication code for the specified key and the original data by using algorithms approved by the State Password Administration Committee Office.

S404: The terminal100obtains a first data packet based on the first authentication code and the original data.

The terminal100may concatenate the first authentication code and the original data together, to obtain and encrypt, by using the specified key, the first authentication code and the original data that are concatenated together, to obtain encrypted data. The terminal100may add packet header information in front of the encrypted data, to obtain the first data packet. The packet header information may include but is not limited to an encryption indication field. The encryption indication field may indicate an encryption algorithm used by the terminal100. A length of the encryption indication field may be 2 bits. For example, when a value of the encryption indication field is 00, the sending device is indicated not to use an encryption algorithm. When a value of the encryption indication field is 01, the sending device is indicated to use a hash algorithm in the algorithms approved by the State Password Administration Committee Office.

S405: The terminal100may send the first data packet to the satellite network device200.

Specifically, for descriptions of a specific procedure in which the terminal100sends data to the satellite network device200, refer to the foregoing embodiment inFIG.2A(1) andFIG.2A(2). Details are not described herein again. It should be noted that in a process in which the terminal100sends the first data packet to the satellite network device200, the first data packet includes a user identifier. For example, frame header information added by the terminal100at an SLC layer may include a user ID field. The user ID field may be used to identify the terminal100. A value of the user ID field is an ID number of the terminal100. The ID number of the terminal100may indicate a parameter such as the specified key corresponding to the terminal100.

S406: The satellite network device200may generate a second authentication code based on the specified key and the first data packet.

The satellite network device200may decrypt the first data packet by using the specified key, to obtain the first authentication code and the original data. The satellite network device200may determine, based on the encryption indication field in a packet header, the encryption algorithm used by the terminal100. The satellite network device200may use the specified key to decrypt the encrypted data in the first data packet by using a decryption algorithm corresponding to the encryption algorithm, to obtain the first authentication code and the original data. For descriptions of a specific procedure in which the satellite network device200receives data from the terminal100, refer to the foregoing embodiment inFIG.2B(1) andFIG.2B(2). Details are not described herein again.

The satellite network device200may generate the second authentication code based on the specified key and the original data by using a specified algorithm (for example, a grouping encryption algorithm). The specified algorithm used by the satellite network device200to generate the second authentication code is the same as the specified algorithm used by the terminal100to generate the authentication code.

S407: The satellite network device200determines whether the first authentication code is the same as the second authentication code.

The satellite network device200may determine a receiving status of the first data packet based on the second authentication code.

When the satellite network device200determines that the first authentication code is different from the second authentication code, the satellite network device200determines that the first data packet fails to be received, and may discard the first data packet. In some embodiments, the satellite network device200may perform step S408.

When the satellite network device200determines that the first authentication code is the same as the second authentication code, the satellite network device200determines that the first data packet is successfully received. In some embodiments, the satellite network device200may perform step S409.

S408: The satellite network device200sends a failure application receipt to the terminal100.

When the satellite network device200determines that the first authentication code is different from the second authentication code, the satellite network device200may further generate the failure application receipt. The failure application receipt indicates that the satellite network device200fails to receive the first data packet. The satellite network device200may send the failure application receipt to the terminal100.

S409: The satellite network device200may send the original data to the cellular network device400.

The satellite network device200may send the original data to the cellular network device400(for example, a short message service center25). The cellular network device400may forward the original data to a called user (for example, a terminal300) in a specified format (for example, an SMS message). In some embodiments, the satellite network device200may further perform step S410.

S410: The satellite network device sends a success application receipt to the terminal100.

When the satellite network device200determines that the first authentication code is the same as the second authentication code, the satellite network device200may further generate the success application receipt. The success application receipt indicates that the satellite network device200successfully receives the first data packet. The satellite network device200may send the success application receipt to the terminal100.

The following describes a flowchart of a method for obtaining a specified key according to an embodiment of this application.

In some embodiments, a terminal100and a satellite network device200may obtain a specified key through negotiation in a cellular network. In this way, the terminal100can also perform data encryption and decryption in a satellite network by using the specified key, and does not need to negotiate with the satellite network device about the specified key, thereby ensuring data security while saving an air interface resource of the satellite network device.

Specifically, the terminal100and the satellite network device200may obtain the specified key by using a generic bootstrapping architecture (GBA) procedure. For example, as shown inFIG.5, specific steps in which the terminal100and the satellite network device200obtain the specified key are as follows:

S501: The terminal100sends a service request1to the satellite network device200.

When the terminal100is in a cellular network, the terminal100may send the service request1to the satellite network device200in the cellular network. The service request1may include an identifier of the terminal100, and the identifier is used to identify an identity of the terminal100. For example, the service request1may be a hypertext transfer protocol get (HTTP GET) request.

S502: The satellite network device200sends a service response1to the terminal100.

After receiving the service request1, after determining, based on the identifier of the terminal100, that a specified key of the terminal100is not stored in the satellite network device200or the specified key of the terminal100has expired, the satellite network device200may send the service response1to the terminal100. The service response1may indicate the terminal100to obtain a specified key by using a cellular network device400.

S503: The terminal100sends a service request2to a bootstrapping server41.

After receiving the service response1, the terminal100may send the service request2to the bootstrapping server41. The service request2may include the identifier of the terminal100. The service request2may indicate the cellular network device400to send, to the terminal100, parameters, such as a random RAND and an authentication token AUTN, required for generating the specified key. For example, the service request2may be a hypertext transfer protocol authentication and key agreement (AKA) request.

S504: The bootstrapping server41sends an authentication request to a home subscriber server42.

After receiving the service request2, the bootstrapping server41may send the authentication request to the home subscriber server42. The authentication request includes the identifier of the terminal100. The authentication request may indicate the home subscriber server42to feed back authentication parameters of the terminal100. For descriptions of the authentication parameters, refer to the foregoing embodiment shown inFIG.1A. Details are not described herein again. For example, the authentication request may be a multimedia authentication request (MAR).

S505: The home subscriber server42sends the authentication parameters (including the RAND, the AUTN, an XRES, a CK, and an IK) to the bootstrapping server41.

After receiving the authentication request, the home subscriber server42may obtain the authentication parameters of the terminal100based on the identifier of the terminal100. The home subscriber server42pre-stores the identifier of the terminal100and the CK and the IK that correspond to the identifier. The home subscriber server42may further obtain the random RAND by using a random generator. The home subscriber server42may generate the AUTN and the XRES based on the RAND, the IK, and the CK. The home subscriber server42may send the generated authentication parameters to the bootstrapping server41. The identifier of the terminal100may include but is not limited to a mobile number, an IP multimedia private identity (IMPI), a temporary IP multimedia private identity (TMPI), and the like of the terminal100.

S506: The bootstrapping server41sends a service response2to the terminal100.

After receiving the authentication parameters, the bootstrapping server41may send the service response2to the terminal100. The service response2may include the RAND and the AUTN.

S507: The terminal100generates the CK, the IK, and an RES based on the RAND and the AUTN.

After receiving the RAND and the AUTN, the terminal100may obtain the CK, the IK, and the RES through calculation based on the RAND and the AUTN by using a SIM card. An algorithm used by the terminal100to generate the RES is the same as an algorithm used by the cellular network device400to generate the XRES.

S508: The terminal100sends a service request3(including the RES) to the bootstrapping server41.

After generating the RES, the terminal100may send the service request3to the cellular network device400. The service request3includes the RES. For example, the service request3may be an HTTP GET request whose header field includes the RES.

S509: The bootstrapping server41may determine, through comparison, whether the XRES is the same as the RES.

After receiving the service request3of the terminal100, the bootstrapping server41may verify the identity of the terminal100by determining, through comparison, whether the RES is the same as the XRES. If the bootstrapping server41determines that the RES is the same as the XRES, the bootstrapping server41may perform step S510 and step S511.

S510: The bootstrapping server41may generate a Ks_NAF, a specified key validity period of the Ks_NAF, and a bootstrapping transaction identifier (B-TID) of the Ks_NAF based on the CK and the IK.

The bootstrapping server41may obtain the Ks_NAF through calculation based on the CK and the IK by using an algorithm for generating the specified key. In addition, the bootstrapping server41may generate the B-TID and the specified key validity period that correspond to the Ks_NAF The Ks_NAF is the specified key of the terminal100, and may be used to encrypt/decrypt data during data transmission with the satellite network device200. The B-TID may be used by the satellite network device200to obtain the Ks_NAF of the terminal100from the bootstrapping server41. The specified key validity period may indicate validity time of the specified key (Ks_NAF).

S511: The bootstrapping server41may send a service response3to the terminal100.

The service response3may include the specified key validity period and the B-TID. The service response3may indicate the terminal100to generate the specified key by using the parameters in the service response2.

S512: The terminal100may generate the Ks_NAF based on the authentication parameters.

The terminal100may obtain the Ks_NAF through calculation based on the CK and the IK by using an algorithm for generating the specified key. The algorithm used by the terminal100to generate the specified key is the same as the algorithm used by the cellular network device400. Within the specified key validity period, in a data transmission process, the terminal100may obtain the Ks_NAF (specified key) through calculation by using the authentication parameters, to perform a data encryption/decryption operation.

S513: The terminal100sends a service request4(including the B-TID) to the satellite network device200.

After obtaining the Ks_NAF through calculation, the terminal100may send the service request4to the satellite network device200. The service request4may include the B-TID. The service request4may indicate the satellite network device200to obtain the specified key of the terminal100.

S514: The satellite network device200sends a parameter request to the bootstrapping server41.

After receiving the service request4, the satellite network device200may send the parameter request to the bootstrapping server41. The parameter request may include the B-TID. For example, the parameter request may be a bootstrapping-info-request (BIR).

S515: The bootstrapping server41sends a parameter response to the satellite network device200.

The bootstrapping server41may send the parameter response to the satellite network device200based on the B-TID of the terminal100. The parameter response may include the Ks_NAF of the terminal100and the specified key validity period. In some embodiments, the bootstrapping server41may generate only the B-TID and the specified key validity period in step S515, and then generate the specified key Ks_NAF after receiving the parameter request of the satellite network device200.

S516: The satellite network device200sends a service response4to the terminal100.

The satellite network device200may send the service response4to the terminal100after receiving the specified key returned by the bootstrapping server41. The service response4may indicate that the terminal100and the satellite network device200can perform a data encryption/decryption operation within the specified key validity period by using the Ks_NAF stored by the terminal100and the satellite network device200. It may be understood that the Ks_NAF is a specified key obtained by the terminal100and the satellite network device200by using the cellular network device400.

In this way, the specified key is updated in the cellular network, and a validity period is preset for the specified key. In a satellite network, the terminal100and the satellite network device200can perform a data encryption/decryption operation by using the specified key within the validity period. This saves an air interface resource that is of a satellite communication system and that is required for negotiating about the specified key, and also reduces steps of generating the specified key.

However, because a sending device and a receiving device generate authentication codes based on only original data, when the receiving device repeatedly receives a message of the sending device, the repeated message may be repeatedly parsed and processed, and the repeated message may be charged for a plurality of times. As shown inFIG.6, when the sending device is a terminal100and the receiving device is a satellite network device200, if an inbound message of the terminal100is intercepted by an attack terminal, and the inbound message is repeatedly sent to the satellite network device200, a computing resource of the satellite network device200may be occupied, and a message fee of the terminal100may be repeatedly calculated.

Therefore, an embodiment of this application provides a transmission method. A sending device may generate an authentication code A based on information A and original data. The sending device may obtain a data packet based on the authentication code A and the original data. The sending device may send the data packet to a receiving device in a first transmission system. After receiving the data packet, the receiving device may generate an authentication code B based on the data packet and information B. The receiving device may determine a receiving status of the data packet based on the authentication code B. The information A and the information B are information updated by the sending device and the receiving device based on transmission, for example, may be time information and updated with time, or may be information about quantities of data packets and respectively updated by the sending device and the receiving device based on a quantity of sent data packets and a quantity of received data packets.

In this way, because an authentication code A in a repeatedly sent data packet is generated based on information A existing before an update, an authentication code B generated by a receiving device based on updated information B is different from the authentication code A in the repeatedly sent data packet. This indicates that the data packet may be forwarded by an invalid terminal. The receiving device determines that the data packet fails to be received, so that problems of repeated processing and charging do not occur.

In some embodiments, information A of a sending device is sending time information, and information B of a receiving device is receiving time information. In this way, when a difference between sending time of the sending device and receiving time of the receiving device exceeds a preset minimum time granularity, the information A is different from the information B, that is, an authentication code A is different from an authentication code B. Therefore, the receiving device cannot parse a data packet sent by the sending device, so that problems of repeated processing and charging do not occur.

Specifically, a sending device may generate an authentication code A based on information A and original data. The sending device may send, to a receiving device in a first transmission system, a data packet including the authentication code A. The information A is sending time information. After receiving the data packet, the receiving device may generate an authentication code B based on information B and the data packet. The receiving device may determine a receiving status of the data packet based on the authentication code B. The information B is receiving time information. In this way, when an interval between time at which the sending device generates the authentication code and time at which the receiving device receives the data packet exceeds a minimum time granularity, the receiving device cannot parse the data packet, so that problems of repeated processing and charging do not occur.

FIG.7AandFIG.7Bare a schematic diagram of a processing procedure of a transmission method according to an embodiment of this application.

1. A Sending Device Generates an Authentication Code A Based on Original Data and Information A.

The information A is sending time information, and the information A may indicate sending time of a data packet.

(1) The Sending Device Obtains the Sending Time of the Data Packet.

In an inbound process, the sending time of the data packet may be any time in an entire period from time at which the sending device (a terminal100) obtains the original data to time, at which the sending device generates the authentication code A, plus offset time (an offset for short). The time at which the terminal100obtains the original data may be time at which the terminal100receives input of a satellite message sent by a calling user. In this case, the original data includes data entered by the calling user. The time at which the terminal100generates the authentication code A may be current time obtained by the terminal100by running a program statement for obtaining the sending time of the data packet (for example, by using a get current time function getCurrentTime( )). The terminal100may determine the sending time of the data packet based on positioning timing of a satellite. Alternatively, the sending time of the first data packet may be represented as time at which the sending device (the terminal100) delivers the first data packet to an MDCP layer at an AP layer. Alternatively, the sending time of the first data packet may be represented as time that is estimated by the sending device (the terminal100) and at which the sending device (the terminal100) sends the first data packet to a receiving device (a satellite network device200).

In an outbound process, the sending time of the data packet may be any time in a period from time at which the sending device (the satellite network device200) obtains the original data to time, at which the sending device generates the authentication code A, plus an offset. The time at which the satellite network device200obtains the original data may be time at which the satellite network device200receives a service request sent by the terminal100, or the time at which the satellite network device200obtains the original data may be time at which the satellite network device200receives a message sent to the terminal100, time at which the satellite network device200sends data to the terminal100, or the time, at which the satellite network device200generates the authentication code A, plus the offset, and is used to estimate time at which an SLC layer, an MDCP layer, or a physical layer of the satellite network device200sends data. The time at which the satellite network device200generates the authentication code A may be current time obtained by the satellite network device200by running a program statement for obtaining the sending time of the first data packet (for example, by a converged communication platform24in the satellite network device200by using a get current time function getCurrentTime( )). A ground transceiver station22or a central station23in the satellite network device200may determine the sending time of the data packet based on a satellite21.

In some embodiments, in the outbound process, the satellite network device200may obtain scheduling time of the data packet based on an outbound data volume and an outbound air interface resource, and the satellite network device200may estimate outbound time of the data packet based on the scheduling time of the data packet. That is, the sending time of the data packet of the satellite network device200may be the estimated outbound time of the data packet. For example, the converged communication platform24in the satellite network device200receives schedulable time indicated by the ground transceiver station22or the central station23.

In some embodiments, the sending time of the data packet may be represented as time at which the sending device delivers the data packet to the MDCP layer at an AP layer.

(2) The Sending Device Generates the Information a Based on the Sending Time of the Data Packet.

After obtaining the sending time of the data packet, the sending device may encode the time based on a preset or configured minimum time granularity, to obtain the information A. For example, a time value in front of the preset minimum time granularity in the sending time of the data packet may be extracted, and encoding (for example, binary-decimal encoding or decimal-to-binary conversion) may be performed on the time value, to obtain the information A. For inbound transmission, the sending device, namely, the terminal100, may encode the time based on a preset minimum time granularity or a minimum time granularity configured for the terminal100in a cellular network or a WLAN or in a satellite network, to obtain the information A. For outbound transmission, the sending device, namely, the satellite network device200, generates the information A. For example, the converged communication platform24in the satellite network device200performs encoding based on time provided by the ground transceiver station22or the central station23and a preset or configured minimum time granularity, to generate the information A. For another example, the ground transceiver station or the central station in the satellite network device200performs encoding based on the time and a preset or configured minimum time granularity, to obtain the information A, and then notifies the converged communication platform24of the information A.

The preset or configured minimum time granularity may be a minute, half a minute, half an hour, or the like. This is not limited in this application.

For example, the sending time of the data packet is 2021-08-25 17:23:51. When the minimum time granularity is a minute, a time value that may be obtained by the sending device through extraction based on the preset minimum time granularity is 202108251723.

For another example, when the minimum time granularity is half a minute, a time value that may be obtained by the sending device through extraction based on the preset minimum time granularity is as follows: For example, the sending device may record, as 0.0 minutes, time that does not exceed 30 s, and record, as 0.5 minutes, time that exceeds 30 s. In this case, the time value obtained based on the sending time of the data packet is 202108251723.5. For another example, the sending device may record, as 00 seconds, time that does not exceed 30 s, and record, as 30 seconds, time that exceeds 30 s. In this case, the time value obtained based on the sending time of the data packet is 20210825172330. For another example, the sending device may directly encode a time value in front of a minute to obtain binary data, and then add 1-bit data at the end of the obtained binary data, to indicate the first half minute or the last half minute (for example, 0 represents 1 s to 30 s, and 1 represents 31 s to 60 s). For another example, the sending device may divide a value of the sending time of the data packet by a minimum granularity, to obtain an integer value, where the integer value is a time value obtained by the sending device. In this case, the time value obtained by the sending device based on the sending time is 404216503446. It may be understood that actual sending time of the data packet is a product of the time value and a value of the minimum time granularity. In this way, time information may be identified by using an integer quantity of minimum granularities.

For example, when an encoding manner of the sending device is 8421 encoding in the binary-decimal encoding, the sending device may learn, in the 8421 encoding manner based on a time value 202108251723, that a value of the information A is 0010 0000 0010 0001 0000 1000 0010 0101 0001 0111 0010 0011. When an encoding manner of the sending device is the decimal-to-binary conversion manner, the sending device may learn, through conversion based on a time value 202108251723, that a value of the information A is 10111100001110100101110010111001001011.

It should be noted that the foregoing value of the preset minimum time granularity and selection of the encoding manner are merely examples. This is not specifically limited in this application.

In some embodiments, the sending device may alternatively obtain a time value of one or more specific time granularities in the sending time of the data packet, and then perform encoding, to obtain the information A. For example, when the sending time of the data packet is 2021-08-25 17:23:51, and the specific time granularities include a month, a minute, and an hour, a time value obtained by the sending device is 082317.

(3) The Sending Device Obtains the Authentication Code A Based on the Information A and the Original Data.

The sending device may obtain the authentication code A through calculation based on the information A and the original data by using a specified algorithm (for example, an SM3 hash algorithm).

In some embodiments, the sending device may obtain the authentication code A through calculation based on the information A, the original data, and a key by using the specified algorithm.

2. The Sending Device Obtains the Data Packet Based on the Original Data and the Authentication Code A.

The sending device may concatenate the authentication code A and the original data together, to obtain the data packet.

In some embodiments, the sending device may add packet header information in front of the authentication code A and the original data that are concatenated together, to obtain the data packet. The packet header information may include a service type indication and the like. The service type indication may indicate a service type (for example, a data packet for sending a message to user equipment in a cellular network, or a data packet for requesting data from the satellite network device200) of the data packet.

In some embodiments, the data packet may further include identification information used to identify the data packet, and the identification information may include but is not limited to a message ID field, a count value field, or a sequence number field of the data packet. The identification information may be used by the receiving device to identify the sent data packet. For example, the identification information may be added to an application receipt to indicate a receiving status of the data packet. The sending device may determine, by using the identification information in the application receipt, the receiving status of the data packet corresponding to the identification information.

3. The Receiving Device Obtains the Authentication Code a and the Original Data Based on the Data Packet.

After the receiving device receives the data packet sent by the sending device, the receiving device may obtain the authentication code A and the original data from the data packet. For descriptions of sending the data packet by the sending device and receiving the data packet by the receiving device during inbound, refer to the foregoing embodiments shown inFIG.2A(1) andFIG.2A(2) andFIG.2B(1) andFIG.2B(2). For descriptions of sending the data packet by the sending device and receiving the data packet by the receiving device during outbound, refer to the foregoing embodiments shown inFIG.3A(1) toFIG.3A(3) andFIG.3B(1) toFIG.3B(3). Details are not described herein again. It should be noted that the sending device may process the data packet into at least one sub data packet at an MDCP layer and an SLC layer, or the sending device may process the data packet into at least one sub data packet at the MDCP layer. In the inbound process, the data packet may be considered as the foregoing first data packet inFIG.2A(1) andFIG.2A(2) orFIG.2B(1) andFIG.2B(2), and the sub data packet may be considered as the foregoing second data packet inFIG.2A(1) andFIG.2A(2) orFIG.2B(1) andFIG.2B(2). In the outbound process, the data packet may be considered as the foregoing third data packet inFIG.3A(1) toFIG.3A(3) orFIG.3B(1) toFIG.3B(3), and the sub data packet may be considered as the foregoing fourth data packet inFIG.3A(1) toFIG.3A(3) orFIG.3B(1) toFIG.3B(3).

4. The Receiving Device Obtains Information B.

The information B is receiving time information, and the information B may indicate receiving time of the data packet.

(1) The Receiving Device Obtains the Receiving Time of the Data Packet.

The receiving time of the data packet may be time at which the receiving device obtains the 1stsub data packet of the data packet, time at which the receiving device obtains the first sub data packet of the data packet minus an offset value, or any time in a period from the time at which the receiving device obtains the first sub data packet of the data packet minus the offset value to time at which the receiving device generates the authentication code B. The offset value may be set through configuration or based on a transmission delay (for example, 540 ms) or a processing delay.

In a specific case, the receiving time may be recorded by using an SLC layer and transferred to an AP layer by using an MDCP layer. The receiving device may record, at the SLC layer, time at which each SLC PDU (sub data packet) is received. When concatenating at least one SLC PDU at the SLC layer based on frame header information to obtain an SLC SDU, the receiving device may record earliest receiving time in receiving time of the at least one SLC PDU as receiving time of the SLC SDU, and upload the SLC SDU and the receiving time corresponding to the SLC SDU to the MDCP layer. After receiving, at the MDCP layer, the SLC SDU and the receiving time corresponding to the SLC SDU that are uploaded from the SLC layer, the receiving device may use the SLC SDU as an MDCP PDU at the MDCP layer. The receiving device may determine, based on a successor indication field, whether the current MDCP PDU is the first MDCP PDU in at least one MDCP PDU. For example, the successor indication field is 00 or 01. When the successor field indicates that data of the MDCP PDU is the first segment of a corresponding MDCP SDU, or the successor indication field indicates that data of the MDCP PDU is all data of a corresponding MDCP SDU, the receiving device reserves receiving time corresponding to the MDCP PDU, and uses the receiving time as receiving time of the MDCP SDU. The receiving device may upload the MDCP SDU and the receiving time of the MDCP SDU to the AP layer at the MDCP layer. The receiving device may use the MDCP SDU as the data packet at the AP layer. The receiving time corresponding to the MDCP SDU is the time at which the receiving device obtains the 1stsub data packet of the data packet.

In another specific case, the receiving time may be recorded by using an SLC layer and transferred to an AP layer by using an MDCP layer. An obtaining manner is the same as that in the foregoing case, and details are not described herein again. An offset value is subtracted from time uploaded from the SLC layer. The offset value may be set through configuration or based on a transmission delay (for example, 540 ms).

In another specific case, the receiving time may be recorded by using an MDCP layer and transferred to an AP layer. The receiving device records, at the MDCP layer, time at which the first MDCP PDU is received. The MDCP layer may perform time recording based on a successor indication. For example, a successor indication field is 00 or 01. When the successor field indicates that data of the MDCP PDU is the first segment of a corresponding MDCP SDU, or the successor indication field indicates that data of the MDCP PDU is all data of a corresponding MDCP SDU, the receiving device reserves the receiving time corresponding to the MDCP PDU, and the receiving device uses the receiving time as receiving time of the MDCP SDU. The receiving device submits the receiving time to the AP layer. The receiving device may use the MDCP SDU as the data packet at the AP layer. The receiving time corresponding to the MDCP SDU is the time at which the receiving device obtains the 1stsub data packet of the data packet.

In another specific case, the receiving time may be recorded by using an MDCP layer and transferred to an AP layer. An obtaining manner is the same as that in the foregoing case, and details are not described herein again. An offset value is subtracted from time uploaded from the MDCP layer. The offset value may be set through configuration or based on a transmission delay (for example, 540 ms) or a processing delay.

In another specific case, the receiving time may be time at which an AP layer receives an MDCP SDU or time at which packet assembly of the MDCP SDU submitted from an MDCP layer is completed.

In another specific case, the receiving time may be time, at which an AP layer receives an MDCP SDU, minus an offset value, or time, at which packet assembly of the MDCP SDU submitted from the MDCP layer is completed, minus an offset value. The offset value may be set through configuration or based on a transmission delay (for example, 540 ms) or a processing delay.

In another specific case, the receiving time may be current time obtained by running, when the receiving device calculates the authentication code B, a program statement for obtaining the receiving time of the data packet (for example, by using a get current time function getCurrentTime( )).

In another specific case, the receiving time may be current time, obtained by running, when the receiving device calculates the authentication code B, a program statement for obtaining the receiving time of the data packet (for example, by using a get current time function getCurrentTime( )), minus an offset value. The offset value may be set through configuration based on a transmission delay (for example, 540 ms) or a processing delay.

For inbound transmission, the receiving device is the satellite network device200. The converged communication platform24in the satellite network device200bears processing of the AP layer, the ground transceiver station22or the central station23bears processing of the SLC layer and processing of the MDCP layer, and the converged communication platform24may request time information from the ground transceiver station22or the central station23.

For outbound transmission, the receiving device is the terminal device100.

(2) The Receiving Device Generates the Information B Based on the Receiving Time of the Data Packet.

After obtaining the receiving time of the data packet, the receiving device may encode the time based on a preset or configured minimum time granularity, to obtain the information B. For example, a time value in front of the preset minimum time granularity in the receiving time of the data packet may be extracted, and encoding (for example, binary-decimal encoding or decimal-to-binary conversion) may be performed on the time value, to obtain the information B. For outbound transmission, the receiving device, namely, the terminal100, may encode the time based on a preset minimum time granularity or a minimum time granularity configured for the terminal100in a cellular network or in a satellite network, to obtain the information B. For inbound transmission, the receiving device, namely, the satellite network device200, generates the information B. For example, the converged communication platform24in the satellite network device200performs encoding based on receiving time information that is of the data packet and that is provided by the ground transceiver station22or the central station23and a preset or configured minimum time granularity, to generate the information B. For another example, the ground transceiver station or the central station in the satellite network device200performs encoding based on the recorded time and a preset or configured minimum time granularity, to obtain the information B, and then transmits the information B to the converged communication platform24.

The preset minimum time granularity may be a minute, half a minute, half an hour, or the like. This is not limited in this application.

It should be noted that the minimum time granularity and an encoding manner used by the receiving device to generate the information B based on the receiving time of the data packet are the same as those used by the sending device to generate the information A. That is, for descriptions of generating the information B by the receiving device, refer to the foregoing descriptions of generating the information A by the sending device. Details are not described herein.

In some embodiments, the receiving device may alternatively extract a time value of one or more specific time granularities in the receiving time of the data packet, and then perform encoding, to obtain the information B.

In some embodiments, after obtaining the receiving time of the MDCP SDU at the MDCP layer, the receiving device may use the receiving time of the MDCP SDU as the receiving time of the data packet, generate the information B at the MDCP layer based on the receiving time of the data packet, and upload the MDCP SDU and the information B to the AP layer at the MDCP layer.

In some embodiments, after obtaining the receiving time of the SLC SDU at the SLC layer, the receiving device may use the receiving time of the SLC SDU as the receiving time of the data packet, generate the information B at the SLC layer based on the receiving time of the data packet and minimum granularity information and upload the information B to the MDCP layer, and upload the MDCP SDU and the information B to the AP layer at the MDCP layer.

5. The Receiving Device Generates the Authentication Code B Based on the Information B and the Data Packet.

The receiving device may obtain the authentication code B through calculation based on the information B and the original data in the data packet by using a specified algorithm (for example, the SM3 hash algorithm). The specified algorithm of the receiving device is the same as the specified algorithm of the sending device. For example, the sending device may add a specified algorithm indication to a packet header of the data packet, where the specified algorithm indication may indicate the specified algorithm used by the sending device; and the receiving device may determine, based on the specified algorithm indication in the received data packet, the specified algorithm used by the sending device. For another example, the sending device and the receiving device may negotiate about a used specified algorithm in a cellular network.

6. The Receiving Device Determines the Receiving Status of the Data Packet Based on the Authentication Code B.

The receiving device may determine the receiving status of the data packet by determining, through comparison, whether the authentication code A is the same as the authentication code B.(1) When the authentication code B is the same as the authentication code A, the receiving device determines that the data packet is successfully received. The receiving device may perform a corresponding processing operation on the original data. For example, when the receiving device is the terminal100, the receiving device may display the original data. When the receiving device is the satellite network device200, the receiving device may forward the original data to user equipment (for example, a terminal300) in a cellular network. In some embodiments, the receiving device may further generate a success application receipt and send the success application receipt to the sending device. The success application receipt may indicate that the receiving device successfully receives the data packet.(2) When the authentication code B is different from the authentication code A, the receiving device may obtain information C based on the information B. Specifically, the receiving device may subtract a preset value (for example, 1) from the information B, to obtain the information C. The receiving device may obtain an authentication code C based on the information C and the original data by using a specified authentication algorithm. For example, on a basis that time corresponding to the information B is 2021-09-23 18:00, time corresponding to the information C obtained by subtracting the preset value is 2021-09-23 17:59. The authentication code C is generated based on time information corresponding to the information C. The receiving device may determine, through comparison, whether the authentication code C is the same as the authentication code A.(3) When the authentication code A is the same as the authentication code C, the receiving device may determine that the data packet is successfully received. In some embodiments, the receiving device may further generate and send, to the sending device, a success application receipt. The success application receipt may indicate that the receiving device successfully receives the data packet.(4) When the authentication code A is different from the authentication code C, the receiving device may determine that the data packet fails to be received. In some embodiments, the receiving device may further generate and send, to the sending device, a failure application receipt. The failure application receipt may indicate that the receiving device fails to receive the data packet. In this embodiment, first, the authentication code A may be compared with the authentication code B; and then, when the authentication code A is different from the authentication code B, the information C may be generated, and the authentication code A may be compared with the authentication code C. Alternatively, first, the information B and the information C may be generated, and then the authentication code B and the authentication code C may be generated; and then, the authentication code B and the authentication code C may be compared with the authentication code A. If either of the authentication code B or the authentication code C is the same as the authentication code A, it indicates that the data packet is successfully received. In some embodiments, a receiving success application receipt may be fed back. If neither of the authentication code B and the authentication code C is the same as the authentication code A, a sending failure application receipt is fed back.

In some embodiments, after obtaining the receiving time of the data packet, the receiving device may obtain a receiving time set based on the receiving time of the data packet. The receiving device may obtain the first time value in the receiving time set based on the receiving time of the data packet and the preset minimum time granularity, and then the receiving device subtracts 1 from the first time value to obtain the second time value, and subtract 1 from the second time value to obtain the third time value. By analogy, the receiving device may obtain a receiving time set including n time values. n is a positive integer. The receiving device may perform encoding based on each time value in the receiving time set, to obtain an information B set. The receiving device may perform calculation on each value in the information B set and the original data by using a specified authentication algorithm, to obtain an authentication code set. The receiving device may determine the receiving status of the data packet by comparing a value in the authentication code set with the authentication code A. Provided that one value in the authentication code set is the same as the authentication code A, the receiving device determines that the data packet is successfully received. When no value in the authentication code set is the same as the authentication code A, the receiving device determines that the data packet fails to be received.

In some embodiments, before obtaining the data packet, the sending device may encrypt the authentication code A and the original data by using a specified key. The sending device may further add, to the data packet, packet header information including an encryption indication field. After receiving the data packet sent by the sending device, the receiving device may decrypt the data packet based on the encryption indication field and the specified key, to obtain the authentication code A and the original data. In this way, the sending device and the receiving device can ensure data security through data encryption.

Formats of the sending time of the data packet and the receiving time of the data packet are universal time coordinated (UTC), Greenwich mean time (GMT), Beijing time, Eastern Pacific time, Western Pacific time, or the like. This is not limited in this embodiment.

It should be noted that, usually, a difference between the sending time of the data packet of the sending device and the receiving time of the data packet of the receiving device does not exceed the preset minimum time granularity, that is, the receiving device may successfully receive the data packet sent by the sending device.

In some embodiments, information A of a sending device is sending time information, and information B of a receiving device is receiving time information. The sending device may generate an authentication code A based on the information A, a specified key, and original data, and then generate a data packet based on the authentication code A and the original data. The receiving device may generate an authentication code B based on the information B, a specified key, and the data packet. In this way, problems of repeated processing and charging do not occur. In addition, because both the sending device and the receiving device generate the authentication codes based on respective stored specified keys, the receiving device may further verify, by using the authentication codes, whether the specified keys of the two parties are the same, to verify validity of the sending device.

A terminal100and a satellite network device200may obtain a specified key through negotiation by using a cellular network, as shown inFIG.5. Alternatively, a terminal100and a satellite network device200may preset a same specified key.

In some embodiments, a terminal100may obtain a specified key by using an intermediate device. The intermediate device and a satellite network device200may first obtain the specified key through negotiation by using a cellular network (for example, for a procedure in which the intermediate device and the satellite network device200obtain the specified key through negotiation, refer to the procedure, in which the terminal100and the satellite network device200obtain the specified key through negotiation, shown inFIG.5). The intermediate device may establish a communication connection (for example, a Bluetooth connection, a Wi-Fi connection, or a sidelink (sidelink) connection) to the terminal100. The intermediate device may send the specified key to the terminal100through the communication connection.

Further, to ensure data transmission security, the sending device may concatenate the authentication code A and the original data together, to obtain concatenated data. Then, the sending device uses the specified key to encrypt the concatenated data by using a specified encryption algorithm, to obtain encrypted data. The sending device may add packet header information in front of the encrypted data. The packet header information includes an encryption indication field. The encryption indication field may indicate the specified encryption algorithm (for example, an SM3 hash algorithm) used by the sending device. The receiving device may decrypt the encrypted data in the data packet based on the encryption indication field and the specified key, to obtain the authentication code A and the original data. Then, the receiving device generates the authentication code B based on the original data, the information B, and the specified key. This is shown inFIG.8AtoFIG.8C. In this way, because the sending device encrypts the data and then sends the encrypted data to the receiving device, data security can be further ensured.

The following describes an inbound procedure of a transmission method according to an embodiment of this application.

A terminal100may generate a first authentication code based on first information, a specified key, and first data (also referred to as original data). The first information is sending time information. The terminal100may obtain a first data packet based on the first authentication code, the specified key, and the first data. The terminal100may send the first data packet to a satellite network device200. After receiving the first data packet, the satellite network device200may generate a second authentication code based on second information, the specified key, and the first data packet. The second information is receiving time information. The satellite network device200may determine a receiving status of the first data packet based on the second authentication code. In this way, when the satellite network device200receives the repeatedly sent first data packet, because the second information has been updated with time, a generated authentication code is different from the first authentication code in the first data packet. Therefore, the satellite network device200determines that the first data packet fails to be received, so that a problem of repeatedly receiving a same data packet does not occur.

FIG.9is a schematic diagram of an inbound transmission procedure according to an embodiment of this application.

S901: A terminal100, a satellite network device200, and a cellular network device400negotiate about a key.

For descriptions of negotiating about the key by the terminal100, the satellite network device200, and the cellular network device400, refer to the foregoing embodiment shown inFIG.5. Details are not described herein again. After negotiating about the key, both the terminal100and the satellite network device200store the specified key.

After the terminal100receives input of a satellite message sent by a user, the terminal100may generate, in response to the input, the original data based on content of the satellite message entered by the user. Alternatively, after the terminal100receives an indication of a user, for example, when the user wants to initiate a query on a mailbox, or wants to obtain other information from a network, the terminal100may generate the original data based on a user request. The original data may include but is not limited to a receiving user quantity indication, a receiving user ID number, data (for example, text data, picture data, or audio data) entered by the user, location information of the terminal100, and the like.

S903: The terminal100generates a first authentication code based on the specified key, the original data, and first information.

First, the terminal100may obtain sending time of a first data packet. The sending time of the first data packet may be any time in a period from time at which the terminal100obtains the original data to time at which the terminal100generates the first authentication code. The time at which the terminal100obtains the original data may be time at which the terminal100receives input of a satellite message sent by a calling user. In this case, the original data includes data entered by the calling user. The time at which the terminal100generates the first authentication code may be current time obtained by the terminal100by running a program statement for obtaining the sending time of the first data packet (for example, by using a get current time function getCurrentTime( )). The terminal100may determine the sending time of the data packet based on positioning timing of a satellite.

In some embodiments, the sending time of the first data packet may be represented as time at which the terminal100delivers the first data packet to an MDCP layer at an AP layer.

In some other embodiments, the sending time of the first data packet may be represented as time that is estimated by the terminal100and at which the terminal100sends the first data packet to the satellite network device200.

Specifically, for obtaining the sending time of the first data packet by the terminal100, refer to the foregoing embodiment shown inFIG.7AandFIG.7B. Details are not described herein again.

Then, the terminal100generates the first information based on the sending time of the first data packet. After obtaining the sending time of the first data packet, the terminal100may extract a time value in front of a preset minimum time granularity in the sending time of the first data packet, and perform encoding (for example, binary-decimal encoding or decimal-to-binary conversion) on the time value, to obtain the first information. The preset minimum time granularity may be a minute, half a minute, half an hour, or the like. This is not limited in this application. Specifically, for descriptions of generating the first information by the terminal100, refer to the foregoing embodiment shown inFIG.7AandFIG.7B. Details are not described herein again.

Finally, the terminal100generates the first authentication code based on the specified key, the original data, and the first information. The terminal100may obtain the first authentication code through calculation based on the first information, the specified key, and the original data by using a specified algorithm (for example, an SM3 hash algorithm).

For example, the specified algorithm used by the terminal100may be a hash-based message authentication code (HMAC) algorithm based on the SM3 hash algorithm. A calculation formula of an HMAC is as follows:

SM3 is a hash algorithm. k+ may be obtained based on the specified key. A length of k+ may be 64 bytes. 16 most significant bytes are the specified key, and 48 following bytes are all 0. opad is a byte 0x5C repeated 64 times, and ipad is a byte 0x36 repeated 64 times. text is the original data, and context is the first information. ⊕ is an exclusive OR symbol, and ∥ is a concatenation symbol. A length of output of the SM3 algorithm is 32 bytes. F is a function for extracting data of the first 16 bits from a most significant bit to a least significant bit of input. Output (the HMAC) of F is the first authentication code. A length of the first authentication code is 16 bits.

S904: The terminal100may obtain the first data packet based on the first authentication code and the original data.

The terminal100may concatenate the first authentication code and the original data together, to obtain the first data packet. In some embodiments, the terminal100may further add packet header information in front of the first authentication code and the original data that are concatenated together, to obtain the first data packet. The packet header information may include but is not limited to a service type indication and the like. The service type indication may indicate a service type (for example, a data packet for sending a message to user equipment in a cellular network, or a data packet for requesting data from the satellite network device200) of the first data packet.

In some embodiments, the terminal100may further encrypt, by using the specified key, the first authentication code and the original data that are concatenated together, to obtain the first data packet. For specific descriptions, refer to the foregoing embodiment shown inFIG.8AtoFIG.8C. Details are not described herein again.

S905: The terminal100sends the first data packet to the satellite network device200.

In some embodiments, after sending the first data packet to the receiving device, the terminal100may display sending prompt information, for example, display “Sent”. The sending prompt information may be used to prompt the user that the terminal100has sent the first data packet to the satellite network device200. The sending prompt information may further include a mark icon. The mark icon may be used to trigger (for example, through tapping) display of an information explanation, for example, “Sent!”. Display of an operation suggestion (for example, the message has been sent to the receiving device, and it is not determined whether the message reaches the receiving device) may be triggered through tapping. A form of the sending prompt information is not limited, and may be a text, a picture, an animation, or the like.

Specifically, the terminal100may process the first data packet into at least one second data packet (SLC PDU or MDCP PDU) at the MDCP layer and an SLC layer or the MDCP layer, and then send the at least one second data packet to the satellite network device200. For specific descriptions of obtaining, by the terminal100, the at least one second data packet and sending the at least one second data packet to the satellite network device200, refer to the foregoing embodiments shown inFIG.2A(1) andFIG.2A(2) andFIG.7AandFIG.7B. Details are not described herein again.

S906: The satellite network device200obtains receiving time of the first data packet, and generates second information based on the receiving time.

Specifically, the satellite network device200may obtain the receiving time of the first data packet in a plurality of manners. For example, when receiving the at least one second data packet at an SLC layer, the satellite network device200may record receiving time of each of the at least one second data packet. The satellite network device200may concatenate, at the SLC layer based on frame header information of second data packets, second data packets belonging to one SLC SDU, to obtain an SLC SDU. The satellite network device200may determine, through comparison, a sequence of receiving time of the second data packets included in the SLC SDU, and use earliest receiving time as receiving time of the SLC SDU. The satellite network device200may upload the SLC SDU and the receiving time of the SLC SDU to an MDCP layer at the SLC layer. The satellite network device200may use the SLC SDU as an MDCP PDU at the MDCP layer, and obtain an MDCP SDU based on the MDCP PDU. The satellite network device200may determine the first MDCP PDU in the MDCP SDU by using successor indication fields of MDCP PDUs, and use, as receiving time of the MDCP SDU, receiving time of an SLC SDU corresponding to the first MDCP PDU. The satellite network device200may upload the MDCP SDU and the receiving time of the MDCP SDU to an AP layer at the MDCP layer. The satellite network device200may use the MDCP SDU as the first data packet and use the receiving time of the MDCP SDU as the receiving time of the first data packet at the AP layer. For detailed descriptions of obtaining the receiving time of the first data packet by the satellite network device200, further refer to the foregoing embodiment shown in the inbound process inFIG.7AandFIG.7B. Details are not described herein again.

Specifically, for detailed descriptions of receiving the first data packet by the satellite network device200, refer to the foregoing embodiments shown inFIG.2B(1) andFIG.2B(2) andFIG.7AandFIG.7B. Details are not described herein again.

After obtaining the receiving time (also referred to as fourth information) of the first data packet at the AP layer, the satellite network device200may generate the second information based on the fourth information and a preset or configured minimum time granularity. For specific descriptions of generating the second information by the satellite network device200, refer to the foregoing embodiment, in which the receiving device generates the information B, shown inFIG.7AandFIG.7B. Details are not described herein again.

S907: The satellite network device200may generate a second authentication code based on the specified key, the original data, and the second information.

The satellite network device200may obtain the second authentication code through calculation based on the second information and the original data in the first data packet by using a specified algorithm (for example, the SM3 hash algorithm). The specified authentication algorithm of the satellite network device200is the same as the specified authentication algorithm of the terminal100.

For example, when the specified authentication algorithm used by the terminal100may be a hash-based message authentication code (HMAC) algorithm based on the SM3 hash algorithm, the specified authentication algorithm used by the satellite network device200is also the HMAC algorithm based on SM3. An HMAC is calculated as follows:

SM3 is a hash algorithm. k+ may be obtained based on the specified key. A length of k+ may be 64 bytes. 16 most significant bytes are the specified key, and 48 following bytes are all 0. opad is a byte 0x5C repeated 64 times, and ipad is a byte 0x36 repeated 64 times. text is the original data, and context is the second information. ⊕ is an exclusive OR symbol, and ∥ is a concatenation symbol. A length of output of the SM3 algorithm is 32 bytes. F is a function for extracting data of the first 16 bits from a most significant bit to a least significant bit of input. Output (the HMAC) of F is the second authentication code. A length of the second authentication code is 16 bits.

S908: The satellite network device200determines whether the first authentication code is the same as the second authentication code.

The satellite network device200may determine a receiving status of the first data packet by determining, through comparison, whether the first authentication code is the same as the second authentication code. When the first authentication code is the same as the second authentication code, the satellite network device200may perform step S909, and may further perform step S910. For detailed descriptions of the first authentication code, refer to the authentication code A in the foregoing embodiment shown inFIG.7AandFIG.7B. For detailed descriptions of the second authentication code, refer to the authentication code B or the authentication code C in the foregoing embodiment shown inFIG.7AandFIG.7B. Details are not described herein again.

When the first authentication code is different from the second authentication code, the satellite network device200may perform step S911.

S909: The satellite network device200sends the original data to the cellular network device400.

The satellite network device200determines that the first authentication code is the same as the second authentication code, and determines that the first data packet is successfully received. The satellite network device200may perform a corresponding processing operation on the original data. For example, the satellite network device200may forward the original data to user equipment (for example, a terminal300) in a cellular network.

In some embodiments, the satellite network device200may further record information about time at which the first data packet is successfully received. For example, the information about the time at which the first data packet is successfully received may be the second information corresponding to the second authentication code. The satellite network device200may record the second information, and forward the second information to a network element (for example, a short message service center) in the cellular network. The network element in the cellular network may record sending success time of an inbound message based on the received information about the time at which the first data packet is successfully received, to subsequently send transmission success time information to the terminal100in the cellular network, to update a sending status of information for which the terminal100fails to receive an application receipt in a satellite network.

S910: The satellite network device200sends an application receipt to the terminal100, to indicate that the first data packet is successfully sent.

The satellite network device200may further generate a success application receipt (an application receipt indicating that the first data packet is successfully sent). The success application receipt may indicate that the satellite network device200successfully receives the data packet. The satellite network device200may send the success application receipt to the terminal100.

S911: The satellite network device200sends an application receipt to the terminal100, to indicate that the first data packet fails to be sent.

The satellite network device200determines that the first authentication code is different from the second authentication code, and determines that the first data packet fails to be received. The satellite network device200may delete the first data packet. The satellite network device200may further generate a failure application receipt (an application receipt indicating that the first data packet fails to be sent). The failure application receipt may indicate that the satellite network device200fails to receive the data packet. The satellite network device200may send the failure application receipt to the terminal100.

In some embodiments, after the satellite network device200determines that the first authentication code is different from the second authentication code, the satellite network device200may subtract a preset value (for example, 1) from a value of the second information, and then generate a new second authentication code based on adjusted second information, the specified key, and the original data.

The satellite network device200may determine, through comparison, whether the first authentication code is the same as the new second authentication code. When the first authentication code is the same as the new second authentication code, the satellite network device200may determine that the data packet is successfully received. The satellite network device200may further perform step S909 and step S910.

When the first authentication code is different from the new second authentication code, the satellite network device200may determine that the data packet fails to be received. The satellite network device200may further generate and send, to the terminal100, a failure application receipt. The failure application receipt may indicate that the satellite network device200fails to receive the data packet.

In some embodiments, after receiving the failure application receipt, the terminal100may generate and send, to the satellite network device200, a new first data packet.

Herein, the success application receipt and the failure application receipt may be collectively referred to as a first application receipt, and the first application receipt may include indication information, indicating, to the user, whether the data packet is successfully received.

In some embodiments, after receiving an application receipt (including a failure application receipt or a success application receipt), the terminal100may display result prompt information (including success prompt information or failure prompt information) on a display screen. In this way, the user may determine a sending status of the first data packet by using the result prompt information, to avoid repeated sending of a successfully sent satellite message.

Specifically, the terminal100may display success prompt information after receiving a success application receipt (an application receipt indicating that the first data packet is successfully sent). The success prompt information may be used to prompt the user that the first data packet is successfully sent.

The terminal100may display failure prompt information after receiving a failure application receipt (an application receipt indicating that the first data packet fails to be sent). The failure prompt information may be used to prompt the user that the first data packet fails to be sent.

The following describes an outbound procedure of a transmission method according to an embodiment of this application.

A satellite network device200may generate a fourth authentication code based on sixth information and original data (also referred to as third data). The sixth information is sending time information. The satellite network device200may obtain a third data packet based on the fourth authentication code and the original data. The satellite network device200may send the third data packet to a terminal100. After receiving the third data packet, the terminal100may generate a third authentication code based on fifth information and the third data packet. The fifth information is receiving time information. The terminal100may determine a receiving status of the third data packet based on the third authentication code. In this way, when the terminal100receives the repeatedly sent third data packet, because the fifth information has been updated with time, an authentication code generated based on fifth information is different from the fourth authentication code in the third data packet. Therefore, the terminal100determines that the third data packet fails to be received, so that a problem of receiving a repeated data packet does not occur.

FIG.10is a schematic diagram of an outbound transmission procedure according to an embodiment of this application.

S1001: A satellite network device200receives original data sent by a cellular network device400.

The satellite network device200receives the original data sent by a short message service center25in the cellular network device400. The original data is data sent by a calling user (for example, a user of a terminal300) in a cellular network to a called user (a user of a terminal100) in a satellite network (where the data includes but is not limited to text data, picture data, and the like that are entered by the calling user). It should be noted that when forwarding, to the satellite network device200, the data sent by the terminal300to the terminal100, the cellular network device400may also forward an identifier (for example, an ID number or a mobile number of the terminal100) of the called user to the satellite network device200.

In some embodiments, the original data obtained by the satellite network device200may be data stored in a memory of the satellite network device200. For example, the original data may be map data stored in the satellite network device200.

In some other embodiments, the original data received by the satellite network device200may be data (for example, text data, image data, audio data, or video data) sent by a third-party server to the satellite network device200.

S1002: In some embodiments, the satellite network device200receives a service request sent by the terminal100.

The service request may be a request for downloading the original data. Herein, a receiving device of the original data is the terminal100. After receiving the service request of the terminal100, the satellite network device200may perform step S1003 to step1005.

S1003: The satellite network device200generates a fourth authentication code based on the original data and sixth information.

First, the satellite network device200may obtain sending time of a third data packet. The sending time of the third data packet may be any time in an entire period from time at which the satellite network device200obtains the original data to time, at which the satellite network device200generates the fourth authentication code, plus an offset. The time at which the satellite network device200obtains the original data may be time at which the satellite network device200receives the service request sent by the terminal100, time at which the satellite network device200receives the original data sent by the cellular network device400, time at which the satellite network device200sends data to the terminal100, or the time, at which the satellite network device200generates the fourth authentication code, minus the offset, and is used to estimate time at which an SLC layer, an MDCP layer, or a physical layer of the satellite network device200sends data. For example, the time at which the satellite network device200generates the fourth authentication code may be current time obtained by the satellite network device200by running a program statement for obtaining the sending time of the third data packet (for example, by using a get current time function getCurrentTime( )).

In some embodiments, the satellite network device200may determine the sending time (also referred to as eighth information) of the third data packet at the MDCP layer/the SLC layer (based on a central station23or a ground central station31). Then, the satellite network device200generates the sixth information at an AP layer based on the eighth information and a minimum time granularity. In some embodiments, the satellite network device200may determine the sending time of the third data packet at the MDCP layer/the SLC layer, and generate the sixth information based on the sending time of the third data packet and the preset minimum time granularity and then upload the sixth information to the AP layer.

In some embodiments, the sending time of the third data packet may be represented as time at which the satellite network device200delivers the third data packet to the MDCP layer at the AP layer, namely, time at which a converged communication platform24delivers the third data packet to the central station23or the ground central station31.

For obtaining the sending time of the third data packet by the satellite network device200, refer to the procedure in the embodiment shown inFIG.7AandFIG.7B. Details are not described herein again.

Then, the satellite network device200generates the sixth information based on the sending time of the third data packet. After obtaining the sending time of the third data packet, the satellite network device200may encode the time based on a preset or configured minimum time granularity, to obtain the sixth information. For example, the satellite network device200may extract a time value in front of the preset or configured minimum time granularity in the sending time of the third data packet, and perform encoding (for example, binary-decimal encoding or decimal-to-binary conversion) on the time value, to obtain the sixth information. The preset or configured minimum time granularity may be a second, a minute, half a minute, half an hour, or the like. This is not limited in this application. Specifically, for descriptions of generating the sixth information by the satellite network device200, refer to the foregoing embodiment shown inFIG.7AandFIG.7B. Details are not described herein again.

Finally, the satellite network device200generates the fourth authentication code based on the original data and the sixth information. Specifically, the satellite network device200may obtain the fourth authentication code through calculation based on the sixth information and the original data by using a specified algorithm (for example, an SM3 hash algorithm).

S1004: The satellite network device200obtains the third data packet based on the original data and the fourth authentication code.

The satellite network device200may concatenate the fourth authentication code and the original data together, to obtain the third data packet. In some embodiments, the satellite network device200may further add packet header information in front of the fourth authentication code and the original data that are concatenated together, to obtain the third data packet. The packet header information may include but is not limited to a service type indication and the like. The service type indication may indicate a service type (for example, a data packet for sending a satellite message to the terminal100, or a data packet for sending, to the terminal100, a quantity of satellite messages sent to the terminal100) of the third data packet.

In some embodiments, the terminal100may obtain the fourth authentication code based on a specified key, the sixth information, and the original data.

In some embodiments, the terminal100may further encrypt, by using the specified key, the fourth authentication code and the original data that are concatenated together, to obtain the third data packet. For specific descriptions, refer to the foregoing embodiment shown inFIG.8AtoFIG.8C. Details are not described herein again.

S1005: The satellite network device200sends the third data packet to the terminal100.

Specifically, the satellite network device200may process the third data packet into at least one fourth data packet (SLC PDU) at the MDCP layer and the SLC layer, or the satellite network device200may process the third data packet into at least one fourth data packet (MDCP PDU) at the MDCP layer, and then send the at least one fourth data packet to the terminal100. For specific descriptions of obtaining, by the satellite network device200, the at least one fourth data packet and sending the at least one fourth data packet to the terminal100, refer to the foregoing embodiment shown inFIG.3A(1) toFIG.3A(3). Details are not described herein again.

S1006: The terminal100obtains receiving time of the third data packet, and generates fifth information based on the receiving time.

The terminal100obtains the receiving time of the third data packet in a plurality of manners. For example, when receiving the at least one fourth data packet at an SLC layer, the terminal100may record receiving time of each of the at least one fourth data packet. The terminal100may concatenate, at the SLC layer based on frame header information of fourth data packets, fourth data packets belonging to one SLC SDU, to obtain an SLC SDU. The terminal100may determine, through comparison, a sequence of receiving time of the fourth data packets included in the SLC SDU, and use earliest receiving time as receiving time of the SLC SDU. The terminal100may upload the SLC SDU and the receiving time of the SLC SDU to an MDCP layer at the SLC layer. The terminal100may use the SLC SDU as an MDCP PDU at the MDCP layer, and obtain an MDCP SDU based on the MDCP PDU. The terminal100may determine the first MDCP PDU in the MDCP SDU by using successor indication fields of MDCP PDUs, and use, as receiving time of the MDCP SDU, receiving time of an SLC SDU corresponding to the first MDCP PDU. The terminal100may upload the MDCP SDU and the receiving time of the MDCP SDU to an AP layer at the MDCP layer. The terminal100may use the MDCP SDU as the third data packet and use the receiving time of the MDCP SDU as the receiving time of the third data packet at the AP layer. For other detailed descriptions of obtaining the receiving time of the third data packet by the terminal100, refer to the descriptions of obtaining the receiving time of the data packet by the receiving device in the embodiment inFIG.7AandFIG.7B. Details are not described herein again.

Specifically, for detailed descriptions of receiving the third data packet by the terminal100, refer to the foregoing embodiments shown inFIG.3B(1) toFIG.3B(3) andFIG.7AandFIG.7B. Details are not described herein again.

After obtaining the receiving time of the third data packet, the terminal100may generate the fifth information based on the receiving time of the third data packet and a preset or configured minimum time granularity. For specific descriptions of generating the fifth information by the terminal100, refer to the foregoing embodiment shown inFIG.7AandFIG.7B. Details are not described herein again.

S1007: The terminal100obtains a third authentication code based on the third data packet and the fifth information.

The terminal100may obtain the third authentication code through calculation based on the fifth information and the original data in the third data packet by using a specified authentication algorithm (for example, an SM3 hash algorithm). The specified authentication algorithm of the satellite network device200is the same as the specified authentication algorithm of the terminal100.

S1008: The terminal100determines whether the third authentication code is the same as the fourth authentication code.

The terminal100may determine a receiving status of the third data packet by determining, through comparison, whether the third authentication code is the same as the fourth authentication code. When the third authentication code is the same as the fourth authentication code, the terminal100performs step S1009, and in some embodiments, may further perform step S1010.

In some embodiments, the terminal100may further record information about time at which the third data packet is successfully received, for example, generate the fifth information corresponding to the third authentication code. The information about the time at which the third data packet is successfully received may be used by the terminal100to subsequently send transmission success time information to the satellite device200or a network element in a second transmission system when the terminal100accesses the second transmission system (for example, a cellular network or a WLAN), to update a sending status of information for which an application receipt fails to be received in a satellite network. This avoids a charging problem.

When the third authentication code is different from the fourth authentication code, the terminal100may perform step S1011.

The terminal100determines that the third authentication code is the same as the fourth authentication code, and determines that the third data packet is successfully received. The terminal100may perform a corresponding processing operation on the original data. For example, the terminal100may display the receiving prompt information. The receiving prompt information may be used to prompt the user that a satellite message sent by user equipment (for example, the terminal300) in a cellular network is received. The receiving prompt information may include but is not limited to voice prompt information, text prompt information, vibration prompt information, and the like. For example, when the receiving prompt information is text prompt information, the receiving prompt information may be “Received a satellite message from the “terminal300””. In some embodiments, the terminal100may further the display original data in the third data packet on a display screen.

S1010: The terminal100sends an application receipt to the satellite network device200, to indicate that the third data packet is successfully received.

The terminal100may further generate a success application receipt (an application receipt indicating that the third data packet is successfully sent). The success application receipt may indicate that the terminal100successfully receives the data packet. The terminal100may send the success application receipt to the satellite network device200.

In some embodiments, after receiving the success application receipt, the satellite network device200may delete the original data in the third data packet.

S1011: The terminal100sends an application receipt to the satellite network device200, to indicate that the third data packet fails to be received.

The terminal100determines that the third authentication code is different from the fourth authentication code, and determines that the third data packet fails to be received. The terminal100may delete the third data packet. The terminal100may further generate a failure application receipt (an application receipt indicating that the third data packet fails to be sent). The failure application receipt may indicate that the terminal100fails to receive the data packet. The terminal100may send the failure application receipt to the satellite network device200.

In some embodiments, after the terminal100determines that the third authentication code is different from the fourth authentication code, the terminal100may subtract a preset value (for example, 1) from a value of the fifth information, and then generate a new third authentication code based on adjusted fifth information and the original data.

The receiving device may determine, through comparison, whether the fourth authentication code is the same as the new third authentication code. When the fourth authentication code is the same as the new third authentication code, the terminal100may determine that the data packet is successfully received. The terminal100may further perform step S1010.

When the fourth authentication code is different from the new third authentication code, the terminal100may determine that the data packet fails to be received. The terminal100may further generate and send, to the satellite network device200, a failure application receipt. The failure application receipt may indicate that the terminal100fails to receive the data packet.

In some embodiments, after receiving the failure application receipt, the satellite network device200may generate and send, to the terminal100, a new third data packet.

Herein, the success application receipt and the failure application receipt may be collectively referred to as a third application receipt, and the third application receipt may include indication information, indicating, to the user, whether the data packet is successfully received.

This application is not limited to the foregoing embodiments, and further provides the following embodiments. It should be noted that the following embodiments may be used in mutual combination with the foregoing embodiments.

In some embodiments, information A of a sending device is context (context) information A, and the context information A may indicate information about a quantity of sent data packets. The information about the quantity of sent data packets is information about a quantity of data packets successfully sent by the sending device. Information B of a receiving device is context information B, and the context information B may indicate information about a quantity of received data packets. The information about the quantity of received data packets is information about a quantity of data packets successfully received by the receiving device (information about a quantity of generated success application receipts). An initial value of the information A is the same as an initial value of the information B. In this way, after successfully parsing, based on the information B, a data packet generated by the sending device based on the information A, the receiving device may update a value of the information B. After the receiving device receives the repeatedly sent data packet, because a value of updated information B is different from a value of the information A existing before an update, that is, an authentication code A is different from an authentication code B, the receiving device cannot parse the data packet sent by the sending device, so that problems of repeated processing and charging do not occur.

It should be noted that before the sending device sends the data packet to the receiving device, the sending device and the receiving device may obtain context information. Context information of the sending device may be referred to as the context information A, namely, the information A. Context information of the receiving device may be referred to as the context information B, namely, the information B.

In some embodiments, the quantity of data packets successfully sent by the sending device may be a quantity of success application receipts received by the sending device.

The following describes several manners in which a terminal100and a satellite network device200obtain context information. Specific descriptions are as follows:(1) The terminal100and the satellite network device200may obtain the context information when obtaining a specified key through negotiation by using a cellular network. For example, the terminal100, the satellite network device200, and a cellular network device400may perform step S501 to step S515 shown inFIG.5. After the satellite network device200receives a parameter response (including the specified key) sent by a bootstrapping server41, the satellite network device200may set context information of the satellite network device200. For example, an initial value of the context information of the satellite network device200may be X. Then, the satellite network device200may send a service response4to the terminal100. The service response4may indicate that the terminal100and the satellite network device200can perform a data encryption/decryption operation within a specified key validity period by using the specified key stored by the terminal100and the satellite network device200. The service response4may further include the context information of the satellite network device200. After receiving the service response4, the terminal100may set an initial value of context information of the terminal100to X based on the service response4. It should be noted that, provided that a value of the context information of the satellite network device200is the same as a value of the context information of the terminal100, even if the initial value of the context information is any value, receiving results of the sending device and the receiving device are not affected.(2) The terminal100may obtain a specified key and an initial value of context information by using an intermediate device. The intermediate device and the satellite network device200may first obtain the specified key, context information of the satellite network device200, and the context information of the terminal100through negotiation in a cellular network by using the foregoing operations. The intermediate device may establish a communication connection (for example, a Bluetooth connection) to the terminal100. The intermediate device may send the specified key and the context information of the terminal100to the terminal100through the communication connection.(3) Initial values of information A of the terminal100and information B of the satellite network device200are preset specified values.(4) An initial value of information A of the terminal100is a data value configured by the satellite network device200for the terminal100.

FIG.11AandFIG.11Bare a schematic diagram of a processing procedure of a transmission method according to an embodiment of this application.

1. A Sending Device Generates an Authentication Code A Based on Original Data and Information A.

The information A is context information A, and the information A may indicate information about a quantity of sent data packets. The information about the quantity of sent data packets is information about a quantity of data packets successfully sent by the sending device. Herein, information about a quantity of success application receipts received by the sending device may indicate the information about the quantity of data packets successfully sent by the sending device. That is, after receiving a success application receipt, the sending device may add a preset value to a value of the information A. It should be noted that an increment of the information A is related to the quantity of data packets successfully sent by the sending device.

The sending device may obtain the authentication code A based on the information A and the original data. For detailed descriptions of obtaining the authentication code A by the sending device, refer to the foregoing embodiment shown inFIG.7AandFIG.7B. Details are not described herein again.

In some embodiments, the sending device may generate the authentication code A based on the information A, a specified key, and the original data, and then generate a data packet based on the authentication code A and the original data. A receiving device may generate an authentication code B based on information B, the specified key, and the data packet. In this way, validity of the sending device can be verified by using the specified key, thereby ensuring transmission security.

2. The Sending Device Obtains the Data Packet Based on the Original Data and the Authentication Code A.

The sending device may concatenate the authentication code A and the original data together, to obtain the data packet.

In some embodiments, the sending device may add packet header information in front of the authentication code A and the original data that are concatenated together, to obtain the data packet. The packet header information may include a service type indication and the like. The service type indication may indicate a service type of the data packet.

In some embodiments, the sending device may concatenate the authentication code A and the original data together, to obtain concatenated data. Then, the sending device uses the specified key to encrypt the concatenated data by using a specified algorithm, to obtain encrypted data. The sending device may add packet header information in front of the encrypted data. The packet header information includes an encryption indication field. The encryption indication field may indicate the specified algorithm (for example, an SM3 hash algorithm) used by the sending device. In this way, because the sending device encrypts the data and then sends the encrypted data to the receiving device, data security can be further ensured.

The sending device may send the data packet to the receiving device. For descriptions of sending the data packet by the sending device to the receiving device during inbound, refer to the foregoing embodiment shown inFIG.2A(1) andFIG.2A(2). For descriptions of sending the data packet by the sending device to the receiving device during outbound, refer to the foregoing embodiment shown inFIG.3A(1) toFIG.3A(3). Details are not described herein again.

In some embodiments, when the sending device is a terminal100, after the sending device sends the data packet to the receiving device, the sending device may display sending prompt information. The sending prompt information may be used to prompt a user that the sending device has sent a satellite message to the receiving device.

3. The Receiving Device Obtains the Authentication Code A and the Original Data Based on the Data Packet.

After the receiving device receives the data packet sent by the sending device, the receiving device may obtain the authentication code A and the original data from the data packet. For descriptions of receiving the data packet by the receiving device during inbound, refer to the foregoing embodiment shown inFIG.2B(1) andFIG.2B(2). For descriptions of receiving the data packet by the receiving device during outbound, refer to the foregoing embodiment shown inFIG.3B(1) toFIG.3B(3). Details are not described herein again.

In some embodiments, the data packet includes the encryption indication field and the encrypted data. The receiving device may decrypt the encrypted data in the data packet based on the encryption indication field and the specified key, to obtain the authentication code A and the original data.

4. The Receiving Device Generates the Authentication Code B Based on the Information B and the Data Packet.

The receiving device may obtain the authentication code B through calculation based on the information B and the original data in the data packet by using a specified algorithm (for example, the SM3 hash algorithm). The specified algorithm of the receiving device is the same as the specified algorithm of the sending device. For example, the sending device may add a specified algorithm indication to a packet header of the data packet, where the specified algorithm indication may indicate the specified algorithm used by the sending device; and the receiving device may determine, based on the specified algorithm indication in the received data packet, the specified algorithm used by the sending device. For another example, the sending device and the receiving device may negotiate about a used specified algorithm in a cellular network.

In some embodiments, when the sending device generates the authentication code A based on the original data, the information A, and the specified key, the receiving device may generate the authentication code B based on the original data, the information B, and the specified key. The sending device and the receiving device may preset parameters required for generating the authentication codes.

5. The Receiving Device Determines a Receiving Status of the Data Packet Based on the Authentication Code B.

The receiving device may determine the receiving status of the data packet by determining, through comparison, whether the authentication code A is the same as the authentication code B.(1) When the authentication code B is the same as the authentication code A, the receiving device determines that the data packet is successfully received. The receiving device may perform a corresponding processing operation on the original data. For specific descriptions, refer to the embodiment inFIG.7AandFIG.7B.

The receiving device may update a value of the information B. Specifically, the receiving device may add a preset value to the value of the information B.

The receiving device may further generate a success application receipt and send the success application receipt to the sending device. The success application receipt may indicate that the receiving device successfully receives the data packet.(2) When the authentication code B is different from the authentication code A, the receiving device may determine that the data packet fails to be received. The receiving device may further generate and send, to the sending device, a failure application receipt. The failure application receipt may indicate that the receiving device fails to receive the data packet.

6. The Sending Device Determines a Sending Status of the Data Packet Based on an Application Receipt.

The sending device may determine the sending status of the data packet based on the application receipt.(1) When the application receipt received by the sending device is a success application receipt indicating that the receiving device successfully receives the data packet, the sending device may determine that the data packet is successfully sent. The sending device may add a preset value to a value of the information A. The preset value added in the sending device is the same as the preset value added in the receiving device.

In some embodiments, when the sending device is the terminal100, after receiving the success application receipt, the sending device may display success prompt information. The success prompt information may be used to prompt the user that the data packet is successfully sent. It should be noted that only after receiving the success application receipt, the sending device can determine that the data packet is successfully sent.(2) When the application receipt received by the sending device is a failure application receipt indicating that the receiving device fails to receive the data packet, the sending device may determine that the data packet fails to be sent.

In some embodiments, the sending device may retransmit the data packet that fails to be sent.

In some embodiments, when the sending device is the terminal100, after receiving the failure application receipt, the sending device may display failure prompt information. The failure prompt information may be used to prompt the user that the data packet fails to be sent.

The following describes an inbound procedure of a transmission method according to an embodiment of this application.

A terminal100may generate a first authentication code based on first information, a specified key, and first data (also referred to as original data). The first information is first context information, and the first context information indicates information about a quantity of sent data packets. The terminal100may obtain a first data packet based on the first authentication code, the specified key, and the original data. The terminal100may send the first data packet to a satellite network device200. After receiving the first data packet, the satellite network device200may generate a second authentication code based on second information, the specified key, and the first data packet. The second information is second context information, and the second context information indicates information about a quantity of received data packets. The satellite network device200may determine a receiving status of the first data packet based on the second authentication code. In this way, when successfully receiving the first data packet sent by the terminal100, the satellite network device200may update a value of the second information. When the satellite network device200repeatedly receives the first data packet, because updated second information is different from the second information existing before the update, an authentication code generated by the satellite network device200based on the updated second information is different from the first authentication code in the first data packet. Therefore, the satellite network device200determines that the first data packet fails to be received, so that a problem of repeatedly receiving a same data packet does not occur.

FIG.12is a schematic diagram of an inbound transmission procedure according to an embodiment of this application.

S1201: A terminal100, a satellite network device200, and a cellular network device400negotiate about a key, first information, and second information.

For descriptions of negotiating about the key, the first information, and the second information by the terminal100, the satellite network device200, and the cellular network device400, refer to the foregoing embodiment shown inFIG.11AandFIG.11B. Details are not described herein again. After negotiating about the key, both the terminal100and the satellite network device200store the specified key. The terminal100stores the first information. The satellite network device200stores the second information. An initial value of the first information is the same as an initial value of the second information.

S1203: The terminal100generates a first authentication code based on the specified key, the original data, and the first information.

The terminal100may obtain the first authentication code through calculation based on the stored first information, the specified key, and the original data by using a specified authentication algorithm (for example, an SM3 hash algorithm).

S1204: The terminal100may obtain a first data packet based on the first authentication code and the original data.

In some embodiments, the terminal100may further encrypt, by using the specified key, the first authentication code and the original data that are concatenated together, to obtain the first data packet.

S1205: The terminal100sends the first data packet to the satellite network device200.

In some embodiments, after sending the first data packet to the receiving device, the terminal100may display sending prompt information, for example, display “Sent”. The sending prompt information may be used to prompt a user that the terminal100has sent the first data packet to the satellite network device200. The sending prompt information may further include a mark icon. The mark icon may be used to trigger (for example, through tapping) display of an information explanation, for example, “Sent!”. Display of an operation suggestion (for example, the message has been sent to the receiving device, and it is not determined whether the message reaches the receiving device) may be triggered through tapping. A form of the sending prompt information is not limited, and may be a text, a picture, an animation, or the like.

S1206: The satellite network device200may generate a second authentication code based on the specified key, the original data, and the second information.

S1207: The satellite network device200determines whether the first authentication code is the same as the second authentication code.

The satellite network device200may determine a receiving status of the first data packet by determining, through comparison, whether the first authentication code is the same as the second authentication code. When the first authentication code is the same as the second authentication code, the satellite network device200may perform step S1208 to step S1210.

When the first authentication code is different from the second authentication code, the satellite network device200may perform step S1213.

S1208: The satellite network device200updates a value of the second information.

The satellite network device200may add a preset value to the value of the second information. For example, when the value of the second information is 0 and the preset value is 1, an updated value of the second information is 1.

S1209: The satellite network device200sends the original data to the cellular network device400.

S1210: The satellite network device200sends a success application receipt to the terminal100.

S1211: The terminal100updates a value of the first information.

After receiving the success application receipt sent by the satellite network device200, the terminal100may add a preset value to the value of the first information. The preset value added for the first information is the same as the preset value added for the second information, in other words, an updated value of the first information is the same as the updated value of the second information. In some embodiments, the terminal100may further perform step S1212.

The terminal100displays the success prompt information. The success prompt information prompts the user that the first data packet is successfully sent.

S1213: The satellite network device200sends a failure application receipt to the terminal100.

In some embodiments, after receiving the failure application receipt, the terminal100may further perform step S1214.

The terminal100displays the failure prompt information. The failure prompt information prompts the user that the first data packet fails to be sent.

For specific descriptions of step S1202 to step S1207, step S1209, step S1210, and step S1212, refer to the foregoing embodiment shown inFIG.9. Details are not described herein again.

The following describes an outbound procedure of a transmission method according to an embodiment of this application.

A satellite network device200may generate a fourth authentication code based on sixth information and third data (also referred to as original data). The sixth information is sixth context information, and the sixth context information indicates information about a quantity of sent data packets. The satellite network device200may obtain a third data packet based on the fourth authentication code and the original data. The satellite network device200may send the third data packet to a terminal100. After receiving the third data packet, the terminal100may generate a third authentication code based on fifth information and the third data packet. The fifth information is fifth context information, and the fifth context information indicates information about a quantity of received data packets. The terminal100may determine a receiving status of the third data packet based on the third authentication code. In this way, when successfully receiving the third data packet sent by the satellite network device200, the terminal100may update a value of the fifth information. When the terminal100repeatedly receives the third data packet, because updated fifth information is different from the fifth information existing before the update, an authentication code generated by the terminal100based on the updated fifth information is different from the fourth authentication code in the third data packet. Therefore, the terminal100determines that the third data packet fails to be received, so that a problem of repeatedly receiving a same data packet does not occur.

FIG.13is a schematic diagram of an outbound transmission procedure according to an embodiment of this application.

S1301: A terminal100, a satellite network device200, and a cellular network device400negotiate about fifth information and sixth information.

The terminal100and the satellite network device200may obtain respective context information when obtaining a key through negotiation by using the cellular network device400in a cellular network. For specific descriptions, refer to the foregoing embodiment shown inFIG.11AandFIG.11B. Details are not described herein again. Alternatively, the terminal100and the satellite network device200may establish a communication connection in a cellular network, and obtain respective context information through negotiation. The terminal100stores the fifth information. The satellite network device200stores the sixth information. An initial value of the fifth information is the same as an initial value of the sixth information.

S1302: The satellite network device200receives original data sent by the cellular network device400.

S1303: The satellite network device200receives a service request sent by the terminal100.

S1304: The satellite network device200generates a fourth authentication code based on the original data and the sixth information.

The satellite network device200may generate the fourth authentication code based on the stored sixth information and the original data.

S1305: The satellite network device200obtains a third data packet based on the original data and the fourth authentication code.

S1306: The satellite network device200sends the third data packet to the terminal100.

S1307: The terminal100obtains a third authentication code based on the third data packet and the fifth information.

S1308: The terminal100determines whether the third authentication code is the same as the fourth authentication code.

The terminal100may determine a receiving status of the third data packet by determining, through comparison, whether the third authentication code is the same as the fourth authentication code. When the third authentication code is the same as the fourth authentication code, the terminal100may perform step S1309 to step S1311.

When the third authentication code is different from the fourth authentication code, the terminal100may perform step S1313.

S1310: The terminal100updates a value of the fifth information.

The terminal100may add a preset value to the value of the fifth information. For example, when the value of the fifth information is 0 and the preset value is 1, an updated value of the fifth information is 1.

S1311: The terminal100sends a success application receipt to the satellite network device200.

S1312: The satellite network device200updates a value of the sixth information.

After receiving the success application receipt sent by the terminal100, the satellite network device200may add a preset value to the value of the sixth information. The preset value added for the sixth information is the same as the preset value added for the fifth information, in other words, an updated value of the sixth information is the same as the updated value of the fifth information.

S1313: The terminal100sends a failure application receipt to the satellite network device200.

For specific descriptions of step S1302 to step S1309, step S1311, and step S1313, refer to the foregoing embodiment shown inFIG.10. Details are not described herein again.

It should be noted that this application is not limited to the foregoing embodiments, and further provides the following embodiments. It should be noted that the following embodiments may be used in mutual combination with any one or more of the foregoing embodiments.

In some embodiments, if a sending device has sent at least two data packets before receiving a failure application receipt (the sending device does not receive an application receipt during sending of the at least two data packets), after receiving the failure application receipt, the sending device cannot determine which data packet in the at least two data packets is successfully sent.

Therefore, in some embodiments, information A of a sending device is context (context) information A, and information B of a receiving device is context information B. The context information A may indicate information about a quantity of sent data packets. The information B of the receiving device is the context information B, and the context information B may indicate information about a quantity of received data packets. The sending device may add a message ID field A to a data packet. The message ID field A may be used to identify the data packet. The receiving device may determine a value of a message ID field B based on a message ID field A of a successfully received data packet. The receiving device may add the message ID field B to an application receipt. The message ID field B may be used to identify a latest successfully received data packet. The application receipt to which the message ID field B of the successfully received data packet is added may be referred to as an indication application receipt. In this way, when sending a plurality of data packets generated based on a same value of the context information A, the sending device can determine the successfully sent data packet by using the message ID field B in the application receipt.

A terminal100and a satellite network device200may obtain context information by using a cellular network, the terminal100may obtain context information by using an intermediate device, or the terminal100and the satellite network device200may preset context information. For detailed descriptions of obtaining the context information by the terminal100and the satellite network device200, refer to the foregoing embodiments. Details are not described herein again.

It should be noted that in an inbound process, a success application receipt, a failure application receipt, and an indication application receipt may be collectively referred to as a first application receipt. In an outbound process, a success application receipt, a failure application receipt, and an indication application receipt may be collectively referred to as a third application receipt. It may be understood that, in the inbound process, if the satellite network device200generates only a success application receipt and a failure application receipt, the success application receipt and the failure application receipt may be collectively referred to as a first application receipt. In the outbound process, if the terminal100generates only a success application receipt and a failure application receipt, the success application receipt and the failure application receipt may be collectively referred to as a third application receipt.

FIG.21AandFIG.21Bare a schematic diagram of a processing procedure of a transmission method according to an embodiment of this application.

1. A Sending Device Generates an Authentication Code A Based on Original Data and Context Information A.

The context information A may indicate information about a quantity of sent data packets. The information about the quantity of sent data packets is information about a quantity of data packets successfully sent by the sending device. Herein, the information about the quantity of successfully sent data packets may be a sum of a preset offset value, a quantity of success application receipts received by the sending device, and a quantity of indication application receipts received by the sending device. The preset offset value is greater than or equal to 0. That is, after receiving a success application receipt/an indication application receipt, the sending device may add a preset value to a value of the context information A. It should be noted that an increment of the context information A is related to the quantity of data packets successfully sent by the sending device.

The sending device may obtain the authentication code A based on the context information A and the original data. For detailed descriptions of obtaining the authentication code A by the sending device, refer to the foregoing embodiment shown inFIG.7AandFIG.7B. Details are not described herein again.

In some embodiments, the sending device may generate the authentication code A based on the context information A, a specified key, and the original data, and then generate a data packet based on the authentication code A and the original data. A receiving device may generate an authentication code B based on context information B, the specified key, and the data packet. In this way, validity of the sending device can be verified by using the specified key, thereby ensuring transmission security.

2. The Sending Device Obtains the Data Packet Based on a Message ID Field A, the Original Data, and the Authentication Code A.

The sending device may concatenate the message ID field A, the authentication code A, and the original data together, to obtain the data packet.

Specifically, the sending device may store a message ID. When the value of the context information A does not change, a value of the message ID may be updated with a data packet generated by the sending device. That is, the sending device may update the value of the message ID after generating a data packet based on the message ID field A corresponding to the message ID. After the value of the context information A changes, the sending device may reset the value of the message ID. In this way, when the value of the context information A does not change, because the message ID can identify different data packets, the sending device and the receiving device may distinguish between data packets by using message ID fields of the data packets. That is, when the sending device sends a plurality of data packets and does not receive a success application receipt, the receiving device may send a message ID of a latest successfully received data packet to the sending device, so that the sending device can determine a sending status of the plurality of data packets based on a value of the message ID.

For example, when a length of the message ID is 2 bits, the message ID may be “00”, “01”, “10”, or “11”. After generating, based on a message ID “00”, a data packet 1 including a message ID field A “00”, the sending device may send the data packet 1 to the receiving device, and update a value of the message ID to “01”. After the sending device receives a success application receipt of the receiving device, the sending device may update the value of the context information A, and reset the value of the message ID to “00”. Then, the sending device may generate and send, to the receiving device, a data packet 2 including a message ID field A “00”.

After generating, based on a message ID “00”, a data packet 1 including a message ID field A “00”, the sending device may send the data packet 1 to the receiving device, and update a value of the message ID to “01”. When the sending device does not receive an application receipt of the data packet 1 whose message ID field A is “00”, the sending device may generate and send, to the receiving device, a data packet 2 including a message ID field A “01”, and the sending device may further update the value of the message ID to “10”. When the sending device does not receive an application receipt of the data packet 2 whose message ID field A is “01”, the sending device may generate and send, to the receiving device, a data packet 3 including a message ID field A “10”, and the sending device may further update the value of the message ID to “11”. After the sending device receives an indication application receipt including a message ID field B “01”, the sending device may determine that the data packets whose message ID fields A are “00” and “10” fail to be sent, and the data packet whose message ID field A is “01” is successfully sent. The sending device may update the value of the context information A and adjust the value of the message ID to “00”.

In some embodiments, the sending device may add packet header information in front of the authentication code A and the original data that are concatenated together, to obtain the data packet. The packet header information may include the message ID field A and the like.

In some embodiments, the sending device may concatenate the authentication code A and the original data together, to obtain concatenated data. Then, the sending device uses the specified key to encrypt the concatenated data by using a specified algorithm, to obtain encrypted data. The sending device may add packet header information in front of the encrypted data. The packet header information includes an encryption indication field and the message ID field A. The encryption indication field may indicate the specified algorithm (for example, an SM3 hash algorithm) used by the sending device. In this way, because the sending device encrypts the data and then sends the encrypted data to the receiving device, data security can be further ensured. In some embodiments, the sending device may concatenate the message ID field A, the authentication code A, and the original data together, and then perform encryption by using the specified key.

The sending device may send the data packet to the receiving device. For descriptions of sending the data packet by the sending device to the receiving device during inbound, refer to the foregoing embodiment shown inFIG.2A(1) andFIG.2A(2). For descriptions of sending the data packet by the sending device to the receiving device during outbound, refer to the foregoing embodiment shown inFIG.3A(1) toFIG.3A(3). Details are not described herein again.

In some embodiments, when the sending device is a terminal100, after the sending device sends the data packet to the receiving device, the sending device may display sending prompt information. The sending prompt information may be used to prompt a user that the sending device has sent a satellite message to the receiving device.

3. The Receiving Device Obtains the Message ID Field A, the Authentication Code A, and the Original Data Based on the Data Packet.

After the receiving device receives the data packet sent by the sending device, the receiving device may extract the message ID field A, the authentication code A, and the original data from the data packet. For descriptions of receiving the data packet by the receiving device during inbound, refer to the foregoing embodiment shown inFIG.2B(1) andFIG.2B(2). For descriptions of receiving the data packet by the receiving device during outbound, refer to the foregoing embodiment shown inFIG.3B(1) toFIG.3B(3). Details are not described herein again.

In some embodiments, the data packet includes the encryption indication field and the encrypted data. The receiving device may decrypt the encrypted data in the data packet based on the encryption indication field and the specified key, to obtain the message ID field A, the authentication code A, and the original data.

4. The Receiving Device Generates the Authentication Code B Based on the Context Information B and the Data Packet.

The receiving device may obtain the authentication code B through calculation based on the context information B and the original data in the data packet by using a specified algorithm (for example, the SM3 hash algorithm). The specified algorithm of the receiving device is the same as the specified algorithm of the sending device. For example, the sending device may add a specified algorithm indication to a packet header of the data packet, where the specified algorithm indication may indicate the specified algorithm used by the sending device; and the receiving device may determine, based on the specified algorithm indication in the received data packet, the specified algorithm used by the sending device. For another example, the sending device and the receiving device may negotiate about a used specified algorithm in a cellular network.

In some embodiments, when the sending device generates the authentication code A based on the original data, the context information A, and the specified key, the receiving device may generate the authentication code B based on the original data, the context information B, and the specified key. The sending device and the receiving device may preset parameters required for generating the authentication codes.

5. The Receiving Device Determines a Receiving Status of the Data Packet Based on the Authentication Code B.

The receiving device may determine the receiving status of the data packet by determining, through comparison, whether the authentication code A is the same as the authentication code B.(1) When the authentication code B is the same as the authentication code A, the receiving device determines that the data packet is successfully received. The receiving device may perform a corresponding processing operation on the original data. For specific descriptions, refer to the embodiment inFIG.7AandFIG.7B.

The receiving device may determine a value of a message ID field B based on a value of the message ID field A, and may further update a value of the context information B. Specifically, the receiving device may add a preset value to the value of the context information B.

The receiving device may further generate a success application receipt and send the success application receipt to the sending device. The success application receipt may indicate that the receiving device successfully receives the data packet.(2) When the authentication code B is different from the authentication code A, the receiving device may obtain information C based on the context information B. Specifically, the receiving device may subtract a preset value from a value of the context information B, to obtain the information C. The receiving device may obtain an authentication code C based on the information C and the original data by using a specified authentication algorithm. The receiving device may determine, through comparison, whether the authentication code C is the same as the authentication code A.(3) When the authentication code A is the same as the authentication code C, the receiving device may determine that the data packet fails to be received. The receiving device may further generate and send, to the sending device, an indication application receipt. The indication application receipt includes a message ID field B, and the message ID field B may be used to identify a data packet latest successfully received by the receiving device. Because the authentication code C generated by the receiving device based on the information C is the same as the authentication code A, the receiving device may determine that the sending device does not update the value of the context information A, that is, the receiving device may determine that the sending device does not receive a success application receipt indicating the latest successfully received data packet. The receiving device may generate the indication application receipt indicating the latest successfully received data packet. The indication application receipt may further indicate, to the sending device, that the current data packet fails to be received.

In some embodiments, when determining that the authentication code A is the same as the authentication code C, the receiving device may determine that the data packet is successfully received. The receiving device may add the preset value to the value of the context information B, and determine a value of a message ID field B based on the message ID field A of the current data packet. The receiving device may further generate and send, to the sending device, an indication application receipt. The indication application receipt may include a message ID field B of a latest successfully received data packet. The indication application receipt may indicate, to the sending device, that the current data packet and a data packet including a message ID field A that has a same value as the message ID field B are successfully received. The sending device may add the preset value to the value of the context information A twice based on the indication application receipt.(4) When the authentication code A is different from the authentication code C, the receiving device may determine that the data packet fails to be received. The receiving device may further generate and send, to the sending device, a failure application receipt. The failure application receipt may indicate that the receiving device fails to receive the data packet.

For example, an application receipt may include but is not limited to a status code. The application receipt may indicate the receiving status of the data packet by using the status code. Each value of the status code may uniquely correspond to one status of receiving the data packet by the receiving device. For example, the status code of the application receipt and the receiving status corresponding to the status code are shown in Table 1.

TABLE 1Application receipt descriptionStatuscodeDescription0000Receiving succeeds0001Decryption error0010Decoding error0011-1011Reserved1100Context information mismatch (mismatch), where a datapacket with a message ID = 00 is correctly transmitted1101Context information mismatch (mismatch), where a datapacket with a message ID = 01 is correctly transmitted1110Context information mismatch (mismatch), where a datapacket with a message ID = 10 is correctly transmitted1111Context information mismatch (mismatch), where a datapacket with a message ID = 11 is correctly transmitted

For example, a length of the status code may be 4 bits. When the authentication code A is the same as the authentication code B, a value of the status code may be “0000”, and the status code may indicate that the data packet is successfully received, that is, an application receipt including the status code “0000” is a success application receipt.

When the authentication code A is different from the authentication code B, the receiving device may generate the authentication code C. When the authentication code A is different from the authentication code C, a value of the status code may be “0001”, and the status code may indicate that the receiving device fails to decrypt the data packet (for example, a decryption failure caused by a key error or a decryption failure caused by an authentication code error), that is, an application receipt including the status code “0001” is a failure application receipt.

When the authentication code A is the same as the authentication code C, the receiving device may determine that there is a mismatch between context information of the sending device and context information of the receiving device. The first two bits of the status code of the receiving device may be “11”, and the last two bits of the status code may be the value of the message ID field B. When a value of the status code is “1100”, the status code may indicate that a data packet whose value of a message ID field A is “00” and that is received by the receiving device is successfully received, that is, an application receipt including the status code “1100” is an indication application receipt. When a value of the status code is “1101”, the status code may indicate that a data packet whose message ID field A is “01” and that is received by the receiving device is successfully received, that is, an application receipt including the status code “1101” is an indication application receipt. When a value of the status code is “1110”, the status code may indicate that a data packet whose message ID field is “10” and that is received by the receiving device is successfully received, that is, an application receipt including the status code “1110” is an indication application receipt. When a value of the status code is “1111”, the status code may indicate that a data packet whose message ID field is “11” and that is received by the receiving device is successfully received, that is, an application receipt including the status code “1111” is an indication application receipt.

It should be noted that after updating the value of the context information A, the sending device adjusts the value of the message ID associated with the data packet to “00”. When the sending device does not receive an application receipt after sending a data packet whose message ID indication A is “00”, the sending device may continue to send a data packet whose message ID is “01”. If the sending device still does not receive an application receipt, the sending device may continue to send a data packet whose message ID is “10”. After the sending device receives a success application receipt/an indication application receipt, the sending device may update the value of the context information A, and adjust the value of the message ID field to “00”. The rest can be deduced from this.

For another example, when the receiving device fails to decode the data packet, and a value of the status code is “0010”, the status code may indicate that the receiving device fails to decode the data packet (for example, a decoding failure caused by inconsistent encoding manners between the sending device and the receiving device), that is, an application receipt including the status code “0010” is a failure application receipt. Other values of the status code may be reserved values.

It should be noted that the foregoing descriptions of the status code are merely an example, the status code may be alternatively a data segment of another length, and the receiving status corresponding to the value of the status code is not limited to the foregoing described case. This is not limited in this application.

6. The Sending Device Determines a Sending Status of the Data Packet Based on an Application Receipt.

The sending device may determine the sending status of the data packet based on the application receipt.(1) When the application receipt received by the sending device is a success application receipt indicating that the receiving device successfully receives the data packet, the sending device may determine that the data packet is successfully sent. The sending device may add a preset value to the value of the context information A. The preset value added in the sending device is the same as the preset value added in the receiving device.

In some embodiments, when the sending device is the terminal100, after receiving the success application receipt, the sending device may display success prompt information. The success prompt information may be used to prompt the user that the data packet is successfully sent.(2) When the application receipt received by the sending device is a failure application receipt indicating that the receiving device fails to receive the data packet, the sending device may determine that the data packet fails to be sent.

In some embodiments, the sending device may retransmit the data packet that fails to be sent.

In some embodiments, when the sending device is the terminal100, after receiving the failure application receipt, the sending device may display failure prompt information. The failure prompt information may be used to prompt the user that the data packet fails to be sent.(3) When the application receipt received by the sending device is an indication application receipt, the sending device may determine that the data packet fails to be sent.

The sending device may determine a latest successfully sent data packet based on a message ID field B in the indication application receipt. Specifically, the sending device may determine a message ID field A of the latest successfully sent data packet based on the message ID field B in the indication application receipt. The sending device may determine the latest successfully sent data packet based on the message ID field A.

The sending device may further add a preset value to the value of the context information A. Because the sending device may determine, based on the indication application receipt, that a success application receipt of a data packet that has been successfully sent is not received, the sending device may determine that a data packet has been previously successfully sent, and accordingly update the value of the context information A.

For example, after the sending device receives an application receipt including a status code “1100”, the sending device may determine that a data packet whose message ID field is “00” is successfully sent, and the sending device may update the value of the context information A.

In some embodiments, when the sending device is the terminal100, after receiving the indication application receipt, the sending device may display success prompt information and failure prompt information. The success prompt information may be used to prompt the user that the data packet indicated by the message ID field B is successfully sent. The failure prompt information may be used to prompt the user that the current data packet fails to be sent.

In some embodiments, the indication application receipt may indicate that the data packet indicated by the message ID field B is successfully sent, and may further indicate that the current data packet is successfully sent. After receiving the indication application receipt, the sending device may add the preset value to the value of the context information A twice. The sending device may further display success prompt information1and success prompt information2. The success prompt information1may be used to prompt the user that the data packet identified by the message ID field B is successfully sent. The success prompt information2may be used to prompt the user that the current data packet is successfully sent.

This application is not limited to the foregoing embodiments, and further provides the following embodiments. It should be noted that the following embodiments may be used in mutual combination with any one or more of the foregoing embodiments.

In some embodiments, information A of a sending device is context information A, and information B of a receiving device is context information B. The context information A may indicate a count value or a sequence number of a data packet sent by the sending device. The context information B may indicate a count value or a sequence number of a data packet received by the receiving device. In this way, after the receiving device receives a repeatedly sent data packet, because a count value or a sequence number of the received data packet changes, the receiving device can update a value of context information B. Because an updated value of the context information B is different from a value of context information A in the repeated data packet, the receiving device cannot parse the repeated data packet, so that problems of repeated processing and charging do not occur. In addition, because the sending device updates the value of the context information A based on a quantity of sent data packets, even if the sending device does not receive a success application receipt of the receiving device, the sending device updates the value of the context information A, and generates a new data packet based on an updated value of the context information A, without affecting parsing of the receiving device for the new data packet.

In some embodiments, when context information indicates a count value of a data packet, an initial value of the context information A of the sending device is greater than an initial value of the context information B of the receiving device by a preset value. The sending device may generate a data packet based on the context information A. After sending, to the receiving device, the data packet including an authentication code A, the sending device may add the preset value to the value of the context information A. After receiving the data packet, the receiving device may add the preset value to the value of the context information B. The receiving device may generate an authentication code B based on the context information B, and determine a receiving status of the data packet based on the authentication code B.

For example, a length of the context information A and a length of the context information B may be 5 bits. The initial value of the context information A may be “00001”, the initial value of the context information B may be “00000”, and the sending device may generate a data packet 1 based on the context information A “00001”. After sending the data packet 1 to the receiving device, the sending device may update the value of the context information A to “00010”. After receiving the data packet 1, the receiving device may update the value of the context information B to “00001”, and the receiving device may generate an authentication code B based on the context information B “00001”. Then, the sending device may generate a data packet 2 based on the context information A “00010”, and update the value of the context information A to “00011” after sending the data packet 2 to the receiving device. After receiving the data packet 2, the receiving device may update the value of the context information B to “00010”, and the receiving device may generate an authentication code B based on the context information B “00010”. The rest can be deduced from this.

In this way, the receiving device does not perform repeated processing.

In some embodiments, context information indicates a sequence number of a data packet. The context information A of the sending device includes a hyper frame number (hyper frame number, HFN) A and a sequence number (sequence number) A. The sending device may generate, based on the sequence number A, a data packet including a sequence number field A and an authentication code A, and send the data packet to the receiving device in a first transmission system. The receiving device may determine a value of a hyper frame number B based on the sequence number field A in the data packet, and obtain the context information B based on the sequence number field A and the hyper frame number B. The receiving device may generate an authentication code B based on the context information B and the data packet, and determine a receiving status of the data packet based on the authentication code B. Because a data length of the sequence number field A is limited, a value of the sequence number field A returns to an initial value as the value of the sequence number field A is updated. When an updated value of the sequence number A of the sending device is less than a value that is of the sequence number A and that exists before an update, the sending device updates a value of the hyper frame number A, that is, adds a preset value to the value of the hyper frame number A. When the value of the sequence number field A received by the receiving device is less than or equal to a value of a sequence number B, the receiving device may update the value of the hyper frame number B, that is, add the preset value to the value of the hyper frame number B. After updating the value of the hyper frame number B, the receiving device may update the value of the sequence number B to the value of the sequence number field A.

For example, a length of the context information A and a length of the context information B may be 5 bits. The sending device may store the context information A, and an initial value of the context information A may be “00000”. In the context information A, the hyper frame number A is “0000”, and the sequence number A is “0”. The receiving device may store the context information B. In the context information B, an initial value of the hyper frame number B may be “0000”, and an initial value of the sequence number B is smaller than an initial value of the sequence number A.

The sending device may generate a data packet 1 including the sequence number field A “0”. After sending the data packet 1 to the receiving device, the sending device may update the value of the context information A to “00001”. After receiving the data packet 1, the receiving device may determine, based on the sequence number field A, that the value of the hyper frame number B remains unchanged and is still “0000”. The receiving device may update the value of the sequence number B to “0”. The receiving device may concatenate the hyper frame number B and the sequence number field A, to obtain context information B “00000”.

Then, the sending device may generate, based on the context information A “00001”, a data packet 2 including a sequence number field A “1”. After sending the data packet 2 to the receiving device, the sending device may update the value of the context information A to “00010”. After receiving the data packet 2, the receiving device may determine, based on the sequence number field A, that the value of the hyper frame number B remains unchanged and is still “0000”. The receiving device may update the value of the hyper frame number B to “1”. The receiving device may concatenate the hyper frame number B and the sequence number field A, to obtain context information B “00001”.

Then, the sending device may generate, based on the context information A “00010”, a data packet 3 including a sequence number field A “0”. After sending the data packet 3 to the receiving device, the sending device may update the value of the context information A to “00011”. After receiving the data packet 3, because the value “0” of the sequence number field A is less than the value “1” of the sequence number B, the receiving device may determine, based on the sequence number field A “0”, that the value of the hyper frame number B is changed to “0001”. The receiving device may update the value of the hyper frame number B to “0”. The receiving device may concatenate the hyper frame number B and the sequence number field A, to obtain context information B “00010”. The rest can be deduced from this.

In this way, when context information indicates a sequence number of a data packet, the receiving device may determine a hyper frame number based on a sequence number in a data packet. Therefore, if the 1stdata packet sent by the sending device is lost in a sending process, the receiving device can also determine a hyper frame number based on a sequence number of the 2nddata packet sent by the sending device, and can still successfully parse out the 2nddata packet.

In this way, when the receiving device does not receive the data packet 2, the receiving device can also update the hyper frame number B to “0001” based on the sequence number A of the data packet 3, and the receiving device can successfully parse the data packet 3. When the sending device does not receive an application receipt, the sending device may update the value of the context information A with a sent data packet, and the sending device may continue to send a next data packet. It is ensured that the receiving device does not process a repeatedly sent data packet, and data can be continued to be transmitted after a data packet is lost or an application receipt is lost.

For a manner in which a terminal100and a satellite network device200obtain an initial value of context information/a hyper frame number, refer to the foregoing embodiments. Details are not described herein again.

For specific descriptions of the foregoing steps, refer to the embodiment shown inFIG.34. Details are not described herein again.

This application is not limited to the foregoing embodiments, and further provides the following embodiments. It should be noted that the following embodiments may be used in mutual combination with any one or more of the foregoing embodiments.

In some embodiments, a sending device may obtain, based on a retransmission indication field, information A, and original data, a data packet including an authentication code A and the retransmission indication field. The information A is sending time information or context information A. The retransmission indication field indicates that the data packet is a retransmitted data packet or a newly transmitted data packet. A receiving device may obtain an authentication code B based on information B and the data packet. The information B is receiving time information or context information B. When the authentication code A is different from the authentication code B, when determining, based on the retransmission indication field, that the data packet is a newly transmitted data packet, the receiving device may send a failure application receipt to the sending device. When determining, based on the retransmission indication field, that the data packet is a retransmitted data packet, the receiving device may generate an authentication code C. When the authentication code A is the same as the authentication code C, the receiving device may determine that the data packet is a retransmitted data packet corresponding to a data packet latest successfully received by the receiving device. The receiving device sends a success application receipt to the sending device.

In this way, when determining that the authentication code B is different from the authentication code A of the newly transmitted data packet, the receiving device determines that the receiving device fails to receive the newly transmitted data packet, and directly sends the failure application receipt. When the receiving device determines that the authentication code C is the same as the authentication code A of the retransmitted data packet, the receiving device may determine that the data packet is the retransmitted data packet corresponding to the latest successfully received data packet, that is, the receiving device may determine that the sending device fails to receive a success application receipt of the latest successfully received data packet, and the receiving device may send the success application receipt to the sending device again. The sending device may determine, based on the success application receipt, that original data in the retransmitted data packet is successfully sent, and no longer perform a retransmission operation, thereby saving a transmission resource of a satellite network.

This application is not limited to the foregoing embodiments, and further provides the following embodiments. It should be noted that the following embodiments may be used in mutual combination with any one or more of the foregoing embodiments.

In some embodiments, after a sending device and a receiving device return from a first transmission system to a second transmission system, the receiving device may send a set application receipt to the sending device. The set application receipt may indicate a data packet successfully received by the receiving device. The set application receipt may include identification information of the successfully received data packet (for example, the identification information may include but is not limited to a message ID field, receiving time of the data packet, context information, a sequence number SN, and the like). The sending device may determine a successfully sent data packet based on the identification information of the data packet.

Specifically, in an inbound process, after a terminal100and a satellite network device200return to a second transmission system, the satellite network device200may generate and send, to the terminal100, a set application receipt. The set application receipt may include but is not limited to one or more of identification information such as a message ID field of a successfully received data packet, receiving time of the data packet, context information of the data packet, and a sequence number of the data packet. The terminal100may determine, based on the set application receipt, a successfully sent data packet and a data packet that fails to be sent. The terminal100may further display success prompt information corresponding to the successfully sent data packet. The success prompt information may be used to prompt a user that a satellite message corresponding to the success prompt information is successfully sent. The terminal100may further display failure prompt information corresponding to the data packet that fails to be sent. The failure prompt information may be used to prompt the user that a satellite message corresponding to the failure prompt information fails to be sent. Herein, the set application receipt generated by the satellite network device200is also referred to as a second application receipt.

Specifically, in an outbound process, after the terminal100and the satellite network device200return to the second transmission system, the terminal100may generate and send, to the satellite network device200, a set application receipt. The set application receipt may include but is not limited to one or more of identification information such as a message ID field of a successfully received data packet, receiving time of the data packet, context information of the data packet, and a sequence number of the data packet. The satellite network device200may determine, based on the set application receipt, a successfully sent data packet and a data packet that fails to be sent. The satellite network device200may delete the successfully sent data packet. Herein, the set application receipt generated by the terminal100is also referred to as a fourth application receipt.

In some embodiments, the satellite network device200may further retransmit, through the second transmission system, the data packet that fails to be sent.

This application is not limited to the foregoing embodiments, and further provides the following embodiments. It should be noted that the following embodiments may be used in mutual combination with any one or more of the foregoing embodiments.

In some embodiments, in an inbound process, after sending a first data packet to a satellite network device200, a terminal100may further display first sending time prompt information. The first sending time prompt information may be used to prompt a user time at which the terminal100sends the first data packet to the satellite network device200. The first data packet may include a first authentication code generated based on first information, and the first information may be sending time information or first context information.

In some embodiments, after receiving a success application receipt, the terminal100may further display second sending time prompt information while displaying success prompt information. The second sending time prompt information may be used to prompt the user time at which the satellite message is successfully sent.

For example, as shown inFIG.43B, after receiving the success application receipt, the terminal100may display a success prompt4311and a sending time prompt4312. The success prompt4311may be used to prompt the user that the terminal100has successfully sent the message content in the message box4301. The sending time prompt4312may be used to prompt the user the time at which the terminal100successfully sends the satellite message.

In some embodiments, after receiving a failure application receipt, the terminal100may further display second sending time prompt information while displaying failure prompt information. The second sending time prompt information may be used to prompt the user time at which the data packet fails to be sent.

In some embodiments, in an outbound process, the terminal100may further display receiving prompt information and receiving time prompt information after successfully receiving a third data packet sent by the satellite network device200. The receiving prompt information may be used to prompt the user that a satellite message is received. The receiving time prompt information may be used to prompt the user time at which the satellite message is received.

The following describes a terminal100according to an embodiment of this application.

The terminal100may be a mobile phone, a tablet computer, a desktop computer, a laptop computer, a handheld computer, a notebook computer, an ultra-mobile personal computer (UMPC), a netbook, a cellular phone, a personal digital assistant (PDA), an augmented reality (AR) device, a virtual reality (VR) device, an artificial intelligence (AI) device, a wearable device, a vehicle-mounted device, a smart home device, and/or a smart city device. A specific type of the electronic device is not specially limited in this embodiment of this application.

FIG.42is a schematic diagram of a hardware structure according to an embodiment of this application.

The following uses the terminal100as an example to specifically describe this embodiment. It should be understood that the terminal100shown inFIG.42is merely an example. The terminal100may have more or fewer components than those shown inFIG.42, may combine two or more components, or may have a different component configuration. Components shown inFIG.42may be implemented in hardware including one or more signal processing and/or application-specific integrated circuits, software, or a combination of hardware and software.

It may be understood that the structure illustrated in one or more embodiments of the present disclosure does not constitute a specific limitation on the terminal100. In some other embodiments of this application, the terminal100may include more or fewer components than those shown in the figure, may combine some components, may split some components, or may have a different component arrangement. The components shown in the figure may be implemented by hardware, software, or a combination of software and hardware.

A wireless communication function of the terminal100may be implemented through the antenna1, the antenna2, the mobile communication module150, the wireless communication module160, the modem processor, the baseband processor, and the like.

The mobile communication module150may provide a wireless communication solution that is applied to the terminal100and that includes 2G/3G/4G/5G or the like. The mobile communication module150may include at least one filter, a switch, a power amplifier, a low noise amplifier (LNA), and the like. The mobile communication module150may receive an electromagnetic wave through the antenna1, perform processing such as filtering and amplification on the received electromagnetic wave, and transmit a processed electromagnetic wave to the modem processor for demodulation. The mobile communication module150may further amplify a signal modulated by the modem processor, and convert an amplified signal into an electromagnetic wave through the antenna1for radiation. In some embodiments, at least some functional modules in the mobile communication module150may be disposed in the processor110. In some embodiments, at least some functional modules in the mobile communication module150may be disposed in a same component as at least some modules in the processor110.

The modem processor may include a modulator and a demodulator. The modulator is configured to modulate a to-be-sent low-frequency baseband signal into a medium-high frequency signal. The demodulator is configured to demodulate a received electromagnetic wave signal into a low-frequency baseband signal. Then, the demodulator transmits the low-frequency baseband signal obtained through demodulation to the baseband processor for processing. The low-frequency baseband signal is processed by the baseband processor and then a processed signal is transmitted to the application processor. The application processor outputs a sound signal through an audio device (not limited to the speaker170A, the receiver170B, and the like), or displays an image or a video through the display screen194. In some embodiments, the modem processor may be an independent component. In some other embodiments, the modem processor may be independent of the processor110, and disposed in a same component as the mobile communication module150or another functional module.

The wireless communication module160may provide a wireless communication solution that is applied to the terminal100and that includes a wireless local area network (such as a wireless fidelity (Wi-Fi) network), Bluetooth (BT), a global navigation satellite system GNSS), a satellite communication module, frequency modulation (FM), a near field communication (NFC) technology, an infrared (IR) technology, or the like. The wireless communication module160may be one or more components integrating at least one communication processing module. The wireless communication module160receives an electromagnetic wave through the antenna2, performs frequency modulation and filtering processing on an electromagnetic wave signal, and sends a processed signal to the processor110. The wireless communication module160may further receive a to-be-sent signal from the processor110, perform frequency modulation and amplification on the signal, and convert a modulated and amplified signal into an electromagnetic wave through the antenna2for radiation.

The satellite communication module may be configured to communicate with a satellite network device. In a satellite communication system, the satellite communication module may communicate with a satellite network device200, and the satellite communication module can support data packet transmission with the satellite network device200. For example, when the satellite communication system is a BeiDou communication system, the satellite network device200is a BeiDou network device200, the satellite communication module may communicate with the BeiDou network device200, and the satellite communication module can support BeiDou short packet (a data packet in the BeiDou communication system) transmission with the BeiDou network device200.

The terminal100implements a display function through the GPU, the display screen194, the application processor, and the like. The GPU is a microprocessor for image processing, and is connected to the display screen194and the application processor. The GPU is configured to: perform mathematical and geometric computation, and render an image. The processor110may include one or more GPUs, and execute program instructions to generate or change display information.

The display screen194is configured to display an image, a video, or the like. The display screen194includes a display panel. In some embodiments, the terminal100may include one or N display screens194, where N is a positive integer greater than 1. The pressure sensor180A is configured to sense a pressure signal, and can convert the pressure signal into an electrical signal. In some embodiments, the pressure sensor180A may be disposed on the display screen194. The touch sensor180K is also referred to as a “touch panel”. The touch sensor180K is configured to detect a touch operation acting on or near the touch sensor. The touch sensor may transfer the detected touch operation to the application processor to determine a touch event type. Visual output related to the touch operation may be provided through the display screen194.

The SIM card interface195is configured to be connected to a SIM card. The SIM card may be inserted into the SIM card interface195or pulled out from the SIM card interface195, to implement contact with or separation from the terminal100. The terminal100may support one or N SIM card interfaces, where N is a positive integer greater than 1. The SIM card interface195may support a nano-SIM card, a micro-SIM card, a SIM card, and the like. A plurality of cards may be simultaneously inserted into a same SIM card interface195. The plurality of cards may be of a same type or different types. The SIM card interface195may also be compatible with different types of SIM cards. The SIM card interface195may also be compatible with an external storage card. The terminal100interacts with a network through the SIM card, to implement functions such as calling and data communication. In some embodiments, the terminal100uses an eSIM, namely, embedded SIM card. The eSIM card may be embedded in the terminal100, and cannot be separated from the terminal100.

It may be understood that the foregoing embodiments may be used in mutual combination. For example, when the information A of the sending device is context information A and the information B of the receiving device is context information B, and the context information A and the context information B of the sending device and the receiving device are inconsistent, the sending device may set the information A to sending time information, and the receiving device may set the information B to receiving time information. In this way, the sending device and the receiving device may continue to communicate with each other in the first transmission system. It should be further noted that a combination manner is not limited to the foregoing described combination manner, and the combination manner is not limited in embodiments of this application.