Network connection method and device, equipment and storage medium
By conducting network search and filtering on the terminal, filtering out the target network that can be connected normally and adding it to the alternate network list, the problem that the terminal may be rejected during network switching is solved, and the success rate of network connections and the continuity and stability of network services are improved.
Patent Information
- Application Number
- CN202510020967.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-06
- Publication Date
- 2025-04-18
AI Technical Summary
The terminal may be denied during network switching, resulting in network connection failure and affecting the continuity and stability of network services.
By implementing network search and filtering functions on the terminal, search for candidate networks based on the network frequency bands supported by the terminal, filter out the target network that can be connected normally, and add it to the alternate network list, so as to switch directly to the target network if needed.
It improves the success rate of network connections, ensures the continuity and stability of network services, and avoids connection failure during network switching.
Smart Images

Figure CN119854896A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of communication technology, and in particular to a network connection method, device, equipment and storage medium. Background Art
[0002] The terminal can use the network services provided by the network by establishing a network connection between the terminal and the network. However, the signal coverage of a single network is limited. When the geographical location of the terminal changes, in order to maintain the continuity and stability of the network service, the terminal usually needs to switch networks among multiple networks.
[0003] During the implementation, it was found that since the terminal cannot sign contracts with the institutions corresponding to all networks, when the terminal switches the currently connected network to another network, the other network may refuse to establish a network connection with the terminal, and the terminal will experience network disconnection. This will result in a low success rate of network connection and affect the continuity and stability of network services. Summary of the invention
[0004] The embodiments of the present application provide a network connection method, apparatus, device, and storage medium, which can improve the success rate of network connection and improve the continuity and stability of network services.
[0005] An embodiment of the present application provides a network connection method, including:
[0006] When the use state of the first network currently connected to the terminal is an idle state, and the connection state between the terminal and the first network is a normal state, a network search is performed according to the network frequency band supported by the terminal to obtain network parameters corresponding to N candidate networks respectively; N is a positive integer;
[0007] Establishing network connections respectively corresponding to the N candidate networks between the terminal and the N candidate networks respectively according to the network parameters respectively corresponding to the N candidate networks;
[0008] According to the connection states of the network connections respectively corresponding to the terminal and the N candidate networks, selecting a target network whose connection state of the network connection is in a normal state from the N candidate networks;
[0009] The network parameters corresponding to the target network are added to a backup network list; the backup network list is used to provide network services to the terminal through the target network when the connection state of the network connection between the terminal and the first network is abnormal.
[0010] An embodiment of the present application provides a network connection device, including:
[0011] A search module, configured to, when the use state of the first network currently connected to the terminal is an idle state and the connection state between the terminal and the first network is a normal state, perform a network search according to the network frequency band supported by the terminal to obtain network parameters corresponding to N candidate networks respectively; N is a positive integer;
[0012] A network connection module, used to establish network connections respectively corresponding to the terminal and the N candidate networks according to the network parameters respectively corresponding to the N candidate networks;
[0013] A screening module, configured to screen a target network whose network connection status is normal from the N candidate networks according to the connection status of the network connections respectively corresponding to the terminal and the N candidate networks;
[0014] The processing module is used to add the network parameters corresponding to the above-mentioned target network to the backup network list; the above-mentioned backup network list is used to provide network services for the above-mentioned terminal through the above-mentioned target network when the connection state of the network connection between the above-mentioned terminal and the above-mentioned first network is an abnormal state.
[0015] On one hand, an embodiment of the present application provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the above method when executing the computer program.
[0016] On one hand, an embodiment of the present application provides a computer storage medium, wherein the computer storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the above method are executed.
[0017] In this application, before the terminal needs to switch networks, a network search is performed according to the network frequency bands supported by the terminal to screen out the target network that can establish a normal network connection with the terminal, and the network parameters corresponding to the target network are added to the backup network list. When the terminal needs to switch networks, the terminal's network can be directly switched to the target network according to the backup network list, which can avoid the terminal being rejected during network switching, resulting in network connection failure, improve the success rate of network connection, and improve the continuity and stability of network services. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the background technology, the drawings required for use in the embodiments of the present application or the background technology will be described below.
[0019] Figure 1 It is a flowchart of a network connection method provided by the present application;
[0020] Figure 2It is a flowchart of another network connection method provided by the present application;
[0021] Figure 3 It is a flowchart of another network connection method provided by the present application;
[0022] Figure 4 It is a structural schematic diagram of a network connection device provided by the present application;
[0023] Figure 5 It is a structural schematic diagram of a computer device provided by this application. DETAILED DESCRIPTION
[0024] The embodiments of the present application are described below in conjunction with the drawings in the embodiments of the present application.
[0025] The terms "first" and "second" in the specification, claims and drawings of this application are only used to distinguish different objects, rather than to describe a specific order. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units that are not listed, or may optionally include other steps or units that are inherent to these processes, methods, products or devices.
[0026] The "embodiment" mentioned in this application means that the specific features, structures or characteristics described in conjunction with the embodiment may be included in at least one embodiment of the present application. The appearance of this phrase in various places in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It can be explicitly and implicitly understood by those skilled in the art that the embodiments described herein can be combined with other embodiments.
[0027] It should be understood that in the present application, "at least one (item)" means one or more, "more than one" means two or more, "at least two (items)" means two or three and more than three, and "and / or" is used to describe the association relationship of associated objects, indicating that three relationships may exist. For example, "A and / or B" can mean: only A exists, only B exists, and A and B exist at the same time, where A and B can be singular or plural. The character " / " generally indicates that the previous and next associated objects are in an "or" relationship. "At least one of the following items" or similar expressions refers to any combination of these items, including any combination of single items or plural items. For example, at least one of a, b or c can mean: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, c can be single or multiple.
[0028] It should be understood that, although the various steps in the flowchart in the embodiment of the present application are displayed in sequence according to the indication of the arrows, these steps are not necessarily performed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and it can be performed in other orders. Moreover, at least a portion of the steps in the figure may include a plurality of sub-steps or a plurality of stages, and these sub-steps or stages are not necessarily performed at the same time, but can be performed at different times, and their execution order is not necessarily performed in sequence, but can be performed in turn or alternately with other steps or at least a portion of the sub-steps or stages of other steps.
[0029] First, see Figure 1 , Figure 1 This is a flowchart of a network connection method provided by this application. Figure 1 As shown, the method can be executed by a terminal, and the method may include but is not limited to the following steps:
[0030] S101. When the use state of a first network to which a terminal is currently connected is an idle state and the connection state between the terminal and the first network is a normal state, a network search is performed according to a network frequency band supported by the terminal to obtain network parameters corresponding to N candidate networks.
[0031] It should be noted that the terminal may refer to any device such as a smart phone, a computer, a smart watch, etc. The first network may refer to the network to which the terminal is currently connected, and the first network may refer to any network such as a mobile data network, a wireless network, a satellite network, etc. The use state of the first network may include an idle state or a non-idle state, and the idle state means that the terminal is not currently using the first network for network communication, and the non-idle state means that the terminal is currently using the first network for network communication. Among them, network communication may refer to uploading data, downloading data, browsing web pages, etc.
[0032] It should be noted that the connection status between the terminal and the first network may include a normal state and an abnormal state. The normal state means that the stability of the first network is greater than or equal to the stability threshold, and the abnormal state means that the stability of the first network is less than the stability threshold. When the connection status between the terminal and the first network is a normal state, the terminal can use the network services provided by the first network, that is, use the first network for network communication; when the connection status between the terminal and the first network is an abnormal state, the terminal cannot use the network services provided by the first network, that is, cannot use the first network for network communication. Among them, the stability of the first network can be determined based on one or more of the network signal strength, packet loss rate, transmission delay, etc. of the first network.
[0033] In one embodiment, a first signal strength threshold may be set in the terminal, and the terminal may obtain the network signal strength of the first network. When the network signal strength of the first network is greater than or equal to the first signal strength threshold, the connection state between the terminal and the first network is a normal state. When the network signal strength of the first network is less than the first signal strength threshold, the connection state between the terminal and the first network is an abnormal state. The first signal strength threshold may be a default value in the terminal, or the first signal strength threshold may be manually set.
[0034] In one embodiment, a first signal strength threshold and a packet loss rate threshold may be set in the terminal, and the terminal may obtain the network signal strength and packet loss rate of the first network. When the network signal strength of the first network is greater than or equal to the first signal strength threshold, and the packet loss rate of the first network is less than or equal to the packet loss rate threshold, the connection state between the terminal and the first network is a normal state. When the network signal strength of the first network is less than the first signal strength threshold, and the packet loss rate of the first network is greater than the packet loss rate threshold, the connection state between the terminal and the first network is an abnormal state. The packet loss rate threshold may be a default value in the terminal, or the packet loss rate threshold may also be manually set.
[0035] It should be noted that a network frequency band may refer to a specific frequency range used for network communication through a network; a network frequency band supported by a terminal may refer to a specific frequency range in which a terminal can perform network communication through a network; wherein the number of network frequency bands supported by a terminal may be one or more. For example, the network frequency bands supported by a terminal include 2100 MHz (megahertz), 1900 MHz, 1800 MHz, 850 MHz, etc.
[0036] It should be noted that the network parameters of the candidate network may include a mobile area code, a mobile network code, a location area code, a wireless access technology, etc. Among them, the mobile area code may be used to identify the region where the candidate network is located; the mobile network code may be used to identify the network operator where the candidate network is located; the location area code may be used to identify the region where the candidate network is located; and the wireless access technology may be used to identify the type of wireless technology used by the candidate network.
[0037] In this application, when the terminal needs to use the network, the terminal can establish a network connection with the first network, and provide network services to the terminal through the first network. At this time, when the use state of the first network currently connected to the terminal is idle, and the connection state between the terminal and the first network is normal, the terminal can obtain the supported network frequency band, scan the supported network frequency band, search for available candidate networks, and obtain the network parameters corresponding to N candidate networks. Use the idle time when the terminal is not using the first network to perform network search to avoid disturbing the normal use of the terminal.
[0038] S102: Establishing network connections respectively corresponding to the terminal and the N candidate networks according to network parameters respectively corresponding to the N candidate networks.
[0039] In the present application, the terminal may generate a registration request corresponding to the i-th candidate network according to the network parameters of the i-th candidate network; the registration request corresponding to the i-th candidate network carries the registration request of the network parameters of the i-th candidate network; the terminal may send the registration request corresponding to the i-th candidate network to the network device corresponding to the i-th candidate network. After receiving the registration request, the network device corresponding to the i-th candidate network establishes a network connection between the terminal and the i-th candidate network.
[0040] It should be noted that the network devices corresponding to the candidate network may refer to devices such as base stations, servers, and routers.
[0041] S103: Filter a target network whose network connection status is normal from the N candidate networks according to the connection status of the network connections respectively corresponding to the terminal and the N candidate networks.
[0042] It should be noted that the connection status of the network connection corresponding to each of the terminal and the N candidate networks may include a normal state and an abnormal state. The connection status of the network connection between the terminal and a candidate network is a normal state, which may mean that the stability of a candidate network is greater than or equal to a stability threshold; the connection status of the network connection between the terminal and a candidate network is an abnormal state, which may mean that the stability of a candidate network is less than a stability threshold. Among them, the stability of the candidate network may be determined based on one or more of the network signal strength, packet loss rate, transmission delay, etc. of the candidate network.
[0043] It should be noted that when the connection status of the network connection between the terminal and a candidate network is normal, the terminal can use the network services provided by the candidate network, that is, use the candidate network for network communication; when the connection status of the network connection between the terminal and a candidate network is abnormal, the terminal cannot use the network services provided by the candidate network, that is, cannot use the candidate network for network communication.
[0044] In the present application, after the terminal establishes network connections with N candidate networks respectively, the terminal can determine the connection status of the network connections corresponding to the N candidate networks respectively, and select a candidate network with a normal connection status from the N candidate networks, which is the target network.
[0045] In one embodiment, a first signal strength threshold may be set in the terminal, and the terminal may obtain the network signal strength of the i-th candidate network. When the network signal strength of the i-th candidate network is greater than or equal to the first signal strength threshold, the connection state of the network connection between the terminal and the i-th candidate network is a normal state. When the network signal strength of the i-th candidate network is less than the first signal strength threshold, the connection state of the terminal and the i-th candidate network is an abnormal state. Based on the above steps, the terminal can determine the connection state of the network connection corresponding to each of the N candidate networks.
[0046] S104: Add the network parameters corresponding to the target network to the backup network list.
[0047] In the present application, after the terminal can filter out the target network, it can obtain the network parameters corresponding to the target network and add the network parameters corresponding to the target network to the backup network list. The target network in the backup network list is a verified network that can establish a network connection with the terminal.
[0048] Furthermore, the terminal can continue to establish a network connection with the first network, that is, the first network provides network services for the terminal. When the connection state of the network connection between the terminal and the first network is abnormal, the terminal can obtain the network parameters corresponding to the target network from the backup network list; based on the network parameters corresponding to the target network, establish a network connection with the target network, and provide network services to the terminal through the target network. This can avoid the situation where the target network refuses the terminal to establish a network connection, reduce the probability and duration of the terminal's network disconnection during the network switching process, improve the success rate of the network connection, and thus improve the continuity and stability of the network service.
[0049] In this application, before the terminal needs to switch networks, a network search is performed according to the network frequency bands supported by the terminal to screen out the target network that can establish a normal network connection with the terminal, and the network parameters corresponding to the target network are added to the backup network list. When the terminal needs to switch networks, the terminal's network can be directly switched to the target network according to the backup network list, which can avoid the terminal being rejected during network switching, resulting in network connection failure, improve the success rate of network connection, and improve the continuity and stability of network services.
[0050] See also Figure 2 , Figure 2 FIG. 1 is a flow chart of another network connection method provided by the present application. Figure 2 As shown, the method can be executed by a terminal, and the method may include but is not limited to the following steps:
[0051] S201. When the use state of a first network to which the terminal is currently connected is an idle state and the connection state between the terminal and the first network is a normal state, a network search is performed according to a network frequency band supported by the terminal to obtain network parameters corresponding to N candidate networks.
[0052] In one embodiment, when the use state of the first network to which the terminal is currently connected is idle, and the connection state between the terminal and the first network is normal, the terminal can obtain the network signal strength of the first network. When the network signal strength of the first network is less than the second signal strength threshold and greater than the first signal strength threshold, the terminal can perform a network search based on the network frequency band supported by the terminal to obtain network parameters corresponding to N candidate networks; wherein the first signal strength threshold is less than the second signal strength threshold.
[0053] In the present application, a first signal strength threshold and a second signal strength threshold can be set in the terminal. Before the terminal performs a network search based on the network frequency band supported by the terminal, the terminal can obtain the network signal strength of the first network. When the network signal strength of the first network is less than the second signal strength threshold and greater than the first signal strength threshold, the terminal can perform a network search based on the network frequency band supported by the terminal to obtain network parameters corresponding to N candidate networks. In this way, the duration of the terminal's network search can be controlled, avoiding the terminal from performing a network search for a long time, increasing the power consumption of the terminal, and affecting the terminal's usage time.
[0054] It should be noted that the second signal strength threshold may be a default value in the terminal, or the second signal strength threshold may be a manually set value.
[0055] S202: Establishing network connections respectively corresponding to the terminal and the N candidate networks according to network parameters respectively corresponding to the N candidate networks.
[0056] In one embodiment, the terminal may generate a registration request corresponding to the i-th candidate network according to the network parameters corresponding to the i-th candidate network; i is a positive integer less than or equal to N. The terminal may send the registration request corresponding to the i-th candidate network to the network device corresponding to the i-th candidate network; the registration request corresponding to the i-th candidate network is used to instruct the network device corresponding to the i-th candidate network to establish a network connection between the terminal and the i-th candidate network.
[0057] S203: Filter a target network whose network connection status is normal from the N candidate networks according to the connection status of the network connections respectively corresponding to the terminal and the N candidate networks.
[0058] S204: Obtain connection priorities corresponding to the M target networks respectively.
[0059] In the present application, the connection priority can be used to reflect the stability of the target network; the greater the stability of the target network, the greater the connection priority corresponding to the target network; the smaller the stability provided by the target network, the smaller the connection priority corresponding to the target network. Therefore, after the terminal screens out the network parameters corresponding to the M target networks, it can obtain the connection priorities corresponding to the M target networks. In one embodiment, the terminal can determine the connection priorities corresponding to the M target networks according to the network signal strengths of the network connections corresponding to the terminal and the M target networks. The greater the network signal strength of the network connection between the terminal and a target network, the greater the connection priority corresponding to the target network; the smaller the network signal strength of the network connection between the terminal and a target network, the smaller the connection priority corresponding to the target network.
[0060] For example, the M target networks may include target network A1, target network A2, and target network A3. The network signal strength of target network A1 is -90dBm (milliwatt decibel), the network signal strength of target network A2 is -45dBm, and the network signal strength of target network A3 is -60dBm; based on this, the connection priority corresponding to target network A2 is greater than the connection priority corresponding to target network A3, and greater than the connection priority corresponding to target network A1, and the connection priority corresponding to target network A3 is greater than the connection priority corresponding to target network A1. Therefore, the connection priority corresponding to target network A1 can be 1, the connection priority corresponding to target network A2 can be 3, and the connection priority corresponding to target network A3 can be 2.
[0061] In one embodiment, the terminal may determine the connection priorities corresponding to the M target networks respectively according to the transaction relationships between the terminal and the institutions corresponding to the M target networks respectively.
[0062] It should be noted that the transaction relationship may include a contracted transaction relationship, a selected transaction relationship, etc.; the contracted transaction relationship includes a direct contracted relationship, an indirect contracted relationship, etc. A direct contracted relationship may refer to a contract signed between the terminal and the institution corresponding to the target network A4; an indirect contracted relationship may refer to a network service agreement between other institutions signed by the terminal and the institution corresponding to the target network A4.
[0063] For example, when the target network A4 is a mobile data network, the organization corresponding to the target network A4 may refer to the network operator B4; if the terminal has signed a network service contract with the network operator B4, the transaction relationship between the terminal and the organization B4 is a direct contract relationship; if the terminal has signed a network service contract with the network operator B2, and there is a network service agreement between the network operator B2 and the network operator B4, the network operator B4 can provide network services to the terminal, and the transaction relationship between the terminal and the network operator B4 is an indirect contract relationship.
[0064] It should be noted that the selected transaction relationship may be determined based on the number of times the network is used, or based on user configuration information. For example, a number threshold is set in the terminal, and when the number of times the terminal uses a target network is greater than or equal to the number threshold, the transaction relationship between the terminal and the institution corresponding to the target network may be determined to be a selected transaction relationship; wherein the number threshold may be a default value set in the terminal, or the number threshold may also be manually set.
[0065] For another example, the terminal is configured with user configuration information, which is used to indicate the network parameters corresponding to the preferred network of the object (i.e., the user) corresponding to the terminal. When the network parameters corresponding to a target network are consistent with the network parameters corresponding to the preferred network, it can be determined that the transaction relationship between the terminal and the institution corresponding to the target network is a selected transaction relationship.
[0066] In the present application, different connection priorities can be set in the terminal based on different transaction relationships. For example, the connection priority corresponding to the selected transaction relationship can be set to 3 in the terminal, and the connection priority corresponding to the signed transaction relationship can be set to 1. Therefore, the terminal can obtain the transaction relationship between the terminal and the institutions corresponding to the M target networks respectively, and determine the connection priorities corresponding to the M target networks respectively based on the transaction relationship between the institutions corresponding to the M target networks respectively.
[0067] In one embodiment, the terminal may determine the connection priorities corresponding to the M target networks respectively according to the transaction relationships between the institutions corresponding to the terminal and the M target networks respectively and the network signal strengths of the network connections corresponding to the terminal and the M target networks respectively.
[0068] In the present application, the terminal may first obtain the transaction relationship between the terminal and the institutions corresponding to the M target networks, and determine the initial connection priorities corresponding to the M target networks based on the transaction relationship between the institutions corresponding to the M target networks. Then, the terminal may obtain the network signal strength of the network connection corresponding to the terminal and the M target networks; based on the initial connection priorities and network signal strength corresponding to the M target networks, determine the connection priorities corresponding to the M target networks.
[0069] S205 . According to the connection priorities respectively corresponding to the M target networks, the network parameters respectively corresponding to the M target networks are added to the standby network list in sequence.
[0070] In the present application, the terminal can determine the order of arrangement of the M target networks in the backup network list based on the connection priorities corresponding to the M target networks. According to the order of arrangement of the M target networks in the backup network list, the network parameters corresponding to the M target networks are added to the backup network list in sequence. Among them, the network parameters corresponding to the target network with a higher connection priority are positioned higher in the backup network list, and the network parameters corresponding to the target network with a lower connection priority are positioned higher in the backup network list.
[0071] Optionally, before establishing the network connections respectively corresponding to the terminal and the N candidate networks according to the network parameters respectively corresponding to the N candidate networks, the terminal may disconnect the network connection between the terminal and the first network. After the terminal establishes network connections with the N candidate networks respectively, and when the connection status between the terminal and the first network is normal, the terminal may switch the network connection between the terminal and the candidate network back to the network connection between the terminal and the first network. While waiting for the connection status of the network connection between the terminal and the first network to be abnormal, the terminal may switch the network connection between the terminal and the first network to the network connection between the terminal and the target network according to the backup network list.
[0072] In the present application, the terminal may obtain the network parameters corresponding to the first network and disconnect the network connection between the terminal and the first network before establishing the network connections respectively corresponding to the N candidate networks according to the network parameters respectively corresponding to the N candidate networks. After the terminal establishes network connections with the N candidate networks respectively, the terminal may establish a network connection between the terminal and the first network based on the network parameters corresponding to the first network. When the connection status between the terminal and the first network is normal, the terminal may switch the network connection between the terminal and the candidate network back to the network connection between the terminal and the first network, and continue to provide network services to the terminal through the first network.
[0073] Furthermore, in the process of establishing a network connection between the terminal and the first network and the first network providing network services to the terminal, the terminal can detect the connection status of the network connection between the terminal and the first network in real time. When the connection status of the network connection between the terminal and the first network is abnormal, it indicates that the first network cannot provide network services to the terminal; the terminal can switch the network connection between the terminal and the first network to the network connection between the terminal and the target network based on the corresponding network parameters of the target network in the backup network list.
[0074] In one embodiment, the terminal can obtain network parameters corresponding to the target network from the backup network list; and establish network connections between the terminal and the target network according to the network parameters corresponding to the target network. The terminal can switch the network connection between the terminal and the first network to the network connection between the terminal and the target network.
[0075] In one embodiment, the number of target networks in the above-mentioned backup network list is M, where M is a positive integer; one target network corresponds to one connection priority. At this time, the terminal can obtain the network parameters corresponding to the target network at the front of the arrangement order from the M target networks in the above-mentioned backup network list. The terminal can also establish a network connection between the above-mentioned terminal and the target network at the front of the arrangement order based on the network parameters corresponding to the target network at the front of the arrangement order. Switch the network connection between the above-mentioned terminal and the first network to the network connection between the above-mentioned terminal and the target network at the front of the arrangement order. Among them, the connection priority corresponding to the target network at the front of the arrangement order is greater than the connection priority corresponding to the remaining target networks, and the remaining target networks are the target networks other than the target network at the front of the arrangement order among the above-mentioned M target networks.
[0076] It should be noted that the target network at the front of the list may refer to the target network corresponding to the maximum connection priority in the backup network list. For example, the backup network list includes target network A5, target network A6 and target network A7; the connection priority corresponding to target network A5 is 3, the connection priority corresponding to target network A6 is 2, and the connection priority corresponding to target network A7 is 1; at this time, in the backup network list, the target network A5 is ranked before target network A6 and target network A7, and the target network A6 is ranked before target network A7. Target network A5 is the target network ranked first in the backup network list, and target network A6 and target network A7 are both remaining target networks.
[0077] In the present application, before the terminal needs to perform a network search, a network search is performed according to the network frequency bands supported by the terminal to screen out M target networks that can establish a normal network connection with the terminal. At the same time, based on the connection priorities corresponding to the M target networks, the network parameters corresponding to the M target networks can be added to the backup network list in sequence. Based on this, when the waiting terminal needs to switch the network, when the backup network list includes M target network terminals, the terminal can determine the target network to be switched by the terminal based on the connection priorities corresponding to the M target networks, and switch the terminal's network to the target network. This can avoid the terminal being rejected during network switching, resulting in network connection failure, improve the success rate of network connection, and improve the continuity and stability of network services.
[0078] See also Figure 3 , Figure 3 FIG. 1 is a flow chart of another network connection method provided by the present application. Figure 3 As shown, the method can be executed by a terminal, and the method may include but is not limited to the following steps:
[0079] S301. A terminal establishes a network connection with a first network.
[0080] In the present application, when the terminal needs to use network services, it can first establish a network connection with the first network.
[0081] S302: Detect a usage status of the first network and a connection status between the terminal and the first network.
[0082] In the present application, in the process of establishing a network connection between a terminal and a first network and the first network providing network services to the terminal, the terminal can detect the usage status of the first network and the connection status of the network connection between the terminal and the first network.
[0083] S303: Whether network parameters are stored in the standby network list.
[0084] In this application, in the same area (i.e., the same geographical location), the network that can provide network services to the terminal in the area is usually relatively fixed. That is to say, when the terminal performs network searches multiple times in the same area, the network searched each time may be the same. Based on this, in order to reduce the frequency of network searches and avoid excessive frequency of network searches that affects the use time of the terminal, before performing a network search, the terminal can determine whether network parameters are stored in the backup network list.
[0085] Specifically, when the use state of the first network currently connected to the terminal is idle, and the connection state between the terminal and the first network is normal, the terminal can determine whether network parameters are stored in the standby network list. When network parameters are stored in the standby network list, it indicates that the terminal has performed a network search in the current area, and step S302 can be executed; when network parameters are not stored in the standby network list, it indicates that the terminal has not performed a network search in the current area, and step S304 can be executed.
[0086] S304: Is it possible to conduct a network search?
[0087] In the present application, when it is determined that the terminal has not added the backup network list in the current area, the terminal can obtain the signal strength of the first network. When the signal strength of the first network is less than the second signal strength threshold and greater than the first signal strength threshold, it is determined that the terminal can perform a network search, and then step S305 is executed; when the signal strength of the first network is greater than or equal to the second signal strength threshold, or the signal strength of the first network is less than or equal to the first signal strength threshold, the terminal cannot perform a network search, and then step S302 is executed. In this way, the duration of the terminal's network search can be controlled to avoid the terminal performing a long network search, increasing the power consumption of the terminal, and affecting the terminal's usage time.
[0088] S305: Start the protection timer.
[0089] In the present application, a time limit corresponding to a timer can be set in the terminal, and the timer can be started.
[0090] It should be noted that the timer can be used to instruct the terminal to perform a network search within a limited time, and to establish corresponding network connections with the searched networks (i.e., N candidate networks). For example, the time limit corresponding to the timer is set to 30 seconds; when the timer is started, the terminal can perform a network search within 30 seconds, and establish corresponding network connections between the terminal and the searched networks (i.e., N candidate networks); if the time limit corresponding to the timer (i.e., 30 seconds) expires, the terminal needs to stop the network search, or the terminal needs to stop establishing the corresponding network connections with the searched networks, and re-establish the network connection between the terminal and the first network.
[0091] S306: Obtain network parameters corresponding to the first network.
[0092] In the present application, after the terminal starts the timer, it can obtain the network parameters corresponding to the currently connected first network.
[0093] S307: The terminal performs a network search and finds N candidate networks.
[0094] In the present application, the terminal may perform a network search according to the network frequency bands supported by the terminal, search for N candidate networks, and obtain network parameters corresponding to the N candidate networks.
[0095] S308: Send a registration request to the i-th candidate network to determine whether the registration is successful.
[0096] In the present application, the terminal may generate a registration request corresponding to the i-th candidate network according to the network parameters corresponding to the i-th candidate network, and send the registration request corresponding to the i-th candidate network to the network device corresponding to the i-th candidate network. The registration request corresponding to the i-th candidate network is used to instruct the network device corresponding to the i-th candidate network to establish a network connection between the terminal and the i-th candidate network.
[0097] Further, the terminal can detect the connection status of the network connection between the terminal and the i-th candidate network. When the connection status of the network connection between the terminal and the i-th candidate network is normal, it indicates that the i-th candidate network is successfully registered, and the i-th candidate network is determined as the target network, and then step S09 is executed; when the connection status of the network connection between the terminal and the i-th candidate network is abnormal, it indicates that the i-th candidate network registration has failed, and then step S310 is executed.
[0098] S309. Obtain the connection priority corresponding to the target network.
[0099] In this application, when the terminal determines that the i-th candidate network is successfully registered, the terminal can obtain the connection priority corresponding to the i-th candidate network.
[0100] S310. i < N.
[0101] In this application, the terminal can compare the magnitudes of i and N. When i < N, the terminal can increment i by one and then execute step S308; when i > N or i = N, then execute step S311.
[0102] S311. Add the network parameters corresponding to the M target networks to the standby network list respectively according to the connection priorities corresponding to the M target networks.
[0103] In this application, the terminal can add the network parameters corresponding to the M target networks to the standby network list respectively according to the connection priorities corresponding to the M target networks. Among them, the connection priority of the target network before the j-th target network in the standby network list is greater than the connection priority of the j-th target network, and the connection priority of the target network after the j-th target network in the standby network list is less than the connection priority of the j-th target network. Where j is a positive integer less than or equal to M.
[0104] S312. Establish a network connection between the terminal and the first network according to the network parameters corresponding to the first network.
[0105] In this application, after the terminal adds the network parameters corresponding to the target network to the standby network list, it can generate a registration request corresponding to the first network according to the network parameters corresponding to the first network, and send the registration request corresponding to the first network to the network device corresponding to the first network to establish a network connection with the first network.
[0106] In this application, before the terminal needs to perform a network search, it can also control the network search frequency of the terminal based on whether there are network parameters stored in the standby network list, so as to avoid too high a network search frequency, increase the power consumption of the terminal, and affect the usage duration of the terminal. Then, by performing a network search according to the network bands supported by the terminal, M target networks that can establish a normal network connection with the terminal are filtered out. When the terminal needs to perform a network switch, it can obtain the target network from this standby network list to switch the network of the terminal to the target network. This can avoid the terminal being rejected during a network switch, resulting in a network connection failure, improve the success rate of the network connection, and improve the continuity and stability of the network service. In addition, the timer can also limit the duration for the terminal to search for and filter the target network to avoid disturbing the normal use of the terminal.
[0107] See also Figure 4 , is a schematic diagram of the structure of a network connection device provided by the present application. Figure 4 As shown, the network connection device may include:
[0108] The search module 411 is used to perform a network search according to the network frequency band supported by the terminal to obtain network parameters corresponding to N candidate networks respectively when the use state of the first network currently connected to the terminal is idle and the connection state between the terminal and the first network is normal; N is a positive integer;
[0109] A network connection module 412, configured to establish network connections respectively corresponding to the terminal and the N candidate networks according to network parameters respectively corresponding to the N candidate networks;
[0110] A screening module 413 is used to screen a target network whose network connection status is normal from the N candidate networks according to the connection status of the network connections respectively corresponding to the terminal and the N candidate networks;
[0111] The processing module 414 is used to add the network parameters corresponding to the above-mentioned target network to the backup network list; the above-mentioned backup network list is used to provide network services to the above-mentioned terminal through the above-mentioned target network when the connection state of the network connection between the above-mentioned terminal and the above-mentioned first network is abnormal.
[0112] In an optional embodiment, the number of the target networks is M, where M is a positive integer; when M is greater than 1, the processing module 414 is further configured to:
[0113] Get the connection priorities corresponding to the M target networks respectively;
[0114] According to the connection priorities respectively corresponding to the M target networks, the network parameters respectively corresponding to the M target networks are added to the standby network list in sequence.
[0115] In an optional embodiment, the processing module 414 is further configured to:
[0116] Determine the connection priorities corresponding to the M target networks respectively according to the network signal strengths of the network connections respectively corresponding to the terminal and the M target networks; or,
[0117] According to the transaction relationship between the terminal and the institutions respectively corresponding to the M target networks, the connection priorities respectively corresponding to the M target networks are determined.
[0118] In an optional embodiment, the network connection module 412 may also be used for:
[0119] Generate a registration request corresponding to the i-th candidate network according to the network parameters corresponding to the i-th candidate network; i is a positive integer less than or equal to N;
[0120] The registration request corresponding to the i-th candidate network is sent to the network device corresponding to the i-th candidate network; the registration request corresponding to the i-th candidate network is used to instruct the network device corresponding to the i-th candidate network to establish a network connection between the terminal and the i-th candidate network.
[0121] In an optional embodiment, the network connection module 412 is further used for:
[0122] Before respectively establishing the network connections respectively corresponding to the N candidate networks between the terminal and the N candidate networks according to the network parameters respectively corresponding to the N candidate networks, disconnecting the network connection between the terminal and the first network;
[0123] After the terminal establishes network connections with the N candidate networks respectively, and when the connection state between the terminal and the first network is normal, switching the network connection between the terminal and the candidate network back to the network connection between the terminal and the first network;
[0124] When the connection state of the network connection between the waiting terminal and the first network is abnormal, the network connection between the waiting terminal and the first network is switched to the network connection between the terminal and the target network according to the backup network list.
[0125] In an optional embodiment, the network connection module 412 is further used for:
[0126] In the process of the first network providing network services to the terminal, detecting the network signal strength of the first network;
[0127] When it is detected that the network signal strength of the first network is less than a first signal strength threshold, determining that the connection state of the network connection between the terminal and the first network is an abnormal state;
[0128] According to the backup network list, the network connection between the terminal and the first network is switched to the network connection between the terminal and the target network.
[0129] In an optional embodiment, the network connection module 412 is further used for:
[0130] Obtain network parameters corresponding to the target network from the backup network list;
[0131] Establishing a network connection between the terminal and the target network according to network parameters corresponding to the target network;
[0132] The network connection between the terminal and the first network is switched to a network connection between the terminal and the target network.
[0133] In an optional embodiment, the number of target networks in the standby network list is M, where M is a positive integer; one target network corresponds to one connection priority; and the processing module 414 is further used to:
[0134] From the M target networks in the backup network list, network parameters corresponding to the target network at the front of the list are obtained; the connection priority corresponding to the target network at the front of the list is greater than the connection priority corresponding to the remaining target networks, and the remaining target networks are the target networks other than the target network at the front of the list in the M target networks;
[0135] Establishing a network connection between the terminal and the target network at the front of the arrangement order according to the network parameters corresponding to the target network at the front of the arrangement order;
[0136] The network connection between the terminal and the first network is switched to a network connection between the terminal and the target network that is at the front of the arrangement order.
[0137] In an optional embodiment, the search module 411 is further used for:
[0138] When the use state of the first network to which the terminal is currently connected is an idle state, and the connection state between the terminal and the first network is a normal state, obtaining the network signal strength of the first network;
[0139] When the network signal strength of the above-mentioned first network is less than the second signal strength threshold and greater than the first signal strength threshold, a network search is performed according to the network frequency band supported by the above-mentioned terminal to obtain network parameters corresponding to N candidate networks respectively; the above-mentioned first signal strength threshold is less than the above-mentioned second signal strength threshold.
[0140] In the embodiments of the present application, the term "module" or "unit" refers to a computer program or a part of a computer program with a predetermined function, and works together with other related parts to achieve a predetermined goal, and can be implemented in whole or in part by using software, hardware (such as processing circuits or memories) or a combination thereof. Similarly, a processor (or multiple processors or memories) can be used to implement one or more modules or units. In addition, each module or unit can be part of an overall module or unit that includes the function of the module or unit.
[0141] In this application, before the terminal needs to switch networks, a network search is performed according to the network frequency bands supported by the terminal to screen out the target network that can establish a normal network connection with the terminal, and the network parameters corresponding to the target network are added to the backup network list. When the terminal needs to switch networks, the terminal's network can be directly switched to the target network according to the backup network list, which can avoid the terminal being rejected during network switching, resulting in network connection failure, improve the success rate of network connection, and improve the continuity and stability of network services.
[0142] See also Figure 5 , is a schematic diagram of the structure of a computer device provided by this application. Figure 5 As shown, the computer device 500 may include: a processor 501, a network interface 504 and a memory 505. In addition, the above-mentioned computer device 500 may also include: a user interface 503, and at least one communication bus 502. The communication bus 502 is used to realize the connection and communication between these components. In some embodiments, the user interface 503 may include a display screen (Display), a keyboard (Keyboard), and the user interface 503 may also include a standard wired interface and a wireless interface. The network interface 504 may optionally include a standard wired interface and a wireless interface (such as a WI-FI interface). The memory 505 may be a high-speed RAM memory, or it may be a non-volatile memory (non-volatile Memory), such as at least one disk storage. The memory 505 may also be optionally at least one storage device away from the aforementioned processor 501. As Figure 5 As shown, the memory 505 as a computer device may include an operating system, a network communication module, a user interface module and a computer program.
[0143] exist Figure 5 In the computer device 500 shown, the network interface 504 can provide a network communication function; the user interface 503 is mainly used to provide an input interface; and the processor 501 can be used to call a computer program stored in the memory 505 to execute:
[0144] When the use state of the first network currently connected to the terminal is an idle state, and the connection state between the terminal and the first network is a normal state, a network search is performed according to the network frequency band supported by the terminal to obtain network parameters corresponding to N candidate networks respectively; N is a positive integer;
[0145] Establishing network connections respectively corresponding to the N candidate networks between the terminal and the N candidate networks respectively according to the network parameters respectively corresponding to the N candidate networks;
[0146] According to the connection states of the network connections respectively corresponding to the terminal and the N candidate networks, selecting a target network whose connection state of the network connection is in a normal state from the N candidate networks;
[0147] The network parameters corresponding to the target network are added to a backup network list; the backup network list is used to provide network services to the terminal through the target network when the connection state of the network connection between the terminal and the first network is abnormal.
[0148] In this application, before the terminal needs to switch networks, a network search is performed according to the network frequency bands supported by the terminal to screen out the target network that can establish a normal network connection with the terminal, and the network parameters corresponding to the target network are added to the backup network list. When the terminal needs to switch networks, the terminal's network can be directly switched to the target network according to the backup network list, which can avoid the terminal being rejected during network switching, resulting in network connection failure, improve the success rate of network connection, and improve the continuity and stability of network services.
[0149] In addition, it should be pointed out here that: the embodiment of the present application also provides a computer-readable storage medium, and the computer-readable storage medium stores a computer program executed by the data processing device mentioned above, and the computer program includes program instructions. When the processor executes the program instructions, it can execute the description of the data processing method in the corresponding embodiment above, so it will not be repeated here. In addition, the description of the beneficial effects of the same method will not be repeated. For technical details not disclosed in the computer-readable storage medium embodiment involved in this application, please refer to the description of the method embodiment of this application.
[0150] As an example, the above program instructions may be deployed on a computer device for execution, or deployed on at least two computer devices at one location for execution, or executed on at least two computer devices distributed at at least two locations and interconnected through a communication network. At least two computer devices distributed at at least two locations and interconnected through a communication network may constitute a blockchain network.
[0151] The computer-readable storage medium may be the data processing device provided in any of the aforementioned embodiments or the central storage unit of the computer device, such as a hard disk or a memory of the computer device. The computer-readable storage medium may also be an external storage device of the computer device, such as a plug-in hard disk, a smart memory card (SMART Media card, SMC), a secure digital (Secure digital, SD) card, a flash card (flash card), etc. equipped on the computer device. Further, the computer-readable storage medium may also include both the central storage unit of the computer device and an external storage device. The computer-readable storage medium is used to store the computer program and other programs and data required by the computer device. The computer-readable storage medium may also be used to temporarily store data that has been output or is to be output.
[0152] The terms "first", "second", etc. in the description, claims, and drawings of the embodiments of the present application are used to distinguish between contents in different media, rather than to describe a specific order. In addition, the terms "including" and any of their variations are intended to cover non-exclusive inclusions. For example, a process, method, device, product, or equipment that includes a series of steps or units is not limited to the listed steps or modules, but may optionally include steps or modules that are not listed, or may optionally include other step units inherent to these processes, methods, devices, products, or equipment.
[0153] The data collection and processing in this application should be strictly in accordance with the requirements of relevant laws and regulations when applied in practice, and the informed consent or separate consent of the personal information subject should be obtained. Subsequent data use and processing should be carried out within the scope of authorization of laws and regulations and the personal information subject.
[0154] The embodiment of the present application also provides a computer program product, including a computer program, which, when executed by a processor, implements the description of the above-mentioned data processing method and decoding method in the corresponding embodiment above, so it will not be repeated here. In addition, the description of the beneficial effects of the same method will not be repeated. For technical details not disclosed in the embodiment of the computer program product involved in the present application, please refer to the description of the method embodiment of the present application.
[0155] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in terms of function in the above description. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0156] The method and related apparatus provided by the embodiment of the present application are described with reference to the method flow chart and / or structural diagram provided by the embodiment of the present application. Specifically, each process and / or box in the method flow chart and / or structural diagram, as well as the combination of the processes and / or boxes in the flow chart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable network connection device to generate a machine, so that the instructions executed by the processor of the computer or other programmable network connection device generate instructions for implementing the process in the process. Figure 1 A process or multiple processes and / or structures Figure 1 These computer program instructions can also be stored in a computer-readable memory that can guide a computer or other programmable network-connected device to work in a specific manner, so that the instructions stored in the computer-readable memory produce a product including an instruction device, which implements the functions specified in the process. Figure 1 A process or multiple processes and / or structures Figure 1 These computer program instructions can also be loaded onto a computer or other programmable network connected device, so that a series of operation steps are executed on the computer or other programmable device to produce a computer-implemented process, so that the instructions executed on the computer or other programmable device provide for implementing the process. Figure 1 A flow or multiple flows and / or structures illustrate the steps of the functions specified in one block or multiple blocks.
[0157] The above disclosure is only the preferred embodiment of the present application, which certainly cannot be used to limit the scope of rights of the present application. Therefore, equivalent changes made according to the claims of the present application are still within the scope covered by the present application.
Claims
1. A network connection method, characterized in that: include: When the use state of the first network currently connected to the terminal is an idle state, and the connection state between the terminal and the first network is a normal state, a network search is performed according to the network frequency band supported by the terminal to obtain network parameters corresponding to N candidate networks respectively; N is a positive integer; Establishing network connections respectively corresponding to the N candidate networks between the terminal and the N candidate networks respectively according to the network parameters respectively corresponding to the N candidate networks; According to the connection states of the network connections respectively corresponding to the terminal and the N candidate networks, selecting a target network whose connection state of the network connection is in a normal state from the N candidate networks; The network parameters corresponding to the target network are added to a backup network list; the backup network list is used to provide network services to the terminal through the target network when the connection state of the network connection between the terminal and the first network is abnormal.
2. The method according to claim 1, characterized in that The number of target networks is M, where M is a positive integer; When M is greater than 1, adding the network parameters corresponding to the target network to the backup network list includes: Get the connection priorities corresponding to the M target networks respectively; According to the connection priorities respectively corresponding to the M target networks, the network parameters respectively corresponding to the M target networks are added to the standby network list in sequence.
3. The method according to claim 2, characterized in that The obtaining of connection priorities respectively corresponding to the M target networks includes: determining the connection priorities respectively corresponding to the M target networks according to the network signal strengths of the network connections respectively corresponding to the terminal and the M target networks; or, The connection priorities respectively corresponding to the M target networks are determined according to the transaction relationship between the terminal and the institutions respectively corresponding to the M target networks.
4. The method according to claim 1, characterized in that: The establishing, according to the network parameters respectively corresponding to the N candidate networks, respectively corresponding network connections between the terminal and the N candidate networks, comprises: Generate a registration request corresponding to the i-th candidate network according to the network parameters corresponding to the i-th candidate network; i is a positive integer less than or equal to N; The registration request corresponding to the i-th candidate network is sent to the network device corresponding to the i-th candidate network; the registration request corresponding to the i-th candidate network is used to instruct the network device corresponding to the i-th candidate network to establish a network connection between the terminal and the i-th candidate network.
5. The method according to claim 1, characterized in that The method further comprises: Before respectively establishing the network connections respectively corresponding to the N candidate networks between the terminal and the N candidate networks according to the network parameters respectively corresponding to the N candidate networks, disconnecting the network connection between the terminal and the first network; After the terminal establishes network connections with the N candidate networks respectively, and when the connection state between the terminal and the first network is normal, switching the network connection between the terminal and the candidate network back to the network connection between the terminal and the first network; When the connection state of the network connection between the waiting terminal and the first network is abnormal, the network connection between the terminal and the first network is switched to the network connection between the terminal and the target network according to the backup network list.
6. The method according to claim 5, characterized in that When the connection state of the waiting network connection between the terminal and the first network is an abnormal state, switching the network connection between the terminal and the first network to the network connection between the terminal and the target network according to the backup network list includes: In the process of the first network providing network services for the terminal, detecting the network signal strength of the first network; When it is detected that the network signal strength of the first network is less than a first signal strength threshold, determining that the connection state of the network connection between the terminal and the first network is an abnormal state; According to the backup network list, the network connection between the terminal and the first network is switched to the network connection between the terminal and the target network.
7. The method according to claim 1, characterized in that When the use state of the first network to which the terminal is currently connected is an idle state, and the connection state between the terminal and the first network is a normal state, performing a network search according to a network frequency band supported by the terminal to obtain network parameters corresponding to N candidate networks respectively include: When the use state of the first network to which the terminal is currently connected is an idle state, and the connection state between the terminal and the first network is a normal state, obtaining the network signal strength of the first network; When the network signal strength of the first network is less than the second signal strength threshold and greater than the first signal strength threshold, a network search is performed according to the network frequency band supported by the terminal to obtain network parameters corresponding to N candidate networks respectively; the first signal strength threshold is less than the second signal strength threshold.
8. A network connection device, characterized in that: include: A search module, configured to, when the use state of the first network currently connected to the terminal is an idle state and the connection state between the terminal and the first network is a normal state, perform a network search according to the network frequency band supported by the terminal to obtain network parameters corresponding to N candidate networks respectively; N is a positive integer; A network connection module, configured to establish network connections respectively corresponding to the N candidate networks between the terminal and the N candidate networks according to network parameters respectively corresponding to the N candidate networks; A screening module, configured to screen a target network whose network connection status is normal from the N candidate networks according to the connection status of the network connections respectively corresponding to the terminal and the N candidate networks; A processing module is used to add the network parameters corresponding to the target network to a backup network list; the backup network list is used to provide network services to the terminal through the target network when the connection state of the network connection between the terminal and the first network is abnormal.
9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.
10. A computer storage medium, characterized in that: The computer storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are performed.
Citation Information
Cited By
Network connection method and apparatus, device, and storage medium
WO2026144033A1