Communication network switching method and device, nonvolatile storage medium and electronic equipment

By adding a data type field to the authentication message, the authentication parameters are encapsulated into a consistent data type, which solves the access problem when switching from 5G to 4G and enables smooth network switching for terminal devices.

CN120935670APending Publication Date: 2025-11-11CHINA TELECOM CORP LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410564912.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-05-08
Publication Date
2025-11-11

AI Technical Summary

Technical Problem

Because the new and old versions of the 3GPP protocol have different requirements for the encapsulation data format of authentication parameters, terminal devices cannot access the network normally when switching from 5G to 4G, resulting in authentication failure.

Method used

A data type field (type field) is added to the authentication message to ensure that the authentication parameters are encapsulated into a consistent data type. Before the terminal device accesses the 4G communication network, the encapsulated authentication parameters are compared with the locally stored authentication parameters to ensure data type consistency.

Benefits of technology

This effectively reduces the probability of communication network switching failures, ensuring that terminal devices can smoothly switch from 5G to 4G communication networks and avoiding access failures caused by inconsistent data types.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120935670A_ABST
    Figure CN120935670A_ABST
Patent Text Reader

Abstract

The invention discloses a communication network switching method and device, a nonvolatile storage medium and electronic equipment. The method comprises the steps that the terminal equipment receives an authentication message forwarded by a second communication network through a base station, and the authentication message comprises an authentication parameter and a data type field used for indicating a data type; packaging the authentication parameter into a data type indicated by a data type field, and comparing the packaged authentication parameter with a locally stored authentication parameter; and under the condition that the comparison result of the packaged authentication parameter and the locally stored authentication parameter is that the terminal equipment can access the second communication network, the terminal equipment accesses a base station corresponding to the second communication network, so that the voice communication service is transferred to the second communication network. The technical problem that the terminal equipment cannot normally switch the accessed communication network due to the fact that the consistency of the compared parameter data types cannot be guaranteed in the related technology is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of wireless communication, and more specifically, to a communication network switching method, apparatus, non-volatile storage medium, and electronic device. Background Technology

[0002] In related technologies, when a terminal device switches from a 5G communication network to a 4G communication network, it needs to compare the authentication parameters sent by the 4G communication network's core network through the base station with the locally stored authentication parameters to determine whether it can access the 4G communication network. However, the new and old versions of the 3GPP protocol have different requirements for the encapsulation data format of authentication parameters. This may cause the terminal device to use a data format that is inconsistent with the locally stored authentication parameters when encapsulating the authentication parameters sent by the core network, resulting in authentication failure and inability to access the 4G communication network.

[0003] There is currently no effective solution to the above problems. Summary of the Invention

[0004] This application provides a communication network switching method, apparatus, non-volatile storage medium, and electronic device to at least solve the technical problem that terminal devices cannot switch access to the communication network normally because the data types of the parameters being compared cannot be guaranteed to be consistent in the related art.

[0005] According to one aspect of the embodiments of this application, a communication network switching method is provided, comprising: when a terminal device is unable to conduct voice call services through a first communication network within a preset time period, the terminal device receives an authentication message forwarded by a base station through a second communication network, wherein the second communication network is used to continue carrying the voice call services of the terminal device in areas not covered by the first communication network, and the authentication message includes authentication parameters and a data type field for indicating data type; encapsulating the authentication parameters into the data type indicated by the data type field, and comparing the encapsulated authentication parameters with locally stored authentication parameters; if the comparison result between the encapsulated authentication parameters and the locally stored authentication parameters indicates that access to the second communication network is possible, the terminal device accesses the base station corresponding to the second communication network, thereby transferring the voice call services to the second communication network; if the comparison result between the encapsulated authentication parameters and the locally stored authentication parameters indicates that access to the second communication network is not possible, the terminal device no longer responds to the request information initiated by the base station corresponding to the second communication network.

[0006] Optionally, encapsulating the authentication parameters into the data type indicated by the data type field and comparing the encapsulated authentication parameters with the locally stored authentication parameters includes: determining the data type of the locally stored authentication parameters; if the data type of the authentication parameters matches the data type indicated by the data type field, comparing the encapsulated authentication parameters with the authentication parameters; if the data type of the authentication parameters does not match the data type indicated by the data type field, re-encapsulating the authentication parameters, and ensuring that the data type of the re-encapsulated authentication parameters matches the data type indicated by the data type field; and comparing the re-encapsulated authentication parameters with the encapsulated authentication parameters.

[0007] Optionally, the first communication network includes a 5G communication network, and the second communication network includes a 4G communication network; when the first communication network is a 5G communication network and the second communication network is a 4G communication network, the authentication parameters are calculated and generated by the access and mobility management function entity in the first communication network, and forwarded to the terminal device by the mobility management entity in the second communication network through the base station.

[0008] Optionally, the authentication parameters include historical authentication parameters stored locally by the terminal device.

[0009] Optionally, before the terminal device receives the authentication message forwarded by the second communication network through the base station, the communication network handover method further includes: determining the location information of the terminal device; determining a set of candidate mobility management entities (MMUs) and a set of candidate base stations among the multiple MMUs corresponding to the second communication network based on the location information; determining a target mobility management entity (MMU) in the set of candidate MMUs based on the load information of each MMU in the set of candidate MMUs; and determining a target base station based on the load information of each candidate base station in the set of candidate base stations, wherein the target MMU and the target base station are used to send authentication parameters to the terminal device and transfer voice call services to the second communication network.

[0010] Optionally, before the terminal device receives the authentication message forwarded by the second communication network through the base station, the communication network switching method further includes: the terminal device determining the location information of the terminal device according to a preset frequency; determining the movement trajectory of the terminal device based on the location information; predicting the probability that the terminal device cannot conduct voice call services through the first communication network within a preset time period based on the movement trajectory, and determining that the terminal device cannot conduct voice call services through the first communication network within a preset time period if the probability is greater than a preset probability threshold.

[0011] Optionally, before the terminal device receives the authentication message forwarded by the second communication network through the base station, the communication network switching method further includes: the terminal device collecting communication quality parameters when making voice calls through the first communication network at a preset frequency; predicting the communication quality parameters of the terminal device when making voice calls through the first communication network within a preset time period based on the communication quality parameters, wherein the prediction results of the communication quality parameters include the predicted values ​​of the communication quality parameters at each moment within the preset time period; and determining that the terminal device cannot make voice calls through the first communication network within the preset time period if the cumulative duration for which the predicted values ​​of the communication quality parameters are lower than the preset communication quality parameter threshold exceeds the preset duration.

[0012] According to another aspect of the embodiments of this application, a communication network switching device is also provided, comprising: a first processing module, configured to, when a terminal device is unable to conduct voice call services through a first communication network within a preset time period, receive an authentication message forwarded by a base station from a second communication network, wherein the second communication network is used to continue carrying the voice call services of the terminal device in areas not covered by the first communication network, and the authentication message includes authentication parameters and a data type field indicating the data type; a second processing module, configured to, encapsulate the authentication parameters into the data type indicated by the data type field, and compare the encapsulated authentication parameters with locally stored authentication parameters; a third processing module, configured to, if the comparison result between the encapsulated authentication parameters and the locally stored authentication parameters indicates that access to the second communication network is possible, allow the terminal device to access the base station corresponding to the second communication network, thereby transferring the voice call services to the second communication network; and if the comparison result between the encapsulated authentication parameters and the locally stored authentication parameters indicates that access to the second communication network is not possible, the terminal device will no longer respond to the request information initiated by the base station corresponding to the second communication network.

[0013] According to another aspect of the embodiments of this application, a non-volatile storage medium is also provided, wherein a program is stored in the non-volatile storage medium, and the program controls the device where the non-volatile storage medium is located to perform a communication network switching method when it runs.

[0014] According to another aspect of the embodiments of this application, an electronic device is also provided, including: a memory and a processor, the processor being configured to run a program stored in the memory, wherein the program executes a communication network switching method during runtime.

[0015] According to another aspect of the embodiments of this application, a computer program product is also provided, including a computer program that implements a communication network switching method when executed by a processor.

[0016] In this embodiment, when a terminal device is unable to conduct voice calls through the first communication network within a preset time period, the terminal device receives an authentication message forwarded by a base station from the second communication network. The second communication network is used to continue carrying the terminal device's voice call service in areas not covered by the first communication network. The authentication message includes authentication parameters and a data type field indicating the data type. The authentication parameters are encapsulated into the data type indicated by the data type field, and the encapsulated authentication parameters are compared with locally stored authentication parameters. If the comparison result between the encapsulated authentication parameters and the locally stored authentication parameters indicates that access to the second communication network is possible, the terminal device accesses the base station corresponding to the second communication network. Instead of transferring voice calls to a second communication network, the terminal device stops responding to requests from the base station of the second communication network when the comparison between the encapsulated authentication parameters and the locally stored authentication parameters indicates that access to the second communication network is not possible. This is achieved by adding a data type field to the authentication message to ensure that the data type of the encapsulated authentication parameters is a specified data type. This avoids interference with the comparison results due to inconsistent data types, thus preventing the terminal device from failing to switch communication networks due to inconsistent data types. This solves the technical problem of the terminal device being unable to switch to the accessed communication network normally because the data type of the compared parameters cannot be guaranteed to be consistent in related technologies. Attached Figure Description

[0017] The accompanying drawings, which are included to provide a further understanding of this application and form part of this application, illustrate exemplary embodiments and are used to explain this application, but do not constitute an undue limitation of this application. In the drawings:

[0018] Figure 1 This is a schematic diagram of the structure of a computer terminal (mobile terminal) according to an embodiment of this application;

[0019] Figure 2 This is a flowchart illustrating a communication network switching method according to an embodiment of this application;

[0020] Figure 3 This is a schematic diagram of a data type field provided according to an embodiment of this application;

[0021] Figure 4 This is a schematic diagram of a signaling message in the event of a handover failure, provided according to an embodiment of this application.

[0022] Figure 5 This is a schematic diagram illustrating the data type of authentication parameters in an authentication message sent by a core network according to an embodiment of this application;

[0023] Figure 6This is a schematic diagram illustrating the data type of authentication parameters locally stored in a terminal device according to an embodiment of this application;

[0024] Figure 7 This is a schematic diagram of a signaling message in the case of a successful handover, according to an embodiment of this application.

[0025] Figure 8 This is a schematic diagram of the interactive process of a communication network switching procedure provided according to an embodiment of this application;

[0026] Figure 9 This is a schematic diagram of the structure of a communication network switching device according to an embodiment of this application. Detailed Implementation

[0027] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, and not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort should fall within the scope of protection of the present application.

[0028] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0029] To better understand the embodiments of this application, the technical terms involved in the embodiments of this application are explained below:

[0030] MME (Mobility Management Entity): A mobility management entity used to provide capabilities to users accessing 4G communication networks, including terminal authentication, paging, and other functions.

[0031] AMF (Access and Mobility Management Function): This entity provides capabilities to users accessing 5G communication networks, including terminal authentication, security control, and other functions.

[0032] Handover: A process used to describe the handover process between different network environments of a device, such as the handover process between a user terminal device and a 4G communication network via the N26 interface.

[0033] While the coverage of 5G communication networks is expanding rapidly with the development of 5G services, there are still areas not covered by 5G. In these areas, users who previously made 5G calls will fall back to 4G. Because 5G and 4G network architectures differ, the access restrictions for users also differ. If problems arise when accessing the new 4G communication network, such as access latency or failure, the original call will be disrupted, resulting in noise, echo, or even complete call termination. Furthermore, when a terminal device switches from a 5G to a 4G communication network, it needs to compare the authentication parameters sent by the 4G core network through the base station with the locally stored authentication parameters to determine whether access to the 4G network is possible. However, the new and old versions of the 3GPP protocol have different requirements for the encapsulation data format of authentication parameters. This means that the terminal device may use a different data format when encapsulating the authentication parameters sent by the core network, leading to authentication failure and inability to access the 4G communication network.

[0034] To address the aforementioned issues, this application provides relevant solutions, which are detailed below.

[0035] According to an embodiment of this application, a method embodiment for switching communication networks is provided. It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. Furthermore, although a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in a different order than that shown here.

[0036] The methods and embodiments provided in this application can be executed on mobile terminals, computer terminals, or similar computing devices. Figure 1 A hardware block diagram of a computer terminal (or mobile device) for implementing a communication network switching method is shown. Figure 1As shown, the computer terminal 10 (or mobile device 10) may include one or more processors 102 (shown as 102a, 102b, ..., 102n in the figure) 102 (processor 102 may include, but is not limited to, a microprocessor MCU or a programmable logic device FPGA, etc.), a memory 104 for storing data, and a transmission device 106 for communication functions. In addition, it may also include: a display, an input / output interface (I / O interface), a universal serial bus (USB) port (which may be included as one of the ports of a BUS bus), a network interface, a power supply, and / or a camera. Those skilled in the art will understand that... Figure 1 The structure shown is for illustrative purposes only and does not limit the structure of the aforementioned electronic device. For example, computer terminal 10 may also include... Figure 1 The more or fewer components shown, or having the same Figure 1 The different configurations shown.

[0037] It should be noted that the aforementioned one or more processors 102 and / or other data processing circuits are generally referred to herein as "data processing circuits". These data processing circuits may be embodied, in whole or in part, in software, hardware, firmware, or any other combination thereof. Furthermore, the data processing circuits may be a single, independent processing module, or may be integrated, in whole or in part, into any other element within the computer terminal 10 (or mobile device). As involved in the embodiments of this application, the data processing circuits serve as a processor control mechanism (e.g., selection of a variable resistor termination path connected to an interface).

[0038] The memory 104 can be used to store software programs and modules of application software, such as the program instructions / data storage device corresponding to the communication network switching method in this embodiment. The processor 102 executes various functional applications and data processing by running the software programs and modules stored in the memory 104, thereby realizing the aforementioned communication network switching method. The memory 104 may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 104 may further include memory remotely located relative to the processor 102, and these remote memories can be connected to the computer terminal 10 via a network. Examples of the aforementioned networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.

[0039] The transmission device 106 is used to receive or send data via a network. Specific examples of the network described above may include a wireless network provided by the communication provider of the computer terminal 10. In one example, the transmission device 106 includes a Network Interface Controller (NIC), which can connect to other network devices via a base station to communicate with the Internet. In another example, the transmission device 106 may be a Radio Frequency (RF) module, used for wireless communication with the Internet.

[0040] The display can be, for example, a touchscreen liquid crystal display (LCD) that allows the user to interact with the user interface of the computer terminal 10 (or mobile device).

[0041] Under the above operating environment, embodiments of this application provide a communication network switching method, such as... Figure 2 As shown, the method includes the following steps:

[0042] Step S202: If the terminal device is unable to conduct voice call service through the first communication network within a preset time period, the terminal device receives an authentication message forwarded by the second communication network through the base station. The second communication network is used to continue to carry the voice call service of the terminal device in areas not covered by the first communication network. The authentication message includes authentication parameters and a data type field for indicating the data type.

[0043] In the technical solution provided in step S202, the first communication network includes a 5G communication network and the second communication network includes a 4G communication network. When the first communication network is a 5G communication network and the second communication network is a 4G communication network, the authentication parameters are calculated and generated by the access and mobility management function entity in the first communication network and forwarded to the terminal device by the mobility management entity in the second communication network through the base station.

[0044] To address this issue, the communication network switching method provided in this application embodiment adds a new parameter to the authentication message, such as... Figure 3 The `type` field, as shown, specifies the data type format, allowing the terminal device to encapsulate relevant parameters into the data type indicated by the `type` field. This ensures data type consistency and prevents switching failures due to data type inconsistencies. Figure 3 As can be seen, the type field can be used to indicate different data types, such as Mapped Security Context or Native Security Context.

[0045] In some embodiments of this application, before the terminal device receives the authentication message forwarded by the second communication network through the base station, the various communication devices that may be involved in the handover process can be determined in advance. Specifically, this includes the following steps: determining the location information of the terminal device; determining a set of candidate mobility management entities (MMUs) and a set of candidate base stations from among the multiple mobility management entities corresponding to the second communication network based on the location information; determining a target mobility management entity from the set of candidate MMUs based on the load information of each candidate MMU in the set of candidate MMUs; and determining a target base station from the set of candidate base stations based on the load information of each candidate base station in the set of candidate base stations. The target MMU and the target base station are used to send authentication parameters to the terminal device and to transfer voice call services to the second communication network.

[0046] As an optional implementation, to further reduce the time required for the handover process, it is also possible to predict in advance whether the terminal device needs to switch from the first communication network to the second communication network within a preset time period. For example, the following method can be used to determine whether the terminal device will reach an area not covered by the first communication network within the preset time period by determining the movement trajectory of the terminal device: the terminal device determines its location information according to a preset frequency; the terminal device's movement trajectory is determined based on the location information; the probability that the terminal device cannot conduct voice calls through the first communication network within the preset time period is predicted based on the movement trajectory, and if the probability is greater than a preset probability threshold, it is determined that the terminal device cannot conduct voice calls through the first communication network within the preset time period.

[0047] Additionally, when the terminal device is located in an area covered by both the first and second communication networks, the communication quality of the first communication network can be predicted in real time within a preset time period. If it is determined that the first communication network may be overloaded within the preset time period, affecting normal communication, the terminal device will be switched to the second communication network within that preset time period. Specifically, this includes the following steps: the terminal device collects communication quality parameters for voice calls via the first communication network at a preset frequency; based on these parameters, it predicts the communication quality parameters for voice calls via the first communication network within the preset time period, including predicted values ​​for the communication quality parameters at each moment within the preset time period; if the cumulative duration for which the predicted communication quality parameter value is lower than a preset communication quality parameter threshold exceeds a preset duration, it is determined that the terminal device cannot conduct voice calls via the first communication network within the preset time period.

[0048] Step S204: Encapsulate the authentication parameters into the data type indicated by the data type field, and compare the encapsulated authentication parameters with the locally stored authentication parameters.

[0049] In the technical solution provided in step S204, the authentication parameters include historical authentication parameters stored locally by the terminal device. These locally stored historical authentication parameters are the authentication parameters received by the terminal device during the most recent handover process prior to the current handover process.

[0050] Specifically, according to the 3GPP protocol TS 33.401

[10] , after receiving the authentication message sent by the core network of the 4G communication network through the base station, the terminal device will extract the authentication parameter K from the message. NASenc and K NASint It is then encapsulated into a Mapped Security Context data type, and the encapsulated parameters are compared with the authentication parameters received during the last access to the 4G communication network stored locally.

[0051] However, according to the old version of the 3GPP protocol TS24.501

[35] , the above authentication parameter K NASenc and K NASint It can also be encapsulated as a Native Security Context data type, which leads to some user terminal devices of certain models or versions being unable to smoothly complete the Handover (communication handover) request, resulting in a probabilistic decrease in call quality when switching from 5G to 4G. For example, if the authentication parameters sent by the core network are encapsulated as Mapped Security Context, while the authentication parameters locally on the terminal device are of the Native Security Context data type, such as... Figure 4 As shown, due to inconsistent data types, the terminal device will no longer respond to the base station's requests. When the base station receives no response after sending multiple handover requests, it will release the relevant resources and cease establishing a bearer, thus causing the terminal device to fail to switch communication networks.

[0052] Specifically, after receiving a message, the terminal device first checks the value of the type field. If the type value is mapped-security-context, the terminal will then use the authentication parameter K obtained from the message. NASenc and K NASint The authentication parameters are encapsulated into a Mapped Security Context data type before subsequent authentication processes. Furthermore, if the data type of the authentication parameters stored locally on the terminal device is inconsistent with the type indicated by the `type` field, the terminal device will also re-encapsulate the authentication parameters.

[0053] As an optional implementation, encapsulating the authentication parameters into the data type indicated by the data type field and comparing the encapsulated authentication parameters with the locally stored authentication parameters includes: determining the data type of the locally stored authentication parameters; if the data type of the authentication parameters matches the data type indicated by the data type field, comparing the encapsulated authentication parameters with the authentication parameters; if the data type of the authentication parameters does not match the data type indicated by the data type field, re-encapsulating the authentication parameters, and ensuring that the data type of the re-encapsulated authentication parameters matches the data type indicated by the data type field; and comparing the re-encapsulated authentication parameters with the encapsulated authentication parameters.

[0054] In some embodiments of this application, the process of comparing authentication parameters after using the communication network switching method provided in the embodiments of this application is as follows:

[0055] 1. Initialize the authentication handle passed through during the HAND OVER process of switching from 5G to 4G communication network;

[0056] 2. Obtain authentication parameter information;

[0057] 3. Determine the data type format specified by the newly added type field;

[0058] 4. Encapsulate the authentication parameters according to the data type format indicated by the type field;

[0059] 5. Compare the encapsulated authentication parameters with the local authentication parameters after adjusting the data type according to the type field to obtain the HAND OVER process authentication result.

[0060] After adopting the communication network switching method provided in this application embodiment, in a scenario where a terminal device switches from a 5G communication network to a 4G communication network, the authentication parameters sent by the core network of the 4G communication network to the terminal device are as follows: Figure 5 As shown, where Figure 5 The portion enclosed in the box represents the data type of the encapsulated authentication parameters. Historical authentication parameters stored locally on the terminal device are as follows: Figure 6 As shown, where Figure 6 The part enclosed in the box is the data type of the historical authentication parameters after being encapsulated.

[0061] Step S206: If the comparison result between the encapsulated authentication parameters and the locally stored authentication parameters indicates that the device can access the second communication network, the terminal device accesses the base station corresponding to the second communication network, thereby transferring the voice call service to the second communication network.

[0062] In the technical solution provided in step S206, the signaling information when the communication network handover is successful is as follows: Figure 7 As shown.

[0063] In step S208, if the comparison result between the encapsulated authentication parameters and the locally stored authentication parameters is that the terminal device cannot access the second communication network, the terminal device will no longer respond to the request information initiated by the base station corresponding to the second communication network.

[0064] When the first communication network is a 5G communication network, the second communication network is a 4G communication network, and an N26 interface exists between the 5G and 4G communication networks, embodiments of this application also provide a method such as... Figure 8 The communication network handover process based on the N26 interface, as shown, includes the following steps:

[0065] Step 1: When the terminal device moves to a location without 5G base station coverage, the base station will send a Handover request to the AMF to switch to the 4G base station, notifying the 4G core network to continue to be responsible for the voice call service of the terminal device.

[0066] Step 2: When the AMF receives the Handover request, it calculates the authentication parameters (SecurityContext) of the new network to transfer the voice call service of the terminal device to the 4G network bearer, and sends these parameters to the MME.

[0067] Step 3: After receiving the authentication parameters, the MME sends a Relocation request to the 4G base station to request 4G voice service resources for the terminal device.

[0068] Step 4: The 4G base station responds to the relocation request, allowing the new user's terminal device to access the base station.

[0069] Step 5: The MME notifies the AMF that the terminal device can be accessed via 4G, and notifies the AMF that it will no longer carry voice services.

[0070] Step 6: After responding to the request in Step 1, AMF will no longer carry out voice services.

[0071] Step 7: The 4G base station notifies the user terminal that a network switch is about to take place and sends authentication parameters to the terminal.

[0072] Step 8: The user terminal compares the authentication parameters issued by the core network with the authentication parameters stored locally, and determines whether the new network is legitimate based on the result.

[0073] It is important to note that before comparison, the terminal device needs to determine the data type based on the type field, and only compare the parameters after confirming that the data types of the parameters to be compared are all of the data types indicated by the type field.

[0074] Step 9: If Step 8 determines that the new network is legitimate, then the 4G network will be used to continue the voice call service for the user; if the new network is deemed illegal and insecure, then the base station's request will no longer be answered.

[0075] By adopting the communication network switching method and switching process provided in this application, the probability of switching failure can be effectively reduced because the impact of inconsistent data types on the judgment results is resolved.

[0076] When a terminal device is unable to conduct voice calls through the first communication network within a preset time period, it receives an authentication message forwarded by a base station from a second communication network. The second communication network is used to continue carrying the terminal device's voice call service in areas not covered by the first communication network. The authentication message includes authentication parameters and a data type field indicating the data type. The authentication parameters are encapsulated into the data type indicated by the data type field, and the encapsulated authentication parameters are compared with locally stored authentication parameters. If the comparison result between the encapsulated authentication parameters and the locally stored authentication parameters indicates that access to the second communication network is possible, the terminal device accesses the base station corresponding to the second communication network, thereby enabling voice calls. The voice call service is transferred to the second communication network. If the comparison result between the encapsulated authentication parameters and the locally stored authentication parameters indicates that access to the second communication network is not possible, the terminal device will no longer respond to the request information initiated by the base station corresponding to the second communication network. This is achieved by adding a data type field to the authentication message to ensure that the data type of the encapsulated authentication parameters is a specified data type. This avoids interference with the comparison result due to inconsistent data types, thus preventing the terminal device from failing to switch communication networks due to inconsistent data types. This solves the technical problem in related technologies where the inability to guarantee consistent data types of the compared parameters leads to the terminal device's inability to properly switch to the accessed communication network.

[0077] This application provides a communication network switching device. Figure 9 This is a schematic diagram of the device. (For example...) Figure 9As shown, the device includes: a first processing module 90, used to receive an authentication message forwarded by a base station from a second communication network when the terminal device is unable to conduct voice call services through the first communication network within a preset time period. The second communication network is used to continue carrying the terminal device's voice call services in areas not covered by the first communication network. The authentication message includes authentication parameters and a data type field indicating the data type. A second processing module 92 is used to encapsulate the authentication parameters into the data type indicated by the data type field and compare the encapsulated authentication parameters with locally stored authentication parameters. A third processing module 94 is used to, if the comparison result between the encapsulated authentication parameters and the locally stored authentication parameters indicates that access to the second communication network is possible, allow the terminal device to access the base station corresponding to the second communication network, thereby transferring the voice call service to the second communication network. And if the comparison result between the encapsulated authentication parameters and the locally stored authentication parameters indicates that access to the second communication network is not possible, the terminal device will not respond to requests initiated by the base station corresponding to the second communication network.

[0078] In some embodiments of this application, the first communication network includes a 9G communication network and the second communication network includes a 4G communication network; when the first communication network is a 9G communication network and the second communication network is a 4G communication network, the authentication parameters are calculated and generated by the access and mobility management function entity in the first communication network and forwarded to the terminal device by the mobility management entity in the second communication network through the base station.

[0079] In some embodiments of this application, before the terminal device receives the authentication message forwarded by the second communication network through the base station, the first processing module 90 is further configured to: determine the location information of the terminal device; determine a set of candidate mobility management entities among multiple mobility management entities corresponding to the second communication network and a set of candidate base stations among multiple base stations corresponding to the second communication network based on the location information; determine a target mobility management entity in the set of candidate mobility management entities based on the load information of each candidate mobility management entity in the set of candidate mobility management entities, and determine a target base station based on the load information of each candidate base station in the set of candidate base stations, wherein the target mobility management entity and the target base station are used to send authentication parameters to the terminal device and transfer voice call services to the second communication network.

[0080] In some embodiments of this application, before the terminal device receives the authentication message forwarded by the second communication network through the base station, the first processing module 90 is further configured to: determine the location information of the terminal device according to a preset frequency; determine the movement trajectory of the terminal device based on the location information; predict the probability that the terminal device cannot conduct voice call service through the first communication network within a preset time period based on the movement trajectory, and determine that the terminal device cannot conduct voice call service through the first communication network within a preset time period if the probability is greater than a preset probability threshold.

[0081] In some embodiments of this application, before the terminal device receives the authentication message forwarded by the second communication network through the base station, the first processing module 90 is further configured to: collect communication quality parameters when making voice calls through the first communication network at a preset frequency; predict the communication quality parameters of the terminal device when making voice calls through the first communication network within a preset time period based on the communication quality parameters, wherein the prediction results of the communication quality parameters include the predicted values ​​of the communication quality parameters at each moment within the preset time period; and determine that the terminal device cannot make voice calls through the first communication network within the preset time period if the cumulative duration for which the predicted values ​​of the communication quality parameters are lower than the preset communication quality parameter threshold exceeds the preset duration.

[0082] In some embodiments of this application, the authentication parameters include historical authentication parameters stored locally by the terminal device.

[0083] In some embodiments of this application, the second processing module 92 encapsulates the authentication parameters into the data type indicated by the data type field and compares the encapsulated authentication parameters with the locally stored authentication parameters. This includes: determining the data type of the locally stored authentication parameters; if the data type of the authentication parameters matches the data type indicated by the data type field, comparing the encapsulated authentication parameters with the authentication parameters; if the data type of the authentication parameters does not match the data type indicated by the data type field, re-encapsulating the authentication parameters, and ensuring that the data type of the re-encapsulated authentication parameters matches the data type indicated by the data type field; and comparing the re-encapsulated authentication parameters with the encapsulated authentication parameters.

[0084] According to an embodiment of this application, a non-volatile storage medium is also provided, which stores a program. When the program runs, it controls the device containing the non-volatile storage medium to execute the following communication network switching method: When a terminal device cannot conduct voice calls through a first communication network within a preset time period, the terminal device receives an authentication message forwarded by a base station from a second communication network. The second communication network is used to continue carrying the terminal device's voice call service in areas not covered by the first communication network. The authentication message includes authentication parameters and a data type field indicating the data type. The authentication parameters are encapsulated into the data type indicated by the data type field, and the encapsulated authentication parameters are compared with locally stored authentication parameters. If the comparison result between the encapsulated authentication parameters and the locally stored authentication parameters indicates that access to the second communication network is possible, the terminal device accesses the base station corresponding to the second communication network, thereby transferring the voice call service to the second communication network. If the comparison result between the encapsulated authentication parameters and the locally stored authentication parameters indicates that access to the second communication network is not possible, the terminal device no longer responds to requests initiated by the base station corresponding to the second communication network.

[0085] According to an embodiment of this application, an electronic device is also provided, including: a memory and a processor. The processor is used to run a program stored in the memory, wherein the program executes the following communication network switching method: when a terminal device cannot conduct voice call services through a first communication network within a preset time period, the terminal device receives an authentication message forwarded by a base station through a second communication network, wherein the second communication network is used to continue to carry the terminal device's voice call services in areas not covered by the first communication network, and the authentication message includes authentication parameters and a data type field indicating the data type; the authentication parameters are encapsulated into the data type indicated by the data type field, and the encapsulated authentication parameters are compared with locally stored authentication parameters; if the comparison result between the encapsulated authentication parameters and the locally stored authentication parameters indicates that access to the second communication network is possible, the terminal device accesses the base station corresponding to the second communication network, thereby transferring the voice call service to the second communication network; if the comparison result between the encapsulated authentication parameters and the locally stored authentication parameters indicates that access to the second communication network is not possible, the terminal device no longer responds to the request information initiated by the base station corresponding to the second communication network.

[0086] According to an embodiment of this application, a computer product is also provided, including a computer program. When the computer program is executed by a processor, it implements the following communication network switching method: When a terminal device cannot conduct voice call services through a first communication network within a preset time period, the terminal device receives an authentication message forwarded by a base station through a second communication network. The second communication network is used to continue carrying the terminal device's voice call services in areas not covered by the first communication network. The authentication message includes authentication parameters and a data type field indicating the data type. The authentication parameters are encapsulated into the data type indicated by the data type field, and the encapsulated authentication parameters are compared with locally stored authentication parameters. If the comparison result between the encapsulated authentication parameters and the locally stored authentication parameters indicates that access to the second communication network is possible, the terminal device accesses the base station corresponding to the second communication network, thereby transferring the voice call service to the second communication network. If the comparison result between the encapsulated authentication parameters and the locally stored authentication parameters indicates that access to the second communication network is not possible, the terminal device no longer responds to the request information initiated by the base station corresponding to the second communication network.

[0087] It should be noted that each module in the above-mentioned communication network switching device can be a program module (for example, a set of program instructions that implement a certain function) or a hardware module. For the latter, it can be manifested in the following forms, but is not limited to them: each of the above modules is manifested as a processor, or the functions of each of the above modules are implemented by a processor.

[0088] In the above embodiments of this application, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments.

[0089] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. The device embodiments described above are merely illustrative; for example, the division of units can be a logical functional division, and in actual implementation, there may be other division methods. For instance, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the displayed or discussed mutual coupling, direct coupling, or communication connection may be through some interfaces; the indirect coupling or communication connection between units or modules may be electrical or other forms.

[0090] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0091] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0092] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to related technologies, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, read-only memory (ROM), random access memory (RAM), portable hard drives, magnetic disks, or optical disks.

[0093] The above description is only a preferred embodiment of this application. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of this application, and these improvements and modifications should also be considered within the scope of protection of this application.

Claims

1. A communication network switching method, characterized in that, include: If the terminal device is unable to conduct voice call service through the first communication network within a preset time period, the terminal device receives an authentication message forwarded by the second communication network through the base station. The second communication network is used to continue to carry the voice call service of the terminal device in areas not covered by the first communication network. The authentication message includes authentication parameters and a data type field for indicating the data type. The authentication parameters are encapsulated into the data type indicated by the data type field, and the encapsulated authentication parameters are compared with the locally stored authentication parameters. If the comparison result between the encapsulated authentication parameters and the locally stored authentication parameters indicates that the device can access the second communication network, the terminal device accesses the base station corresponding to the second communication network, thereby transferring the voice call service to the second communication network. If the comparison result between the encapsulated authentication parameters and the locally stored authentication parameters indicates that the terminal device cannot access the second communication network, the terminal device will no longer respond to the request information initiated by the base station corresponding to the second communication network.

2. The communication network switching method according to claim 1, characterized in that, Encapsulating the authentication parameters into the data type indicated by the data type field, and comparing the encapsulated authentication parameters with the locally stored authentication parameters includes: Determine the data type of the authentication parameters stored locally; If the data type of the authentication parameter is consistent with the data type indicated by the data type field, compare the encapsulated authentication parameter and the authentication parameter. If the data type of the authentication parameter is inconsistent with the data type indicated by the data type field, the authentication parameter is re-encapsulated, and the data type of the re-encapsulated authentication parameter is consistent with the data type indicated by the data type field. Compare the repackaged authentication parameters with the repackaged authorization parameters.

3. The communication network switching method according to claim 1, characterized in that, The first communication network includes a 5G communication network, and the second communication network includes a 4G communication network. When the first communication network is a 5G communication network and the second communication network is a 4G communication network, the authentication parameters are calculated and generated by the access and mobility management function entity in the first communication network, and forwarded to the terminal device by the mobility management entity in the second communication network through the base station.

4. The communication network switching method according to claim 1, characterized in that, The authentication parameters include the historical authentication parameters stored locally by the terminal device.

5. The communication network switching method according to claim 1, characterized in that, Before the terminal device receives the authentication message forwarded by the second communication network through the base station, the communication network switching method further includes: Determine the location information of the terminal device; Based on the location information, a set of candidate mobility management entities is determined from among the multiple mobility management entities corresponding to the second communication network, and a set of candidate base stations is determined from among the multiple base stations corresponding to the second communication network; The target mobility management entity is determined in the set of candidate mobility management entities based on the load information of each candidate mobility management entity in the set of candidate mobility management entities, and the target base station is determined based on the load information of each candidate base station in the set of candidate base stations. The target mobility management entity and the target base station are used to send the authentication parameters to the terminal device and to transfer the voice call service to the second communication network.

6. The communication network switching method according to claim 1, characterized in that, Before the terminal device receives the authentication message forwarded by the second communication network through the base station, the communication network switching method further includes: The terminal device determines its location information according to a preset frequency. The movement trajectory of the terminal device is determined based on the location information; Based on the movement trajectory, predict the probability that the terminal device cannot conduct voice call service through the first communication network within the preset time period, and determine that the terminal device cannot conduct voice call service through the first communication network within the preset time period if the probability is greater than a preset probability threshold.

7. The communication network switching method according to claim 1, characterized in that, Before the terminal device receives the authentication message forwarded by the second communication network through the base station, the communication network switching method further includes: The terminal device collects communication quality parameters when making voice calls through the first communication network at a preset frequency. Based on the communication quality parameters, the prediction result of the communication quality parameters when the terminal device makes a voice call through the first communication network within the preset time period is predicted, wherein the prediction result of the communication quality parameters includes the predicted value of the communication quality parameters at each time point within the preset time period; If the cumulative duration during which the predicted value of the communication quality parameter is lower than the preset communication quality parameter threshold exceeds a preset duration, it is determined that the terminal device cannot conduct voice call services through the first communication network within the preset time period.

8. A communication network switching device, characterized in that, include: The first processing module is configured to, when a terminal device is unable to conduct voice call services through a first communication network within a preset time period, receive an authentication message forwarded by a base station from a second communication network. The second communication network is configured to continue to carry the voice call services of the terminal device in areas not covered by the first communication network. The authentication message includes authentication parameters and a data type field indicating the data type. The second processing module is used to encapsulate the authentication parameters into the data type indicated by the data type field, and compare the encapsulated authentication parameters with the locally stored authentication parameters. The third processing module is configured to, if the comparison result between the encapsulated authentication parameters and the locally stored authentication parameters indicates that access to the second communication network is possible, allow the terminal device to access the base station corresponding to the second communication network, thereby transferring the voice call service to the second communication network; and if the comparison result between the encapsulated authentication parameters and the locally stored authentication parameters indicates that access to the second communication network is not possible, the terminal device will no longer respond to the request information initiated by the base station corresponding to the second communication network.

9. A non-volatile storage medium, characterized in that, The non-volatile storage medium stores a program, wherein when the program is executed, it controls the device where the non-volatile storage medium is located to perform the communication network switching method according to any one of claims 1 to 7.

10. An electronic device, characterized in that, include: A memory and a processor, the processor being configured to run a program stored in the memory, wherein the program, when running, executes the communication network switching method according to any one of claims 1 to 7.

11. A computer program product, characterized in that, It includes a computer program that, when executed by a processor, implements the communication network switching method according to any one of claims 1 to 7.