A network switching method, device and storage medium

By coordinating network strength values ​​with mobile devices and cloud servers and automatically switching networks, the problem of network lag caused by manual switching by users is solved, thus achieving stability and continuity of network connectivity for mobile devices.

CN122340561APending Publication Date: 2026-07-03CHINA SOUTHERN POWER GRID DIGITAL GRID GROUP (GUIZHOU) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-04-01
Publication Date
2026-07-03

Smart Images

  • Figure CN122340561A_ABST
    Figure CN122340561A_ABST
Patent Text Reader

Abstract

This invention discloses a network switching method, device, and storage medium. The method includes: a mobile device collecting network signals from various networks, as well as collecting the mobile device's identity and geographical location; when the mobile device detects that the network signal of a first network is less than a preset internet access threshold and has not received a first switching command manually triggered by the user, the mobile device uploads the network signals, identity, and geographical location of each network to a cloud server; the cloud server calculates the network strength values ​​of each network based on the network signals and geographical location; when the network strength value of the first network is less than the network strength value of the second network, the cloud server sends a second switching command to the mobile device pointed to by the identity; the mobile device replaces the first network according to the second switching command to complete the network switching. This embodiment ensures the stability and continuity of the mobile device's network connection through fully automated network switching.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of communication technology, and in particular to a network switching method, device and storage medium. Background Technology

[0002] With the development of communication technology, mobile devices can access an increasingly diverse range of networks, often simultaneously finding multiple available networks. However, in actual use, the network environment of a mobile device is constantly changing. For example, when moving outdoors, the currently connected network signal may gradually weaken due to factors such as obstruction or distance from a base station, leading to network lag, data transmission interruptions, and impacting the user experience.

[0003] Currently, network switching on mobile devices mostly relies on manual operation by the user. That is, when the user perceives that the current network signal is weak or the smoothness of use is low, they manually search for and switch to other available networks in the settings. However, manual operation not only increases the user's workload, but may also lead to problems such as degraded network experience and data transmission interruption if the user does not detect network anomalies in time or switch networks in time. Summary of the Invention

[0004] This invention provides a network switching method, device, and storage medium to achieve automated network switching and ensure the stability and continuity of network connections for mobile devices.

[0005] In a first aspect, embodiments of the present invention provide a network switching method applied to a network switching system, the network switching system including a mobile device and a cloud server, the method comprising: The mobile device collects network signals from various networks, as well as its identity and geographical location; the networks include a first network to which the mobile device is connected and a second network to which the mobile device is not connected. When the mobile device detects that the network signal of the first network is less than the preset internet access threshold and has not received a first switching command manually triggered by the user, it uploads the network signals of each network, the identity identifier, and the geographical location to the cloud server. After receiving the network signals, identity identifiers and geographical locations of each network, the cloud server calculates the network strength values ​​of each network based on the network signals and geographical locations of each network. When the network strength value of the first network is less than the network strength value of the second network, the cloud server sends a second switching instruction to the mobile device pointed to by the identity identifier; After receiving the second switching instruction, the mobile device replaces the first network according to the second switching instruction to complete the network switching.

[0006] Secondly, embodiments of the present invention also provide a network switching device applied to a network switching system, the network switching system including a mobile device and a cloud server, the device comprising: A network data acquisition module, located on the mobile device, is used to acquire network signals from various networks, as well as the identity and geographical location of the mobile device; the networks include a first network that the mobile device has connected to and a second network that the mobile device has not connected to; The network data upload module, located on the mobile device, is used to upload the network signals of each network, the identity identifier, and the geographical location to the cloud server when the network signal of the first network is detected to be less than the preset internet access threshold and no first switching instruction manually triggered by the user is received. A network strength calculation module, located on the cloud server, is used to receive the network signals of each network, the identity identifier, and the geographical location, and then calculate the network strength value of each network based on the network signals and geographical location of each network. The second switching instruction sending module, located on the cloud server, is used to send a second switching instruction to the mobile device pointed to by the identity identifier when the network strength value of the first network is less than the network strength value of the second network. The second switching instruction execution module, located in the mobile device, is used to replace the first network according to the second switching instruction after receiving the second switching instruction, so as to complete the network switching.

[0007] Thirdly, embodiments of the present invention also provide a computer device, the computer device comprising: One or more processors; Storage device for storing one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the network switching method provided in the first aspect of the present invention.

[0008] Fourthly, embodiments of the present invention also provide a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the network switching method as provided in the first aspect of the present invention.

[0009] Fifthly, embodiments of the present invention also provide a computer program product, the computer program product including a computer program, which, when executed by a processor, implements the network switching method provided in the first aspect of the present invention.

[0010] In this embodiment of the invention, when a mobile device detects that the first network signal is less than a preset internet access threshold and has not received a first switching instruction, it uploads relevant data to the cloud server. This avoids invalid data uploads when the network signal is normal, reduces the power consumption and network bandwidth usage of the mobile device, and ensures that the switching process is initiated under both conditions, balancing the necessity and automation of the switching. The cloud server calculates network strength values ​​for each network, which can objectively and comprehensively assess the quality of each network, avoiding the bias of network assessment caused by relying solely on the local perception of the mobile device, and ensuring the scientific nature of the switching decision. Finally, when the network strength value of the first network is less than that of the second network, the cloud server sends a switching instruction to the corresponding mobile device. After receiving the instruction, the mobile device completes the network replacement, realizing full automation from network quality assessment to switching execution without manual user intervention. This reduces the user's operational burden and can promptly switch to a better network, avoiding problems such as network lag and data transmission interruption caused by insufficient network signal of the currently connected network. This ensures the stability and continuity of the mobile device's network connection, thereby improving the user's network experience. Attached Figure Description

[0011] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0012] Figure 1 This is a flowchart of a network switching method provided in Embodiment 1 of the present invention; Figure 2 This is a schematic diagram of a display interface of a mobile device provided in Embodiment 1 of the present invention; Figure 3 This is a structural block diagram of a network switching device provided in Embodiment 2 of the present invention; Figure 4 This is a schematic diagram of the structure of a computer device provided in Embodiment 3 of the present invention. Detailed Implementation

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

[0014] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this invention 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 used interchangeably where appropriate so that the embodiments of the invention described herein can cover implementations in sequences 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.

[0015] Example 1 See Figure 1 The diagram illustrates a flowchart of a network switching method according to Embodiment 1 of the present invention. This embodiment is applicable to the interaction between a mobile device and a cloud server, and selects the optimal network based on the network strength value corresponding to the network. This method can be executed by a network switching device, which can be implemented in hardware and / or software and can be configured in a computer device. Figure 1 As shown, this method is applied to a network handover system, which includes mobile devices and a cloud server. The method includes: Step 101: The mobile device collects network signals from various networks, as well as the mobile device's identity and geographical location.

[0016] A mobile device is a portable terminal device that can operate normally in mobile scenarios and has network access, data collection, and processing capabilities. Its characteristics are portability and mobility, enabling it to perform data interaction and network connectivity in different geographical locations, independent of fixed locations. Mobile devices come in a wide variety of types; any mobile device possessing portability, network access, and data processing capabilities can include smartphones, tablets, and other similar devices.

[0017] Each network refers to the network to which the mobile device's SIM card (Subscriber Identity Module) has signed up. The network includes the first network to which the mobile device is connected and the second network to which the mobile device is not connected.

[0018] In this embodiment, the network signals of each network subscribed to by the SIM card are collected by the mobile device in order to obtain the real-time operating status of all available networks, clarify the quality level of the currently connected first network and the availability of the potentially switchable second network, and provide data basis for subsequent judgment on whether to switch networks and which SIM card subscribed network to switch to.

[0019] The identification of the mobile device is collected and used to achieve precise binding between the mobile device and the cloud server. This ensures that the cloud server can accurately identify the mobile device corresponding to the data source after receiving the data, avoiding problems such as incorrect cloud server command transmission and data confusion. It also ensures that the network switching commands sent by the cloud server can be accurately delivered to the mobile device, ensuring the effectiveness and relevance of the switching commands.

[0020] Collecting the geographical location of mobile devices is to supplement the judgment of the network signal of the network subscribed to by the SIM card, because the network signal of the network subscribed to by the SIM card can be affected by geographical location (such as differences in base station coverage strength and signal interference in different areas). Through geographical location information, the cloud server can more accurately assess the actual usage quality of each network in that location.

[0021] Step 102: When the mobile device detects that the network signal of the first network is less than the preset internet access threshold and has not received the first switching command manually triggered by the user, it uploads the network signal, identity identifier and geographical location of each network to the cloud server.

[0022] In this embodiment, if the mobile device detects that the network signal of the first network it is connected to is lower than the preset internet access threshold, it indicates that the currently connected first network no longer meets the internet access requirements. At the same time, if no first switching command is received manually triggered by the user, it indicates that the automatic network switching process has begun. There is no need for manual network switching. At this time, the mobile device uploads the network signal, identity identifier and geographical location of each network to the cloud server to provide data support for the cloud server to decide which network to switch to.

[0023] By setting a dual-condition triggering mechanism (i.e., the network signal of the first network is less than the preset internet access threshold and no user-manually triggered first switching command is received), the accidental triggering and frequent startup of the network automatic switching logic can be effectively avoided, reducing unnecessary data uploads from mobile devices and cloud server computing overhead, reducing mobile device power consumption and network resource occupation, while prioritizing the user's control over manually switching networks, significantly improving user autonomy and experience comfort.

[0024] For example, network signals include signal strength, network latency, and download speed. Each of the network signals corresponds to a threshold. If any of the network signals is less than the corresponding threshold, the network signal is considered to be below the preset internet access threshold.

[0025] For example, communication between a mobile device and a cloud server can use SOCKET communication technology.

[0026] Step 103: After receiving the network signals, identity identifiers and geographical locations of each network, the cloud server calculates the network strength values ​​of each network based on the network signals and geographical locations of each network.

[0027] In this embodiment, after receiving network signals and geographical locations from various networks, the cloud server converts the network signals of each network into a quantifiable and comparable unified indicator (i.e., network strength value), eliminating the fragmentation and subjectivity of the original network signals. At the same time, the calculation of geographical locations can adapt to the differences in network signals in different regions, making the evaluation of network signals more in line with the actual usage scenarios of mobile devices. This improves the rationality and accuracy of network switching, ensures the stability and smoothness of mobile device network connections, and enhances the user experience.

[0028] In one embodiment of the present invention, step 103 may include the following steps: Step 1031: Query the historical average data of various network signal parameters based on geographical location.

[0029] In this embodiment, network signal includes signal strength, network latency, and download speed. The cloud server queries the historical average data of each aspect of the network signal at this geographical location. The historical average data is the result of long-term statistics and can reflect the normal level of the network signal at this geographical location.

[0030] Step 1032: Correct the network signals of each network based on historical average data.

[0031] In this embodiment, the network signals of various networks collected by the mobile device are susceptible to instantaneous environmental interference, exhibiting randomness and instability. The network signal at a single moment cannot objectively reflect the true network level at that geographical location. However, historical average data is the normal data of network signals over a long period of time at that geographical location, which can make up for the limitations of the network signals of each network. Therefore, the network signals of each network are corrected by using historical average data to eliminate signal fluctuations caused by instantaneous interference in the collected network signals (such as false high or low signal, latency peaks, speed fluctuations, etc.), resulting in a more objective and representative network signal.

[0032] For example, historical average data includes historical average signal strength, historical average network latency, and historical average download speed.

[0033] For each network, the product of the signal strength and the first correction weight, and the product of the historical average signal strength and the second correction weight are added together to obtain the corrected signal strength.

[0034] For each network, the corrected network latency is obtained by adding the product of the network latency and the first correction weight, and the product of the historical average network latency and the second correction weight.

[0035] For each network, the corrected download speed is obtained by multiplying the download speed by the first correction weight and the historical average download speed by the second correction weight. The first correction weight is greater than the second correction weight, both of which are positive numbers, and the sum of the first and second correction weights equals 1. Typically, the first correction weight is 0.7 and the second correction weight is 0.3.

[0036] Step 1033: If the correction is completed, calculate the signal weight by multiplying the signal strength and the first weight for each network.

[0037] In this embodiment, after the correction is completed, each network has obtained a corrected signal strength that matches the actual level of the geographical location. Signal strength is one of the indicators of network quality. The higher the signal strength, the stronger the stability and anti-interference ability of the network connection, and the lower the probability of users experiencing lag or disconnection when using the network. By multiplying it with the first weight, the influence of signal strength on network quality (i.e., signal weight) can be accurately quantified. At the same time, with the completion of the correction as a premise, it is ensured that the calculation basis of the signal weight is accurate and stable, reducing the interference of instantaneous signal fluctuations on the weight, enabling the cloud server to clearly distinguish the differences in signal strength between different networks, and providing a scientific basis for network switching decisions.

[0038] Step 1034: If the correction is completed, for each network, take the inverse of the product between the network delay and the second weight to obtain the delay weight.

[0039] In this embodiment, network latency and network quality are negatively correlated. Longer network latency results in slower data transmission response, leading to loading delays and operational lag for users. Since network strength values ​​need to directly reflect network quality (higher values ​​indicate better quality), the product of network latency and a second weight is inversely multiplied to obtain the latency weight. This transforms the negative correlation into a positive one, ensuring that shorter network latency corresponds to a larger latency weight. This allows the network strength value to accurately reflect the impact of network latency on network quality. Furthermore, this correction is made to ensure that the network latency used for calculation is calibrated using historical average data and closely reflects reality. This avoids distortion in the latency weight calculation due to instantaneous network latency peaks or troughs, which could affect the objectivity of network quality assessment and make the final network strength value more comprehensive and objective.

[0040] Step 1035: If the correction is completed, calculate the download weight by multiplying the download speed by the third weight for each network.

[0041] In this embodiment, download speed is a supplementary indicator of network quality, relating to the efficiency with which users acquire network data (such as downloading files, loading videos, and browsing images). Faster download speeds result in a better user experience. Therefore, by multiplying the download speed by a third weight, the difference in download speed is quantified into a download weight, which is then incorporated into the calculation of the network strength value, ensuring the comprehensiveness of the network quality assessment. Furthermore, this correction is made to ensure that the download speed used for calculation is a value calibrated with historical average data, reflecting the true bandwidth potential of the network at that geographical location. This avoids deviations in the download weight calculation caused by instantaneous download speed fluctuations (such as temporary network congestion or sudden bandwidth usage), ensuring that the download weight accurately reflects the network's actual download capacity.

[0042] For example, the first, second, and third weights are all positive numbers; the sum of the first, second, and third weights is 1, and the first weight is greater than the second weight, and the second weight is greater than the third weight; signal strength is an indicator that determines network connection stability and anti-interference capability, directly determining whether the network can be used normally and whether there will be disconnections or lag, so it is given the highest first weight; network latency is related to the response speed of data transmission, directly affecting the smoothness of user operation, and is an indicator second only to signal strength, so it is given a middle second weight; download speed is a supplementary indicator of network quality, affecting the efficiency of users to obtain data, but its priority is lower than connection stability and response speed, so it is given the lowest third weight. This weight design allows the network strength value to reflect the difference between signal strength and network latency first, ensuring that the evaluation results are consistent with the actual needs of users and providing a scientific and reasonable basis for network switching decisions.

[0043] Step 1036: For each network, calculate the sum of the signal weight, delay weight, and download weight to obtain the network strength value.

[0044] In this embodiment, for each network, the calculated signal weight, delay weight, and download weight are added together to obtain the network strength value of the network. The magnitude of the network strength value is related to the quality of the network; the larger the network strength value, the higher the quality of the network.

[0045] Step 104: When the network strength value of the first network is less than that of the second network, the cloud server sends a second switching instruction to the mobile device pointed to by the identity identifier.

[0046] In this embodiment, there may be multiple second networks that the mobile device is not connected to. When the network strength value of any second network is greater than the network strength value of the first network that the mobile device is currently connected to, it means that the network quality of the second network is better than that of the currently connected first network. If there are two or more second networks whose network strength values ​​are both greater than that of the first network, the cloud server will select the second network with the largest network strength value, generate a second switching instruction to replace the currently connected first network with the optimal second network, and accurately send the second switching instruction to the mobile device corresponding to the identity identifier.

[0047] By comparing network strength values ​​to trigger a switching command, the system can automatically select a network with better quality, solving the problems of weak first network signals and poor user experience. This reduces the operational cost of manually switching networks for users and improves ease of use. Precisely matching the identity identifier to send a second switching command ensures that the switching command only applies to the corresponding mobile device, avoiding interference with other mobile devices and ensuring the targeted and secure nature of network switching. At the same time, if multiple high-quality second networks exist, the system prioritizes switching to the network with the strongest signal, further ensuring the stability and smoothness of the network connection after the switch and improving the overall network usage experience of mobile devices.

[0048] In one embodiment of the present invention, step 104 may include the following steps: Step 1041: If the network strength value of the first network is less than that of the second network, then the second network with the highest network strength value is determined as the target network.

[0049] In this embodiment, the calculated network strength values ​​of each network comprehensively reflect the signal quality, response speed, and download efficiency of each network, serving as the basis for judging network quality. When the network strength value of the first network is less than that of the second network, it indicates that the quality of the currently connected first network is inferior to some unconnected second networks. In this case, it is necessary to select the optimal option from multiple second networks. The second network with the highest network strength value means that its overall quality is the best, and it can meet the user's network usage needs to the greatest extent. By selecting the second network with the highest network strength value as the target network, it is ensured that the mobile device connects to the best available network after switching, maximizing the stability, smoothness, and efficiency of network usage, avoiding the inability to resolve the lag and disconnection issues of the original network when switching to a network of average quality, and ensuring the continuity of the user's network usage.

[0050] Step 1042: Extract the operator identifier corresponding to the target network.

[0051] In this embodiment, the target network is provided by a specific operator. Different operators have different network access rules and access parameters. The operator identifier is the basis for distinguishing different operators and accurately querying access parameters. Without the operator identifier, it is impossible to accurately match the access configuration corresponding to the target network, which will affect the subsequent network switching process. Therefore, after determining the target network, its corresponding operator identifier is extracted.

[0052] Step 1043: Query the access parameters of the target network based on the operator identifier.

[0053] In this embodiment, after obtaining the operator identifier of the target network, the access parameters of the target network can be queried based on the operator identifier. The access parameters include the Mobile Country Code (MCC), the Mobile Network Code (MNC), and the Access Point Name (APN). The access parameters are the configuration information for the mobile device to access the target network. The Mobile Country Code is used to distinguish networks in different countries / regions, the Mobile Network Code is used to distinguish networks of different operators within the same country / region, and the Access Point Name is used to specify the access path for the mobile device to establish a connection with the operator's network. All three are indispensable. If any access parameter is missing, the mobile device will not be able to successfully search for and connect to the target network.

[0054] The operator identifier serves as a unique identifier to distinguish different operators, enabling precise location of the target network's operator's access parameter database. This ensures that the queried access parameters match the target network, preventing network connection failures due to incorrect access parameters. There are significant differences in access parameters between different operators.

[0055] Step 1044: Match the corresponding AT command template according to the communication module.

[0056] The cloud server stores device profile information for mobile devices corresponding to their identifiers. This device profile information includes the communication module installed on the mobile device and the AT command adaptation rules for that module. The AT command adaptation rules are a set of agreed-upon standards and specifications. Only AT commands that conform to these specifications can be accurately identified, interpreted, and executed by the mobile device's communication module.

[0057] In this embodiment, the AT (Attention) command is the command used by the mobile device's communication module to perform a network switching operation. Different mobile devices have different communication module models and specifications, and their supported AT command formats and AT command adaptation rules also differ. That is, different communication modules correspond to different AT command templates. Therefore, the AT command template must be matched according to the communication module corresponding to the mobile device. If an incompatible AT command template is used, the communication module will not be able to recognize and execute the switching command sent by the cloud server, resulting in network switching failure.

[0058] Step 1045: Instantiate the AT command template into a second switching command based on the access parameters and AT command adaptation rules.

[0059] In this embodiment, the matched AT command template is only a standardized command framework and does not contain specific network access information. It cannot be directly used for network switching operations. The access parameters are the specific configurations of the mobile device accessing the target network. The AT command adaptation rules are the specific requirements for the communication module to identify AT commands. The access parameters are filled into the AT command template and adjusted according to the AT command adaptation rules to convert the AT command template into an executable second switching command. The second switching command is the command sent by the cloud server to the mobile device. The accuracy of the second switching command directly affects whether the mobile device can successfully complete the network switching.

[0060] Step 1046: Send the second switching instruction to the mobile device indicated by the identity identifier.

[0061] In this embodiment, after the cloud server determines the optimal target network and generates an executable second switching instruction, it needs to accurately send the second switching instruction to the corresponding mobile device in order to trigger the network switching operation of the mobile device. Therefore, the cloud server sends the second switching instruction to the mobile device corresponding to the identity identifier.

[0062] In another embodiment of the present invention, if the network strength value of the first network is greater than the network strength value of each second network, it indicates that the currently connected first network is the optimal network. At this time, there is no need to replace the originally connected network. Therefore, the cloud server will generate a network no-switching instruction and send the network no-switching instruction to the mobile device pointed to by the identity identifier. After receiving the network no-switching instruction, the mobile device executes the network no-switching instruction to maintain the currently connected first network.

[0063] Step 105: After receiving the second switching instruction, the mobile device replaces the first network according to the second switching instruction to complete the network switching.

[0064] In this embodiment, after receiving the second switching command, the mobile device replaces the first network, which is no longer sufficient for internet access, with a second network determined by the cloud server to be superior. This ensures that the mobile device can continuously access a network that meets the requirements, achieving automatic network connection switching and avoiding network interruptions and lag caused by insufficient signal from the first network. This guarantees the continuity of network usage for the mobile device, and the entire network replacement process can be completed without manual user intervention, reducing user operating costs and improving the user experience. At the same time, by executing the second switching command to accurately replace the first network, normal network usage can be quickly restored, preventing network interruptions from affecting various network-related functions of the mobile device (such as data transmission and application usage), ensuring the stability and reliability of network services, and fully leveraging the automatic network connection optimization function of the network switching system.

[0065] For example, mobile devices incorporate a BaseLib (base library) layer. Designed as middleware, the BaseLib layer encapsulates the AT command parsing and execution logic for different communication modules. It uses an abstract interface definition to enable unified command invocation between communication modules, while also reserving adaptation interfaces to facilitate support for new communication modules. After the mobile device receives a second command, the BaseLib layer parses it into data executable by the mobile device driver. The mobile device driver then executes this data to replace the first network, completing the network switch.

[0066] In one embodiment of the present invention, step 105 may include the following steps: Step 1051: Parse the second handover command to extract the access parameters of the target network and the release command of the original network.

[0067] In this embodiment, the second switching instruction is a standardized control instruction generated by the cloud server based on the target network configuration and communication module rules. It encapsulates complex network connection parameters and operational logic. If the original second switching instruction is directly input into the communication module driver, the driver cannot directly recognize its business meaning or distinguish which data is the access parameter for connecting to the new network and which is the original network release instruction for disconnecting from the old network. Therefore, after receiving the second switching instruction, the mobile device performs a parsing operation, breaking it down into structured, independent data blocks understandable to the communication module driver. This yields the target network access parameters and the original network release instruction. The access parameters are used to search for the target network; the original network release instruction is used to disconnect the network currently connected to the mobile device.

[0068] Step 1052: Convert the access parameters of the target network and the release command of the original network into parsed data that is compatible with the input format of the communication module driver of the mobile device.

[0069] In this embodiment, the second handover instruction generated by the cloud server has a data structure and encoding format designed based on the cloud server's specifications, while the mobile device's communication module driver has its own fixed input format, data type requirements, and interaction protocol. There are significant format differences between the two. If the original parsed data (i.e., the target network's access parameters and the original network's release instruction) is directly input into the driver, the driver will not be able to recognize it, leading to the second handover instruction failing to execute or even system abnormalities. Therefore, the extracted access parameters and the original network release instruction are recombined and converted according to the input format specified by the driver (such as data bit order, data type, encapsulation protocol, etc.) to make it parsable data that the communication module driver can receive and process.

[0070] This effectively eliminates the format barrier between the instructions sent by the cloud server and the communication module driver of the mobile device, ensuring that the second switching instruction can be correctly received and processed by the communication module driver, and greatly improving the stability and compatibility of the entire network switching process.

[0071] Step 1053: Input the parsed data into the communication module driver program to replace the first network with the target network through the access parameters of the target network and the release command of the original network.

[0072] In this embodiment, the communication module driver is the interface that controls the operation of the communication module hardware. Physical operations such as connecting and disconnecting the network need to be triggered by inputting formatted parsed data into the communication module driver. After the parsed data is input into the communication module driver, the communication module driver executes the parsed data. According to the instruction logic, it first calls hardware resources to execute the original network release instruction to disconnect the previously connected first network, and then uses access parameters to search for and connect to the target network, thereby completing the entire network replacement process.

[0073] In one embodiment of the present invention, if the mobile device receives a first switching instruction manually triggered by the user, it uploads the network signal and identity of the second network indicated by the first switching instruction to the cloud server. Receiving the first switching instruction manually triggered by the user indicates that the current network switching was manually triggered by the user, who manually clicks on any of the second networks displayed on the mobile device's interface. The mobile device then captures this event and converts it into a specific network switching request (i.e., the first switching instruction).

[0074] After receiving the network signal and identity identifier of the second network indicated by the first handover instruction, the cloud server sends a third handover instruction to the mobile device indicated by the identity identifier. Specifically, after receiving the network signal and identity identifier of the second network indicated by the first handover instruction, the cloud server extracts the operator identifier of the second network; queries the access parameters of the second network based on the operator identifier; the access parameters include the mobile country code, mobile network code, and access point name; matches the corresponding AT command template according to the communication module of the mobile device; instantiates the AT command template into a third handover instruction according to the access parameters and AT command adaptation rules; and sends the third handover instruction to the mobile device indicated by the identity identifier.

[0075] After receiving the third handover instruction, the mobile device replaces the first network according to the instruction to complete the network switch. Specifically, after receiving the third handover instruction, the mobile device parses it to extract the access parameters of the second network and the original network release instruction indicated by the first handover instruction. The access parameters are used to search for the second network; the original network release instruction is used to disconnect the network currently connected to the mobile device. The access parameters and the original network release instruction are converted into parsed data adapted to the input format of the mobile device's communication module driver. The parsed data is input to the communication module driver to replace the first network with the second network manually triggered by the user, based on the access parameters of the second network and the original network release instruction.

[0076] In another embodiment of the invention, the mobile device is equipped with a display interface; the display interface is used to display network parameters of the network currently connected to the mobile device; the network parameters include signal strength, network latency, download speed, and network type. Figure 2 The image shows a schematic diagram of the mobile device's interface, which is divided into a manual switching function module, a network status display function module, and an automatic switching setting function module.

[0077] The network status display module shows the currently connected carrier icon (i.e., the carrier icon of the network the mobile device is currently connected to), the network parameters of the network the mobile device is currently connected to, the network status display area (i.e., the network subscribed to by the mobile device's SIM card), and the APP (application) version information. The network status display module uses visual elements such as charts, progress bars, or color coding to provide users with a clear understanding of the network's health and performance, offering an intuitive basis for manual switching.

[0078] The automatic switching setting function module is used to automatically execute the network switching procedure (i.e., execute steps 101 to 105 in this embodiment).

[0079] The manual switching module allows users to switch networks manually (i.e., the mobile device receives the first switching command manually triggered by the user). Operators A, B, and C are all networks contracted to by the mobile device's SIM card. The core value of this manual switching module lies in giving users greater freedom of network control. When the automatic network selection mechanism may not perform optimally in certain situations (such as local network congestion or temporary poor signal), users can actively choose the operator's network with the strongest signal or most stable service based on the network conditions of their location. This not only improves the reliability and speed of data transmission but also ensures network connection stability during critical moments, such as video conferencing, live streaming, or emergency communications, allowing users to autonomously choose the optimal network path and avoid connection interruptions.

[0080] The network currently connected to a mobile device can be divided into two scenarios: one is that the mobile device has not switched networks, in which case the network currently connected to the mobile device is the first network that the mobile device initially connected to; the other is that the mobile device has switched networks, and the first network that the mobile device initially connected to has been replaced by the second network, in which case the network currently connected to the mobile device is the second network that has been replaced.

[0081] For example, when a mobile device detects a change in network parameters, it updates the display interface via messages to columns and / or broadcasts.

[0082] In this embodiment of the invention, the mobile device collects network signals from various networks, as well as its identity identifier and geographical location. The networks include a first network to which the mobile device is connected and a second network to which it is not connected. When the mobile device detects that the network signal of the first network is less than a preset internet access threshold and has not received a first handover command manually triggered by the user, it uploads the network signals, identity identifier, and geographical location of each network to a cloud server. After receiving the network signals, identity identifier, and geographical location of each network, the cloud server calculates the network strength value of each network based on these data. When the network strength value of the first network is less than that of the second network, the cloud server sends a second handover command to the mobile device pointed to by the identity identifier. Upon receiving the second handover command, the mobile device replaces the first network according to the command to complete the network handover. This embodiment uploads relevant data to the cloud server when the mobile device detects that the first network signal is below a preset internet access threshold and has not received a first switching command. This avoids invalid data uploads when the network signal is normal, reduces the mobile device's power consumption and network bandwidth usage, and ensures that the switching process is initiated under both conditions, balancing the necessity and automation of the switching. The cloud server calculates network strength values ​​for each network, which can objectively and comprehensively assess the quality of each network, avoiding the bias caused by relying solely on the mobile device's local perception, and ensuring the scientific nature of the switching decision. Finally, when the network strength value of the first network is lower than that of the second network, the cloud server sends a switching command to the corresponding mobile device. After receiving the command, the mobile device completes the network replacement, realizing full automation from network quality assessment to switching execution without manual user intervention. This reduces the user's operational burden and can promptly switch to a better network, avoiding problems such as network lag and data transmission interruption caused by insufficient network signal, ensuring the stability and continuity of the mobile device's network connection, and thus improving the user's network experience.

[0083] Example 2 Figure 3 This is a schematic diagram of the structure of a network switching device provided in Embodiment 2 of the present invention, as shown below. Figure 3 As shown, an application is made in a network switching system, which includes mobile devices and a cloud server. The device includes: A network data acquisition module 301, located on the mobile device, is used to acquire network signals from various networks, as well as the identity and geographical location of the mobile device; the networks include a first network that the mobile device has connected to and a second network that the mobile device has not connected to. The network data upload module 302, located on the mobile device, is used to upload the network signals of each network, the identity identifier, and the geographical location to the cloud server when the network signal of the first network is detected to be less than the preset internet access threshold and no first switching instruction manually triggered by the user is received. The network strength calculation module 303, located on the cloud server, is used to receive the network signals of each network, the identity identifier and the geographical location, and then calculate the network strength value of each network based on the network signals and the geographical location of each network. The second switching instruction sending module 304, located on the cloud server, is used to send a second switching instruction to the mobile device pointed to by the identity identifier when the network strength value of the first network is less than the network strength value of the second network. The second switching instruction execution module 305, located in the mobile device, is used to replace the first network according to the second switching instruction after receiving the second switching instruction, so as to complete the network switching.

[0084] In one embodiment of the present invention, the network signal includes signal strength, network latency, and download speed; the network strength numerical calculation module 303 includes: The historical average data query module is used to query the historical average data of various aspects of the network signal based on the geographical location. A network signal correction module is used to correct the network signal of each network based on the historical average data. The signal weight calculation module is used to calculate the signal weight for each network by multiplying the signal strength and the first weight if the correction is completed. The delay weight calculation module is used to obtain the delay weight by taking the inverse of the product between the network delay and the second weight for each network if the correction is completed. The download weight calculation module is used to calculate the download weight for each network by multiplying the download speed by the third weight if the correction is completed; the first weight is greater than the second weight; the second weight is greater than the third weight; The network strength value integration module is used to calculate the sum of the signal weight, the delay weight, and the download weight for each network to obtain the network strength value.

[0085] In one embodiment of the present invention, the historical average data includes historical average signal strength, historical average network latency, and historical average download speed; the network signal correction module includes: The signal strength correction module is used to add the product of the signal strength and the first correction weight and the product of the historical average signal strength and the second correction weight for each network to obtain the corrected signal strength. The network latency correction module is used to add the product of the network latency and the first correction weight, and the product of the historical average network latency and the second correction weight for each network, to obtain the corrected network latency. The download speed correction module is used to obtain the corrected download speed for each network by multiplying the download speed by the first correction weight and the historical average download speed by the second correction weight; the first correction weight is greater than the second correction weight.

[0086] In one embodiment of the present invention, the cloud server stores device profile information of the mobile device corresponding to the identity identifier; the device profile information includes the communication module mounted on the mobile device and the AT command adaptation rules of the communication module; the second switching command sending module 304 includes: The target network determination module is used to determine the second network with the highest network strength value as the target network if the network strength value of the first network is less than that of the second network. The operator identifier extraction module is used to extract the operator identifier corresponding to the target network; The access parameter query module is used to query the access parameters of the target network based on the operator identifier; the access parameters include the mobile country code, mobile network code, and access point name; An AT command template matching module is used to match the corresponding AT command template based on the communication module. The second handover instruction generation module is used to instantiate the AT instruction template into a second handover instruction based on the access parameters and the AT instruction adaptation rules. The second switching instruction transmission module is used to send the second switching instruction to the mobile device indicated by the identity identifier.

[0087] In one embodiment of the present invention, the second switching instruction execution module 305 includes: The second handover instruction parsing module is used to parse the second handover instruction to extract the access parameters of the target network and the original network release instruction; the access parameters are used to search for the target network; the original network release instruction is used to disconnect the network currently connected to the mobile device. The parsing data generation module is used to convert the access parameters of the target network and the release command of the original network into parsing data that is compatible with the input format of the communication module driver of the mobile device; The network replacement module is used to input the parsed data to the communication module driver program so as to replace the first network with the target network through the access parameters of the target network and the original network release command.

[0088] In one embodiment of the present invention, the device further includes: The first switching instruction receiving module, located on the mobile device, is used to upload the network signal of the second network indicated by the first switching instruction and the identity identifier to the cloud server when a first switching instruction manually triggered by the user is received. The third switching instruction sending module, located on the cloud server, is used to send a third switching instruction to the mobile device pointed to by the identity identifier after receiving the network signal of the second network indicated by the first switching instruction and the identity identifier. The third handover instruction execution module, located in the mobile device, is used to replace the first network according to the third handover instruction after receiving the third handover instruction, so as to complete the network handover.

[0089] In one embodiment of the present invention, the mobile device is equipped with a display interface; the display interface is used to display the network parameters of the network currently connected to the mobile device; the network parameters include signal strength, network latency, download speed and network type.

[0090] In one embodiment of the present invention, the device further includes: A parameter update module, located on the mobile device, is used to update the display interface by means of message queues and / or broadcasts when a change in the network parameters is detected.

[0091] The network switching device provided in this embodiment of the invention can execute the network switching method provided in any embodiment of the invention, and has the corresponding functional modules and beneficial effects for executing the network switching method.

[0092] Example 3 See Figure 4This diagram illustrates a structural schematic of a computer device according to an embodiment of the present invention. The term "computer device" is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, blade servers, mainframe computers, and other suitable computers. The computer device can also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices (e.g., helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the invention described and / or claimed herein.

[0093] like Figure 4 As shown, the computer device 10 includes at least one processor 11 and a memory, such as a read-only memory (ROM) 12 or a random access memory (RAM) 13, communicatively connected to the at least one processor 11. The memory stores computer programs executable by the at least one processor. The processor 11 can perform various appropriate actions and processes based on the computer programs stored in the ROM 12 or loaded from storage unit 18 into the RAM 13. The RAM 13 may also store various programs and data required for the operation of the computer device 10. The processor 11, ROM 12, and RAM 13 are interconnected via a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.

[0094] Multiple components in computer device 10 are connected to I / O interface 15, including: input unit 16, such as keyboard, mouse, etc.; output unit 17, such as various types of monitors, speakers, etc.; storage unit 18, such as disk, optical disk, etc.; and communication unit 19, such as network card, modem, wireless transceiver, etc. Communication unit 19 allows computer device 10 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.

[0095] Processor 11 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. Processor 11 performs the various methods and processes described above, such as network switching methods.

[0096] In some embodiments, the network switching method may be implemented as a computer program tangibly contained in a computer-readable storage medium, such as storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or installed on the computer device 10 via ROM 12 and / or communication unit 19. When the computer program is loaded into RAM 13 and executed by processor 11, one or more steps of the network switching method described above may be performed. Alternatively, in other embodiments, processor 11 may be configured to perform the network switching method by any other suitable means (e.g., by means of firmware).

[0097] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-a-chip (SoCs), payload-programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.

[0098] Computer programs used to implement the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when executed by the processor, the computer programs cause the functions / operations specified in the flowcharts and / or block diagrams to be performed. The computer programs may be executed entirely on a machine, partially on a machine, or as a standalone software package, partially on a machine and partially on a remote machine, or entirely on a remote machine or server.

[0099] In the context of this invention, a computer-readable storage medium can be a tangible medium that may contain or store a computer program for use by or in conjunction with an instruction execution system, apparatus, or device. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination thereof. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.

[0100] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer device having: a display device for displaying information to the user (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor); and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the computer device. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).

[0101] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as data servers), or middleware components (e.g., application servers), or frontend components (e.g., user computers with graphical user interfaces or web browsers through which users can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., communication networks). Examples of communication networks include local area networks (LANs), wide area networks (WANs), blockchain networks, and the Internet.

[0102] A computing system can include clients and servers. Clients and servers are generally located far apart and typically interact through communication networks. The client-server relationship is created by computer programs running on the respective computers and having a client-server relationship with each other. The server can be a cloud server, also known as a cloud computing server or cloud host, which is a hosting product within the cloud computing service system to address the shortcomings of traditional physical hosts and VPS services, such as high management difficulty and weak business scalability.

[0103] Example 4 This invention also provides a computer program product, which includes a computer program that, when executed by a processor, implements the network switching method provided in any embodiment of this invention.

[0104] In implementing the computer program product, computer program code for performing the operations of this invention can be written in one or more programming languages ​​or a combination thereof. Programming languages ​​include object-oriented programming languages ​​such as Java, Smalltalk, and C++, as well as conventional procedural programming languages ​​such as C or similar languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0105] It should be understood that the various forms of processes shown above can be used, with steps reordered, added, or deleted. For example, the steps described in this invention can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution of this invention can be achieved, and this is not limited herein.

[0106] The specific embodiments described above do not constitute a limitation on the scope of protection of this invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this invention should be included within the scope of protection of this invention.

Claims

1. A network handover method, characterized in that, Applied to a network switching system, the network switching system including mobile devices and cloud servers, the method includes: The mobile device collects network signals from various networks, as well as its identity and geographical location; the networks include a first network to which the mobile device is connected and a second network to which the mobile device is not connected. When the mobile device detects that the network signal of the first network is less than the preset internet access threshold and has not received a first switching command manually triggered by the user, it uploads the network signals of each network, the identity identifier, and the geographical location to the cloud server. After receiving the network signals, identity identifiers and geographical locations of each network, the cloud server calculates the network strength values ​​of each network based on the network signals and geographical locations of each network. When the network strength value of the first network is less than the network strength value of the second network, the cloud server sends a second switching instruction to the mobile device pointed to by the identity identifier; After receiving the second switching instruction, the mobile device replaces the first network according to the second switching instruction to complete the network switching.

2. The method according to claim 1, characterized in that, The network signal includes signal strength, network latency, and download speed; calculating the network strength value of each network based on the network signal of each network and the geographical location includes: Based on the geographical location, query the historical average data of each aspect of the network signal; The network signals of each network are corrected based on the historical average data. If the correction is completed, the signal weight is obtained by multiplying the signal strength and the first weight for each network. If the correction is completed, for each network, the product of the network delay and the second weight is taken as the inverse to obtain the delay weight. If the correction is completed, for each network, the download weight is calculated by multiplying the download speed by the third weight; the first weight is greater than the second weight; the second weight is greater than the third weight. For each network, the sum of the signal weight, the delay weight, and the download weight is calculated to obtain the network strength value.

3. The method according to claim 2, characterized in that, The historical average data includes historical average signal strength, historical average network latency, and historical average download speed; the process of correcting the network signal of each network based on the historical average data includes: For each network, the product of the signal strength and the first correction weight, and the product of the historical average signal strength and the second correction weight are added together to obtain the corrected signal strength; For each network, the product of the network latency and the first correction weight, and the product of the historical average network latency and the second correction weight are added together to obtain the corrected network latency; For each network, the corrected download speed is obtained by multiplying the download speed by the first correction weight and the historical average download speed by the second correction weight; the first correction weight is greater than the second correction weight.

4. The method according to claim 1, characterized in that, The cloud server stores device profile information of the mobile device corresponding to the identity identifier; the device profile information includes the communication module carried by the mobile device and the AT command adaptation rules of the communication module; sending the second switching command to the mobile device pointed to by the identity identifier includes: If the network strength value of the first network is less than the network strength value of the second network, then the second network with the highest network strength value is determined as the target network; Extract the operator identifier corresponding to the target network; The access parameters of the target network are queried based on the operator identifier; the access parameters include the mobile country code, mobile network code, and access point name. Match the corresponding AT command template according to the communication module; The AT command template is instantiated into a second handover command based on the access parameters and the AT command adaptation rules. The second switching instruction is sent to the mobile device indicated by the identity identifier.

5. The method according to claim 4, characterized in that, The replacement of the first network according to the second switching instruction includes: The second switching instruction is parsed to extract the access parameters of the target network and the original network release instruction; the access parameters are used to search for the target network; the original network release instruction is used to disconnect the network currently connected to the mobile device. The access parameters of the target network and the release command of the original network are converted into parsed data that is compatible with the input format of the communication module driver of the mobile device; The parsed data is input to the communication module driver program to replace the first network with the target network using the access parameters of the target network and the original network release command.

6. The method according to claim 1, characterized in that, Also includes: If the mobile device receives a first switching command manually triggered by the user, it uploads the network signal of the second network indicated by the first switching command and the identity identifier to the cloud server. After receiving the network signal of the second network indicated by the first switching instruction and the identity identifier, the cloud server sends a third switching instruction to the mobile device indicated by the identity identifier; After receiving the third switching instruction, the mobile device replaces the first network according to the third switching instruction to complete the network switching.

7. The method according to any one of claims 1-6, characterized in that, The mobile device is equipped with a display interface; the display interface is used to display the network parameters of the network currently connected to the mobile device; the network parameters include signal strength, network latency, download speed and network type.

8. The method according to claim 7, characterized in that, Also includes: When the mobile device detects a change in the network parameters, it updates the display interface through message queues and / or broadcasts.

9. A computer device, characterized in that, The computer device includes: One or more processors; Storage device for storing one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the network switching method as described in any one of claims 1-8.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the network switching method as described in any one of claims 1-8.