A network switching method, a terminal and a storage medium

By selecting an authentication key and generating a session key in the terminal, the terminal can switch between satellite networks and terrestrial mobile networks, solving the problem of the terminal being unable to switch between different networks and improving communication quality.

CN117676566BActive Publication Date: 2026-11-20CHINA MOBILE COMM LTD RES INST +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211062274.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-09-01
Publication Date
2026-11-20
Estimated Expiration
2042-09-01

AI Technical Summary

Technical Problem

The terminal cannot switch to another network after accessing a satellite network or a terrestrial mobile network, resulting in poor communication quality, especially in non-land areas or remote areas without terrestrial mobile signal coverage or in areas with a large number of terrestrial base stations.

Method used

The terminal selects an authentication key from the keys shared with the current communication network device, sends it to the target network device for identity authentication, obtains the master key according to the type of the target network device, and generates a session key through key derivation to realize network switching.

Benefits of technology

When network quality is poor, the terminal can switch to a network device with better communication quality to improve communication quality.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117676566B_ABST
    Figure CN117676566B_ABST
Patent Text Reader

Abstract

The application discloses a network switching method, a terminal and a storage medium. The method comprises the following steps: selecting an authentication key from a shared key between a first network device; the first network device is a network device currently communicating with the terminal; sending the authentication key to a second network device, and obtaining a master key corresponding to the second network device in the case that the terminal identity authentication based on the authentication key is passed; performing key derivation on the master key according to the same key derivation algorithm as the second network device to generate a target session key; and switching the communication interaction from the first network device to the second network device by using the target session key. Through the above technical solution, the communication quality of the terminal is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of communication technology, and in particular to a network switching method, terminal and storage medium. Background Technology

[0002] With the rapid development of modern communications, satellite network communication technology plays an indispensable role. Satellite networks are characterized by wide coverage, high flexibility, high reliability, and strong disaster resistance. They can serve as an emergency communication means in emergencies and provide communication for non-land areas or remote areas without terrestrial mobile signal coverage. However, in cities and densely populated areas, terrestrial mobile operators have established an advantage: a large number of terrestrial base stations that can support a large number of users.

[0003] Currently, integrated air-space and space-ground networking is on the agenda, aiming to achieve global, full-domain, and fully dynamic coverage and use of 6G mobile communication technology, fully meeting the network needs of people, machines, and things. For terminals supporting different communication networks, in order to pursue better communication quality, there will be a need for network switching during movement. However, at present, for terminals, after accessing and authenticating on one network, they cannot switch to another network. For example, after accessing a satellite network, a terminal cannot switch to a mobile network, and after accessing a mobile network, it cannot switch to a satellite network. As a result, terminals accessing mobile terrestrial networks experience poor communication quality in non-land areas or remote areas without terrestrial mobile signal coverage, or terminals accessing satellite networks in areas with a large number of terrestrial base stations. Summary of the Invention

[0004] To address the aforementioned technical problems, this invention aims to provide a network switching method, terminal, and storage medium. When the network quality of the terminal's current communication device is poor, the terminal selects an authentication key from a shared key among the currently communicating network devices as the authentication key for other network devices with better network quality. This completes the terminal's authentication on other network devices. Based on the device type of each other network device, the terminal obtains a master key corresponding to that device to generate a session key for communication with other network devices. Then, based on the generated session key, communication is established with other network devices. This enables the terminal to switch between different network devices, thus improving the terminal's communication quality when the communication quality of the currently communicating network device is poor.

[0005] The technical solution of this invention is implemented as follows:

[0006] This invention provides a network handover method, the method comprising:

[0007] An authentication key is selected from the keys shared with the first network device; the first network device is the network device currently communicating with the terminal.

[0008] The authentication key is sent to the second network device, and if the second network device successfully authenticates the terminal identity based on the authentication key, the master key corresponding to the second network device is obtained.

[0009] The master key is derived using the same key derivation algorithm as the second network device to generate the target session key.

[0010] Using the target session key, the communication interaction is switched from the first network device to the second network device.

[0011] In the above method, the first network device is a satellite network device and the second network device is a terrestrial mobile network device; or, the first network device is a terrestrial mobile network device and the second network device is a satellite network device.

[0012] In the above method, the first network device is a terrestrial mobile network device, the second network device is a satellite network device, and before selecting the authentication key from the keys shared with the first network device, the method further includes:

[0013] Obtain the long-term key established with the terrestrial mobile network device;

[0014] Using the same key derivation algorithm as the terrestrial mobile network device, the long-term key is derivationed to generate the current session key, and the current session key is determined as the key shared between the terrestrial mobile network device and the terrestrial mobile network device.

[0015] Accordingly, selecting the authentication key from the keys shared with the first network device includes:

[0016] A security key is selected from the current session keys and determined as the authentication key.

[0017] In the above method, the first network device is a satellite network device, the second network device is a terrestrial mobile network device, and the step of selecting the authentication key from the keys shared with the first network device includes:

[0018] Select preset encrypted information from the keys shared with the satellite network equipment and determine it as the authentication key;

[0019] Alternatively, a session key obtained through key negotiation with the satellite network device can be selected from the keys shared with the satellite network device and determined as the authentication key.

[0020] In the above method, the first network device is a terrestrial mobile network device, the second network device is a satellite network device, and obtaining the master key corresponding to the second network device includes:

[0021] The system negotiates a key with the satellite network equipment and determines the negotiated key as the master key.

[0022] In the above method, the first network device is a satellite network device, the second network device is a terrestrial mobile network device, and obtaining the master key corresponding to the second network device includes:

[0023] The authentication key is determined as the master key.

[0024] In the above method, the first network device is a satellite network device, the second network device is a terrestrial mobile network device, and before switching from communication with the first network device to communication with the second network device using the target session key, the method further includes:

[0025] The key to be used in the current session key, which is included in the key shared between the satellite network devices, is replaced with the security key in the target session key to obtain the replaced session key; the key to be used is the key that the terminal will use to communicate with the satellite network devices in the next moment from the current moment.

[0026] Accordingly, the step of switching from communication with the first network device to communication with the second network device using the target session key includes:

[0027] In the event of an anomaly in communication with the satellite network device using the replaced session key, communication with the second network device is established using the target session key.

[0028] This invention provides a terminal, comprising:

[0029] The selection module is used to select an authentication key from the keys shared with the first network device; the first network device is the network device currently communicating with the terminal.

[0030] The acquisition module is used to send the authentication key to the second network device, and acquire the master key corresponding to the second network device when the second network device successfully authenticates the terminal identity based on the authentication key;

[0031] The derivation module is used to perform key derivation on the master key according to the same key derivation algorithm as the second network device to generate a target session key;

[0032] A communication module is used to switch from communicating with the first network device to communicating with the second network device using the target session key.

[0033] In the aforementioned terminal, the first network device is a satellite network device and the second network device is a terrestrial mobile network device; or, the first network device is a terrestrial mobile network device and the second network device is a satellite network device.

[0034] In the aforementioned terminal, the first network device is a terrestrial mobile network device, and the second network device is a satellite network device. The selection module is further configured to acquire a long-term key established with the terrestrial mobile network device; perform key derivation on the long-term key according to the same key derivation algorithm as the terrestrial mobile network device to generate a current session key, and determine the current session key as a key shared with the terrestrial mobile network device; select a security key from the current session key and determine it as the authentication key.

[0035] In the aforementioned terminal, the first network device is a satellite network device, and the second network device is a terrestrial mobile network device. The selection module is further configured to select preset encrypted information from the keys shared with the satellite network device and determine it as the authentication key; or, select a session key obtained through key negotiation with the satellite network device from the keys shared with the satellite network device and determine it as the authentication key.

[0036] In the aforementioned terminal, the first network device is a terrestrial mobile network device, the second network device is a satellite network device, and the acquisition module is further configured to perform key negotiation with the satellite network device and determine the negotiated key as the master key.

[0037] In the aforementioned terminal, the first network device is a satellite network device, the second network device is a terrestrial mobile network device, and the acquisition module is further configured to determine the authentication key as the master key.

[0038] In the aforementioned terminal, the first network device is a satellite network device, the second network device is a terrestrial mobile network device, and a replacement module is further included, used to replace the unused key in the current session key, which is a key shared between the satellite network devices, with a security key in the target session key to obtain a replaced session key; the unused key is the key that the terminal will use to communicate with the satellite network device in the next moment; the establishment module is further used to establish communication with the second network device using the target session key in the event of communication failure with the satellite network device using the replaced session key.

[0039] This invention provides a terminal, comprising: a processor, a memory, and a communication bus;

[0040] The communication bus is used to realize the communication connection between the processor and the memory;

[0041] The processor is used to execute the computer program stored in the memory to implement the network switching method described above.

[0042] The present invention provides a computer-readable storage medium storing one or more computer programs, which can be executed by one or more processors to implement the above-described network handover method.

[0043] This invention provides a network switching method, terminal, and storage medium. The method includes: selecting an authentication key from a key shared with a first network device; the first network device being the network device currently communicating with the terminal; sending the authentication key to a second network device, and obtaining a master key corresponding to the second network device if the second network device successfully authenticates the terminal based on the authentication key; performing key derivation on the master key according to the same key derivation algorithm as the second network device to generate a target session key; and using the target session key to switch from communication with the first network device to communication with the second network device. The technical solution provided by this invention, when the network quality of the terminal's currently communicating network device is poor, allows the terminal to select an authentication key from a key shared with the currently communicating network device as the authentication key for other network devices with better network quality. This completes the terminal's authentication on other network devices, and the terminal obtains a master key corresponding to the other network device based on the device type of the other network device to generate a session key for communication with other network devices. Based on the generated session key, communication with other network devices is established, enabling the terminal to switch between different network devices. This improves the terminal's communication quality when the communication quality of the currently communicating network device is poor. Attached Figure Description

[0044] Figure 1 A flowchart illustrating a network switching method provided in an embodiment of the present invention;

[0045] Figure 2 A flowchart illustrating an exemplary 5G system key hierarchy derivation algorithm provided for an embodiment of the present invention;

[0046] Figure 3 This invention provides an exemplary illustration of selecting an authentication key. Figure 1 ;

[0047] Figure 4 A flowchart illustrating an exemplary DVB-MKE key derivation algorithm provided for an embodiment of the present invention;

[0048] Figure 5 This invention provides an exemplary illustration of selecting an authentication key. Figure 2 ;

[0049] Figure 6 This invention provides an exemplary illustration of selecting an authentication key. Figure 3 ;

[0050] Figure 7 A schematic diagram of the structure of a terminal provided in an embodiment of the present invention. Figure 1 ;

[0051] Figure 8 A schematic diagram of the structure of a terminal provided in an embodiment of the present invention. Figure 2 . Detailed Implementation

[0052] The technical solutions of the present invention will now be clearly and completely described with reference to the accompanying drawings of the embodiments of the present invention. It is to be understood that the specific embodiments described herein are merely for explaining the relevant application and are not intended to limit the application. Furthermore, it should be noted that, for ease of description, only the parts relevant to the relevant application are shown in the accompanying drawings.

[0053] This invention provides a network switching method implemented by a terminal. Figure 1 This is a flowchart illustrating a network handover method provided in an embodiment of the present invention. Figure 1 As shown, the main steps include:

[0054] S101. Select an authentication key from the keys shared with the first network device; the first network device is the network device currently communicating with the terminal.

[0055] In an embodiment of the present invention, the terminal selects an authentication key from a key shared with a first network device; the first network device is the network device currently communicating with the terminal.

[0056] It should be noted that, in the embodiments of the present invention, the first network device is the network device currently being communicated with by the terminal. The terminal can not only communicate and interact with the first network device, but also with other network devices of different types as the first network device. That is, the terminal supports communication and interaction with different network devices.

[0057] It should be noted that, in the embodiments of the present invention, the shared key between the terminal and the first network device is a key known to both the terminal and the first network device. For example, the shared key may be a key pre-stored between the terminal and the first network device, or it may be another key derived by the terminal and the first network device based on the same key and according to the same key derivation algorithm.

[0058] It should be noted that, in the embodiments of the present invention, the terminal can select the authentication key from the keys shared with the first network device.

[0059] Specifically, in embodiments of the present invention, the first network device is a satellite network device and the second network device is a terrestrial mobile network device; or, the first network device is a terrestrial mobile network device and the second network device is a satellite network device.

[0060] It should be noted that, in the embodiments of the present invention, when the first network device is a satellite network device, the second network device is a terrestrial mobile network device, and when the first network device is a terrestrial mobile network device, the second network device is a satellite network device.

[0061] Specifically, in an embodiment of the present invention, the first network device is a terrestrial mobile network device, and the second network device is a satellite network device. Before the terminal selects an authentication key from the keys shared with the first network device, it may also perform the following steps: obtain a long-term key established with the terrestrial mobile network device; perform key derivation on the long-term key according to the same key derivation algorithm as the terrestrial mobile network device to generate a current session key, and determine the current session key as the key shared with the terrestrial mobile network device; correspondingly, the terminal selects an authentication key from the keys shared with the first network device, including: selecting a security key from the current session key and determining it as the authentication key.

[0062] It should be noted that, in the embodiments of the present invention, when the first network device is a terrestrial mobile network device and the second network device is a satellite network device, the terminal obtains the long-term key established with the terrestrial mobile network device. The long-term key is a key that is pre-stored in the terminal and the terrestrial mobile network device and is used to derive the current session key between the terminal and the terrestrial mobile network device. After the terminal obtains the long-term key, it performs key derivation on the long-term key according to the same key derivation algorithm as the terrestrial mobile network device to generate the current session key.

[0063] It should be noted that, in the embodiments of the present invention, both the terminal and the terrestrial mobile network device pre-store a long-term key. If the terminal and the terrestrial mobile network device perform key derivation according to the same key derivation algorithm for the long-term key, the current session key obtained will also be the same. That is, both the terminal and the terrestrial mobile network device have the current session key. Then, the terminal determines the current session key as the key shared between the terminal and the terrestrial mobile network device. Finally, the terminal selects a security key from the current session key and determines the selected key as the authentication key.

[0064] It should be noted that, in the embodiments of the present invention, the key derivation algorithm between the terminal and the terrestrial mobile network equipment can be the key hierarchy derivation algorithm of the 5G system.

[0065] Figure 2 This is a flowchart illustrating an exemplary 5G system key hierarchy derivation algorithm provided as an embodiment of the present invention. Figure 2As shown, both the terminal and the terrestrial mobile network equipment perform key derivation based on the long-term key K according to the 5G system key hierarchy derivation algorithm. In the terminal, the execution entity for key derivation is the terminal's computing unit (EM). In the terrestrial mobile network equipment, the execution entities for key derivation include: Unified Data Management (UDM) or Authentication Credential Repository and Processing Function (ARPF) network elements, Authentication Server Function (AUSF) network elements, Security Anchor Function (SEAF) network elements, Access and Mobility Management Function (AMF) network elements, Non-3GPP Interworking Function (N3IWF) network elements, and base stations, etc. For example, the key derivation process of a terrestrial mobile network device is as follows: During authentication and key negotiation, if the Extensible Authentication Protocol (EAP-AKA) protocol is used, the ARPF or UDM network element should derive a cipher key (CK) and an integrity key (IK) from the long-term key K. Then, the ARPF network element forwards the encryption key CK' and integrity verification key IK' derived from CK and IK to the AUSF network element. The AUSF network element then derives a security key K for EAP-AKA' from the derived keys CK' and IK'. AUSF When using the 5G Authenticated Key Agreement (5G AKA) protocol, ARPF network elements should derive the security key K from the long-term key K. AUSF During the authentication and key negotiation process, AUSF network elements, based on K... AUSF Generate anchor key K SEAF The SEAF network element receives the anchor key K from the AUSF. SEAF Afterwards, immediately after authentication and key negotiation, the anchor key K will be used. SEAF Generate authentication management key K AMF and K AMF Send to the AMF network element; when the AMF network element receives K AMF Afterwards, AMF based on KAMF Generate a dedicated Non-Access Stratum (NAS) integrity key K for protecting the NAS layer. NASint Non-access stratum security key K NASenc From K AMF Generate access network-specific keys, including the base station key K sent to the base station. gNB Or NH, and from K AMF Generate non-3GPP interoperability key K N3IWF And send it to the N3IWF network element; when the base station receives K gNB Or after NH, use K gNB Alternatively, NH can generate the key for the Access Stratum (AS) layer, such as the user layer security key K. UPenc Access Control Integrity Key K RRCint and access control security key K RRCenc Or the user-level integrity key K UPint Furthermore, the process of key derivation based on long-term keys by the terminal is the same as that of key derivation by terrestrial mobile network equipment, except that the execution entity for key derivation by the terminal is the computing unit within the terminal.

[0066] It should be noted that, in the embodiments of the present invention, the terminal and the terrestrial mobile network equipment are based on a long-term key, according to... Figure 2 The keys derived by the key derivation algorithm are all current session keys. After deriving the current session key, the terminal determines the current session key as the key shared with the terrestrial mobile network equipment, and selects the security key K from the current session key. AUSF This is determined as the authentication key.

[0067] Figure 3 This invention provides an exemplary illustration of selecting an authentication key. Figure 1 .like Figure 3 As shown, the terminal directly transmits the security key K obtained by key derivation from the long-term key K with the terrestrial mobile network equipment. AUSF The authentication key serves as the authentication key for the terminal to authenticate its identity on satellite network equipment.

[0068] Specifically, in the embodiments of the present invention, the first network device is a satellite network device, the second network device is a terrestrial mobile network device, and the terminal selects an authentication key from the keys shared with the first network device, including: selecting preset encrypted information from the keys shared with the satellite network device and determining it as the authentication key; or, selecting a session key obtained through key negotiation with the satellite network device from the keys shared with the satellite network device and determining it as the authentication key.

[0069] It should be noted that, in the embodiments of the present invention, when the first network device is a satellite network device and the second network device is a terrestrial mobile network device, the terminal selects the authentication key from the shared key with the satellite network device.

[0070] It should be noted that, in the embodiments of the present invention, the shared key between the terminal and the satellite network device includes: pre-stored encrypted cookies for identity authentication between the terminal and the satellite network device, a session key s obtained through key negotiation between the terminal and the satellite network device, and a current session key derived by the terminal and the satellite network device based on the session key s. The session key s obtained through negotiation between the terminal and the satellite network device can be obtained through the Diffie-Hellman key exchange (DH) protocol algorithm, and the current session key derived by the terminal and the satellite network device based on the session key s can be derived according to the key derivation algorithm of Digital Video Broadcasting-Master key Agreement (DVB-MKE).

[0071] Figure 4 This is a schematic flowchart illustrating an exemplary DVB-MKE key derivation algorithm provided as an embodiment of the present invention. Figure 4 As shown, the terminal and the satellite network device first negotiate a session key s according to the DH algorithm. Then, according to the DVB-MKE key derivation algorithm, the negotiated session key s is derivation to obtain the current session key Key(n) between the terminal and the satellite network device. Here, H is a hash function, encode is the encoding, nonce is a random value, temp is a temporary value, unsignedchar is an unsigned value, x, y, g, m are preset values, and mod is the modulo function.

[0072] It should be noted that, in the embodiments of the present invention, since the terminal is currently communicating and interacting with the satellite network device, that is, the terminal does not store information for identity authentication on the terrestrial mobile network device, the terminal can select an authentication key from the keys shared with the satellite network device. For example, the terminal can select preset encrypted information cookies for identity authentication that are pre-stored with the satellite network device, or a session key s obtained through key negotiation with the satellite network device.

[0073] Figure 5 This invention provides an exemplary illustration of selecting an authentication key. Figure 2 .like Figure 5As shown, the terminal directly uses the pre-stored encrypted information cookies for identity authentication, which are stored between the terminal and the satellite network device, as the authentication key for the terminal to authenticate its identity on the terrestrial mobile network device. Figure 6 This invention provides an exemplary illustration of selecting an authentication key. Figure 3 .like Figure 6 As shown, the terminal uses the session key s obtained through key negotiation with the satellite network equipment as the authentication key for the terminal to authenticate its identity on the terrestrial mobile network equipment.

[0074] S102. Send the authentication key to the second network device, and if the second network device successfully authenticates the terminal's identity based on the authentication key, obtain the master key corresponding to the second network device.

[0075] In an embodiment of the present invention, the terminal sends the authentication key to the second network device, and obtains the master key corresponding to the second network device when the second network device successfully authenticates the terminal's identity based on the authentication key.

[0076] It should be noted that, in the embodiments of the present invention, since the terminal is currently communicating with the first network device, and there is a shared key between the terminal and the first network device, that is, the terminal does not currently store a key for authentication on the second network device. Therefore, the terminal can select an authentication key from the key shared with the first network device. After selecting the authentication key from the key shared with the first network device, the terminal sends the selected authentication key to the second network device, wherein the authentication key is used by the terminal for authentication on the second network device.

[0077] It should be noted that, in the embodiments of the present invention, the terminal sends the authentication key to the second network device so that the second network device can authenticate the terminal based on the authentication key, and obtain the master key corresponding to the second network device if the second network device successfully authenticates the terminal.

[0078] Specifically, in an embodiment of the present invention, the first network device is a terrestrial mobile network device, the second network device is a satellite network device, and the terminal obtains the master key corresponding to the second network device, including: performing key negotiation with the satellite network device, and determining the negotiated key as the master key.

[0079] It should be noted that, in the embodiments of the present invention, when the first network device is a terrestrial mobile network device and the second network device is a satellite network device, the master key obtained by the terminal corresponding to the second network device is the key negotiated with the satellite network device.

[0080] It should be noted that, in the embodiments of the present invention, the current session key used when the terminal communicates with the satellite network device is derived from the session key s negotiated between the terminal and the satellite network device, according to a key derivation algorithm, and is not directly related to identity authentication. Figure 3 As shown, the terminal will use the long-term key K to derive the security key K from the terrestrial mobile network equipment. AUSF After authentication is completed using the authentication key for terminal authentication on satellite network equipment, the security key K... AUSF It is not used as the master key between the terminal and the satellite network equipment. Instead, a key negotiation will be conducted with the satellite network equipment, and the negotiated key will be determined as the master key.

[0081] Specifically, in an embodiment of the present invention, the first network device is a satellite network device, the second network device is a terrestrial mobile network device, and the terminal obtains the master key corresponding to the second network device, including: determining the authentication key as the master key.

[0082] It should be noted that, in the embodiments of the present invention, when the first network device is a satellite network device and the second network device is a terrestrial mobile network device, the master key obtained by the terminal corresponding to the terrestrial mobile network device is an authentication key selected from the keys shared with the satellite network device. Figure 5 and Figure 6 It can be seen that the authentication key used by the terminal to authenticate its identity on the terrestrial mobile network device can be a preset encrypted information shared with the satellite network device, or it can be a session key s obtained through key negotiation with the satellite network device. Therefore, the master key obtained by the terminal corresponding to the terrestrial mobile network device is either the preset encrypted information shared with the satellite network device, or the session key obtained through key negotiation with the satellite network device.

[0083] S103. Using the same key derivation algorithm as the second network device, perform key derivation on the master key to generate the target session key.

[0084] In an embodiment of the present invention, the terminal performs key derivation on the master key according to the same key derivation algorithm as the second network device to generate the target session key.

[0085] It should be noted that, in the embodiments of the present invention, when the second network device is a satellite network device, the same key derivation algorithm as that used in the satellite network device is... Figure 4 The DVB-MKE key derivation algorithm shown; when the second network device is a terrestrial mobile network device, the same key derivation algorithm as the terrestrial network device is... Figure 2 The 5G system key hierarchy derivation algorithm is shown.

[0086] It should be noted that, in the embodiments of the present invention, after the terminal obtains the master key corresponding to the second network device, it performs key derivation on the master key according to the same key derivation algorithm as the second network device to generate the target session key.

[0087] S104. Using the target session key, switch from communicating with the first network device to communicating with the second network device.

[0088] In an embodiment of the present invention, the terminal uses a target session key to switch from communicating with a first network device to communicating with a second network device.

[0089] It should be noted that, in the embodiments of the present invention, when the second network device is a satellite network device, the master key obtained by the terminal is the session key s negotiated with the satellite network device. Then, based on the session key s, the target session key is derived according to the DVB-MKE key derivation algorithm. Finally, the target session key is directly used to establish communication interaction with the satellite network device.

[0090] It should be noted that, in the embodiments of the present invention, when the first network device is a satellite network device and the second network device is a terrestrial mobile network device, the terminal needs to first replace the current session key with the satellite network device, and then use the replaced session key to smoothly switch to communication with the terrestrial mobile network device.

[0091] Specifically, in an embodiment of the present invention, the first network device is a satellite network device, and the second network device is a terrestrial mobile network device. Before the terminal switches from communicating with the first network device to communicating with the second network device using the target session key, it may perform the following steps: replacing the key to be used in the current session key, which is a key shared between satellite network devices, with the security key in the target session key to obtain a replaced session key; the key to be used is the key that the terminal will use to communicate with the satellite network device in the next moment; correspondingly, the terminal switches from communicating with the first network device to communicating with the second network device using the target session key, including: in the case of communication failure with the satellite network device using the replaced session key, establishing communication with the second network device using the target session key.

[0092] It should be noted that, in the embodiments of the present invention, the current session key Key(n) between the terminal and the satellite network device includes two keys: a currently used key and a key to be used. The currently used key is the key used by the terminal to communicate with the satellite network device at the current moment, and the key to be used is the key used by the terminal to communicate with the satellite network device at the next moment.

[0093] It should be noted that, in the embodiments of the present invention, the length of the current session key Key(n) between the terminal and the satellite network device can be determined according to n. For example, if a 16-byte key is required, then only key(1) is needed to meet the length requirement. The specific value of n can be set according to the actual situation and application scenario, and the present invention does not limit it.

[0094] It should be noted that, in the embodiments of the present invention, the two keys in the current session key can be generated by truncation or by updating. For example, the current session key Key(n) can be truncated evenly, or it can be obtained by updating. The specific updating method can be newKey(n+1) = H(temp~(unsigned char)1~(unsigned char)n+1,""").

[0095] It should be noted that, in the embodiments of the present invention, when the first network device is a satellite network device and the second network device is a terrestrial mobile network device, the key to be used in the current session key, which is included in the key shared between the satellite network devices, is replaced with the security key in the target session key to obtain the replaced session key. The key to be used is the key used by the terminal to communicate with the satellite network device in the next moment. In this way, since the key to be used in the current session key in the terminal has been replaced with the security key in the target session key, the terminal will not be able to use the key to be used to communicate with the satellite in the next moment. Furthermore, the replaced session key can be used to complete the transition of the terminal from the satellite network device to the terrestrial mobile network device. Then, the target session key is used to establish communication with the second network device.

[0096] This invention provides a network switching method, comprising: selecting an authentication key from a key shared with a first network device; the first network device being the network device currently communicating with the terminal; sending the authentication key to a second network device, and obtaining a master key corresponding to the second network device if the second network device successfully authenticates the terminal's identity based on the authentication key; performing key derivation on the master key according to the same key derivation algorithm as the second network device to generate a target session key; and using the target session key to switch from communication interaction with the first network device to communication interaction with the second network device. The network switching method provided by this invention, when the network quality of the terminal's currently communicating network device is poor, allows the terminal to select an authentication key from the key shared with the currently communicating network device as the authentication key for other network devices with better network quality, thereby completing the terminal's identity authentication on other network devices. It also obtains a master key corresponding to the other network device based on the device type of the other network device to generate a session key for communication interaction with other network devices. Based on the generated session key, communication interaction with other network devices is established, enabling the terminal to switch between different network devices. This improves the terminal's communication quality when the communication quality of the currently communicating network device is poor.

[0097] This invention provides a terminal, Figure 7 A schematic diagram of the structure of a terminal provided in an embodiment of the present invention. Figure 1 .like Figure 7 As shown, the terminal includes:

[0098] The selection module 701 is used to select an authentication key from the keys shared with the first network device; the first network device is the network device currently communicating with the terminal.

[0099] The acquisition module 702 is used to send the authentication key to the second network device, and acquire the master key corresponding to the second network device when the second network device successfully authenticates the terminal identity based on the authentication key;

[0100] The derivation module 703 is used to perform key derivation on the master key according to the same key derivation algorithm as the second network device to generate a target session key;

[0101] The communication module 704 is used to switch from communicating with the first network device to communicating with the second network device using the target session key.

[0102] In one embodiment of the present invention, the first network device is a satellite network device and the second network device is a terrestrial mobile network device; or, the first network device is a terrestrial mobile network device and the second network device is a satellite network device.

[0103] In one embodiment of the present invention, the first network device is a terrestrial mobile network device, the second network device is a satellite network device, and the selection module 701 is further configured to obtain a long-term key established with the terrestrial mobile network device; perform key derivation on the long-term key according to the same key derivation algorithm as the terrestrial mobile network device to generate a current session key, and determine the current session key as a key shared with the terrestrial mobile network device; select a security key from the current session key and determine it as the authentication key.

[0104] In one embodiment of the present invention, the first network device is a satellite network device and the second network device is a terrestrial mobile network device. The selection module 701 is further configured to select preset encryption information from the keys shared with the satellite network device and determine it as the authentication key; or, select a session key obtained through key negotiation with the satellite network device from the keys shared with the satellite network device and determine it as the authentication key.

[0105] In one embodiment of the present invention, the first network device is a terrestrial mobile network device, the second network device is a satellite network device, and the acquisition module 702 is further configured to perform key negotiation with the satellite network device and determine the negotiated key as the master key.

[0106] In one embodiment of the present invention, the first network device is a satellite network device, the second network device is a terrestrial mobile network device, and the acquisition module 702 is further configured to determine the authentication key as the master key.

[0107] In one embodiment of the present invention, the first network device is a satellite network device, the second network device is a terrestrial mobile network device, and the system further includes a replacement module (not shown in the figure), which is used to replace the unused key in the current session key, which is a key shared between the satellite network devices, with a security key in the target session key to obtain a replaced session key; the unused key is the key used by the terminal to communicate with the satellite network device in the next moment of the current moment; the establishment module is further used to establish communication with the second network device using the target session key in the event of communication failure with the satellite network device using the replaced session key.

[0108] This invention provides a terminal, Figure 8A schematic diagram of the structure of a terminal provided in an embodiment of the present invention. Figure 2 .like Figure 8 As shown, the terminal includes: a processor 801, a memory 802, and a communication bus 803;

[0109] The communication bus 803 is used to realize the communication connection between the processor 801 and the memory 802;

[0110] The processor 801 is used to execute the computer program stored in the memory 802 to implement the above-described network switching method.

[0111] This invention provides a terminal that selects an authentication key from a key shared with a first network device (the network device currently communicating with the terminal). The authentication key is sent to a second network device, and if the second network device successfully authenticates the terminal based on the authentication key, a master key corresponding to the second network device is obtained. The master key is then derivationed using the same key derivation algorithm as the second network device to generate a target session key. Using the target session key, communication is switched from the first network device to the second network device. This invention allows the terminal to select an authentication key from the shared key shared with the current network device when the network quality is poor. This key is used to authenticate the terminal on other network devices with better network quality. The terminal also obtains a master key corresponding to the other network device based on its device type to generate a session key for communication. Based on this session key, communication is established with other network devices, enabling network switching between different network devices. This improves the terminal's overall communication quality, allowing it to switch to a network device with better communication quality even when the current network device has poor communication quality.

[0112] This invention provides a computer-readable storage medium storing one or more computer programs, which can be executed by one or more processors to implement the network handover method described above. The computer-readable storage medium can be volatile memory, such as random-access memory (RAM); or non-volatile memory, such as read-only memory (ROM), flash memory, hard disk drive (HDD), or solid-state drive (SSD); or it can be a device including one or any combination of the above-mentioned memories, such as a mobile phone, computer, tablet device, personal digital assistant, etc.

[0113] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of hardware embodiments, software embodiments, or embodiments combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage and optical storage) containing computer-usable program code.

[0114] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0115] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0116] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0117] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in the present invention should be included within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.

Claims

1. A network handover method, characterized in that, Applied to a terminal, the method includes: An authentication key is selected from the keys shared with the first network device; the first network device is the network device currently communicating with the terminal. The authentication key is sent to the second network device, and if the second network device successfully authenticates the terminal's identity based on the authentication key, the terminal obtains the master key corresponding to the second network device. The authentication key used by the terminal to authenticate its identity on the second network device is either preset encrypted information shared with the first network device, or a session key negotiated with the first network device's key. Correspondingly, the master key obtained by the terminal corresponding to the second network device is either preset encrypted information shared with the first network device, or a session key negotiated with the first network device's key. The master key is derived using the same key derivation algorithm as the second network device to generate the target session key. Using the target session key, the communication interaction is switched from the first network device to the second network device.

2. The method according to claim 1, characterized in that, The first network device is a satellite network device, and the second network device is a terrestrial mobile network device; or, the first network device is a terrestrial mobile network device, and the second network device is a satellite network device.

3. The method according to claim 1, characterized in that, The first network device is a terrestrial mobile network device, and the second network device is a satellite network device. Before selecting the authentication key from the key shared with the first network device, the method further includes: Obtain the long-term key established with the terrestrial mobile network device; Using the same key derivation algorithm as the terrestrial mobile network device, the long-term key is derivationed to generate the current session key, and the current session key is determined as the key shared between the terrestrial mobile network device and the terrestrial mobile network device. Accordingly, selecting the authentication key from the keys shared with the first network device includes: A security key is selected from the current session keys and determined as the authentication key.

4. The method according to claim 1, characterized in that, The first network device is a satellite network device, and the second network device is a terrestrial mobile network device. The step of selecting the authentication key from the keys shared with the first network device includes: Select preset encrypted information from the keys shared with the satellite network equipment and determine it as the authentication key; Alternatively, a session key obtained through key negotiation with the satellite network device can be selected from the keys shared with the satellite network device and determined as the authentication key.

5. The method according to claim 1, characterized in that, The first network device is a terrestrial mobile network device, and the second network device is a satellite network device. The step of obtaining the master key corresponding to the second network device includes: The system negotiates a key with the satellite network equipment and determines the negotiated key as the master key.

6. The method according to claim 1, characterized in that, The first network device is a satellite network device, and the second network device is a terrestrial mobile network device. The step of obtaining the master key corresponding to the second network device includes: The authentication key is determined as the master key.

7. The method according to claim 1, characterized in that, The first network device is a satellite network device, and the second network device is a terrestrial mobile network device. Before switching from communication with the first network device to communication with the second network device using the target session key, the method further includes: The key to be used in the current session key, which is included in the key shared between the satellite network devices, is replaced with the security key in the target session key to obtain the replaced session key; the key to be used is the key that the terminal will use to communicate with the satellite network devices in the next moment from the current moment. Accordingly, the step of switching from communication with the first network device to communication with the second network device using the target session key includes: In the event of an anomaly in communication with the satellite network device using the replaced session key, communication with the second network device is established using the target session key.

8. A terminal, characterized in that, The terminal includes: The selection module is used to select an authentication key from the keys shared with the first network device; the first network device is the network device currently communicating with the terminal. The acquisition module is configured to send the authentication key to the second network device, and, if the second network device successfully authenticates the terminal's identity based on the authentication key, acquire the master key corresponding to the second network device; wherein, the authentication key used by the terminal to authenticate its identity on the second network device is preset encrypted information shared with the first network device, or is a session key negotiated with the key of the first network device; correspondingly, the master key acquired by the terminal corresponding to the second network device is preset encrypted information shared with the first network device, or is a session key negotiated with the key of the first network device. The derivation module is used to perform key derivation on the master key according to the same key derivation algorithm as the second network device to generate a target session key; A communication module is used to switch from communicating with the first network device to communicating with the second network device using the target session key.

9. A terminal, characterized in that, include: Processor, memory, and communication bus; The communication bus is used to realize the communication connection between the processor and the memory; The processor is configured to execute a computer program stored in the memory to implement the network switching method according to any one of claims 1-7.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores one or more computer programs, which can be executed by one or more processors to implement the network switching method according to any one of claims 1-7.

Citation Information

Patent Citations

  • IP address allocation method and system for wireless network

    CN106304400A

  • 5G AKA protocol security enhancement system for Tarmarin analysis security

    CN113541936A