CN110035385A - SIM card selection method and device, storage medium and computer equipment - Google Patents
SIM card selection method and device, storage medium and computer equipment Download PDFInfo
- Publication number
- CN110035385A CN110035385A CN201910411033.8A CN201910411033A CN110035385A CN 110035385 A CN110035385 A CN 110035385A CN 201910411033 A CN201910411033 A CN 201910411033A CN 110035385 A CN110035385 A CN 110035385A
- Authority
- CN
- China
- Prior art keywords
- sim card
- information
- selecting
- sim
- roaming
- 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.)
- Granted
Links
- 238000010187 selection method Methods 0.000 title claims description 10
- 238000000034 method Methods 0.000 claims abstract description 35
- 238000001514 detection method Methods 0.000 claims description 22
- 238000004590 computer program Methods 0.000 claims description 15
- 230000015654 memory Effects 0.000 claims description 11
- 101150053844 APP1 gene Proteins 0.000 description 14
- 101100055496 Arabidopsis thaliana APP2 gene Proteins 0.000 description 14
- 101100189105 Homo sapiens PABPC4 gene Proteins 0.000 description 14
- 102100039424 Polyadenylate-binding protein 4 Human genes 0.000 description 14
- 101100016250 Saccharomyces cerevisiae (strain ATCC 204508 / S288c) GYL1 gene Proteins 0.000 description 14
- 102100038359 Xaa-Pro aminopeptidase 3 Human genes 0.000 description 8
- 101710081949 Xaa-Pro aminopeptidase 3 Proteins 0.000 description 8
- 238000005516 engineering process Methods 0.000 description 8
- 238000013507 mapping Methods 0.000 description 8
- 238000010295 mobile communication Methods 0.000 description 7
- 238000010586 diagram Methods 0.000 description 5
- 238000005457 optimization Methods 0.000 description 5
- 238000004364 calculation method Methods 0.000 description 4
- 230000002349 favourable effect Effects 0.000 description 4
- 238000012545 processing Methods 0.000 description 4
- 101000616761 Homo sapiens Single-minded homolog 2 Proteins 0.000 description 2
- 230000009977 dual effect Effects 0.000 description 2
- 230000003287 optical effect Effects 0.000 description 2
- 102100024113 40S ribosomal protein S15a Human genes 0.000 description 1
- 101001118566 Homo sapiens 40S ribosomal protein S15a Proteins 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000004891 communication Methods 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W4/00—Services specially adapted for wireless communication networks; Facilities therefor
- H04W4/02—Services making use of location information
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W8/00—Network data management
- H04W8/02—Processing of mobility data, e.g. registration information at HLR [Home Location Register] or VLR [Visitor Location Register]; Transfer of mobility data, e.g. between HLR, VLR or external networks
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W8/00—Network data management
- H04W8/18—Processing of user or subscriber data, e.g. subscribed services, user preferences or user profiles; Transfer of user or subscriber data
- H04W8/183—Processing at user equipment or user record carrier
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Databases & Information Systems (AREA)
- Telephone Function (AREA)
- Telephonic Communication Services (AREA)
Abstract
The application discloses a method and a device for selecting an SIM card, a storage medium and computer equipment, wherein the method for selecting the SIM card comprises the following steps: when a target application program is started, determining a first SIM card corresponding to the target application program according to a preset application program-SIM card corresponding relation; detecting whether the first SIM card is in a roaming state; and if not, selecting the first SIM card as the SIM card of the target application program for the data service. The SIM card selecting method can automatically select the proper SIM card for the user to use, avoids the trouble of manual operation and the risk of generating extra charges, and effectively improves the use experience of the user.
Description
Technical Field
The present application relates to the field of communications technologies, and in particular, to a method and an apparatus for selecting a SIM card, a storage medium, and a computer device.
Background
With the further development of the mobile communication market, it is a trend that the same user has multiple SIM cards, and most of the mainstream mobile phones in the market at present have the capability of supporting more than two SIM cards.
A user usually sets a certain SIM card in a pre-designated mobile phone as a SIM card for data services through a system, and all internet data is transmitted through a mobile network accessed by the SIM card, however, due to diversification of user requirements, the scheme of fixedly selecting a data SIM card in a manual manner has significant inconvenience in many application scenarios, for example: different APPs have been bound to different SIM cards in the cell-phone, if use the SIM card that corresponds with the APP to go on the net, then enjoy free flow, under this kind of condition, need look over the data SIM card of current use before starting different APPs to and correspond the setting, if forget the setting and probably produce the extra charge, moreover, if switch over fast between the APP, also need manual setting corresponding data SIM card, therefore the operation is very loaded down with trivial details. Another example is: if different SIM cards in a handset belong to different operators in different country and region, when the network boundaries of these adjacent operators cross back and forth, the correct data SIM card needs to be manually selected in time, otherwise it may result in data service outage (when all SIM cards prohibit data roaming) or unnecessary roaming charges (when all SIM cards allow data roaming).
Disclosure of Invention
The application aims to provide a method and a device for selecting an SIM card, a storage medium and computer equipment, and aims to solve the technical problem that the SIM card is fixedly selected in a manual mode in the prior art.
The application provides a method for selecting an SIM card, which is applied to terminal equipment supporting multi-card multi-standby, wherein the terminal equipment is provided with a plurality of SIM cards, and the method comprises the following steps:
when a target application program is started, determining a first SIM card corresponding to the target application program according to a preset application program-SIM card corresponding relation;
detecting whether the first SIM card is in a roaming state;
and if not, selecting the first SIM card as the SIM card of the target application program for the data service.
Further, the step of detecting whether the first SIM card is in a roaming state includes:
acquiring current operator network information and IMSI information of a first SIM card, wherein the current operator network information comprises first MCC/MNC information, and the IMSI information comprises second MCC/MNC information;
judging whether the first MCC/MNC information is consistent with the second MCC/MNC information;
if not, the first SIM card is judged to be in a roaming state.
Further, after the step of detecting whether the first SIM card is in the roaming state, the method further includes:
if the first SIM card is in a roaming state, detecting whether at least one second SIM card in a non-roaming state exists in the rest SIM cards to be selected;
and if so, selecting a second SIM card with the highest priority from all the second SIM cards in the non-roaming state according to a preset first priority strategy, and selecting the second SIM card with the highest priority as the SIM card of the target application program for the data service.
Further, after the step of detecting whether at least one second SIM card in a non-roaming state exists in the remaining SIM cards to be selected, the method further includes:
and if the rest SIM cards to be selected are in the roaming state, selecting the SIM card with the highest priority from all the SIM cards in the roaming state according to a preset second priority strategy, and selecting the SIM card with the highest priority as the SIM card of the target application program for the data service.
Further, according to a preset first priority policy, selecting a second SIM card with the highest priority from all current second SIM cards in a non-roaming state, and selecting the second SIM card with the highest priority as the SIM card used by the target application program for the data service, the method includes the steps of:
according to a plurality of non-roaming charge information in a preset first corresponding relation table, selecting a second SIM card with the lowest non-roaming charge from all current second SIM cards in a non-roaming state, and selecting the second SIM card with the lowest non-roaming charge as an SIM card of a target application program for data service, wherein charge standard information corresponding to each SIM card is prestored in the first corresponding relation table, and the charge standard information comprises the non-roaming charge information;
or,
the method comprises the steps of obtaining current geographic position information, selecting a second SIM card matched with the current geographic position information from all current second SIM cards in a non-roaming state according to a plurality of geographic position information in a preset second corresponding relation table, and selecting the second SIM card matched with the current geographic position information as an SIM card of a target application program for data service, wherein the geographic position information corresponding to each SIM card is prestored in the second corresponding relation table.
Further, according to a preset second priority policy, selecting the SIM card with the highest priority from all current SIM cards in the roaming state, and selecting the SIM card with the highest priority as the SIM card used by the target application program for the data service, including:
selecting an SIM card with the lowest roaming charge from all current SIM cards in a roaming state according to a plurality of roaming charge information in a preset first corresponding relation table, and selecting the SIM card with the lowest roaming charge as an SIM card of a target application program for data service, wherein charge standard information corresponding to each SIM card is prestored in the first corresponding relation table, and the charge standard information comprises the roaming charge information;
or,
the method comprises the steps of obtaining current geographic position information, selecting an SIM card matched with the current geographic position information from all current SIM cards in a roaming state according to a plurality of geographic position information in a preset second corresponding relation table, and selecting the SIM card matched with the current geographic position information as an SIM card of a target application program for data service, wherein the geographic position information corresponding to each SIM card is prestored in the second corresponding relation table.
Further, the SIM card selecting method further includes:
detecting whether a current APN corresponding to a SIM card which is currently used as a target application program for data service is a preset target APN;
if not, switching the current APN to the target APN.
This application still provides a device is selected for use to SIM card, is applied to and supports many terminal equipment that treat of many cards on, installs many SIM cards on the terminal equipment, and the device includes:
the determining module is used for determining a first SIM card corresponding to the target application program according to a preset application program-SIM card corresponding relation when the target application program is started;
the first detection module is used for detecting whether the first SIM card is in a roaming state;
and the selecting module is used for selecting the first SIM card as the SIM card of the target application program for the data service when the first SIM card is in the non-roaming state.
The present application further provides a storage medium, which is a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the method for selecting a SIM card is implemented.
The application also provides a computer device, which comprises a memory, a processor and a computer program stored on the memory and capable of running on the processor, wherein the processor implements the aforementioned SIM card selection method when executing the computer program.
The beneficial effect of this application is: when the SIM card selecting method is applied to a user using an APP, a first SIM card corresponding to a currently running application program is determined firstly through a preset application program-SIM card corresponding relation, and then when the first SIM card is further detected to be in a non-roaming state, the first SIM card is automatically selected as the SIM card for data service, so that when the user uses the APP, a proper SIM card can be automatically selected for the user to use, the trouble of manual operation and the risk of generating extra charges are avoided, and the use experience of the user is effectively improved.
Drawings
Fig. 1 is a schematic flowchart of a method for selecting an SIM card according to an embodiment of the present application;
fig. 2 is a schematic structural diagram of an apparatus for selecting a SIM card according to an embodiment of the present application;
FIG. 3 is a schematic structural diagram of a first detection module according to an embodiment of the present disclosure;
FIG. 4 is a schematic structural diagram of an apparatus for selecting a SIM card according to another embodiment of the present application;
FIG. 5 is a schematic structural diagram of a storage medium according to an embodiment of the present application;
fig. 6 is a schematic structural diagram of a computer device in an embodiment of the present application.
The implementation, functional features and advantages of the objectives of the present application will be further explained with reference to the accompanying drawings.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
Referring to fig. 1, an embodiment of the present application provides a method for selecting an SIM card, which is applied to a terminal device supporting multiple cards and multiple standby, such as a smart phone supporting dual cards and dual standby, where the terminal device is installed with at least two SIM cards, each of which can be used for performing data services (e.g., internet access) and basic services (e.g., making a call, sending and receiving a short message), and on the terminal device, a user can set one of the SIM cards for data services and the other SIM cards for basic services, or set all the SIM cards to be capable of performing data services and basic services, where the method for selecting an SIM card includes:
s11, when the target application program is started, determining a first SIM card corresponding to the target application program according to a preset application program-SIM card corresponding relation;
s12, detecting whether the first SIM card is in a roaming state;
if the first SIM card is in the non-roaming state, S13 is executed, and the first SIM card is selected as the SIM card for the data service of the target application.
In S11, the target application may be any Application (APP) installed on the terminal device; the above-mentioned application-SIM card correspondence may be stored in the terminal device in a list, and in some embodiments, the application-SIM card correspondence may be set by the user in advance, for example, a special application may be installed on the terminal device for the user to set the correspondence between the application and the SIM card. Specifically, a configuration page may be provided for the user by a special application program, and the user may manually set the correspondence between the application program and the SIM card on the configuration page according to actual requirements, for example, assuming that two SIM cards are installed on the terminal device: SIM card 1 and SIM card 2, where SIM card 1 possesses corresponding traffic fee APP1, APP2 and APP3, and SIM card 2 does not have corresponding traffic fee APP, so the user can set the corresponding relationship between SIM card 1 and APP1, APP2 and APP3 through the configuration page (which is equivalent to binding SIM card 1 with APP1, APP2 and APP 3), and the rest of APPs can be bound with SIM card 2. For another example, assume that two SIM cards are installed on the terminal device: the method comprises the following steps that the SIM card 1 and the SIM card 2 are provided, wherein the SIM card 1 has 5G flow, the SIM card 2 has 500M flow, a user can bind some APPs (such as APP of audio class and APP of game class) which easily consume flow with the SIM card 1 through a configuration page, and can bind some APPs (such as APP of text class) which do not easily consume flow with the SIM card 2, so that the SIM card corresponding to each application program on the terminal equipment can be determined by inquiring the application program-SIM card corresponding relation;
in other embodiments, the APP-SIM card correspondence may also be automatically established by the terminal device according to the usage of the APP and the SIM card by the user, for example, assuming that a plurality of SIM cards are installed on the terminal device, in an initial usage phase, the SIM card corresponding to each APP when in use is recorded, and when the number of times that a certain APP uses a certain SIM card to perform data services reaches a preset number of times (e.g., 3 times), the APP and the SIM card are bound, and the correspondence between the APP and the SIM card is added to a preset correspondence table (the correspondence table is empty at the beginning). For example, assume that two SIM cards are installed on the terminal device: SIM card 1 and SIM card 2, install APP1, APP2, APP3 and APP4 on the terminal device at the same time, when the user sets up SIM card 1 for performing data service at the beginning, SIM card 2 is used for performing basic service, in the subsequent use process, based on consideration of factors such as data charges, when the user uses APP3 or APP4, the user will manually switch the SIM card currently used for data service from SIM card 1 to SIM card 2, and when using user APP1 or APP2, the user will manually switch the SIM card currently used for data service back from SIM card 2 to SIM card 1, then according to the above-mentioned use condition of the user, when the number of times that the terminal device records that APP1 or APP2 uses SIM card 1 to perform data service reaches a preset number (such as 3 times, etc.), the terminal device may bind APP1 or APP2 with SIM card 1, and add its corresponding relationship into a preset corresponding relationship table. Thus, the SIM card corresponding to each application program on the terminal equipment can be determined by inquiring the corresponding relation between the application program and the SIM card; of course, in some other embodiments, the application-SIM card correspondence may be set in other manners, for example, a setting page is added to the existing setting options for the user to set, which is not limited in particular.
In S12, specifically, it is determined whether the first SIM card is in the roaming state by detecting whether the current geographic location of the terminal device matches the home location information of the first SIM card, for example, if the terminal device detects that the current geographic location of the terminal device is a region other than continental china (e.g., a foreign region such as australian harbor, usa) through a GPS technology or the like, and the terminal device reads that the home location information of the first SIM card is a region of continental china (e.g., beijing, shanghai, etc.), the terminal device may accordingly determine that the current geographic location of the terminal device does not match the home location information of the first SIM card, and further determine that the first SIM card is in the roaming state; if the current geographic location of the terminal device is matched with the home location information of the first SIM card, and if the current geographic location and the home location information are both in the continental china, the terminal device may determine that the first SIM card is in the non-roaming state.
In the above S13, when the first SIM card corresponding to the currently running application (i.e., the target application) is determined and the first SIM card is in the non-roaming state, the first SIM card may be selected as the SIM card for the data service, specifically, if the current SIM card for the data service and the first SIM card are two different SIM cards, the current SIM card for the data service is switched to the first SIM card; when the current SIM card used for the data service and the first SIM card are the same SIM card, the operation of switching the SIM cards is not needed, so that when the user uses the APP, the user can automatically select a proper SIM card for use, the trouble of manual operation and the risk of generating extra charges are avoided, and the use experience of the user is effectively improved.
In this embodiment, when the SIM card selection method is applied to a user using an APP, a first SIM card corresponding to a currently running application is determined first according to a preset application-SIM card correspondence, and then when it is further detected that the first SIM card is in a non-roaming state, the first SIM card is automatically selected as the SIM card for the data service, so that when the user uses the APP, a proper SIM card can be automatically selected for the user to use, troubles of manual operation and risks of generating additional charges are avoided, and the use experience of the user is effectively improved.
In an optional embodiment, the step of detecting whether the first SIM card is in the roaming state includes:
s121, acquiring current operator network information and IMSI information of the first SIM card, wherein the current operator network information comprises first MCC/MNC information, and the IMSI information comprises second MCC/MNC information;
s122, judging whether the first MCC/MNC information is consistent with the second MCC/MNC information;
if the first MCC/MNC information is not consistent with the second MCC/MNC information, S123 is executed to determine that the first SIM card is in the roaming state.
In the above S121, specifically, in some embodiments, when the first SIM card corresponding to the target application is determined, the terminal device may obtain, by performing a reading operation on the first SIM card, information that the first SIM card currently accesses to the operator network (i.e., current operator network information) and IMSI information (IMSI, i.e., international mobile subscriber identity, is a flag for distinguishing a mobile subscriber and is composed of three parts, i.e., MCC, MNC, and MSIN) stored in the first SIM card, where the current operator network information includes first MCC/MNC information (MCC, i.e., mobile country code, for identifying a country to which the mobile subscriber belongs; MNC, i.e., mobile network code, for identifying mobile communications to which the mobile subscriber belongs), and the IMSI information includes second MCC/MNC information;
in other embodiments, by installing a dedicated application program on the terminal device, periodically reading SIM card information such as ICCID information and IMSI information of all SIM cards on the terminal device through the dedicated application program in advance, and then establishing and storing a data list T1 according to the read SIM information (i.e. storing the SIM card information such as ICCID information and IMSI information corresponding to each SIM card in the data list T1), and at the same time, periodically reading current carrier network information such as MCC information and MNC information of all SIM cards currently accessing the carrier network on the terminal device through the dedicated application program in advance, and then establishing and storing a data list T2 according to the read current carrier network information (i.e. storing the current carrier network information such as MCC information and MNC information corresponding to each SIM card in the data list T2), when a first SIM card corresponding to a target application program is subsequently determined, the terminal device may obtain the current operator network information and IMSI information of the first SIM card by querying the above data list T1 and data list T2.
In the above S122, since the MCC information can identify the country or region to which the mobile subscriber belongs (i.e. different MCC information represents different countries or regions, e.g. 460 represents china and 310 represents the united states), and the MNC information can identify the mobile communication to which the mobile subscriber belongs (i.e. different mobile communication has different MNC information, e.g. china mobile TD system 00, china mobile GSM system 02, china unicom GSM system 01, and china telecommunication CDMA system 03), it can be determined whether the first SIM card is in a roaming state by comparing whether the first MCC/MNC information and the second MCC/MNC information are consistent, and generally, if the first MCC/MNC information and the second MCC/MNC information are consistent, the terminal device can determine that the first SIM card is in a non-roaming state according to the comparison result, and if the first MCC/MNC information and the second MCC/MNC information are inconsistent (i.e. at least one of the MCC information and the MNC information is different), the terminal device may determine that the first SIM card is in a roaming state according to the determination result, for example, if the first MCC/MNC information and the second MCC/MNC information are 46002, it indicates that the operator network to which the first SIM card is currently accessed is a china mobile GSM system, and the first SIM card is an SIM card issued by a china mobile operator, and the terminal device may determine that the first SIM card is in a non-roaming state according to the determination result; for another example, if the first MCC/MNC information is 310005 and the second MCC/MNC information is 46002, it indicates that the operator network to which the first SIM card is currently accessed is a CDMA system of an operator in the united states, and the first SIM card is an SIM card issued by a china mobile operator, and the terminal device can accordingly determine that the first SIM card is in a roaming state; for another example, if the first MCC/MNC information is 310005, and the second MCC/MNC information is 310026, it indicates that the operator network to which the first SIM card is currently accessed is a CDMA system of one operator in the united states, and the first SIM card is a SIM card issued by another operator in the united states, and the terminal device can accordingly determine that the first SIM card is in a roaming state; specifically, when the terminal device determines that the MCC information in the first MCC/MNC information and the MCC information in the second MCC/MNC information are both 460, the terminal device may perform special processing, for example, directly determine that the first SIM card is in a non-roaming state (different from most countries and regions, networks in continental china are special, and different operator networks cannot roam with each other, for example, an SIM card issued by a china mobile cannot access a network of a china telecom to surf the internet, but only can access a network of a china mobile to surf the internet).
In the above S123, generally, when the first MCC/MNC information is not consistent with the second MCC/MNC information, the terminal device may determine that the first SIM card is in the roaming state, and when the first MCC information is consistent with the second MCC information, the terminal device may determine that the first SIM card is in the non-roaming state, and particularly, when the MCC information in the first MCC/MNC information and the MCC information in the second MCC/MNC information are both 460, the terminal device may determine that the first SIM card is in the non-roaming state.
In an optional embodiment, after the step of detecting whether the first SIM card is in the roaming state, the method further includes:
if the first SIM card is in the roaming state, executing S14, and detecting whether at least one second SIM card in the non-roaming state exists in the remaining SIM cards to be selected;
if at least one second SIM card in the non-roaming state exists in the remaining SIM cards to be selected, S15 is executed, according to a preset first priority policy, a second SIM card with the highest priority is selected from all the current second SIM cards in the non-roaming state, and the second SIM card with the highest priority is selected as the SIM card used by the target application program for the data service.
In the above S14, if the current SIM card used for the data service and the first SIM card are two different SIM cards, the remaining SIM cards to be selected include the current SIM card used for the data service, and preferably, the SIM card information of each SIM card to be selected may be obtained by querying the data list T1, and the current operator network information of each SIM card to be selected may be obtained by querying the data list T2; therefore, when the subsequent APP is switched, the relevant information can be obtained only by inquiring the relevant list, and the information reading operation of the SIM card is not required to be carried out again, so that the power consumption of the terminal equipment is reduced; then, according to the information of the SIM card and the information of the current operator network, which SIM cards in the rest SIM cards to be selected are in the roaming state and which SIM cards are in the non-roaming state can be detected by the roaming state judging mode.
In the above S15, the preset first priority policy is used to select a SIM card that is favorable for improving the user experience (i.e. the priority is the highest) from the one or more SIM cards in the non-roaming state, for example, the first priority policy is set based on the security factor, and the SIM card with the highest security is selected from the first priority policy for use; for another example, a first priority policy is set based on the data cost factor, and the SIM card with the lowest data cost is selected from the first priority policy for use; for another example, a first priority policy is set based on the signal strength factor, the SIM card with the highest signal strength is selected for use, and so on; the first priority policy may be set by the user in advance, or may be default by the system, and is not changeable, which is not limited specifically.
In this embodiment, although the first SIM card corresponds to the target application, since the first SIM card is in the roaming state, if the first SIM card is selected as the SIM card for the data service of the target application at this time, an additional roaming charge will be generated if the first SIM card is in the roaming state; therefore, in order to avoid generating unnecessary charges as much as possible, whether a second SIM card in a non-roaming state exists in the remaining SIM cards to be selected (i.e. the SIM cards except the first SIM card) can be further detected, if only one second SIM card in the non-roaming state exists, the second SIM card can be directly selected as the SIM card for the data service of the target application program, and if a plurality of second SIM cards in the non-roaming state exist, the second SIM card with the highest priority is selected as the SIM card for the data service of the target application program, so that unnecessary roaming charges can be avoided, and the use experience of the user can be improved.
In an optional embodiment, after the step of detecting whether there is at least one second SIM card in a non-roaming state in the remaining SIM cards to be selected, the method further includes:
if the remaining SIM cards to be selected are all in the roaming state, S16 is executed, and according to a preset second priority policy, the SIM card with the highest priority is selected from all the current SIM cards in the roaming state, and the SIM card with the highest priority is selected as the SIM card for the data service.
In the above S16, a preset second priority policy is used to select a SIM card that is favorable for improving the user experience (i.e. the highest priority) from all the SIM cards in the roaming state (including the first SIM card and the SIM card currently used for data services). For example, a second priority policy is set based on security factors, and the SIM card with the highest security is selected for use; for another example, a second priority policy is set based on the data cost factor, and the SIM card with the lowest data cost is selected from the second priority policy for use; for another example, a second priority policy is set based on the signal strength factor, the SIM card with the highest signal strength is selected for use, and so on; the second priority policy may be set by the user in advance, or may be default and unalterable by the system, which is not limited specifically.
In this embodiment, when all the SIM cards on all the terminal devices are in the roaming state, in the case of allowing roaming, the SIM card with the highest priority may be selected from all the SIM cards in the roaming state currently as the SIM card used by the target application for the data service, so that the user experience may be improved to the greatest extent.
In an optional embodiment, according to a preset first priority policy, the step of selecting a second SIM card with the highest priority from all current second SIM cards in a non-roaming state, and selecting the second SIM card with the highest priority as the SIM card used by the target application for the data service includes:
s15a, according to a plurality of non-roaming tariff information in a preset first corresponding relation table, selecting a second SIM card with the lowest non-roaming tariff from all the second SIM cards in the non-roaming state at present, and selecting the second SIM card with the lowest non-roaming tariff as the SIM card used by the target application program for the data service, wherein the first corresponding relation table pre-stores tariff standard information corresponding to each SIM card, and the tariff standard information includes the non-roaming tariff information.
In this embodiment, specifically, the user may establish a first corresponding relationship table in advance by means of importing a template or manually setting on a configuration page of a special application, where the first corresponding relationship table stores tariff standard information corresponding to each SIM card, where the tariff standard information includes non-roaming tariff information (i.e., local network data tariff), and generally, different SIM cards have different non-roaming tariffs, so that when it is detected that at least one SIM card in a non-roaming state exists in the terminal device, the SIM card with the lowest non-roaming tariff can be selected as the SIM card used by the target application for the data service, thereby achieving the optimum tariff and reducing the use cost of the user to the greatest extent.
In another optional embodiment, according to a preset first priority policy, the step of selecting a second SIM card with the highest priority from all current second SIM cards in a non-roaming state, and selecting the second SIM card with the highest priority as the SIM card used by the target application for the data service includes: S15A, obtaining the current geographical location information, selecting the second SIM card matched with the current geographical location information from all the current second SIM cards in a non-roaming state according to a plurality of geographical location information in a preset second corresponding relation table, and selecting the second SIM card matched with the current geographical location information as the SIM card of the target application program for the data service, wherein the geographical location information corresponding to each SIM card is prestored in the second corresponding relation table.
In this embodiment, a user may set up a second correspondence table in advance by means of importing a template or manually setting on a configuration page of a special application, where the second correspondence table stores a plurality of pieces of geographic location information and a SIM card corresponding to each piece of geographic location information, and specifically, in some usage scenarios, different SIM cards are used in different areas, and signal strengths thereof may be different and network speeds may also be different, for example, assuming that a terminal device is installed with a SIM card 1 and a SIM card 2 in addition to a first SIM card, when a user frequently travels to and from an urban area a and a rural area B, when the user is in the urban area a, the signal strength of the SIM card 1 may be slightly better than that of the SIM card 2, and when the user is in the rural area B, the signal strength of the SIM card 2 may be significantly better than that of the SIM card 1, then the user may set up a correspondence between the urban area a and the SIM card 1 and a correspondence between the rural area B and the SIM card 2 in the second correspondence table in advance Corresponding relation, when detecting that the SIM card 1 and the SIM card 2 in the non-roaming state exist in the terminal device, the current geographic position can be obtained through the GPS and other technologies, and then the selection of the SIM card 1 or the SIM card 2 is determined according to the current geographic position, specifically, assuming that the current geographic position is the area a, the first distance between the area a and the urban area a and the second distance between the area a and the township area B can be obtained through calculation, and then the selection of the SIM card 1 or the SIM card 2 is determined by judging the size between the first distance and the second distance, if the first distance is smaller than the second distance, it is indicated that the area a matches the urban area a (i.e. the area a is closer to the urban area a), the SIM card 1 can be selected as the SIM card for the data service of the target application program, and if the second distance is smaller than the first distance, it is indicated that the area a matches the township area B (i.e. the area a is closer to the township area B), then, the SIM card 2 can be selected as the SIM card used by the target application program for the data service, so that the optimization of the geographical location can be realized, and the user experience can be improved to the greatest extent.
In an optional embodiment, according to a preset second priority policy, the step of selecting a SIM card with the highest priority from all current SIM cards in a roaming state, and selecting the SIM card with the highest priority as the SIM card used by the target application program for the data service includes:
s16a, according to the multiple roaming charge information in the preset first corresponding relation table, selecting the SIM card with the lowest roaming charge from all the SIM cards in the roaming state at present, and selecting the SIM card with the lowest roaming charge as the SIM card used by the target application program for the data service, wherein the first corresponding relation table is prestored with charge standard information corresponding to each SIM card, and the charge standard information includes the roaming charge information.
In this embodiment, specifically, a user may establish a first correspondence table in advance by means of importing a template or manually setting on a configuration page of a special application, where the first correspondence table stores tariff standard information corresponding to each SIM card, where the tariff standard information further includes roaming tariff information, and generally, different SIM cards roam to different operators in the same area, and roaming tariffs of the different operators are different, so that when it is detected that the SIM cards in the terminal device are all in a roaming state, the SIM card with the lowest roaming tariff can be selected from the roaming tariff information as the SIM card used by the target application for the data service under the condition that roaming is allowed, thereby achieving optimization of tariff and reducing use cost of the user to the greatest extent.
In another optional embodiment, according to a preset second priority policy, the step of selecting a SIM card with the highest priority from all SIM cards currently in a roaming state, and selecting the SIM card with the highest priority as the SIM card used by the target application for the data service includes:
S16A, obtaining current geographic location information, selecting an SIM card matching the current geographic location information from all current SIM cards in a roaming state according to a plurality of geographic location information in a preset second correspondence table, and selecting the SIM card matching the current geographic location information as an SIM card for a data service of a target application program, where the second correspondence table pre-stores geographic location information corresponding to each SIM card.
In this embodiment, a user may set a second correspondence table in advance by means of importing a template or manually setting on a configuration page of a special application, where the second correspondence table stores a plurality of pieces of geographic location information and a SIM card corresponding to each piece of geographic location information, and specifically, in some usage scenarios, different SIM cards are used in different areas, and the signal strength and the network speed of the SIM cards are different, for example, assuming that a terminal device is installed with a SIM card 3 in addition to a first SIM card, when the user frequently travels to and from an urban area C and a rural area D, the signal strength of the first SIM card is slightly better than that of the SIM card 3 when the user is in the urban area C, and when the user is in the rural area D, the signal strength of the SIM card 3 is obviously better than that of the first SIM card, the user may set the correspondence between the urban area C and the first SIM card and the correspondence between the rural area D and the SIM card 3 in the second correspondence table in advance In a corresponding relationship, when it is detected that both the first SIM card and the SIM card 3 in the terminal device are in a roaming state, the current geographic location may be obtained through a GPS or other technology, and then it is determined whether to select the first SIM card or the SIM card 3 according to the current geographic location, specifically, assuming that the current geographic location is the region D, a first distance between the region D and the urban region C and a second distance between the region D and the township region D may be obtained through calculation, and then it is determined whether to select the first SIM card or the SIM card 3 by determining a size between the first distance and the second distance, if the first distance is smaller than the second distance, it is determined that the region D matches the urban region C (i.e., the region D is closer to the urban region C), then the first SIM card may be selected as the SIM card for the data service at this time, and if the second distance is smaller than the first distance, it is determined that the region D matches the township region D (i.e., the region D is closer to the township region D, then, the SIM card 3 can be selected as the SIM card for the data service of the target application program, so that the optimization of the geographical position can be realized, and the user experience can be improved to the greatest extent.
In an optional embodiment, the SIM card selecting method further includes:
s17, detecting whether the current APN corresponding to the SIM card used for data service as the target application program is a preset target APN;
if the current APN corresponding to the SIM card currently used as the target application for the data service is not the predetermined target APN, S18 is executed to switch the current APN to the target APN.
In this embodiment, in some usage scenarios, the same SIM card may Access the network through different APNs (APNs, Access Point names, refer to a network Access technology, which is a parameter that must be configured when a terminal device (e.g., a smart phone) accesses the internet, and determines which Access method the terminal device accesses the network through), and the generated charges (including roaming charges and non-roaming charges) may also be different when accessing the network through different APNs; in other usage scenarios, for security and other considerations, a specific APN needs to be accessed to a specific network (for example, to access an intranet of an enterprise, a dedicated APN corresponding to the intranet needs to be added in advance on a terminal device), and therefore, in some embodiments, the application-SIM card correspondence specifically includes a SIM card corresponding to each application and a target APN corresponding to each application (that is, the application, the SIM card, and the target APN are in a one-to-one mapping relationship), the first correspondence table specifically includes tariff standard information corresponding to each APN accessed by each SIM card (that is, the SIM card, the target APN, and the tariff standard information are in a one-to-one mapping relationship), and the second correspondence table specifically includes a plurality of geographic location information and a SIM card and an APN corresponding to each geographic location information (that is, the SIM card, the target APN, and the tariff standard information are in a one-to-one mapping relationship), where each geographic location information corresponds to each APN (that is, the, The target APN and the geographical location information are in one-to-one mapping relation). Specifically, after the SIM card used as the target application program for the data service is determined in the foregoing manner, it may be further detected whether the current APN corresponding to the current SIM card used for the data service is a predetermined target APN, and if not, the current APN is switched to the target APN; if yes, no processing is carried out, so that the trouble of manual operation can be avoided by automatically selecting a proper SIM card and APN for the user to use, meanwhile, the optimization in aspects of expense, safety and the like is realized, and the use experience of the user is improved to the maximum extent.
Referring to fig. 2, an embodiment of the present application further provides an apparatus for selecting an SIM card, which is applied to a terminal device supporting multiple cards and multiple standby, where multiple SIM cards are installed on the terminal device, and the apparatus for selecting an SIM card includes:
the determining module is used for determining a first SIM card corresponding to the target application program according to a preset application program-SIM card corresponding relation when the target application program is started;
the first detection module is used for detecting whether the first SIM card is in a roaming state;
and the selecting module is used for selecting the first SIM card as the SIM card of the target application program for the data service when the first SIM card is in the non-roaming state.
In the determining module 11, the target application may be any Application (APP) installed on the terminal device; the above-mentioned application-SIM card correspondence may be stored in the terminal device in a list, and in some embodiments, the application-SIM card correspondence may be set by the user in advance, for example, a special application may be installed on the terminal device for the user to set the correspondence between the application and the SIM card. Specifically, a configuration page may be provided for the user by a special application program, and the user may manually set the correspondence between the application program and the SIM card on the configuration page according to actual requirements, for example, assuming that two SIM cards are installed on the terminal device: SIM card 1 and SIM card 2, where SIM card 1 possesses corresponding traffic fee APP1, APP2 and APP3, and SIM card 2 does not have corresponding traffic fee APP, so the user can set the corresponding relationship between SIM card 1 and APP1, APP2 and APP3 through the configuration page (which is equivalent to binding SIM card 1 with APP1, APP2 and APP 3), and the rest of APPs can be bound with SIM card 2. For another example, assume that two SIM cards are installed on the terminal device: the terminal equipment comprises an SIM card 1 and an SIM card 2, wherein the SIM card 1 has 5G flow, the SIM card 2 has 500M flow, and then a user can bind some APPs (such as APP of audio class, APP of game class and the like) which easily consume flow with the SIM card 1 through a configuration page, and can bind some APPs (such as APP of text class and the like) which do not easily consume flow with the SIM card 2, so that the determining module 11 can determine the SIM card corresponding to each application program on the terminal equipment by inquiring the corresponding relation of the application program and the SIM card;
in other embodiments, the APP-SIM card correspondence may also be automatically established by the terminal device according to the usage of the APP and the SIM card by the user, for example, assuming that a plurality of SIM cards are installed on the terminal device, in an initial usage phase, the SIM card corresponding to each APP when in use is recorded, and when the number of times that a certain APP uses a certain SIM card to perform data services reaches a preset number of times (e.g., 3 times), the APP and the SIM card are bound, and the correspondence between the APP and the SIM card is added to a preset correspondence table (the correspondence table is empty at the beginning). For example, assume that two SIM cards are installed on the terminal device: SIM card 1 and SIM card 2, install APP1, APP2, APP3 and APP4 on the terminal device at the same time, when the user sets up SIM card 1 for performing data service at the beginning, SIM card 2 is used for performing basic service, in the subsequent use process, based on consideration of factors such as data charges, when the user uses APP3 or APP4, the user will manually switch the SIM card currently used for data service from SIM card 1 to SIM card 2, and when using user APP1 or APP2, the user will manually switch the SIM card currently used for data service back from SIM card 2 to SIM card 1, then according to the above-mentioned use condition of the user, when the number of times that the terminal device records that APP1 or APP2 uses SIM card 1 to perform data service reaches a preset number (such as 3 times, etc.), the terminal device may bind APP1 or APP2 with SIM card 1, and add its corresponding relationship into a preset corresponding relationship table. Thus, the determining module 11 may determine the SIM card corresponding to each application program on the terminal device by querying the application program-SIM card correspondence; of course, in some other embodiments, the application-SIM card correspondence may be set in other manners, for example, a setting page is added to the existing setting options for the user to set, which is not limited in particular.
In the first detection module 12, specifically, the first detection module 12 may determine whether the first SIM card is in the roaming state by detecting whether the current geographic location of the terminal device is matched with the home location information of the first SIM card, for example, if the first detection module 12 detects that the current geographic location of the first detection module is a region other than continental china (such as foreign regions such as the australian district, the united states, and the like) through technologies such as GPS, and the first detection module 12 reads that the home location information of the first SIM card is a continental china (such as the beijing, the shanghai, and the like), the first detection module 12 may accordingly determine that the current geographic location of the first detection module is not matched with the home location information of the first SIM card, and further determine that the first SIM card is in the roaming state; if the current geographic location of the terminal device matches the home location information of the first SIM card, and if the current geographic location and the home location information are both continental china, the first detection module 12 may determine that the first SIM card is in the non-roaming state.
In the selecting module 13, when the determining module 11 determines that the first SIM card corresponds to the currently running application program (i.e., the target application program), and the first detecting module 12 determines that the first SIM card is in the non-roaming state, the selecting module 13 may select the first SIM card as the SIM card for the data service, specifically, if the current SIM card for the data service and the first SIM card are two different SIM cards, the current SIM card for the data service is switched to the first SIM card; when the current SIM card used for the data service and the first SIM card are the same SIM card, the operation of switching the SIM cards is not needed, so that when the user uses the APP, the user can automatically select a proper SIM card for use, the trouble of manual operation and the risk of generating extra charges are avoided, and the use experience of the user is effectively improved.
In this embodiment, when the device for selecting the SIM card is applied to the user using the APP, the first SIM card corresponding to the currently running application is determined first according to the preset application-SIM card correspondence, and then when it is further detected that the first SIM card is in the non-roaming state, the first SIM card is automatically selected as the SIM card for the data service, so that when the user uses the APP, the appropriate SIM card can be automatically selected for the user to use, the trouble of manual operation and the risk of generating additional charges are avoided, and the use experience of the user is effectively improved.
Referring to fig. 2 and 3, the first detection module 12 includes:
an obtaining unit 121, configured to obtain current operator network information and IMSI information of the first SIM card, where the current operator network information includes first MCC/MNC information, and the IMSI information includes second MCC/MNC information;
a determining unit 122, configured to determine whether the first MCC/MNC information and the second MCC/MNC information are consistent;
a determining unit 123, configured to determine that the first SIM card is in the roaming state when the first MCC/MNC information is inconsistent with the second MCC/MNC information.
In the above obtaining unit 121, specifically, in some embodiments, when the first SIM card corresponding to the target application is determined, the obtaining unit 121 may obtain, by performing a reading operation on the first SIM card, information that the first SIM card is currently accessed to the operator network (i.e., current operator network information) and IMSI information (IMSI, i.e., international mobile subscriber identity, is a flag for distinguishing a mobile subscriber and is composed of three parts, i.e., MCC, MNC, and MSIN) stored in the first SIM card, where the current operator network information includes first MCC information (MCC, i.e., mobile country code, for identifying a country to which the mobile subscriber belongs) and first MNC information (MNC, i.e., mobile network code, for identifying mobile communications to which the mobile subscriber belongs), and the IMSI information includes second MCC information and first and second MNC information;
in other embodiments, a dedicated application program is installed on the terminal device, then the obtaining unit 121 periodically reads SIM card information such as ICCID information and IMSI information of all SIM cards on the terminal device through the dedicated application program in advance, and further establishes and stores a data list T1 according to the read SIM information (that is, the data list T1 stores SIM card information such as ICCID information and IMSI information corresponding to each SIM card), and at the same time, the obtaining unit 121 periodically reads current carrier network information such as MCC information and MNC information of all SIM cards currently accessing the carrier network on the terminal device through the dedicated application program in advance, and further establishes and stores a data list T2 according to the read current carrier network information (that is, the data list T2 stores current carrier network information such as MCC information and MNC information corresponding to each SIM card), then, when the first SIM card corresponding to the target application is determined subsequently, the obtaining unit 121 may obtain the current operator network information and IMSI information of the first SIM card by querying the data list T1 and the data list T2.
In the above-mentioned determining unit 122, since the country or region to which the mobile subscriber belongs can be identified by the MCC information (i.e. different MCC information represents different countries or regions, e.g. 460 represents china and 310 represents the united states), and the mobile communication to which the mobile subscriber belongs can be identified by the MNC information (i.e. different mobile communication has different MNC information, e.g. china mobile TD system 00, china mobile GSM system 02, china unicom GSM system 01, and china telecommunication CDMA system 03), the determining unit 122 can determine whether the first SIM card is in the roaming state by comparing whether the first MCC/MNC information and the second MCC/MNC information are consistent, and generally, if the first MCC/MNC information and the second MCC/MNC information are consistent, the determining unit 123 can determine that the first SIM card is in the non-roaming state accordingly, and if the first MCC/MNC information and the second MCC/MNC information are not consistent (i.e.g. the MCC information and the MNC information are inconsistent) At least one of them is different), then the determining unit 123 may determine that the first SIM card is in the roaming state accordingly, for example, if the first MCC/MNC information and the second MCC/MNC information are 46002, it indicates that the operator network to which the first SIM card is currently accessed is the china mobile GSM system, and the first SIM card is an SIM card issued by the china mobile operator, then the determining unit 123 may determine that the first SIM card is in the non-roaming state accordingly; for another example, if the first MCC/MNC information is 310005 and the second MCC/MNC information is 46002, it indicates that the operator network to which the first SIM card is currently accessed is a CDMA system of an operator in the united states, and the first SIM card is an SIM card issued by a china mobile operator, then the determining unit 123 may determine that the first SIM card is in the roaming state according to the determination result; for another example, if the first MCC/MNC information is 310005, and the second MCC/MNC information is 310026, it indicates that the operator network to which the first SIM card is currently connected is a CDMA system of one operator in the united states, and the first SIM card is a SIM card issued by another operator in the united states, then the determining unit 123 may determine that the first SIM card is in the roaming state according to the determination result; specifically, when the determining unit 122 determines that the MCC information in the first MCC/MNC information and the MCC information in the second MCC/MNC information are both 460, the terminal device may perform special processing, for example, directly determine that the first SIM card is in a non-roaming state through the determining unit 123 (different from most countries and regions, networks in continental china are special, and different operator networks cannot roam with each other, for example, a SIM card issued by china mobile cannot access a network of china telecommunications to surf the internet, but only access a network of china mobile to surf the internet).
In the above-mentioned determining unit 123, generally, when the first MCC/MNC information is not consistent with the second MCC/MNC information, the determining unit 123 can determine that the first SIM card is in the roaming state, and when the first MCC information is consistent with the second MCC information, the determining unit 123 can determine that the first SIM card is in the non-roaming state, and particularly, when the MCC information in the first MCC/MNC information and the MCC information in the second MCC/MNC information are both 460, the determining unit 123 can determine that the first SIM card is in the non-roaming state.
Referring to fig. 4, the SIM card selecting apparatus further includes:
the second detection module 14 is configured to detect whether at least one second SIM card in a non-roaming state exists in the remaining to-be-selected SIM cards when the first SIM card is in a roaming state;
the first selecting module 15 is configured to select, when at least one second SIM card in a non-roaming state exists in the remaining to-be-selected SIM cards, a second SIM card with a highest priority from all the current second SIM cards in the non-roaming state according to a preset first priority policy, and select the second SIM card with the highest priority as an SIM card for the data service of the target application program.
In the second detection module 14, if the current SIM card used for the data service and the first SIM card are two different SIM cards, the remaining SIM cards to be selected include the current SIM card used for the data service, and preferably, the second detection module 14 may obtain SIM card information of each SIM card to be selected by querying the data list T1, and obtain current operator network information of each SIM card to be selected by querying the data list T2; therefore, when the subsequent APP is switched, the relevant information can be obtained only by inquiring the relevant list, and the information reading operation of the SIM card is not required to be carried out again, so that the power consumption of the terminal equipment is reduced; then, according to the information of the SIM card and the information of the current operator network, which SIM cards in the rest SIM cards to be selected are in the roaming state and which SIM cards are in the non-roaming state can be detected by the roaming state judging mode.
In the first selecting module 15, a preset first priority policy is used to select a SIM card that is favorable for improving user experience (i.e. has the highest priority) from one or more SIM cards in a non-roaming state, for example, the first priority policy is set based on a security factor, and the SIM card with the highest security can be selected from the SIM cards through the first selecting module 15 for use; for another example, a first priority policy is set based on the data cost factor, and the SIM card with the lowest data cost can be selected from the policy by the first selecting module 15 for use; for another example, a first priority policy is set based on the signal strength factor, the SIM card with the highest signal strength can be selected for use by the first selecting module 15, and so on; the first priority policy may be set by the user in advance, or may be default by the system, and is not changeable, which is not limited specifically.
In the embodiment, although the first SIM card corresponds to the target application, since the first SIM card is in the roaming state, if the first SIM card is selected as the SIM card for the data service by the selecting module 13 at this time, an additional roaming charge will be generated if the first SIM card is in the roaming state; therefore, in order to avoid generating unnecessary charges as much as possible, the second detection module 14 may further detect whether there is a second SIM card in a non-roaming state in the remaining SIM cards to be selected (i.e. the SIM cards other than the first SIM card), if there is only one second SIM card in the non-roaming state, the first selection module 15 may directly select the second SIM card as the SIM card for the data service of the target application program, and if there are a plurality of second SIM cards in the non-roaming state, the first selection module 15 selects the second SIM card with the highest priority as the SIM card for the data service of the target application program, so that unnecessary roaming charges may be avoided, thereby facilitating to improve the user experience.
Referring to fig. 4, the SIM card selecting apparatus further includes:
and the second selecting module 16 is configured to select, when all the remaining SIM cards to be selected are in the roaming state, the SIM card with the highest priority from all the current SIM cards in the roaming state according to a preset second priority policy, and select the SIM card with the highest priority as the SIM card for the data service.
In the second selecting module 16, a preset second priority policy is used to select, from all the SIM cards in the roaming state (including the first SIM card and the SIM card currently used for data services), the SIM card that is favorable for improving the user experience (i.e. the SIM card with the highest priority). For example, a second priority policy is set based on the security factor, and the SIM card with the highest security can be selected for use by the second selecting module 16; for another example, a second priority policy is set based on the data cost factor, and the SIM card with the lowest data cost can be selected from the policy by the second selecting module 16 for use; for another example, a second priority policy is set based on the signal strength factor, the SIM card with the highest signal strength can be selected for use by the second selecting module 16, and so on; the second priority policy may be set by the user in advance, or may be default and unalterable by the system, which is not limited specifically.
In this embodiment, when all the SIM cards on all the terminal devices are in the roaming state, in the case of allowing roaming, the second selecting module 16 may select the SIM card with the highest priority from all the SIM cards currently in the roaming state as the SIM card used by the target application for the data service, so as to improve the user experience to the greatest extent.
In an alternative embodiment, the first selecting module 15 includes:
the first selecting unit selects a second SIM card with the lowest non-roaming charge from all current second SIM cards in a non-roaming state according to a plurality of pieces of non-roaming charge information in a preset first corresponding relation table, and selects the second SIM card with the lowest non-roaming charge as an SIM card of a target application program for data service, wherein the first corresponding relation table pre-stores charge standard information corresponding to each SIM card, and the charge standard information comprises the non-roaming charge information.
In this embodiment, specifically, the user may establish a first corresponding relationship table in advance by means of importing a template or manually setting on a configuration page of a special application, where the first corresponding relationship table stores tariff standard information corresponding to each SIM card, where the tariff standard information includes non-roaming tariff information (i.e., local network data tariff), and generally, different SIM cards have different non-roaming tariffs, so that when the second detection module 14 detects that at least one SIM card in a non-roaming state exists in the terminal device, the SIM card with the lowest non-roaming tariff can be selected by the first selection unit as the SIM card for the data service of the target application, thereby achieving the best tariff and reducing the use cost of the user to the greatest extent.
In another alternative embodiment, the first selecting module 15 includes:
and the second selecting unit is used for acquiring current geographic position information, selecting a second SIM card matched with the current geographic position information from all current second SIM cards in a non-roaming state according to a plurality of geographic position information in a preset second corresponding relation table, and selecting the second SIM card matched with the current geographic position information as the SIM card of a target application program for data service, wherein the geographic position information corresponding to each SIM card is prestored in the second corresponding relation table.
In this embodiment, a user may set up a second correspondence table in advance by means of importing a template or manually setting on a configuration page of a special application, where the second correspondence table stores a plurality of pieces of geographic location information and a SIM card corresponding to each piece of geographic location information, and specifically, in some usage scenarios, different SIM cards are used in different areas, and signal strengths thereof may be different and network speeds may also be different, for example, assuming that a terminal device is installed with a SIM card 1 and a SIM card 2 in addition to a first SIM card, when a user frequently travels to and from an urban area a and a rural area B, when the user is in the urban area a, the signal strength of the SIM card 1 may be slightly better than that of the SIM card 2, and when the user is in the rural area B, the signal strength of the SIM card 2 may be significantly better than that of the SIM card 1, then the user may set up a correspondence between the urban area a and the SIM card 1 and a correspondence between the rural area B and the SIM card 2 in the second correspondence table in advance If the correspondence relationship is satisfied, when the second detection module 14 detects that the SIM card 1 and the SIM card 2 in the non-roaming state exist in the terminal device, the second selection unit may obtain the current geographic location through technologies such as GPS, and then determine whether to select the SIM card 1 or the SIM card 2 according to the current geographic location, specifically, assuming that the current geographic location is area a, a first distance between area a and urban area a and a second distance between area a and township area B may be obtained through calculation, and then determine whether to select the SIM card 1 or the SIM card 2 by determining a size between the first distance and the second distance, if the first distance is smaller than the second distance, it is determined that area a matches urban area a (i.e., area a is closer to urban area a), at this time, the second selection unit may select the SIM card 1 as the SIM card for the data service of the target application program, if the second distance is smaller than the first distance, it indicates that the area a matches with the township area B (i.e. the area a is closer to the township area B), then the second selecting unit may select the SIM card 2 as the SIM card for the data service of the target application program, so as to achieve the optimum geographic location and improve the user experience to the greatest extent.
In an alternative embodiment, the second selecting module 16 includes:
and the third selecting unit is used for selecting the SIM card with the lowest roaming charge from all the SIM cards in the roaming state at present according to the plurality of roaming charge information in the preset first corresponding relation table, and selecting the SIM card with the lowest roaming charge as the SIM card of the target application program for the data service, wherein the first corresponding relation table is prestored with charge standard information corresponding to each SIM card, and the charge standard information comprises the roaming charge information.
In this embodiment, specifically, the user may establish a first corresponding relationship table in advance by means of importing a template or manually setting on a configuration page of a special application, where the first corresponding relationship table stores tariff standard information corresponding to each SIM card, where the tariff standard information further includes roaming tariff information, and generally, different SIM cards roam to different operators in the same area, and roaming tariffs of the different SIM cards may be different, so that when the SIM cards in the terminal device are detected to be in a roaming state by the second detection module 14, in a case that roaming is allowed, the SIM card with the lowest roaming tariff can be selected by the third selection unit as the SIM card used by the target application for the data service, so as to achieve the optimal tariff, and reduce the use cost of the user to the greatest extent.
In another alternative embodiment, the second selecting module 16 includes:
and the fourth selecting unit is used for acquiring the current geographic position information, selecting an SIM card matched with the current geographic position information from all current SIM cards in a roaming state according to a plurality of geographic position information in a preset second corresponding relation table, and selecting the SIM card matched with the current geographic position information as the SIM card of a target application program for data service, wherein the geographic position information corresponding to each SIM card is prestored in the second corresponding relation table.
In this embodiment, a user may set a second correspondence table in advance by means of importing a template or manually setting on a configuration page of a special application, where the second correspondence table stores a plurality of pieces of geographic location information and a SIM card corresponding to each piece of geographic location information, and specifically, in some usage scenarios, different SIM cards are used in different areas, and the signal strength and the network speed of the SIM cards are different, for example, assuming that a terminal device is installed with a SIM card 3 in addition to a first SIM card, when the user frequently travels to and from an urban area C and a rural area D, the signal strength of the first SIM card is slightly better than that of the SIM card 3 when the user is in the urban area C, and when the user is in the rural area D, the signal strength of the SIM card 3 is obviously better than that of the first SIM card, the user may set the correspondence between the urban area C and the first SIM card and the correspondence between the rural area D and the SIM card 3 in the second correspondence table in advance In a corresponding relationship, when the second detection module 14 detects that the first SIM card and the SIM card 3 in the terminal device are both in a roaming state, the fourth selection unit may obtain a current geographic location through technologies such as GPS, and then determine whether to select the first SIM card or the SIM card 3 according to the current geographic location, specifically, assuming that the current geographic location is the region D, a first distance between the region D and the urban region C and a second distance between the region D and the township region D may be obtained through calculation, and then determine whether to select the first SIM card or the SIM card 3 by determining a size between the first distance and the second distance, if the first distance is smaller than the second distance, it is determined that the region D matches the urban region C (i.e., the region D is closer to the urban region C), then the fourth selection unit may select the first SIM card as the SIM card for the data service by the target application program, if the second distance is smaller than the first distance, it indicates that the region D matches with the township region D (i.e. the region D is closer to the township region D), then the fourth selecting unit may select the SIM card 3 as the SIM card for the data service of the target application program, so as to achieve the optimum geographic location and improve the user experience to the greatest extent.
Referring to fig. 4, the SIM card selecting apparatus further includes:
a third detecting module 17, configured to detect whether a current APN corresponding to a SIM card currently used as a target application for a data service is a predetermined target APN;
and a switching module 18, configured to switch the current APN to the target APN when the current APN corresponding to the SIM card currently used as the target application for the data service is not a predetermined target APN.
In this embodiment, in some usage scenarios, the same SIM card may access the network through different APNs, and the generated charges (including roaming charges and non-roaming charges) may also be different; in other usage scenarios, for security and other considerations, a specific APN needs to be accessed to a specific network (for example, to access an intranet of an enterprise, a dedicated APN corresponding to the intranet needs to be added in advance on a terminal device), and therefore, in some embodiments, the application-SIM card correspondence specifically includes a SIM card corresponding to each application and a target APN corresponding to each application (that is, the application, the SIM card, and the target APN are in a one-to-one mapping relationship), the first correspondence table specifically includes tariff standard information corresponding to each APN accessed by each SIM card (that is, the SIM card, the target APN, and the tariff standard information are in a one-to-one mapping relationship), and the second correspondence table specifically includes a plurality of geographic location information and a SIM card and an APN corresponding to each geographic location information (that is, the SIM card, the target APN, and the tariff standard information are in a one-to-one mapping relationship), where each geographic location information corresponds to each APN (that is, the, The target APN and the geographical location information are in one-to-one mapping relation). Specifically, after the SIM card used as the target application program for the data service is determined in the foregoing manner, the third detection module 17 may further detect whether the current APN corresponding to the current SIM card used for the data service is the predetermined target APN, and if not, the current APN may be switched to the target APN through the switching module 18; if yes, no processing is carried out, so that the trouble of manual operation can be avoided by automatically selecting a proper SIM card and APN for the user to use, meanwhile, the optimization in aspects of expense, safety and the like is realized, and the use experience of the user is improved to the maximum extent.
Referring to fig. 5, a storage medium 100, which is a computer-readable storage medium, is further provided, and a computer program 200 is stored on the storage medium, and when executed by a processor, the computer program 200 implements the SIM card selection method in any of the above embodiments.
Referring to fig. 6, the embodiment of the present application further provides a computer device 300, which includes a memory 400, a processor 500, and a computer program 200 stored on the memory 400 and executable on the processor 500, and when the processor 500 executes the computer program 200, the SIM card selecting method in any of the above embodiments is implemented.
Those skilled in the art will appreciate that the computer apparatus 300 of the embodiments of the present application is an apparatus as described above for performing one or more of the methods of the present application. These devices may be specially designed and manufactured for the required purposes, or they may comprise known devices in general-purpose computers. These devices have stored therein computer programs 200 or application programs, which computer programs 200 are selectively activated or reconfigured. Such a computer program 200 may be stored in a device (e.g., computer) readable medium, including, but not limited to, any type of disk including floppy disks, hard disks, optical disks, CD-ROMs, and magnetic-optical disks, ROMs (Read-Only memories), RAMs (Random Access memories), EPROMs (Erasable Programmable Read-Only memories), EEPROMs (Electrically Programmable Read-Only memories), flash memories, magnetic cards, or optical cards, or any type of media suitable for storing electronic instructions, and each coupled to a bus. That is, a readable medium includes any medium that stores or transmits information in a form readable by a device (e.g., a computer).
The above description is only a preferred embodiment of the present application, and not intended to limit the scope of the present application, and all modifications of equivalent structures and equivalent processes, which are made by the contents of the specification and the drawings of the present application, or which are directly or indirectly applied to other related technical fields, are also included in the scope of the present application.
Claims (10)
1. A method for selecting an SIM card is applied to a terminal device supporting multi-card multi-standby, wherein a plurality of SIM cards are installed on the terminal device, and the method comprises the following steps:
when a target application program is started, determining a first SIM card corresponding to the target application program according to a preset application program-SIM card corresponding relation;
detecting whether the first SIM card is in a roaming state;
and if not, selecting the first SIM card as the SIM card of the target application program for the data service.
2. The SIM card selection method according to claim 1, wherein the step of detecting whether the first SIM card is in a roaming state includes:
acquiring current operator network information and IMSI information of the first SIM card, wherein the current operator network information comprises first MCC/MNC information, and the IMSI information comprises second MCC/MNC information;
judging whether the first MCC/MNC information is consistent with the second MCC/MNC information or not;
if not, the first SIM card is judged to be in a roaming state.
3. The SIM card selection method according to claim 1, wherein after the step of detecting whether the first SIM card is in the roaming state, the method further comprises:
if the first SIM card is in a roaming state, detecting whether at least one second SIM card in a non-roaming state exists in the rest SIM cards to be selected;
if so, selecting the second SIM card with the highest priority from all the second SIM cards in the non-roaming state according to a preset first priority strategy, and selecting the second SIM card with the highest priority as the SIM card of the target application program for the data service.
4. The method for selecting the SIM card according to claim 3, wherein after the step of detecting whether at least one second SIM card in the non-roaming state exists in the remaining SIM cards to be selected, the method further comprises:
if the rest SIM cards to be selected are in the roaming state, selecting the SIM card with the highest priority from all the SIM cards in the roaming state according to a preset second priority strategy, and selecting the SIM card with the highest priority as the SIM card of the target application program for the data service.
5. The SIM card selection method according to claim 3, wherein the step of selecting the second SIM card with the highest priority from all the second SIM cards currently in the non-roaming state according to a preset first priority policy, and selecting the second SIM card with the highest priority as the SIM card used by the target application for the data service, comprises:
according to a plurality of non-roaming charge information in a preset first corresponding relation table, selecting a second SIM card with the lowest non-roaming charge from all the second SIM cards in a non-roaming state at present, and selecting the second SIM card with the lowest non-roaming charge as an SIM card of the target application program for data service, wherein charge standard information corresponding to each SIM card is prestored in the first corresponding relation table, and the charge standard information comprises the non-roaming charge information;
or,
acquiring current geographic position information, selecting a second SIM card matched with the current geographic position information from all current second SIM cards in a non-roaming state according to a plurality of geographic position information in a preset second corresponding relation table, and selecting the second SIM card matched with the current geographic position information as an SIM card of the target application program for data service, wherein the geographic position information corresponding to each SIM card is prestored in the second corresponding relation table.
6. The method as claimed in claim 4, wherein the step of selecting the SIM card with the highest priority from all current SIM cards in roaming status according to the preset second priority policy, and selecting the SIM card with the highest priority as the SIM card used by the target application for data services, comprises:
selecting the SIM card with the lowest roaming charge from all current SIM cards in a roaming state according to a plurality of roaming charge information in a preset first corresponding relation table, and selecting the SIM card with the lowest roaming charge as the SIM card of the target application program for the data service, wherein charge standard information corresponding to each SIM card is prestored in the first corresponding relation table, and the charge standard information comprises the roaming charge information;
or,
acquiring current geographical position information, selecting the SIM card matched with the current geographical position information from all current SIM cards in a roaming state according to a plurality of geographical position information in a preset second corresponding relation table, and selecting the SIM card matched with the current geographical position information as the SIM card of the target application program for data service, wherein the geographical position information corresponding to each SIM card is prestored in the second corresponding relation table.
7. The method for selecting the SIM card according to any one of claims 1 to 6, further comprising:
detecting whether a current APN corresponding to a SIM card which is currently used as the target application program for data service is a preset target APN;
if not, the current APN is switched to the target APN.
8. The utility model provides a device is selected for use to SIM card which characterized in that is applied to and supports many cards many terminal equipment of treating, install many SIM cards on the terminal equipment, the device includes:
the device comprises a determining module, a judging module and a judging module, wherein the determining module is used for determining a first SIM card corresponding to a target application program according to a preset application program-SIM card corresponding relation when the target application program is started;
the first detection module is used for detecting whether the first SIM card is in a roaming state;
and the selecting module is used for selecting the first SIM card as the SIM card of the target application program for the data service when the first SIM card is in a non-roaming state.
9. A storage medium, characterized in that it is a computer-readable storage medium on which a computer program is stored, which computer program, when being executed by a processor, implements the SIM card selection method according to any one of claims 1 to 7.
10. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the SIM card selection method according to any one of claims 1 to 7 when executing the computer program.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910411033.8A CN110035385B (en) | 2019-05-16 | 2019-05-16 | SIM card selection method and device, storage medium and computer equipment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910411033.8A CN110035385B (en) | 2019-05-16 | 2019-05-16 | SIM card selection method and device, storage medium and computer equipment |
Publications (2)
Publication Number | Publication Date |
---|---|
CN110035385A true CN110035385A (en) | 2019-07-19 |
CN110035385B CN110035385B (en) | 2020-12-22 |
Family
ID=67242556
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910411033.8A Active CN110035385B (en) | 2019-05-16 | 2019-05-16 | SIM card selection method and device, storage medium and computer equipment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110035385B (en) |
Cited By (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110392405A (en) * | 2019-07-25 | 2019-10-29 | Oppo广东移动通信有限公司 | Switch method, apparatus, terminal and the storage medium of mobile data network |
CN110475229A (en) * | 2019-08-20 | 2019-11-19 | 深圳市沃特沃德股份有限公司 | Method, apparatus, computer equipment and the storage medium of service data visitation |
WO2021081840A1 (en) * | 2019-10-30 | 2021-05-06 | 华为技术有限公司 | Sim card selection method, device and system |
CN112995983A (en) * | 2019-12-13 | 2021-06-18 | 卡西欧计算机株式会社 | Terminal device, communication method, and recording medium |
CN113518404A (en) * | 2021-04-19 | 2021-10-19 | Tcl通讯(宁波)有限公司 | Automatic switching method and device of 5G network, storage medium and mobile terminal |
CN113709722A (en) * | 2021-08-30 | 2021-11-26 | 维沃移动通信有限公司 | SIM card switching method and device |
CN114760195A (en) * | 2020-12-29 | 2022-07-15 | 中国移动通信集团北京有限公司 | Network access point configuration method, device, system, equipment and medium |
Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101287233A (en) * | 2008-05-23 | 2008-10-15 | 德信无线通讯科技(北京)有限公司 | Method and system for implementing STK application in double-card double-standby terminal |
CN101370199A (en) * | 2007-08-16 | 2009-02-18 | 中兴通讯股份有限公司 | Dual-module dual-card mobile phone for automatically initializing dual-card classification mode |
CN101895905A (en) * | 2010-07-09 | 2010-11-24 | 惠州Tcl移动通信有限公司 | Method for managing data accounts of mobile communication terminal |
US20130023255A1 (en) * | 2011-07-19 | 2013-01-24 | Yang lin-hao | Method of configuring bluetooth sim access profile of communication device |
CN105898811A (en) * | 2016-04-01 | 2016-08-24 | 宇龙计算机通信科技(深圳)有限公司 | Terminal communication method, terminal communication device and terminal |
CN106793019A (en) * | 2016-12-12 | 2017-05-31 | 深圳市万普拉斯科技有限公司 | Adhere to method, device and the mobile terminal of APN |
CN107172287A (en) * | 2017-05-26 | 2017-09-15 | 维沃移动通信有限公司 | A kind of many cartoon letters methods and mobile terminal |
CN109495875A (en) * | 2019-01-11 | 2019-03-19 | Oppo广东移动通信有限公司 | SIM card selection method, device, electronic equipment and storage medium |
-
2019
- 2019-05-16 CN CN201910411033.8A patent/CN110035385B/en active Active
Patent Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101370199A (en) * | 2007-08-16 | 2009-02-18 | 中兴通讯股份有限公司 | Dual-module dual-card mobile phone for automatically initializing dual-card classification mode |
CN101287233A (en) * | 2008-05-23 | 2008-10-15 | 德信无线通讯科技(北京)有限公司 | Method and system for implementing STK application in double-card double-standby terminal |
CN101895905A (en) * | 2010-07-09 | 2010-11-24 | 惠州Tcl移动通信有限公司 | Method for managing data accounts of mobile communication terminal |
US20130023255A1 (en) * | 2011-07-19 | 2013-01-24 | Yang lin-hao | Method of configuring bluetooth sim access profile of communication device |
CN105898811A (en) * | 2016-04-01 | 2016-08-24 | 宇龙计算机通信科技(深圳)有限公司 | Terminal communication method, terminal communication device and terminal |
CN106793019A (en) * | 2016-12-12 | 2017-05-31 | 深圳市万普拉斯科技有限公司 | Adhere to method, device and the mobile terminal of APN |
CN107172287A (en) * | 2017-05-26 | 2017-09-15 | 维沃移动通信有限公司 | A kind of many cartoon letters methods and mobile terminal |
CN109495875A (en) * | 2019-01-11 | 2019-03-19 | Oppo广东移动通信有限公司 | SIM card selection method, device, electronic equipment and storage medium |
Cited By (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110392405A (en) * | 2019-07-25 | 2019-10-29 | Oppo广东移动通信有限公司 | Switch method, apparatus, terminal and the storage medium of mobile data network |
CN110475229A (en) * | 2019-08-20 | 2019-11-19 | 深圳市沃特沃德股份有限公司 | Method, apparatus, computer equipment and the storage medium of service data visitation |
WO2021081840A1 (en) * | 2019-10-30 | 2021-05-06 | 华为技术有限公司 | Sim card selection method, device and system |
CN112995983A (en) * | 2019-12-13 | 2021-06-18 | 卡西欧计算机株式会社 | Terminal device, communication method, and recording medium |
CN114760195A (en) * | 2020-12-29 | 2022-07-15 | 中国移动通信集团北京有限公司 | Network access point configuration method, device, system, equipment and medium |
CN113518404A (en) * | 2021-04-19 | 2021-10-19 | Tcl通讯(宁波)有限公司 | Automatic switching method and device of 5G network, storage medium and mobile terminal |
CN113709722A (en) * | 2021-08-30 | 2021-11-26 | 维沃移动通信有限公司 | SIM card switching method and device |
CN113709722B (en) * | 2021-08-30 | 2024-10-29 | 维沃移动通信有限公司 | SIM card switching method and device |
Also Published As
Publication number | Publication date |
---|---|
CN110035385B (en) | 2020-12-22 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110035385B (en) | SIM card selection method and device, storage medium and computer equipment | |
KR101474881B1 (en) | Method and system for displaying user-related information on user's handsets | |
US10021561B2 (en) | Method and apparatus for setting up communication connection | |
US9451098B2 (en) | System and methods for dynamic SIM provisioning on a dual-SIM wireless communication device | |
CN107484213B (en) | Network switching method based on ESIM card, intelligent terminal and server | |
EP3582525B1 (en) | Implementation and communication methods, apparatus and system of virtual subscriber identity module | |
US20160309326A1 (en) | Method for Data Service Transmission and Terminal | |
CN102137389B (en) | Multi-card mobile terminal and method for transferring data of SIM card | |
US9020465B2 (en) | Sharing network capacity with another device | |
CN102821380B (en) | For realizing method and the mobile terminal of one-card multi-number of mobile terminal | |
CN110602764B (en) | Network searching method, device, storage medium and terminal | |
EP3136800B1 (en) | Method for updating rplmn information, and user equipment | |
US20070197216A1 (en) | Method for locking terminal home | |
WO2015130689A1 (en) | System and methods for improving network registration for all sims of a multi-sim device using a dynamically-determined registration order | |
CN101388819A (en) | Network access method, system and mobile terminal | |
EP2716086B1 (en) | Identity management for mobile devices | |
CN105359599A (en) | Method of device-assisted enhanced SIM replacement | |
RU2625951C2 (en) | Control of identity data of mobile devices | |
CN103152717A (en) | Method and terminal for terminal frequency band adaptation | |
EP3488631B1 (en) | Cellular device sim multiplexor and control interface | |
CN101557578A (en) | Method and terminal for automatically recognizing and setting dialing parameters | |
CN102149068A (en) | Roaming access method and terminal | |
CN101605378A (en) | A kind of method of automatically selecting calling number by multi-mode terminal and device | |
CN103945345A (en) | Information prompt method and mobile terminal | |
US20130059612A1 (en) | Method and data card for shielding short message receiving function |
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 | ||
TR01 | Transfer of patent right |
Effective date of registration: 20220526 Address after: 518000 floor 1, building 3, Dexin Chang wisdom Park, No. 23 Heping Road, Qinghua community, Longhua street, Longhua District, Shenzhen, Guangdong Patentee after: Shenzhen waterward Information Co.,Ltd. Address before: 518000, block B, huayuancheng digital building, 1079 Nanhai Avenue, Shekou, Nanshan District, Shenzhen City, Guangdong Province Patentee before: SHENZHEN WATER WORLD Co.,Ltd. |
|
TR01 | Transfer of patent right |