WO2017197757A1 - 一种apn分配方法、装置及终端 - Google Patents

一种apn分配方法、装置及终端 Download PDF

Info

Publication number
WO2017197757A1
WO2017197757A1 PCT/CN2016/091754 CN2016091754W WO2017197757A1 WO 2017197757 A1 WO2017197757 A1 WO 2017197757A1 CN 2016091754 W CN2016091754 W CN 2016091754W WO 2017197757 A1 WO2017197757 A1 WO 2017197757A1
Authority
WO
WIPO (PCT)
Prior art keywords
apn
communication application
data connection
application
target
Prior art date
Application number
PCT/CN2016/091754
Other languages
English (en)
French (fr)
Inventor
李艳芳
李希鹏
王连臣
Original Assignee
中兴通讯股份有限公司
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by 中兴通讯股份有限公司 filed Critical 中兴通讯股份有限公司
Publication of WO2017197757A1 publication Critical patent/WO2017197757A1/zh

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W12/00Security arrangements; Authentication; Protecting privacy or anonymity
    • H04W12/08Access security
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/45Network directories; Name-to-address mapping
    • H04L61/4547Network directories; Name-to-address mapping for personal communications, i.e. using a personal identifier
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W48/00Access restriction; Network selection; Access point selection
    • H04W48/16Discovering, processing access restriction or access information
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W48/00Access restriction; Network selection; Access point selection
    • H04W48/20Selecting an access point
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W8/00Network data management
    • H04W8/26Network addressing or numbering for mobility support

Definitions

  • the present application relates to, but is not limited to, the field of communications, and in particular, to an access point name (APN) allocation method, apparatus, and terminal.
  • APN access point name
  • APN refers to a network access technology, which is a parameter that must be configured when accessing a terminal (such as a mobile phone). It determines which access method the terminal accesses the network.
  • APN Internet Protocol
  • WAP Wireless Application Protocol
  • intranet of the group There are many types of external networks that can be accessed by end users, such as the Internet (Internet), the WAP (Wireless Application Protocol) website, the intranet of the group, and the private network within the industry.
  • Internet Internet
  • WAP Wireless Application Protocol
  • APNs the range of access and the way of access are different. How does the network side know which network to access after the terminal is activated and which IP segment is allocated? This is determined by APN, that is, APN. It determines which network the user's terminal (such as a mobile phone) accesses through which access method.
  • APN has many key parameters, such as APN, IP type (type), APN type, etc.; for example, APN type (APN type) supported by Android has default, mms, supl, dun, and so on.
  • APN Access Network Code
  • SPN Service Provider Name
  • an APN that supports Internet access that is, the default APN
  • the default APN an APN that supports Internet access
  • establish a default internet data connection and report the connection success status to the application layer.
  • an application needs to access the Internet, first query whether the data connection required by the application exists and is connected. If it exists and is connected, use the connection to upload and download data to achieve the purpose of accessing the Internet; if the application queries the connection If it does not exist or the status is disconnected, it will be reported directly to the user and the network is disconnected.
  • the attempt searches for an application that supports the application from the APN that conforms to the terminal SIM card.
  • the APN establishes a data connection for use by this application.
  • SIM cards supported by terminals such as mobile phones, such as dual 3G cards, dual 4G cards, etc. Therefore, for a terminal, there are more and more APNs conforming to the SIM card, according to the above mechanism.
  • the workload of the newly discovered matching APN is also getting larger and smaller and the efficiency is getting lower and lower.
  • it can use the data connection established by the default APN, but its network quality is not good or not the best, and the related mechanism will always use the data connection established by the default APN, which will undoubtedly reduce the user. Satisfaction of experience.
  • the default APN is used to establish a data connection.
  • the default data connection established by the default APN is directly used.
  • the default data connection established by using the default APN may not be suitable for re-selection or not optimal selection, which affects the quality of the application. That is, in the process of establishing a data connection by the related terminal, there is a problem that the corresponding APN is not selected according to the current application when the data connection is established, and the established data connection does not match the current application.
  • any application in the terminal can be called for the APN that conforms to the SIM card in the terminal, and the security on the network side is poor.
  • the server upgraded by the Docomo operator system is an exclusive server, and the corresponding access APN is also an APN of a specific dun type. Since any application can call the APN of the dun type, if a malicious program calls the APN of the dun type to establish a connection, it can connect to the system upgrade server, which may cause the system to upgrade the server.
  • the embodiment of the present invention provides an APN allocation method, device, and terminal, which can be used to directly select a default APN when a related terminal selects an APN to establish a data connection, and does not match the current application correspondingly, so that the established data connection may not match the current application. Need to rebuild or affect the quality of the application Internet.
  • An embodiment of the present invention provides an APN allocation method, including:
  • the method further includes: setting an APN calling rule for the APN corresponding to the at least one communication application in the correspondence relationship list;
  • the establishing the data connection by using the found APN includes:
  • the method further includes: applying an application restriction rule to the at least one APN in the correspondence relationship list;
  • the foregoing method further includes:
  • Determining whether the target APN is set with an application restriction rule if yes, determining whether the currently started communication application satisfies the application restriction rule, and if so, allowing the target APN to be invoked.
  • the application restriction rule includes the APN being only called by the target communication application in the dedicated list;
  • Determining whether the currently started communication application satisfies the application restriction rule includes:
  • the foregoing method further includes:
  • the currently activated communication application replaces the APN with the target APN when the communication quality of the other APN is better than the communication quality of the target APN.
  • the setting includes a correspondence list of the correspondence between the communication application and the APN in the terminal, including:
  • the APN that finds the user identification card in the terminal from the total APN database is placed in the user identification card APN database;
  • Corresponding relationships are selected for selecting a corresponding APN from the user identification card APN database for the communication application in the terminal.
  • the establishing a data connection by using the target APN includes:
  • An embodiment of the present invention further provides an APN allocation apparatus, including:
  • the correspondence relationship setting module is configured to set a correspondence relationship list of the communication application of the terminal and the APN correspondence relationship;
  • a processing module configured to: when detecting that a communication application is currently started in the terminal, searching for an APN corresponding to the currently started communication application according to the correspondence relationship list;
  • a connection establishment module is configured to establish a data connection using the APN found by the processing module.
  • the device further includes: an APN calling rule setting module, configured to set an APN calling rule for the APN corresponding to the at least one communication application in the correspondence relationship list;
  • the connection establishment module includes:
  • the first determining sub-module is configured to determine whether an APN calling rule exists in the APN corresponding to the currently started communication application;
  • the first selection sub-module is configured to select a target APN from the found APNs according to the APN calling rule when the determination result of the first determining sub-module is YES, and establish a data connection by using the target APN.
  • the foregoing apparatus further includes: an application restriction rule setting module and an authentication module;
  • the application restriction rule setting module is configured to set an application restriction rule for at least one APN in the correspondence relationship list;
  • the authentication module includes:
  • a second determining sub-module configured to determine, before the first selection sub-module establishes a data connection by using the target APN, whether the target APN is set with an application restriction rule
  • the second selection sub-module is configured to determine, when the determination result of the second determining sub-module is YES, whether the currently-enabled communication application satisfies the application restriction rule, and if yes, allow the target APN to be invoked.
  • An embodiment of the present invention further provides a terminal, including a memory and a processor, where the memory is configured to store a program, and the processor is configured to execute the program to perform the following steps:
  • the embodiment of the invention further provides a computer readable storage medium, which stores a computer executable finger
  • the APN allocation method described above is implemented when the computer executable instructions are executed.
  • An embodiment of the present invention provides an APN allocation method, apparatus, and terminal, which first set a correspondence list of a communication application including a terminal and a corresponding relationship of an APN; and then, when detecting that a currently started communication application is in the terminal, The pre-set correspondence list looks up the APN corresponding to the currently launched communication application, and then establishes a data connection using the found APN for use by the currently started communication application.
  • the APN when the APN is selected to establish a data connection, the APN that matches the currently started communication application can be directly selected according to the preset correspondence list, so that the established data connection can be matched with the communication application. It may be possible to avoid reselecting the APN to re-establish the data connection and the problem that the established data connection does not match the communication application. It can improve the quality of the communication application and improve the satisfaction of the user experience.
  • the embodiment of the present invention may further set an application restriction rule for at least one APN on the basis of the foregoing.
  • the communication application needs to be authenticated according to the application restriction rule, and the authentication may be invoked. Otherwise, the call is prohibited. This ensures that some special APNs can only be called by the specified communication application, avoiding malicious application calls and improving network side security.
  • FIG. 1 is a schematic flowchart of an APN allocation method according to a first embodiment of the present application
  • FIG. 2 is a schematic diagram of a correspondence relationship provided by a first embodiment of the present application.
  • FIG. 3 is a schematic structural diagram 1 of an APN distribution apparatus according to a second embodiment of the present application.
  • FIG. 4 is a second schematic structural diagram of an APN distribution apparatus according to a second embodiment of the present application.
  • FIG. 5 is a schematic structural diagram 3 of an APN distribution apparatus according to a second embodiment of the present application.
  • FIG. 6 is a schematic structural diagram 4 of an APN distribution apparatus according to a second embodiment of the present application.
  • FIG. 7 is a schematic structural diagram of a terminal according to a third embodiment of the present disclosure.
  • FIG. 8 is a schematic diagram of an APN allocation process of a mobile phone according to a third embodiment of the present disclosure.
  • FIG. 9 is a schematic flowchart of a communication application using APN A according to a third embodiment of the present disclosure.
  • FIG. 10 is a schematic diagram of a specific communication application calling APN B according to a third embodiment of the present application.
  • the corresponding relationship of the APNs adapted by the communication application may be set first, and then when the current communication application is detected to start, the currently initiated communication may be directly found according to the set correspondence.
  • the method of directly selecting the default APN in the related technology can avoid the established data connection from being used by the communication application, and can ensure that the established data connection is the most suitable type for the communication application, and the communication application is guaranteed. Have the best internet quality.
  • the APN allocation method provided in this embodiment includes the following steps:
  • the terminal contains a total APN database containing data supporting the APN of each operator in the world.
  • the APN selection parameters of the SIM card in the terminal including but not limited to parameters such as MCC, MNC, SPN, etc.
  • the APN matching the SIM card is selected from the total APN database and placed in the SIM card APN database.
  • a corresponding APN is selected from the SIM card APN database to establish a correspondence.
  • Step S102 When it is detected that the communication application is currently started in the terminal, the APN corresponding to the currently started communication application is searched according to the preset relationship list.
  • Step S103 Establish a data connection by using the found APN; this can ensure that the established data connection is matched with the currently initiated communication application to the greatest extent, so that the communication application obtains the best network quality most quickly.
  • one communication application may correspond to one or more APNs, and one APN may also correspond to one or more communication applications.
  • the APN corresponding to the communication application 1 has A and B
  • the APN corresponding to the communication application 2 has B
  • the APN corresponding to the communication application 3 has B and C.
  • the correspondence relationship may be determined according to the communication application type and the APN type in the terminal.
  • the correspondence list in this embodiment may include all communication applications of the terminal, that is, the APN corresponding to each communication application in the terminal has a clear description in the correspondence relationship list.
  • the correspondence relationship list in this embodiment may also include only the APN correspondence relationship of the communication application (hereinafter referred to as the target communication application) that the user cares about. For example, if there are 10 communication applications in the terminal, and the user only cares about 4 of them, the correspondence relationship list only includes the APN correspondence relationship of the 4 target communication applications; for the remaining 6 pieces, the corresponding corresponding The APN is the default APN in the terminal, or other rules are used to select the corresponding APN.
  • the embodiment may further further apply to at least one communication application in the correspondence list (for example, a communication application having multiple APNs corresponding to the APN, or some special communication that the user focuses on.
  • the APN corresponding to the application or the like, or all communication applications in the list) sets the APN calling rule.
  • the APN corresponding to the currently activated communication application After finding the corresponding APN, determining whether the APN corresponding to the currently activated communication application has an APN calling rule, if yes, selecting a target APN from the found APN according to the APN calling rule, and establishing a data connection by using the target APN; If not, select one of the found APNs as the target APN according to the relevant mechanism or the random selection mechanism.
  • the APN calling rule in this embodiment may include an APN calling sequence rule.
  • the APN calling order rule included in the APN calling rule is selected from the found APN.
  • the APN with the first order is called as the target APN.
  • the APN with the first order of call is an APN that best matches the communication application, and the APN can ensure that the communication application has the best access quality.
  • the corresponding APN has two A and B. It is assumed that the communication application 1 uses A to have the best Internet access quality, and the use B has the highest Internet access quality, and the corresponding calling sequence is A. One, B second.
  • the calling sequence may be set for the communication application 2, but the first is B at this time.
  • the application restriction rule may be set to at least one APN in the correspondence list, such as a specific APN specified by the operator or a key APN specified by the user, so that only the application restriction is met.
  • the rule communication application has permission to call the APN. This can improve the security of the network side and further improve the satisfaction of the user experience.
  • the method further includes: authenticating the usage right of the communication application, and the process of the authentication includes:
  • Determining whether the selected target APN is set with an application restriction rule If yes, determining whether the currently started communication application satisfies the application restriction rule. If yes, the target APN is allowed to be called; otherwise, the mobility is prohibited, and the reselection target APN is notified.
  • the application restriction rule in this embodiment may be: the APN is only called by the target communication application in the dedicated list (that is, the white list); determining whether the communication application meets the application restriction rule includes: determining whether the currently started communication application is in the dedicated list. The target communication application; if yes, it is satisfied; otherwise, the determination is not satisfied, and the currently started communication application does not have permission to call.
  • Establishing a data connection includes:
  • the APN A ranked as the first is selected as the target APN, and it is determined that the APN A ranked first is set with the application restriction rule, and then the communication application 1 is determined whether the application restriction rule is met.
  • the call is made to use the APN A as the target APN; otherwise, it indicates that there is no permission to call, and the APN B sorted to be the second is selected to repeat the above judgment process.
  • the actual usage of each subsequent communication application may be monitored, and the set correspondence correspondence list may be appropriately adjusted according to the monitoring result to ensure the accuracy and the most corresponding relationship. Superiority. For example, when the terminal is found to initiate a certain communication application, and the data connection failure is determined by using one of the APNs corresponding to the communication application, and/or the network quality of the APN corresponding to the communication application is not used, the network quality of the other APN is not good.
  • the correspondence can be appropriately updated and adjusted. described as follows:
  • the communication application After monitoring to establish a data connection using a target APN corresponding to the communication application, the communication application uses another APN (may be outside the APN corresponding to the communication application, or may be one of the corresponding APNs, but not ranked first)
  • the APN is replaced with the target APN, that is, the APN is used as the new target APN. For example, the APN is placed in the first place of the correspondence.
  • the target APN is selected according to the corresponding relationship list and/or the calling rule for the currently started communication application, it may be determined whether the APN used by the data connection currently established by the terminal is the target APN. If so, the data connection is directly used, so that there is no need to re-establish, which can save resources, improve resource utilization, and at the same time improve networking efficiency. If the APN used by the currently established data connection is not the target APN, the target APN is used to re-establish the data connection for use by the communication application.
  • This embodiment provides an APN distribution device, as shown in FIG. 3, including:
  • the correspondence relationship setting module 31 is configured to set a correspondence relationship list of the communication application of the terminal and the APN correspondence relationship;
  • the terminal has a total APN database containing data supporting the APN of each operator in the world.
  • the correspondence relationship setting module 31 needs to select an APN matching the SIM card from the total APN database according to the APN selection parameter of the SIM card in the terminal (including but not limited to parameters such as MCC, MNC, SPN, etc.) to be placed on the SIM card APN.
  • the database then, according to user instructions or other instructions or rules, a corresponding APN is selected from the SIM card APN database for each communication application of the terminal to establish a correspondence.
  • one communication application may correspond to one or more APNs, and one APN may also correspond to one or more communication applications.
  • the processing module 32 is configured to: when detecting that the communication application is currently started in the terminal, searching for the APN corresponding to the currently started communication application according to the correspondence relationship list;
  • connection establishing module 33 is configured to establish a data connection using the APN found by the processing module to ensure that the established data connection matches the currently initiated communication application, so that the communication application obtains the best network quality most quickly.
  • all the communication applications of the terminal may be included in the correspondence list in this embodiment, that is, the APN corresponding to each communication application in the terminal is explicitly reflected in the correspondence relationship list. It can also contain only communication applications or special applications that the user cares about. For example, for a communication application whose correspondence relationship is a default APN, statistics are not performed on the correspondence relationship list. When a communication application is started and the communication application is not found in the correspondence relationship list, it naturally indicates that the communication application corresponds to the communication application. Is the default APN.
  • the APN allocation apparatus in this embodiment further includes: an APN calling rule setting module 34 configured to configure at least one communication application in the correspondence list (for example, a communication application having multiple APNs in the corresponding APN, Or the APN corresponding to some special communication applications or the like that the user focuses on, or all the communication applications in the list, set the APN calling rules;
  • an APN calling rule setting module 34 configured to configure at least one communication application in the correspondence list (for example, a communication application having multiple APNs in the corresponding APN, Or the APN corresponding to some special communication applications or the like that the user focuses on, or all the communication applications in the list, set the APN calling rules;
  • connection establishing module 33 includes:
  • the first determining sub-module 331 is configured to determine whether an APN calling rule exists in the APN corresponding to the currently started communication application;
  • the first selection sub-module 332 is configured to: when the determination result of the first determination sub-module 331 is YES, select a target APN from the found APN according to the APN calling rule, and establish a data connection by using the target APN; if not, Then, one of the found APNs is selected as the target APN according to the relevant mechanism or the random selection mechanism.
  • the APN calling rule in this embodiment may include an APN calling sequence rule.
  • the first determining sub-module 331 determines that the APN corresponding to the currently activated communication application has an APN calling rule
  • the first selecting sub-module 332 according to the APN of the APN calling rule.
  • the order rule is invoked, and the APN with the first order of invocation is selected from the found APN as the target APN.
  • the APN with the first order of call is an APN that best matches the communication application, and the APN can ensure that the communication application has the best access quality.
  • the APN allocating apparatus in this embodiment further includes: an application restriction rule setting module 35 and an authentication module 36.
  • the application restriction rule setting module 35 is configured to set an application restriction rule for at least one APN in the correspondence relationship list
  • the authentication module 36 includes:
  • the second determining sub-module 361 is configured to determine whether the target APN is set with an application restriction rule before the first selection sub-module 332 establishes a data connection by using the target APN;
  • the second selection sub-module 362 is configured to: when the determination result of the second determination sub-module 361 is YES, determine whether the currently-enabled communication application satisfies the application restriction rule, and if yes, allow the target APN to be invoked; otherwise, the call is prohibited. And notifying the first selection sub-module 332 to reselect the target APN.
  • the APN allocation apparatus in this embodiment can flexibly set any one of the APN calling rule setting module 34 and the application restriction rule setting module 35 or directly include the two modules.
  • the APN distribution device further includes: a monitoring and updating module 37 configured to monitor the actual usage of each subsequent communication application after the correspondence list is set, and may be monitored according to the monitoring.
  • the result is appropriately adjusted and updated on the set correspondence list to ensure The accuracy and optimality of the correspondence. For example, when the terminal is found to initiate a certain communication application, and the data connection failure is determined by using one of the APNs corresponding to the communication application, and/or the network quality of the APN corresponding to the communication application is not used, the network quality of the other APN is not good.
  • the correspondence can be appropriately updated and adjusted.
  • the target APN is selected according to the corresponding relationship list and/or the calling rule for the currently started communication application, it may be determined whether the APN used by the data connection currently established by the terminal is the target APN. If so, the data connection is directly used, so that there is no need to re-establish, which can save resources, improve resource utilization, and at the same time improve networking efficiency. If the APN used by the currently established data connection is not the target APN, the target APN is used to re-establish the data connection for use by the communication application.
  • This embodiment provides a terminal, which may be a mobile phone terminal or other communication terminal.
  • a terminal which may be a mobile phone terminal or other communication terminal.
  • FIG. 7 which includes a memory 71 and a processor 72, the memory 71 is configured to store a program, and the processor 72 is configured to run the memory.
  • the program in 71 performs the following APN assignment process:
  • the terminal is a mobile phone
  • the mobile phone can be a single SIM mobile phone, or a dual SIM card or a mobile phone supporting more SIM cards.
  • the APN dynamic allocation process of the mobile phone is shown in Figure 8, and includes the following steps:
  • Step S801 After the SIM card is recognized, the APN selection parameter (including but not limited to parameters such as MCC, MNC, SPN, etc.) of the SIM card in the mobile phone is read;
  • the APN selection parameter including but not limited to parameters such as MCC, MNC, SPN, etc.
  • Step S802 determining whether the reading is successful, if yes, go to step S803; otherwise, go to step S811;
  • Step S803 Generate a SIM card APN database, the database contains all APNs that match the SIM card;
  • Step S804 Select a default APN to establish a default data connection
  • Step S805 Ask the user whether to set the corresponding relationship and rules, if yes, go to step S806; otherwise, go to step S810;
  • Step S806 storing the set correspondence table and rules (including but not limited to at least one of an application restriction rule and an APN calling rule);
  • Step S807 When it is detected that a new communication application is started, the data connection is established according to the correspondence relationship table and the rule selection target APN.
  • Step S808 monitoring the subsequent use of the communication application, determining whether the set correspondence is optimal, if yes, go to step S811; otherwise, go to step S809;
  • Step S809 The corresponding relationship is updated according to the monitored situation, and then the process returns to step S806;
  • Step S810 Establish a data connection using the last APN or default mechanism, and go to step S811.
  • Step S811 End.
  • the calling usage process is as shown in FIG. 9, and includes the following steps:
  • Step S901 determining, according to the above correspondence table and rules, that the communication application 1 uses the target APN A;
  • Step S902 determining whether the APNx currently connected to the mobile phone is APN A, if yes, go to step S906; otherwise, go to step S903;
  • Step S903 Establish a data connection by using APN A;
  • Step S905 The communication application 1 accesses the Internet using the data connection established by the APN A.
  • Step S906 The communication application 1 connects to the Internet using the current data connection.
  • Step S907 The communication application 1 accesses the Internet using the current default data connection, and updates APN A to APNx.
  • the calling usage process is shown in FIG. 10, and includes the following steps:
  • Step S1001 The communication application 3 starts running and requests to call APN B;
  • Step S1002 whether the communication application 3 is in the white list of APN B, if yes, go to step S1003; otherwise, go to step S1005;
  • Step S1003 Establish a data connection by using APN B.
  • Step S1004 The communication application 3 uses the data connection established by the APN B to access the Internet.
  • Step S1005 The return data connection establishment fails.
  • the embodiment of the invention further provides a computer readable storage medium storing computer executable instructions, which are implemented when the computer executable instructions are executed.
  • modules or steps of the present application can be implemented by a general computing device, which can be concentrated on a single computing device or distributed over a network composed of multiple computing devices, optionally They can be implemented by program code executable by the computing device so that they can be stored in a storage medium (ROM/RAM, disk, optical disk) by the computing device and, in some cases, can be different
  • the steps shown or described herein are performed sequentially, or they are separately fabricated into a single integrated circuit module, or a plurality of modules or steps thereof are fabricated as a single integrated circuit module. Therefore, the application is not limited to any particular combination of hardware and software.
  • the embodiment of the present application provides an APN allocation method, device, and terminal, which can ensure that the established data connection is matched with the communication application, and avoids the problem of re-selecting the APN re-establishment data connection and the established data connection and communication application mismatch as much as possible; It can improve the quality of the communication application and improve the satisfaction of the user experience.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Databases & Information Systems (AREA)
  • Mobile Radio Communication Systems (AREA)
  • Communication Control (AREA)

Abstract

本文公开了一种APN分配方法、装置及终端,先设置好包含终端的通信应用与APN对应关系的对应关系列表;然后在检测到终端中当前有通信应用启动时,可以直接根据预先设置好的对应关系列表查找该当前启动的通信应用所对应的APN,然后使用查找到的APN建立数据连接,以供该当前启动的通信应用使用。也即在选择APN建立数据连接时,可直接根据预先设置好的对应关系列表选择与当前启动通信应用匹配的APN,因此,可以保证建立的数据连接与该通信应用匹配,尽可能避免重选APN重新建立数据连接以及所建立的数据连接与通信应用不匹配的问题。既能提升通信应用的上网质量,又能提升用户体验的满意度。

Description

一种APN分配方法、装置及终端 技术领域
本申请涉及但不限于通信领域,尤其涉及一种接入点名称(APN,Access Point Name)分配方法、装置及终端。
背景技术
随着3G(Third Generation,第三代移动通信技术)/4G(Fourth Generation,第四代移动通信技术)等移动网络的快速发展,支持单或多3G/4G卡的终端可以预见将会以爆炸式的方式增长。移动网络数据业务已成为智能终端必不可少的关键业务。终端使用移动网络上网必然要用到APN(Access Point Name,接入点名称)。
APN指一种网络接入技术,是通过终端(例如手机)上网时必须配置的一个参数,它决定了终端通过哪种接入方式来访问网络。
对于终端用户来说,可以访问的外部网络类型有很多,例如:因特网(Internet)、WAP(Wireless Application Protocol,无线应用协议)网站、集团企业内部网络、行业内部专用网络。而不同的APN,所能访问的范围以及接入的方式是不同的,网络侧如何知道终端激活以后要访问哪个网络从而分配哪个网段的IP呢,这就要靠APN来区分了,即APN决定了用户的终端(例如手机)通过哪种接入方式来访问什么样的网络。
不同的运营商其APN配置信息是不一样的。定制的项目,运营商会提供其对应的APN信息。APN的关键参数很多,如APN、IP类型(type)、APN type等等;例如安卓(Android)支持的APN类型(APN type)有default、mms、supl、dun等等。
目前市场上手机或其他终端只要数据开关处于打开状态,都是需要建立无线数据网络,而且首先默认建立internet的数据连接。建立数据连接就需要选择APN。选择APN的方案是Android的框架层根据终端中SIM卡(Subscriber Identity Module,用户识别卡)中的MCC(Mobile Country Code, 移动国家码)、MNC(Mobile Network Code,移动网络码)以及SPN(Service Provider Name,运营商名字)等参数作为筛选条件,从预置的APN数据库中筛选出所有符合此SIM卡MCC、MNC、SPN等参数的APN。然后,按照数据库中的顺序从序号小的开始选择一个支持Internet上网的APN(也即默认APN),建立默认的internet数据连接,并把连接成功状态上报给应用层。当某个应用需要上网时,首先查询此应用所需的数据连接是否存在并且是否是连接态,如果存在并且是连接的,就是使用该连接上传下载数据,达到上网的目的;如果此应用查询连接不存在或者状态为断开,则直接上报给用户,断网状态。
目前常用的通信应用(如浏览器、微信等)都是使用internet数据连接,当这些应用需要上网时就查询internet连接是否为连接态,决定是否能上网;这类应用可以直接使用采用默认APN建立的数据连接。但还有一些应用不能使用默认的APN建立的数据连接,此时尝试失败后需要为这类应用重新选择对应类型的APN建立数据连接供这类应用使用。例如,对于一些不能使用默认APN建立的数据连接的应用,其开启时,先尝试用默认的APN建立的数据连接,尝试失败时再从根据符合终端SIM卡的APN中查找出一个支持该应用的APN建立数据连接,供此应用使用。而目前手机等终端所支持的SIM卡越来越多,例如双3G卡、双4G卡等等,因此,对于一个终端来说符合SIM卡的APN也越来越多,根据上述这种机制为应用重新查找到的匹配的APN的工作量也越来越大,效率越来越低。另外,对于一些应用,其可以使用默认APN建立的数据连接,但其网络质量并不好或并不是最好,而相关机制中该应用会一直使用该默认APN建立的数据连接,无疑会降低用户体验的满意度。
综上可知,目前终端建立数据连接时,不管当前运行什么应用,都直接采用默认APN建立数据连接,在应用开启时都是先直接使用默认APN建立的默认数据连接,然而,对于此应用来说,使用默认APN建立的默认数据连接可能不适用需重选或者并不是最优的选择,影响应用上网质量。也即相关终端建立数据连接过程中,存在建立数据连接时不根据当前应用选择对应的APN,导致建立的数据连接与当前应用不匹配的问题。
另外,目前对于终端中符合SIM卡的APN,终端中任意应用都可以调用,对于网络侧安全性差。例如Docomo运营商系统升级的服务器是专享服务器,对应的接入APN也是特定dun类型的APN。由于任意应用都可以调用该dun类型的APN,因此,如果某恶意程序调用该dun类型的APN建立连接就可连接到系统升级服务器,很可能造成系统升级服务器瘫痪。
发明内容
以下是对本文详细描述的主题的概述。本概述并非是为了限制权利要求的保护范围。
本发明实施例提供了一种APN分配方法、装置及终端,解决相关终端选择APN建立数据连接时直接选择默认APN,而不根据当前应用对应选择,导致建立的数据连接可能与当前应用不匹配进而需要重建或影响应用上网质量的问题。
本发明实施例提供了一种APN分配方法,包括:
设置包含终端的通信应用与APN对应关系的对应关系列表;
检测到所述终端中当前有通信应用启动时,根据所述对应关系列表查找该当前启动的通信应用对应的APN;
使用查找到的APN建立数据连接。
在本申请的一种实施例中,上述方法还包括:对所述对应关系列表中的至少一个通信应用所对应的APN设置APN调用规则;
所述使用查找到的APN建立数据连接包括:
判断所述当前启动的通信应用对应的APN是否存在APN调用规则,如存在,根据所述APN调用规则从查找到的APN中选择出目标APN,使用所述目标APN建立数据连接。
在本申请的一种实施例中,上述方法还包括:对所述对应关系列表中的至少一个APN设置应用限制规则;
在使用所述目标APN建立数据连接之前,上述方法还包括:
判断所述目标APN是否设置有应用限制规则,如存在,判断所述当前启动的通信应用是否满足该应用限制规则,如满足,允许调用所述目标APN。
在本申请的一种实施例中,所述应用限制规则包含APN仅供专用清单中的目标通信应用调用;
判断所述当前启动的通信应用是否满足所述应用限制规则包括:
判断所述当前启动的通信应用是否为所述专用清单中的目标通信应用。
在本申请的一种实施例中,上述方法还包括:
监测到使用所述目标APN建立数据连接失败时,对所述对应关系列表中所述当前启动的通信应用所对应的该目标APN进行删除;
和/或,
监测到使用所述目标APN建立数据连接后,该当前启动的通信应用使用其他APN的通信质量比使用该目标APN的通信质量好时,将该APN替换为目标APN。
在本申请的一种实施例中,所述设置包含终端中通信应用与APN对应关系的对应关系列表包括:
将从总APN数据库中查找到与所述终端内的用户识别卡匹配的APN放入用户识别卡APN数据库;
为所述终端中的通信应用从所述用户识别卡APN数据库中选择对应的APN建立对应关系。
在本申请的一种实施例中,所述使用所述目标APN建立数据连接包括:
判断所述终端当前已建立的数据连接所使用的APN是否是所述目标APN,如是,使用该数据连接;如不是,使用该目标APN重新建立数据连接。
本发明实施例还提供了一种APN分配装置,包括:
对应关系设置模块,配置为设置终端的通信应用与APN对应关系的对应关系列表;
处理模块,配置为检测到所述终端中当前有通信应用启动时,根据所述对应关系列表查找该当前启动的通信应用对应的APN;
连接建立模块,配置为使用所述处理模块查找到的APN建立数据连接。
在本申请的一种实施例中,上述装置还包括:APN调用规则设置模块,配置为对所述对应关系列表中的至少一个通信应用所对应的APN设置APN调用规则;
所述连接建立模块包括:
第一判断子模块,配置为判断所述当前启动的通信应用对应的APN是否存在APN调用规则;
第一选择子模块,配置为在所述第一判断子模块的判断结果为是时,根据所述APN调用规则从查找到的APN中选择出目标APN,使用所述目标APN建立数据连接。
在本申请的一种实施例中,上述装置还包括:应用限制规则设置模块和鉴权模块;
所述应用限制规则设置模块,配置为对所述对应关系列表中的至少一个APN设置应用限制规则;
所述鉴权模块包括:
第二判断子模块,配置为第一选择子模块使用所述目标APN建立数据连接之前,判断所述目标APN是否设置有应用限制规则;
第二选择子模块,配置为在所述第二判断子模块的判断结果为是时,判断该当前启动的通信应用是否满足该应用限制规则,如满足,允许调用所述目标APN。
本发明实施例还提供了一种终端,包括存储器和处理器,所述存储器配置为存储程序,所述处理器配置为运行所述程序执行以下步骤:
设置包含终端的通信应用与APN对应关系的对应关系列表;
检测到所述终端中当前有通信应用启动时,根据所述对应关系列表查找该当前启动的通信应用对应的APN;
使用查找到的APN建立数据连接。
本发明实施例还提供一种计算机可读存储介质,存储有计算机可执行指 令,所述计算机可执行指令被执行时实现上述APN分配方法。
本发明实施例的有益效果:
本发明实施例提供了一种APN分配方法、装置及终端,先设置好包含终端的通信应用与APN对应关系的对应关系列表;然后在检测到终端中有当前启动的通信应用时,可以直接根据预先设置好的对应关系列表查找该当前启动的通信应用所对应的APN,然后使用查找到的APN建立数据连接,以供该当前启动的通信应用使用。也即本发明实施例在选择APN建立数据连接时,可直接根据预先设置好的对应关系列表选择与当前启动的通信应用匹配的APN,因此,可以保证建立的数据连接与该通信应用匹配,尽可能避免重选APN重新建立数据连接以及所建立的数据连接与通信应用不匹配的问题。既能提升通信应用的上网质量,又能提升用户体验的满意度。
本发明实施例还可在上述基础上,针对至少一个APN设置应用限制规则,当有通信应用需要调用该APN时,需根据该应用限制规则对该通信应用进行鉴权,鉴权通过才能调用,否则,禁止调用。这样可以保证一些特殊的APN只能由指定的通信应用进行调用,避免恶意应用调用,提升网络侧的安全性。
在阅读并理解了附图和详细描述后,可以明白其他方面。
附图概述
图1为本申请第一实施例提供的APN分配方法的流程示意图;
图2为本申请第一实施例提供的对应关系示意图;
图3为本申请第二实施例提供的APN分配装置的结构示意图一;
图4为本申请第二实施例提供的APN分配装置的结构示意图二;
图5为本申请第二实施例提供的APN分配装置的结构示意图三;
图6为本申请第二实施例提供的APN分配装置的结构示意图四;
图7为本申请第三实施例提供的终端的结构示意图;
图8为本申请第三实施例提供的手机的APN分配流程示意图;
图9为本申请第三实施例提供的通信应用使用APN A的流程示意图;
图10为本申请第三实施例提供的特定通信应用调用APN B的示意图。
本发明的实施方式
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,所描述的实施例只是本申请中一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。
现通过具体实施方式结合附图的方式对本申请做出进一步的诠释说明。
第一实施例
本实施例根据不同通信应用的需求,可以先设置好通信应用所适配的APN的对应关系,然后在检测到当前有通信应用启动时,可以根据设置好的对应关系直接查找到当前启动的通信应用匹配的APN,相对相关技术中直接选用默认APN的方式,既能避免所建立的数据连接不能被通信应用使用,又能保证建立的数据连接是与该通信应用最为匹配的类型,保证通信应用有最好的上网质量。参见图1所示,本实施例提供的APN分配方法包括以下步骤:
步骤S101:设置包含终端的通信应用与APN对应关系的对应关系列表。
终端中包含总APN数据库,该总APN数据库包含支持全球每个运营商的APN的数据。需根据终端中的SIM卡的APN选择参数(包括但不限于MCC、MNC、SPN等参数),从该总APN数据库中选择出与该SIM卡匹配的APN放到SIM卡APN数据库中。然后,为终端的每个通信应用从SIM卡APN数据库中选择对应的APN建立对应关系。
步骤S102:检测到终端中当前有通信应用启动时,根据预先设置好的对应关系列表查找该当前启动的通信应用对应的APN。
步骤S103:使用查找到的APN建立数据连接;这样可以最大程度上保证所建立的数据连接与当前启动的通信应用匹配,使得该通信应用最快速地获得最好的网络质量。
应当理解的是,本实施例中的对应关系列表中,一个通信应用可能对应一个或多个APN,一个APN也可能对应一个或多个通信应用。如图2所示, 通信应用1对应的APN有A、B,通信应用2对应的APN有B,通信应用3对应的APN有B、C。对应关系可根据终端中的通信应用类型以及APN类型等确定。
另外,应当理解的是,本实施例中的对应关系列表中可以包含终端的所有通信应用,也即终端中的每一个通信应用所对应的APN在该对应关系列表中都有明确的记载。本实施例中的对应关系列表中也可仅包含用户所关心的通信应用(以下称为目标通信应用)的APN对应关系。例如,假设终端中有10个通信应用,用户仅关心其中的4个,则该对应关系列表中仅包含这4个目标通信应用的APN对应关系;对于剩余的6个,则可默认其对应的APN就是终端中的默认APN,或者采用其他规则选择对应的APN等。
基于上述建立的对应关系列表,在通信应用启动时即可根据该对应关系列表最快、最准确地找到与该通信应用匹配的APN,进而使用该APN建立数据连接。但正如上所述,对于一个通信应用,根据对应关系列表查找到的对应APN可能是一个,也可能是多个。因此,在查找到对应的APN后,对于查找到的APN如何进行调用以保证最终调用的APN是与通信应用最为匹配的也是一个值得深究的问题。对此,本实施例在设置好上述对应关系列表后,还可进一步对对应关系列表中的至少一个通信应用(例如,对应的APN有多个的通信应用,或用户所重点关注的一些特殊通信应用等等,或列表中的所有通信应用)所对应的APN设置APN调用规则。此时,使用查找到的APN建立数据连接的过程如下:
在查找到对应的APN之后,判断该当前启动的通信应用对应的APN是否存在APN调用规则,如存在,根据该APN调用规则从查找到的APN中选择出目标APN,使用目标APN建立数据连接;如不存在,则根据相关机制或随机选择机制从查找到的APN中选择一个作为目标APN。
本实施例中的APN调用规则可包含APN调用顺序规则;当判断当前启动的通信应用对应的APN存在APN调用规则时,则根据APN调用规则包含的APN调用顺序规则,从查找到的APN中选择调用顺序为第一的APN作为目标APN。调用顺序为第一的APN为与该通信应用最为匹配的一个APN,该APN可以保证通信应用有最好的上网质量。
例如,对于图2中的通信应用1,其对应的APN有A、B两个,假设通信应用1使用A的上网质量最好,使用B的上网质量次之,则对应的调用顺序为A第一,B第二。
又例如,对于通信应用2,其对应的APN只有一个B时,也可对该通信应用2设置调用顺序,只是此时的第一就是B。
对于每个APN的调用顺序,除了上网质量这一考量因素外,还可根据具体需求结合其他的因素设置。
另外,对于相关技术中,针对每个APN,终端内的任意通信应用都可以进行调用而存在的安全隐患的问题。本实施例在设置好上述对应关系列表后,还可以对对应关系列表中的至少一个APN(例如运营商指定的特定APN或者用户指定的重点APN等)设置应用限制规则,使得只有满足该应用限制规则的通信应用才有权限对该APN进行调用。这样可以提升网络侧的安全性,进一步提升用户体验的满意度。此时,使用目标APN建立数据连接之前,所述方法还包括:对该通信应用的使用权限进行鉴权,鉴权的过程包括:
判断选择的目标APN是否设置有应用限制规则,如存在,判断该当前启动的通信应用是否满足该应用限制规则,如满足,允许调用目标APN;否则,禁止调动,并通知重选目标APN。
本实施例中的应用限制规则可为:APN仅供专用清单(也即白名单)中的目标通信应用调用;判断通信应用是否满足应用限制规则包括:判断当前启动的通信应用是否为专用清单中的目标通信应用;如是,则满足;否则,判定不满足,当前启动的通信应用没有权限进行调用。
例如,当对于图2中的通信应用1既设定了APN调用顺序规则,又针对其对应的其中一个APN A(假设为排序第一的APN)设置了应用限制规则;则使用查找到的APN建立数据连接包括:
根据APN调用顺序规则选择排序为第一的APN A作为目标APN,判断出排序为第一的APN A设置有应用限制规则,则判断通信应用1是否满足该应用限制规则,如满足,则有权限进行调用,将该APN A作为目标APN;否则,表明无权限调用,需选择排序为第二的APN B重复上述判断过程。
上述示例是结合APN调用顺序规则和应用限制规则而进行的说明。应当理解的是,用户可以根据自己的实际需求选择设置上述两个规则中的任意一个或都进行设置,且其设置的对象也可根据具体的情况灵活选择。
本实施例中,设置好对应关系列表后,可对后续每个通信应用的实际使用情况进行监控,且可根据监测结果对设置的对应关系列表进行适当调整,以保证对应关系的准确性和最优性。例如,当发现终端启动某一通信应用,使用该通信应用对应的其中一个APN建立数据连接失败时,和/或,使用该通信应用对应的一个APN的网络质量反而没有使用其他APN的网络质量好时,都可对对应关系进行适当地更新调整。说明如下:
监测到使用通信应用对应的一目标APN建立数据连接失败时,表明该APN与该通信应用并不匹配,对对应关系列表中该通信应用所对应的该目标APN进行删除更新;
监测到使用通信应用对应的一目标APN建立数据连接后,该通信应用使用其他APN(可能是该通信应用对应APN之外的,也可能是对应APN中的一个,但不是排在第一的)的通信质量比使用该通信应用的目标APN的通信质量好时,将该APN替换为目标APN,也即将该APN作为新的目标APN。例如将该APN放置在对应关系的第一位。
对于一些终端,根据其上网设置情况,可能会在开机启动后就需要建立数据连接,此时建立数据连接时往往是选用默认APN建立数据连接。因此,本实施例中,当对于当前启动的通信应用,根据上述对应关系列表和/或调用规则选择出目标APN后,可以先判断终端当前已建立的数据连接所使用的APN是否就是该目标APN,如是,则直接使用该数据连接,这样就不需要重新建立,可节省资源,提升资源利用率,并同时提升联网效率。如当前已建立的数据连接所使用的APN不是该目标APN,则使用该目标APN重新建立数据连接以供通信应用使用。
第二实施例
本实施例提供了一种APN分配装置,请参见图3所示,包括:
对应关系设置模块31,配置为设置终端的通信应用与APN对应关系的对应关系列表;
终端中有包含支持全球每个运营商的APN的数据的总APN数据库。对应关系设置模块31需根据终端中的SIM卡的APN选择参数(包括但不限于MCC、MNC、SPN等参数),从该总APN数据库中选择出与该SIM卡匹配的APN放到SIM卡APN数据库中;然后,根据用户指令或其他指令或规律,为终端的每个通信应用从SIM卡APN数据库中选择对应的APN建立对应关系。得到的对应关系列表中,一个通信应用可能对应一个或多个APN,一个APN也可能对应一个或多个通信应用。
处理模块32,配置为检测到终端中当前有通信应用启动时,根据对应关系列表查找该当前启动的通信应用对应的APN;
连接建立模块33,配置为使用处理模块查找到的APN建立数据连接,以保证所建立的数据连接与当前启动的通信应用匹配,使得该通信应用最快速地获得最好的网络质量。
应当理解的是,本实施例中的对应关系列表中可以包含终端的所有通信应用,也即终端中的每一个通信应用所对应的APN在该对应关系列表中都有明确的体现。也可仅包含用户所关心的通信应用或一些特殊应用。例如对于对应关系为默认APN的这一类通信应用,在该对应关系列表就不进行统计,当一通信应用启动且该对应关系列表中未查找到该通信应用时,就自然表明该通信应用对应的是默认APN。
请参见图4所示,本实施例中的APN分配装置还包括:APN调用规则设置模块34,配置为对对应关系列表中的至少一个通信应用(例如,对应的APN有多个的通信应用,或用户所重点关注的一些特殊通信应用等等,或列表中的所有通信应用)所对应的APN设置APN调用规则;
所述连接建立模块33包括:
第一判断子模块331,配置为判断当前启动的通信应用对应的APN是否存在APN调用规则;
第一选择子模块332,配置为在第一判断子模块331的判断结果为是时,根据该APN调用规则从查找到的APN中选择出目标APN,使用目标APN建立数据连接;如不存在,则根据相关机制或随机选择机制从查找到的APN中选择一个作为目标APN。
本实施例中的APN调用规则可包含APN调用顺序规则;第一判断子模块331判断当前启动的通信应用对应的APN存在APN调用规则时,则第一选择子模块332根据APN调用规则包含的APN调用顺序规则,从查找到的APN中选择调用顺序为第一的APN作为目标APN。调用顺序为第一的APN为与该通信应用最为匹配的一个APN,该APN可以保证通信应用有最好的上网质量。
应当理解的是,对于每个APN的调用顺序,除了上网质量这一考量因素外,还可根据需求结合其他的因素设置。
对于相关技术中,针对每个APN,终端内的任意通信应用都可以进行调用而存在的安全隐患的问题。本实施例可对特定的或所有APN设置应用限制规则,使得只有满足该应用限制规则的通信应用才有权限对该APN进行调用。这样可以提升网络侧的安全性,进一步提升用户体验的满意度。请参见图5所示,本实施例中的APN分配装置还包括:应用限制规则设置模块35和鉴权模块36。
所述应用限制规则设置模块35配置为对对应关系列表中的至少一个APN设置应用限制规则;
所述鉴权模块36包括:
第二判断子模块361,配置为在第一选择子模块332使用目标APN建立数据连接之前,判断该目标APN是否设置有应用限制规则;
第二选择子模块362,配置为在第二判断子模块361的判断结果为是时,判断当前启动的通信应用是否满足该应用限制规则,如满足,允许调用所述目标APN;否则,禁止调用,并通知第一选择子模块332重新选择目标APN。
应当理解的是,本实施例中的APN分配装置可以灵活地设置包含APN调用规则设置模块34和应用限制规则设置模块35中的任意一个或直接包含这两个模块。
本实施例中,请参见图6所示,APN分配装置还包括:监测更新模块37,配置为在设置好对应关系列表后,对后续每个通信应用的实际使用情况进行监控,且可根据监测结果对设置的对应关系列表进行适当地调整更新,以保 证对应关系的准确性和最优性。例如,当发现终端启动某一通信应用,使用该通信应用对应的其中一个APN建立数据连接失败时,和/或,使用该通信应用对应的一个APN的网络质量反而没有使用其他APN的网络质量好时,都可对对应关系进行适当地更新调整。
对于一些终端,根据其上网设置情况,可能会在开机启动后就需要建立数据连接,此时建立数据连接时往往是选用默认APN建立数据连接。因此,本实施例中,当对于当前启动的通信应用,根据上述对应关系列表和/或调用规则选择出目标APN后,可以先判断终端当前已建立的数据连接所使用的APN是否就是该目标APN,如是,则直接使用该数据连接,这样就不需要重新建立,可节省资源,提升资源利用率,并同时提升联网效率。如当前已建立的数据连接所使用的APN不是该目标APN,则使用该目标APN重新建立数据连接以供通信应用使用。
第三实施例
本实施例提供了一种终端,该终端可以是手机终端或其他通信终端,请参见图7所示,其包括存储器71和处理器72,存储器71配置为存储程序,处理器72配置为运行存储器71中的程序执行以下APN分配过程:
设置包含终端的通信应用与APN对应关系的对应关系列表;
检测到终端中有当前有通信应用启动时,根据对应关系列表查找该当前启动的通信应用对应的APN;
使用查找到的APN建立数据连接。
处理器72执行上述程序分配APN的过程请参见实施例一所示。
下面以终端为手机,该手机可以是单SIM手机,也可以是双SIM卡或支持更多的SIM卡的手机。该手机的APN动态分配过程请参见图8所示,包括以下步骤:
步骤S801:当SIM卡识别以后,读取手机中SIM卡的APN选择参数(包括但不限于MCC、MNC、SPN等参数);
步骤S802:判断读取是否成功,如是,转至步骤S803;否则,转至步骤S811;
步骤S803:生成SIM卡APN数据库,该数据库中包含所有与SIM卡匹配的APN;
步骤S804:选择默认APN建立默认的数据连接;
步骤S805:询问用户是否设置对应关系和规则,如是,转至步骤S806;否则,转至步骤S810;
步骤S806:存储设置的对应关系表以及规则(包括但不限于应用限制规则和APN调用规则中的至少一个);
步骤S807:检测到有新通信应用启动时,根据对应关系表和规则选择目标APN建立数据连接;
步骤S808:监控通信应用后续的使用情况,判断设置的对应关系是否是最优的,如是,转至步骤S811;否则,转至步骤S809;
步骤S809:根据监测到的情况对对应关系进行更新后转回至步骤S806;
步骤S810:使用上次的APN或默认机制建立数据连接,转至步骤S811。
步骤S811:结束。
在其中一个示例中,假设图2所示的对应关系中的通信应用1使用目标APN A,则调用使用过程参见图9所示,包括以下步骤:
步骤S901:根据上述对应关系表和规则确定出通信应用1使用目标APN A;
步骤S902:判断手机当前连接的APNx是否就是APN A,如是,转至步骤S906;否则,转至步骤S903;
步骤S903:使用APN A建立数据连接;
步骤S904:判断数据连接建立是否成功,如是,转至步骤S905;否则,转至步骤S907;
步骤S905:通信应用1使用APN A建立的数据连接上网。
步骤S906:通信应用1使用当前数据连接上网。
步骤S907:通信应用1使用当前默认的数据连接上网,并更新APN A为APNx。
在其中一个示例中,假设图2所示的对应关系中,APN B只能由通信应用3使用,则调用使用过程参见图10所示,包括以下步骤:
步骤S1001:通信应用3开始运行并要求调用APN B;
步骤S1002:通信应用3是否在APN B的白名单中,如是,转至步骤S1003;否则,转至步骤S1005;
步骤S1003:使用APN B建立数据连接;
步骤S1004:通信应用3使用APN B建立的数据连接上网。
步骤S1005:返回数据连接建立失败。
本发明实施例还提供一种计算机可读存储介质,存储有计算机可执行指令,所述计算机可执行指令被执行时实现上述APN分配方法。
本领域的技术人员应该明白,上述本申请的模块或步骤可以用通用的计算装置来实现,它们可以集中在单个的计算装置上,或者分布在多个计算装置所组成的网络上,可选地,它们可以用计算装置可执行的程序代码来实现,从而,可以将它们存储在存储介质(ROM/RAM、磁碟、光盘)中由计算装置来执行,并且在某些情况下,可以以不同于此处的顺序执行所示出或描述的步骤,或者将它们分别制作成单个集成电路模块,或者将它们中的多个模块或步骤制作成单个集成电路模块来实现。所以,本申请不限制于任何特定的硬件和软件结合。
以上仅是本申请的具体实施方式而已,并非对本申请做任何形式上的限制,凡是依据本申请的技术实质对以上实施方式所做的任意简单修改、等同变化、结合或修饰,均仍属于本申请技术方案的保护范围。
工业实用性
本申请实施例提供一种APN分配方法、装置及终端,可以保证建立的数据连接与通信应用匹配,尽可能避免重选APN重新建立数据连接以及所建立的数据连接与通信应用不匹配的问题;既能提升通信应用的上网质量,又能提升用户体验的满意度。

Claims (11)

  1. 一种接入点名称APN分配方法,包括:
    设置包含终端的通信应用与APN对应关系的对应关系列表;
    检测到所述终端中当前有通信应用启动时,根据所述对应关系列表查找该当前启动的通信应用对应的APN;
    使用查找到的APN建立数据连接。
  2. 如权利要求1所述的APN分配方法,所述方法还包括:对所述对应关系列表中的至少一个通信应用所对应的APN设置APN调用规则;
    其中,所述使用查找到的APN建立数据连接包括:
    判断所述当前启动的通信应用对应的APN是否存在APN调用规则,如存在,根据所述APN调用规则从查找到的APN中选择出目标APN,使用所述目标APN建立数据连接。
  3. 如权利要求2所述的APN分配方法,所述方法还包括:对所述对应关系列表中的至少一个APN设置应用限制规则;
    所述使用所述目标APN建立数据连接之前,所述方法还包括:
    判断所述目标APN是否设置有应用限制规则,如存在,判断所述当前启动的通信应用是否满足该应用限制规则,如满足,允许调用所述目标APN。
  4. 如权利要求3所述的APN分配方法,其中,所述应用限制规则包含APN仅供专用清单中的目标通信应用调用;
    所述判断所述当前启动的通信应用是否满足所述应用限制规则包括:
    判断所述当前启动的通信应用是否为所述专用清单中的目标通信应用。
  5. 如权利要求2至4任一项所述的APN分配方法,所述方法还包括:
    监测到使用所述目标APN建立数据连接失败时,对所述对应关系列表中所述当前启动的通信应用所对应的该目标APN进行删除;
    和/或,
    监测到使用所述目标APN建立数据连接后,该当前启动的通信应用使用其他APN的通信质量比使用该目标APN的通信质量好时,将该APN替换 为目标APN。
  6. 如权利要求1至4任一项所述的APN分配方法,其中,所述设置包含终端中通信应用与APN对应关系的对应关系列表包括:
    将从总APN数据库中查找到与所述终端内的用户识别卡匹配的APN放入用户识别卡APN数据库;
    为所述终端中的通信应用从所述用户识别卡APN数据库中选择对应的APN建立对应关系。
  7. 如权利要求2至4任一项所述的APN分配方法,其中,所述使用所述目标APN建立数据连接包括:
    判断所述终端当前已建立的数据连接所使用的APN是否是所述目标APN,如是,使用该数据连接;如不是,使用该目标APN重新建立数据连接。
  8. 一种接入点名称APN分配装置,包括:
    对应关系设置模块,配置为设置终端的通信应用与APN对应关系的对应关系列表;
    处理模块,配置为检测到所述终端中当前有通信应用启动时,根据所述对应关系列表查找该当前启动的通信应用对应的APN;
    连接建立模块,配置为使用所述处理模块查找到的APN建立数据连接。
  9. 如权利要求8所述的APN分配装置,所述装置还包括:APN调用规则设置模块,配置为对所述对应关系列表中的至少一个通信应用所对应的APN设置APN调用规则;
    其中,所述连接建立模块包括:
    第一判断子模块,配置为判断所述当前启动的通信应用对应的APN是否存在APN调用规则;
    第一选择子模块,配置为在所述第一判断子模块的判断结果为是时,根据所述APN调用规则从查找到的APN中选择出目标APN,使用所述目标APN建立数据连接。
  10. 如权利要求9所述的APN分配装置,所述装置还包括:应用限制 规则设置模块和鉴权模块;
    所述应用限制规则设置模块,配置为对所述对应关系列表中的至少一个APN设置应用限制规则;
    所述鉴权模块包括:
    第二判断子模块,配置为在第一选择子模块使用所述目标APN建立数据连接之前,判断所述目标APN是否设置有应用限制规则;
    第二选择子模块,配置为在所述第二判断子模块的判断结果为是时,判断该当前启动的通信应用是否满足该应用限制规则,如满足,允许调用所述目标APN。
  11. 一种终端,包括存储器和处理器,所述存储器配置为存储程序,所述处理器配置为运行所述程序执行以下步骤:
    设置包含终端的通信应用与接入点名称APN对应关系的对应关系列表;
    检测到所述终端中当前有通信应用启动时,根据所述对应关系列表查找该当前启动的通信应用对应的APN;
    使用查找到的APN建立数据连接。
PCT/CN2016/091754 2016-05-18 2016-07-26 一种apn分配方法、装置及终端 WO2017197757A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201610330316.6A CN107404543A (zh) 2016-05-18 2016-05-18 一种apn分配方法、装置及终端
CN201610330316.6 2016-05-18

Publications (1)

Publication Number Publication Date
WO2017197757A1 true WO2017197757A1 (zh) 2017-11-23

Family

ID=60324783

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2016/091754 WO2017197757A1 (zh) 2016-05-18 2016-07-26 一种apn分配方法、装置及终端

Country Status (2)

Country Link
CN (1) CN107404543A (zh)
WO (1) WO2017197757A1 (zh)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108924828B (zh) * 2018-06-25 2021-08-31 中国联合网络通信集团有限公司 一种apn自适应方法、服务端和终端
CN109510833A (zh) * 2018-11-29 2019-03-22 北京车联天下信息技术有限公司 一种基于多条apn链路的通信方法及装置
CN109890050A (zh) * 2018-12-19 2019-06-14 深圳市优博讯科技股份有限公司 安卓操作系统动态切换apn方法、存储介质及移动终端
CN110708694A (zh) * 2019-10-15 2020-01-17 武汉诚迈科技有限公司 公专网同时在线的实现方法、系统、存储介质及电子设备
CN112074001A (zh) * 2020-08-27 2020-12-11 展讯半导体(成都)有限公司 一种网络接入方法及通信装置

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101175283A (zh) * 2007-11-28 2008-05-07 中兴通讯股份有限公司 一种动态配置接入点名称的方法
CN101909326A (zh) * 2010-08-17 2010-12-08 中兴通讯股份有限公司 一种接入点的选择方法及装置
CN102438288A (zh) * 2011-12-02 2012-05-02 深圳市融创天下科技股份有限公司 一种apn切换的方法、系统和移动终端
US20160066186A1 (en) * 2014-09-01 2016-03-03 Samsung Electronics Co., Ltd. Method for managing network access and electronic device therefor
CN105517105A (zh) * 2014-09-23 2016-04-20 中兴通讯股份有限公司 网络的接入方法及装置

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20130120709A (ko) * 2012-04-26 2013-11-05 삼성전자주식회사 네트워크 연결 정보를 관리하기 위한 방법 및 그 전자 장치

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101175283A (zh) * 2007-11-28 2008-05-07 中兴通讯股份有限公司 一种动态配置接入点名称的方法
CN101909326A (zh) * 2010-08-17 2010-12-08 中兴通讯股份有限公司 一种接入点的选择方法及装置
CN102438288A (zh) * 2011-12-02 2012-05-02 深圳市融创天下科技股份有限公司 一种apn切换的方法、系统和移动终端
US20160066186A1 (en) * 2014-09-01 2016-03-03 Samsung Electronics Co., Ltd. Method for managing network access and electronic device therefor
CN105517105A (zh) * 2014-09-23 2016-04-20 中兴通讯股份有限公司 网络的接入方法及装置

Also Published As

Publication number Publication date
CN107404543A (zh) 2017-11-28

Similar Documents

Publication Publication Date Title
US11729594B2 (en) Network access method, device, and system
WO2017197757A1 (zh) 一种apn分配方法、装置及终端
CN112566051B (zh) 用于有效地转移多个蜂窝服务凭据的方法和装置
EP2876913B1 (en) Application hosting method and system, mobile terminal and server
RU2357375C2 (ru) Система и способ, предназначенные для квитирования между беспроводными устройствами и серверами
US20140105199A1 (en) Method and apparatus for automatic dialing access points
US8515350B2 (en) Resolving an application service change in a system using bluetooth
US11057827B1 (en) Provisioning an embedded universal integrated circuit card (eUICC) of a mobile communication device
CN105188048A (zh) 一种移动终端加载定制应用的方法、装置及终端设备
CN107567011B (zh) 一种网络接入业务实现方法、装置及通信终端
US20220322088A1 (en) Network roaming method, terminal device, and computer readable storage medium
KR101358346B1 (ko) 자동 로그인 방법 및 자동 로그인 시스템
CN105393603A (zh) 选择公共陆地移动网络plmn的方法及其装置和设备
RU2651159C1 (ru) Способ и устройство для пометки неизвестного номера
US11805397B2 (en) IMEI binding and dynamic IMEI provisioning for wireless devices
JP2014527661A (ja) サーバおよびクライアントのためのモバイルペイメント方法、装置、およびシステム
WO2016184203A1 (zh) 一种数据网络自适应选择的方法及装置
WO2011107021A1 (zh) 一种业务命令信息处理方法及设备
WO2017181465A1 (zh) 一种接入点名称apn的配置方法及装置
WO2016173070A1 (zh) 一种终端搜网方法及终端
CN110348205B (zh) 一种api拓扑隐藏方法、设备及系统
CN113825120B (zh) 用于辅助移动无线设备的蜂窝服务管理
CN112004228B (zh) 实人认证方法及系统
CN113746909A (zh) 网络连接方法、装置、电子设备和计算机可读存储介质
CN114258088A (zh) 中间会话管理功能设备发现方法、设备和系统、存储介质

Legal Events

Date Code Title Description
NENP Non-entry into the national phase

Ref country code: DE

121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 16902137

Country of ref document: EP

Kind code of ref document: A1

122 Ep: pct application non-entry in european phase

Ref document number: 16902137

Country of ref document: EP

Kind code of ref document: A1