CN106658673B - APN selection method and device - Google Patents
APN selection method and device Download PDFInfo
- Publication number
- CN106658673B CN106658673B CN201510724127.2A CN201510724127A CN106658673B CN 106658673 B CN106658673 B CN 106658673B CN 201510724127 A CN201510724127 A CN 201510724127A CN 106658673 B CN106658673 B CN 106658673B
- Authority
- CN
- China
- Prior art keywords
- apn
- networking
- preferapn
- linked list
- sim card
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W8/00—Network data management
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W48/00—Access restriction; Network selection; Access point selection
- H04W48/20—Selecting an access point
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Computer Security & Cryptography (AREA)
- Databases & Information Systems (AREA)
- Mobile Radio Communication Systems (AREA)
- Computer And Data Communications (AREA)
- Telephone Function (AREA)
Abstract
The invention provides an APN selection method and device, which are used for solving the problems of low APN selection efficiency and APN selection error of a double-card or multi-card terminal in the prior art. The APN selection method comprises the following steps: sequentially using preset APNs to perform networking attempts according to a preset priority order; after the networking is successful, the networking attempt is stopped, the terminal is informed of the successful networking, and the scheme provides APN selection efficiency, so that the networking efficiency is improved.
Description
Technical Field
The present invention relates to the field of communications, and in particular, to an Access Point Name (APN) selection method and apparatus.
Background
DSDS (Dual SIM Dual Standby) and DADA (Dual SIM Dual Active) refer to that two mobile phone cards can be inserted into a mobile phone and can be used simultaneously. The DSDS or DSDA is mainly applied to 3G mobile phones, and as 4G mobile phones mature, the DSDS and DSDA technologies have more applications and functions on the basis of 4G networks.
Since 4G mobile networks are still in the large-scale networking stage worldwide, the innovative technology of dual 4G has not been greatly appeared and used. However, no matter whether a single-card or dual-card mobile phone is used for internet access, the APN is necessarily used, and refers to a network access technology, and is a parameter which must be configured when the mobile phone is used for internet access, and determines which access mode the mobile phone accesses to a network. When a terminal needs to be connected with a network and needs to select an APN, the APN selection scheme widely used in the current networking is an Android default scheme. The Android default two selection schemes comprise a polling query scheme and a preferr APN scheme, wherein the polling query scheme is used for polling APNs corresponding to SIM cards in a mobile phone according to the sequence in a database when networking is required each time, failure information needs to be reported to an application when the networking fails each time in the polling process, and then the next APN attempt is performed. And stopping polling until finding the APN capable of surfing the Internet, surfing the Internet by using the APN. If the APN is polled once, the failure of the networking is reported to the mobile phone system, and the polling is stopped. Because the polling inquiry scheme does not record the APN of the last networking, the APN database is polled and searched from the beginning in each networking; the inquiry of the APN is that the inquiry is carried out according to the position in the database, and the time for trying networking of each APN is longer. For example, the time for trying one APN to access the network is currently around 25 seconds. In the case of a large number of built-in APNs, the time taken to query the APNs arranged behind the database may be long, which may mislead the user to think that the data is not available. Resulting in a very poor user experience.
Preferr (preferred) APN scheme: the terminal only stores one preferAPN. Only one APN is set as preferAPN for each SIM card. And at each networking time, if the preferAPN exists, the terminal only tries to perform networking by using the preferAPN. If the preferAPN networking fails. Stopping trying other APNs, and directly reporting networking failure. The preferAPN may be set manually by the user. If the preferAPN does not exist, polling all APNs corresponding to the SIM card, setting the APN as the preferAPN when finding the APN capable of surfing the Internet, storing the APN into the terminal, and stopping polling. However, in this scheme, when the preferAPN does not exist, a polling query is used to find a networkable APN and set to the preferAPN. Therefore, when the preferAPN does not exist, the scheme also adopts a polling mode firstly, and has the disadvantage of the polling mode. In addition, as the mobile phone only stores one preferAPN, for a double-4G card terminal, when data is switched between two cards, the obtained preferAPN is incorrect, so that the problems of frequent polling inquiry or reporting of networking failure due to the existence of available APNs are caused, and other APNs are not tried. For example, one case: the MCC (Mobile Country Code) and MNC (Mobile Network Code) of the card 1 and the card 2 are different in parameters, and the corresponding APNs are definitely different. If the preferAPN in the mobile phone stores the APN of the card 1, and the data is switched to the card 2, the card 2 considers that the preferAPN does not exist, and performs polling query to set the preferAPN as the APN of the card 2 after querying an available APN. At this point, the data is switched back to card 1, and card 1 again encounters a problem polling for and setting preferAPN. In another case: the card 1 and the card 2 which are the same in MCC and MNC respectively have two corresponding APNs, namely APN1 and APN2, the APN1 is set in the terminal to be preferAPN, the terminal only tries APN1 networking during networking, if APN1 networking fails, the terminal does not automatically try APN2 any more, the networking failure is directly reported, and thus the APN2 is missed.
Disclosure of Invention
The invention provides an APN selection method and device, which are used for solving the problems of low APN selection efficiency and APN selection error of a double-card or multi-card terminal in the prior art.
According to an aspect of the present invention, there is provided an APN selection method, including: sequentially using preset APNs to perform networking attempts according to a preset priority order; and after the networking is successful, stopping the networking attempt and informing the terminal of successful networking.
Further, the method further comprises: before using preset APN to perform networking attempt in sequence according to a preset priority order, acquiring MCC and MNC information of each SIM card in the terminal; and selecting APN from a preferAPN database of each SIM card of the terminal according to the MCC and MNC information of each SIM card, generating a preferAPN linked list corresponding to each SIM card, and recording the APN in the preferAPN linked list according to the priority order.
Further, the method further comprises: after generating the preferAPN linked list corresponding to each SIM card, continuously selecting APN in the APN database according to MCC and MNC information of the SIM card, and generating an alternative APN linked list corresponding to each SIM card, wherein the priority of all APNs in the alternative APN linked list is lower than that of all APNs in the preferAPN linked list.
Generating a preferAPN linked list corresponding to each SIM card comprises the following steps: determining the priority order of each APN according to the priority field of each APN pre-recorded in an APN database; and inserting each APN into a preferAPN linked list according to the determined priority order.
Further, the method further comprises: and after the success of networking, setting the APN used by the success of networking at this time as the highest priority, moving the APN to a head node of a preferAPN linked list, moving the APN used by each failure of networking attempt in the networking process to a tail node of the linked list to which the APN belongs, transferring the APN to a standby APN linked list of the SIM card under the condition that the number of times of networking failure of the APN in the preferAPN linked list of the SIM card reaches a preset number, and transferring the APN used by the success of networking to the preferAPN linked list of the SIM card after the APN in the preferAPN linked list fails to be used for networking and the APN in the standby APN is used for networking successfully.
Wherein, according to the preset priority order, the preset APN is used in turn to perform networking attempt, which comprises the following steps: in the process of networking attempt, if the networking attempt fails and an APN which does not attempt to network exists in a pre-set preferAPN linked list and a standby APN linked list, not informing the terminal of the networking failure, and informing the terminal of the networking failure until no APN which does not attempt to network exists in the pre-set APN linked list and the standby APN linked list.
According to another aspect of the present invention, an APN selection apparatus is provided, comprising: the networking module is used for sequentially using the preset APN to perform networking attempt according to the preset priority order; and the notification module is used for stopping the networking attempt after the networking is successful and notifying the terminal of the successful networking.
Further, the above apparatus further comprises: the acquisition module is used for acquiring MCC (Motor control center) and MNC (Mobile network center) information of SIM (subscriber identity Module) cards in the terminal before using the APN (Access Point name) to perform networking attempt in sequence according to the preset priority order;
and the first generation module is used for selecting APNs from a preferAPN database of each SIM card of the terminal according to the MCC and MNC information of each SIM card and generating a preferAPN linked list corresponding to each SIM card, wherein the APNs are recorded in the preferAPN linked list according to the priority order.
Further, the above apparatus further comprises: and the second generation module is used for continuously selecting APNs in the APN database according to the MCC and MNC information of the SIM cards after generating the preferAPN linked list corresponding to each SIM card, and generating alternative APN linked lists corresponding to each SIM card, wherein the priority of all APNs in the alternative APN linked lists is lower than that of all APNs in the preferAPN linked list.
Wherein, the first generating module includes: the determining unit is used for determining the priority order of each APN according to the priority field of each APN pre-recorded in the APN database; and the inserting unit is used for inserting each APN into the preferAPN linked list according to the determined priority order.
Further, the above apparatus further comprises: the device comprises a setting module and a switching module, wherein the setting module is used for setting the APN used by the networking success to be the highest priority after the networking is successful, moving the APN to a head node of a preferAPN linked list, moving the APN used by each networking attempt failure in the networking process to a tail node of the linked list to which the APN belongs, transferring the APN to a spare APN linked list of the SIM card when the number of the networking failures of the APN in the preferAPN linked list of the SIM card reaches a preset number, and transferring the APN used by the networking success to the preferAPN linked list of the SIM card after the APN in the preferAPN linked list fails to be used and the networking is successful by using the APN in the spare APN linked list.
Wherein, the networking module is specifically configured to: in the process of networking attempt, if the networking attempt fails and an APN which does not attempt to network exists in a pre-set preferAPN chain table and a standby APN chain table, not informing the terminal of the networking failure, and informing the terminal of the networking failure until no APN which does not attempt to network exists in the pre-set preferAPN chain table and the standby APN chain table.
The method provided by the embodiment of the invention can improve the networking efficiency when the multi-card terminal can quickly and accurately select the proper APN for networking when the user needs to perform networking.
Drawings
Fig. 1 is a flowchart of an APN selection method provided in embodiment 1 of the present invention;
fig. 2 is a system framework diagram of a terminal according to embodiment 2 of the present invention;
fig. 3 is a schematic diagram of a preferAPN linked list and a backup APN linked list in embodiment 2 of the present invention;
fig. 4 is a flowchart of single-card APN selection provided in embodiments 2 and 3 of the present invention;
fig. 5 is a flowchart of a dual card APN selection method provided in embodiments 3 and 4 of the present invention;
fig. 6 is a block diagram of an APN selection apparatus according to embodiment 5 of the present invention.
Detailed Description
In order to solve the problem of low efficiency of selecting an APN based on a multi-SIM card terminal in the prior art, the present invention provides an APN selection method and apparatus, which are further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and do not limit the invention.
Example 1
The embodiment provides an APN selection method supporting dual 4G cards for dual 4G mobile terminal technology based on a 4G mobile network. The method is used for realizing that when an operator provides a large number of APNs, the terminal quickly and accurately selects the appropriate APN for networking, and aims to provide a better mobile internet access experience for a user.
This embodiment provides an APN selection method, and fig. 1 is a flowchart of an APN selection method provided in embodiment 1 of the present invention, as shown in fig. 1, the method includes the following processing:
step 101: sequentially using preset APNs to perform networking attempts according to a preset priority order;
step 102: and after the networking is successful, stopping the networking attempt and informing the terminal of successful networking.
Before executing the steps 101 and 102, the scheme of this embodiment further includes a process of presetting an APN, and based on this, the method further includes the following processing:
acquiring MCC and MNC information of each SIM card in the terminal before using APN to perform networking attempt in sequence according to the preset priority order of the APN; and selecting APN from a preferAPN database of each SIM card of the terminal according to the MCC and MNC information of each SIM card, and generating a preferAPN linked list corresponding to each SIM card, wherein the APN in the linked list is the preferAPN, and the preferAPN is recorded in the preferAPN linked list according to the priority order. All APNs in the preferAPN linked list are once networked, and the generated preferAPN linked list corresponding to each SIM card is shown in figure 3, and the priority order of each APN is determined according to the priority field of each APN pre-recorded in an APN database; and inserting each preferAPN into the preferAPN linked list according to the determined priority order.
The scheme provided by this embodiment further includes a method for adjusting the priority of the APN based on the current networking situation after the networking is successful, and based on this, the method further includes the following processing: and after the networking is successful, setting the APN used by the networking success to be the highest priority, moving the APN to a head node of a preferAPN linked list, and moving the APN used by each networking attempt failure in the networking process to a tail node of the preferAPN linked list.
In order to shorten the time used for attempting to perform networking by using each APN, the sequentially using APNs according to the preset priority order of the APNs for performing networking may specifically include:
in order to effectively divide the priority of the APN of each SIM card, after establishing the preferAPN linked list of the SIM card, a backup APN linked list of the SIM card may be established according to the total APN database, so that when all APNs in the preferAPN linked list cannot be networked, the APNs in the backup APN linked list are used for networking, based on this, the method further includes:
after generating the preferAPN linked list corresponding to each SIM card, according to the MCC and MNC information of the SIM card, APNs are continuously selected in the total APN database, and a standby APN linked list corresponding to each SIM card is generated, as shown in fig. 3, the priority of all APNs in the standby APN linked list is lower than all preferapns in the preferAPN linked list.
In the process of trying the networking, trying the preferAPN in the preferAPN linked list, and trying the APN in the standby APN linked list after the preferAPNs in the preferAPN linked list fail. If the APN in the standby APN linked list fails to network and APNs which do not attempt to network exist in the standby APN linked list, the terminal is not informed of the networking failure until the standby APN linked list does not have any APNs which do not attempt to network, and the terminal is informed of the networking failure.
The priority of APN can also be dynamically changed in the networking process, the change is synchronously updated into a corresponding APN chain table and an APN database, the preferAPN in the preferAPN chain table of the SIM card is transferred to a standby APN chain table of the SIM card under the condition that the networking failure times of the preferAPN in the preferAPN chain table reach preset times, and after all APNs in the preferAPN chain table fail to be networked and a certain APN in the standby APN chain table is successfully networked, the APN is transferred to the preferAPN chain table of the SIM card.
Example 2
The present embodiment further explains the APN selection method provided by the present invention by disclosing more technical details.
Fig. 2 is a schematic diagram of a system framework of a terminal according to embodiment 2 of the present invention, and as shown in fig. 2, in this embodiment, the system framework of the terminal may include: a terminal supporting a dual subscriber identity card (SIM card, etc.) slot, a subscriber identity card, a preferAPN database, and a total APN database, wherein the network supported by the terminal may include but is not limited to: 2G, 3G, 4G, etc. Preferably, both SIM card 1 and SIM card 2 can support the use of data services such as 2G, 3G, 4G, etc. And the subscriber identity module card involved in the present embodiment includes but is not limited to the currently mainstream subscriber identity module cards such as: SIM card, USIM card, UIM card, etc. Meanwhile, it should be noted that the terminal described in this embodiment includes, but is not limited to, a mobile phone supporting dual cards, and may also include a multi-card mobile phone, or a multi-card terminal, etc.
The method comprises the steps that an APN configuration file is preset in a terminal, the configuration file comprises a plurality of APNs, network parameters of relevant operators corresponding to each APN and the priority of the APNs, when the terminal is started for the first time, a total APN database is generated according to the configuration file, and each APN in the database corresponds to a unique serial number ID. In the generated database of the total APN, the APN may be grouped according to key parameters such as MCC and MNC.
Two preferAPN configuration files are pre-prepared in the terminal and respectively correspond to the SIM1 and the SIM card 2, and a plurality of APNs are stored in the preferAPN configuration files, wherein each APN is successfully connected by the terminal and has priority parameters. And the terminal generates a preferAPN database corresponding to the SIM card 1 and the SIM card 2 according to the two configuration files.
The PreferAPN database is a sub-database of the total APN database, that is, each APN in the PreferAPN exists in the total APN database, and the PreferAPN database can be dynamically changed in the process of mobile phone networking.
After the terminal is powered on, firstly reading identification information of an SIM card inserted in the terminal, including MCC, MNC and the like, and taking the identification information as a keyword variable, screening APNs meeting requirements from a preferAPN database of the SIM card 1 and the SIM card 2, generating a preferAPN linked list of the SIM card 1 and the SIM card 2, updating the preferAPN database at the same time, ensuring that only APNs meeting the key parameters of the SIM card, such as the MCC, MNC and the like, are stored in the preferAPN database, then still screening the APNs meeting requirements from a total database by using the key variables of the SIM card, such as the MCC, MNC and the like, generating a standby APN linked list of the SIM card 1 and the SIM card 2, and generating the preferAPN linked list as shown in figure 3. The APN priorities in the preferAPN list and the alternate APN list are ranked from high to low. If the list is already in the preferAPN list, the list is not added into the spare APN list. The priority of the preferAPN linked list is higher than that of the standby APN linked list.
Based on the above setting, the method for selecting an APN provided in this embodiment may specifically include: for a single card APN selection procedure, as shown in fig. 4: polling and inquiring the preferAPN linked list, and polling and searching the spare APN linked list if the preferAPN linked list has no APN which is successfully networked. In the polling operation process, if an APN capable of successfully networking is found, the APN is set as a default networking APN, is set as an APN with the highest priority, and is inserted into a head node of a preferAPN linked list. And stops polling; if the attempted APN fails to network, the priority of the APN is reduced, the position in the linked list is changed, and the next APN is tried. And if the networking is not successful after polling the standby APN linked list for one time, reporting the networking failure of the mobile phone. When the SIM card 1 and the SIM card 2 perform APN quick selection attempt networking, if the user does not specify which card data to use, the SIM card 1 and the SIM card 2 may perform APN quick selection polling query respectively, and which card succeeds in networking first, uses the data service of which card. If the user has specified the use of data services of a certain card, the above described method of selecting APN is performed using only that card.
Further, each APN in the terminal is prioritized, and the determination of the priority of each APN may use the following method:
prefabrication according to operator provided priorities:
since APNs are all operator supplied, the priority of an APN may solicit operator opinion. When the APN is prefabricated to a mobile phone, corresponding fields in an APN database represent the priority of APNs, and the APNs are sorted from top to bottom according to the priority, so that a preferAPN linked list and a standby APN linked list which are arranged according to the priority can be generated conveniently.
In the networking process of quickly selecting an APN, a priority may be set or dynamically changed for each APN, which may specifically be performed according to the following principle:
first, the APN used in the last networking is the highest priority, at the prefix link list head node position.
Secondly, if the mobile phone is not connected with the internet, namely the APN used in the internet last time does not exist, polling inquiry is carried out from a preferAPN chain table and a standby APN chain table corresponding to the SIM card, the first APN capable of being connected with the internet is set to have high priority, the first APN is inserted into a head node position with the highest priority in a preferAPN chain table, and meanwhile, a database is updated, namely the APN inquired for the first time is guaranteed to be the APN with the highest priority when the APN is selected each time.
And thirdly, in the process of a networking attempt of quickly selecting the APN, the attempted APN is not networked successfully, the priority of the attempted APN is reduced, if the APN is in a preferAPN linked list, the APN is placed at the tail node of the preferAPN linked list, and if the APN is in a spare APN linked list, the APN is placed at the tail node of the spare APN linked list. And simultaneously updating corresponding database information, if a certain APN in the permenanN linked list is tried for many times and networking is not successful all the time, deleting the APN from the permenanN linked list and inserting the APN into a standby APN linked list, and simultaneously updating the corresponding database information.
Further, the time of trying each APN to connect the network is shortened, if the APN trying to connect fails to network and other APNs need to be tried, the state of the polling failure does not need to be reported to an application on the upper layer of the mobile phone, and the next APN is tried directly, so that the time of trying to network by each APN is greatly shortened.
Example 3
This embodiment mainly describes a scheme for selecting an APN without a preferAPN, fig. 5 is a flowchart for selecting an APN of a dual card according to embodiment 3 of the present invention, as shown in fig. 5, when a user does not select which SIM card to use for internet access specifically, and when the user starts up for the first time, the preferAPN does not exist, so that no APN exists in a preferAPN configuration file shown in fig. 2, a corresponding preferAPN database and a preferAPN list are both empty, a terminal will generate a corresponding backup APN list shown in fig. 3 for a SIM card 1 and a SIM card 2, respectively, the backup APN list 1 and the backup APN list 2, and the SIM card 1 and the SIM card 2 in the terminal perform APN quick selection according to the flow for quick APN selection shown in fig. 4, if the SIM card 1 is successfully networked first, the SIM card 1 notifies a mobile phone system, and at the SIM card 2, at the same time, the SIM card 2 will continue to perform quick selection and networking attempt, select an APN that can be added to the preferAPN in the SIM card 2, however, the SIM card 2 does not surf the internet, and the success of the networking is not reported to the mobile phone system, and this operation is only used to update the preferAPN database of the SIM card 2, which is beneficial to the next networking attempt. The mobile phone uses the SIM card 1 which is successfully networked firstly to surf the internet, meanwhile, the SIM card 1 inserts the APN which is successfully networked into the preferAPN linked list of the corresponding SIM card 1, the APN is deleted from the spare APN linked list, and meanwhile, the preferAPN database and the configuration file information are updated.
If the SIM card 1 polls all the preferAPN linked lists and the standby APN linked list once and fails to perform networking, the polling is reported to the SIM card 2, and if the SIM card 2 does not poll once, the SIM card 1 does not report the networking failure of the mobile phone system. If the SIM card 2 has not been successfully networked after polling, reporting the networking failure of the mobile phone system, namely reporting the networking failure really only after the two cards quickly select the APN.
Example 4
This embodiment mainly describes a method for selecting an APN in a scenario where a preferAPN exists, where the method includes the following processing:
if the user does not select which card data to use, the SIM card 1 and the SIM card 2 in the terminal first poll and inquire in their respective preferAPN linked lists respectively, the inquiry mode is according to the APN quick selection method set forth in fig. 5, if the SIM card 1 successfully networks using the first APN in the preferAPN, the SIM card 1 notifies the mobile phone system of the successful networking message and also notifies the SIM card 2, at this time, because the SIM card 2 already has the preferAPN linked list, it is not necessary to regenerate, so the APN quick selection and networking attempt will be stopped. Since the APN successfully used by the SIM card 1 in networking is the head node APN of the first preferAPN linked list and the priority is the highest, the preferAPN linked list and the corresponding database do not have to be updated.
Compared with the prior art, the scheme provided by the embodiment of the invention has the following advantages:
1. a preferAPN database is established for each SIM card, and when network connection is established, a preferAPN linked list and a standby APN linked list are inquired in a polling mode, so that the probability of failure of the SIM card in inquiring the APN is reduced, the APN can be selected quickly, and the networking speed is improved.
2. Setting a priority for each APN, polling each APN by the double 4G cards from high to low according to the priority, quickly determining the APN required by networking, wherein the priority of the APN can be dynamically changed in the polling inquiry process, and further improving the networking speed;
3. the time for trying each APN to connect the network is shortened, so that the terminal can automatically select the APN quickly and accurately.
Example 5
An APN selection device is provided in this embodiment, fig. 6 is a block diagram of a structure of an APN selection device provided in embodiment 5 of the present invention, and as shown in fig. 6, the device 60 includes the following components:
a networking module 61, configured to perform networking attempts by sequentially using preset APNs according to a preset priority order;
and the notification module 62 is configured to stop the networking attempt after the networking is successful, and notify the terminal that the networking is successful.
Wherein, the above apparatus 60 may further include: the acquisition module is used for acquiring MCC (Motor control center) and MNC (Mobile network center) information of each SIM card in the terminal before using the APN (Access Point name) in sequence according to the preset priority order to perform networking attempt; and the first generation module is used for selecting APNs from a preferAPN database of each SIM card of the terminal according to the MCC and MNC information of each SIM card and generating a preferAPN linked list corresponding to each SIM card, wherein the APNs are recorded in the preferAPN linked list according to the priority order.
Further, the apparatus 60 may further include: the device comprises a setting module and a switching module, wherein the setting module is used for setting the APN used by the networking success to be the highest priority after the networking is successful, moving the APN to a head node of a prefer linked list, moving the APN used by each networking attempt failure in the networking process to a tail node of the linked list to which the APN belongs, transferring the APN to a standby APN linked list of the SIM card when the number of the networking failures of the APN in the preferAPN linked list of the SIM card reaches a preset number, and transferring the APN used by the networking success to the preferAPN linked list of the SIM card after the networking attempts of the preferAPN in the preferAPN linked list fail and the networking success by using the APN in the standby APN linked list.
The first generating module may specifically include: the determining unit is used for determining the priority order of each APN according to the priority field of each APN pre-recorded in the APN database; and the inserting unit is used for inserting each APN into the preferAPN linked list according to the determined priority order.
Further, the apparatus 60 may further include: and the second generation module is used for continuously selecting APNs in the total APN database according to the MCC and MNC information of the SIM cards after generating the preferAPN linked list corresponding to each SIM card, and generating an alternative APN linked list corresponding to each SIM card, wherein the priority of all APNs in the alternative APN linked list is lower than that of all preferAPNs in the preferAPN linked list. In the process of trying the networking, trying the preferAPN in the preferAPN linked list, and trying the APN in the standby APN linked list after the preferAPNs in the preferAPN linked list fail. If the APN in the standby APN linked list fails to network and APNs which do not attempt to network exist in the standby APN linked list, the terminal is not informed of the networking failure until the standby APN linked list does not have any APNs which do not attempt to network, and the terminal is informed of the networking failure.
Although the preferred embodiments of the present invention have been disclosed for illustrative purposes, those skilled in the art will appreciate that various modifications, additions and substitutions are possible, and the scope of the invention should not be limited to the embodiments described above.
Claims (10)
1. An APN selection method, comprising:
acquiring mobile country code MCC and mobile network code MNC information of each SIM card in the terminal;
selecting APN in a preferAPN database of each SIM card of the terminal according to MCC and MNC information of each SIM card, and generating a preferAPN linked list corresponding to each SIM card, wherein the APN is recorded in the preferAPN linked list according to a priority order; wherein, APNs in the preferAPN linked list are all the APNs which have been networked by the terminal;
sequentially using preset access points APNs to perform networking attempt according to the preset priority order;
and after the networking is successful, stopping the networking attempt, informing the terminal of successful networking, and dynamically updating the preferAPN linked list in the networking process.
2. The method of claim 1, further comprising:
after generating the preferAPN linked list corresponding to each SIM card, continuously selecting APN in the APN database according to MCC and MNC information of the SIM card, and generating an alternative APN linked list corresponding to each SIM card, wherein the priority of all APNs in the alternative APN linked list is lower than that of all APNs in the preferAPN linked list.
3. The method of claim 1, wherein the generating a preferAPN linked list corresponding to each SIM card comprises:
determining the priority order of each APN according to the priority field of each APN pre-recorded in the preferAPN database;
and inserting each APN into the preferAPN linked list according to the determined priority order.
4. The method of claim 2, further comprising:
and after the APN in the preferAPN linked list fails to be used for trying networking and the APN in the spare APN linked list is successfully used for networking, the APN used for successfully networking is transferred to the preferAPN linked list of the SIM card.
5. The method of claim 2, wherein the using the preset APNs for networking attempts in turn according to the preset priority order comprises:
in the process of networking attempt, if the networking attempt fails and an APN which does not attempt to network exists in the preset preferAPN chain table and the spare APN chain table, not informing the terminal of the networking failure until no APN which does not attempt to network exists in the preset preferAPN chain table and the spare APN chain table, and informing the terminal of the networking failure.
6. An APN selection apparatus, comprising:
the acquisition module is used for acquiring the information of the mobile country code MCC and the mobile network code MNC of each SIM card in the terminal;
the first generation module is used for selecting APN from a preferAPN database of each SIM card of the terminal according to MCC and MNC information of each SIM card and generating a preferAPN linked list corresponding to each SIM card, wherein the APN is recorded in the preferAPN linked list according to a priority order; wherein, APNs in the preferAPN linked list are all the APNs which have been networked by the terminal;
the networking module is used for sequentially using preset access points APNs to perform networking attempts according to the preset priority order;
the notification module is used for stopping the networking attempt after the networking is successful and notifying the terminal of the successful networking;
and the setting module is used for dynamically updating the preferAPN linked list in the networking process.
7. The apparatus of claim 6, further comprising:
and a second generating module, configured to, after generating a preferAPN linked list corresponding to each SIM card, continuously select an APN in an APN database according to MCC and MNC information of the SIM card, and generate an alternative APN linked list corresponding to each SIM card, where priorities of all APNs in the alternative APN linked list are lower than those of all APNs in the preferAPN linked list.
8. The apparatus of claim 6, wherein the first generating module comprises:
a determining unit, configured to determine a priority order of each APN according to a priority field of each APN pre-recorded in the preferAPN database;
and the inserting unit is used for inserting each APN into the preferAPN linked list according to the determined priority order.
9. The apparatus according to claim 7, wherein the setting module is specifically configured to set, after successful networking, an APN successfully used for the current networking as a highest priority, move an APN successfully used for the networking to a head node of the preferAPN, move an APN used for each failed networking attempt in the current networking process to a tail node of a linked list to which the APN belongs, transfer, when the number of networking failures of an APN in a preferAPN linked list of a SIM card reaches a preset number, the APN to a standby APN linked list of the SIM card, and transfer, after all the attempts to network using an APN in the preferAPN linked list fail and the networking succeeds using an APN in the standby APN linked list, an APN successfully used for the networking to the preferAPN linked list of the SIM card.
10. The apparatus of claim 7, wherein the networking module is specifically configured to:
in the process of networking attempt, if the networking attempt fails and an APN which does not attempt to network exists in the preset preferAPN chain table and the spare APN chain table, not informing the terminal of the networking failure until no APN which does not attempt to network exists in the preset preferAPN chain table and the spare APN chain table, and informing the terminal of the networking failure.
Priority Applications (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510724127.2A CN106658673B (en) | 2015-10-29 | 2015-10-29 | APN selection method and device |
PCT/CN2016/074352 WO2016184202A1 (en) | 2015-10-29 | 2016-02-23 | Access point name selection method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510724127.2A CN106658673B (en) | 2015-10-29 | 2015-10-29 | APN selection method and device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN106658673A CN106658673A (en) | 2017-05-10 |
CN106658673B true CN106658673B (en) | 2020-05-29 |
Family
ID=57319400
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201510724127.2A Active CN106658673B (en) | 2015-10-29 | 2015-10-29 | APN selection method and device |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN106658673B (en) |
WO (1) | WO2016184202A1 (en) |
Families Citing this family (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106954208A (en) * | 2017-04-24 | 2017-07-14 | 上海与德科技有限公司 | The Activiation method and device of a kind of identification information |
CN107295503B (en) * | 2017-07-14 | 2020-06-02 | 惠州Tcl移动通信有限公司 | Method for determining access mode of mobile terminal, storage medium and mobile terminal |
EP3860175B1 (en) * | 2018-10-15 | 2023-12-06 | Huawei Technologies Co., Ltd. | Terminal configuration method and device |
CN110913284A (en) * | 2019-11-26 | 2020-03-24 | 国网电子商务有限公司 | Method and device for collecting electric energy information |
CN112584547B (en) * | 2020-12-04 | 2023-04-25 | 北京小米移动软件有限公司 | Method, device, storage medium and terminal equipment for establishing data connection |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1705290A (en) * | 2004-06-03 | 2005-12-07 | 华为技术有限公司 | Method for accessing WLAN |
CN101730184A (en) * | 2009-11-23 | 2010-06-09 | 中兴通讯股份有限公司 | Dialing method and system based on APN self adaption |
Family Cites Families (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
EP1761089A1 (en) * | 2005-09-05 | 2007-03-07 | LG Electronics Inc. | Network selection for a multimode terminal |
CN102685710B (en) * | 2011-03-11 | 2015-05-27 | 华为技术有限公司 | Attribute information transfer method and business initiating method as well as associated equipment and system |
CN103813295B (en) * | 2012-11-13 | 2017-06-13 | 中兴通讯股份有限公司 | A kind of method and device for automatically configuring and updating APN parameter |
WO2014101046A1 (en) * | 2012-12-27 | 2014-07-03 | 华为技术有限公司 | Network device deployment method, base station, and network element management device |
WO2015132633A1 (en) * | 2014-03-06 | 2015-09-11 | Nokia Technologies Oy | Method and apparatus for determining ims connectivity through non-3gpp access networks |
-
2015
- 2015-10-29 CN CN201510724127.2A patent/CN106658673B/en active Active
-
2016
- 2016-02-23 WO PCT/CN2016/074352 patent/WO2016184202A1/en active Application Filing
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1705290A (en) * | 2004-06-03 | 2005-12-07 | 华为技术有限公司 | Method for accessing WLAN |
CN101730184A (en) * | 2009-11-23 | 2010-06-09 | 中兴通讯股份有限公司 | Dialing method and system based on APN self adaption |
Also Published As
Publication number | Publication date |
---|---|
CN106658673A (en) | 2017-05-10 |
WO2016184202A1 (en) | 2016-11-24 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN106658673B (en) | APN selection method and device | |
CN103024871B (en) | The dual mode communication method of public network and private network, terminal and system | |
US8504017B1 (en) | Method, apparatus and computer program product for a user terminal | |
KR101369046B1 (en) | Alerting a user of a mobile device of call attempts on a disabled virtual sim subscription | |
EP3136800B1 (en) | Method for updating rplmn information, and user equipment | |
US20080194253A1 (en) | Search method of a roaming service | |
CN107567011B (en) | Network access service implementation method, device and communication terminal | |
EP2485539B1 (en) | Network selection method and terminal device | |
WO2014166185A1 (en) | Method for automatic network search of mobile terminal and mobile terminal | |
CN105393603A (en) | Method for selecting public land mobile network (PLMN), and apparatus and device thereof | |
RU2745326C1 (en) | Cell selection method and terminal device | |
CN103648146A (en) | Network selection method for terminals and terminal | |
CN111034274B (en) | Method for searching network by terminal, terminal and storage medium | |
US10433214B2 (en) | Synchronization method, apparatus, and system for call supplementary service configuration | |
KR20160067956A (en) | System and methods for using wireless network correlations to acquire service on a multi-sim device | |
CN105792155A (en) | Circuit domain fallback method, communication device and communication system | |
JP6744393B2 (en) | Reduction of call failure rate in devices supporting multiple subscriber identification modules | |
CN110769442A (en) | Method and device for accessing router and Internet of things equipment | |
EP2608606A1 (en) | Establishing a connection between a mobile terminal and a network | |
EP3367731B1 (en) | Method and device for adaptive selection of data network | |
CN101483905B (en) | Network message processing method and system, network searching method, server and terminal | |
CN107635243B (en) | Processing method and device for concurrent data service | |
CN103379508B (en) | Obtain the method and system of the resident frequency of mobile terminal | |
CN106817744B (en) | Network access method and device | |
WO2017038187A1 (en) | Wireless communication device and wireless communication method |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |