CN107548114B - SIM card switching method and device - Google Patents

SIM card switching method and device Download PDF

Info

Publication number
CN107548114B
CN107548114B CN201710750851.1A CN201710750851A CN107548114B CN 107548114 B CN107548114 B CN 107548114B CN 201710750851 A CN201710750851 A CN 201710750851A CN 107548114 B CN107548114 B CN 107548114B
Authority
CN
China
Prior art keywords
sim card
base station
switching
preset
switched
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201710750851.1A
Other languages
Chinese (zh)
Other versions
CN107548114A (en
Inventor
王润心
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hangzhou H3C Technologies Co Ltd
Original Assignee
Hangzhou H3C Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hangzhou H3C Technologies Co Ltd filed Critical Hangzhou H3C Technologies Co Ltd
Priority to CN201710750851.1A priority Critical patent/CN107548114B/en
Publication of CN107548114A publication Critical patent/CN107548114A/en
Application granted granted Critical
Publication of CN107548114B publication Critical patent/CN107548114B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Mobile Radio Communication Systems (AREA)
  • Navigation (AREA)

Abstract

The invention discloses a method and a device for switching SIM cards, which are applied to mobile equipment comprising a data communication module, wherein the data communication module is connected with one of two or more SIM cards through the switching module, and the method comprises the following steps: when the SIM card switching condition is triggered, judging whether the SIM card is necessary to be switched according to a preset environment condition; the environmental conditions comprise terrain environmental conditions and/or base station environmental conditions; and when the SIM card is judged to be necessary to be switched, informing the switching module to switch the SIM card so as to connect the data communication module with the switched SIM card. The technical scheme can realize useful switching of the SIM card, avoids wasting resources due to meaningless switching, does not need to greatly increase the cost of the mobile equipment, and is low in cost and effective.

Description

SIM card switching method and device
Technical Field
The invention relates to the technical field of data communication, in particular to a method and a device for switching an SIM card.
Background
In the prior art, many mobile devices support the insertion of multiple SIM cards (i.e. multiple cards), but the data communication modules (usually including baseband chips and rf chips) are not arranged in the same way, and usually support single standby (one rf chip) and multiple standby (multiple rf chips) respectively according to the number of rf chips.
The multi-card multi-standby undoubtedly adds equipment cost, and the multi-card single-standby requires selecting a proper SIM card switching method.
Disclosure of Invention
In order to at least partially solve the above problems, the present invention provides a method and an apparatus for switching a SIM card.
According to an aspect of the present invention, there is provided a method for switching a SIM card, applied to a mobile device including a data communication module, where the data communication module is connected to one of two or more SIM cards through a SIM card switching module, the method including:
when the SIM card switching condition is triggered, judging whether the SIM card is necessary to be switched according to a preset environment condition; the environmental conditions comprise terrain environmental conditions and/or base station environmental conditions;
and when the SIM card is judged to be necessary to be switched, informing the SIM card switching module to switch the SIM card so as to connect the data communication module with the switched SIM card.
Optionally, the SIM card switching condition includes:
the duration of the SIM card in the network abnormal state reaches the preset time;
and/or the presence of a gas in the gas,
and according to the obtained current geographical position information, finding out that the base station accessed by the SIM card is an abnormal base station from a preset map database.
Optionally, the environmental condition is a base station environmental condition, and the determining whether there is a need to switch the SIM card according to the preset environmental condition includes:
calculating the geographical position information when the switching time arrives according to the acquired current geographical position information, the current speed, a preset route and preset switching time;
according to the geographical position information when the switching time is up, searching a normal base station set determined according to the base station environmental conditions from a preset map database;
and when the base stations in the normal base station set can be accessed by one or more SIM cards which are not connected with the data communication module currently, judging that the SIM cards are necessary to be switched, otherwise, judging that the SIM cards are not necessary to be switched.
Optionally, the method further comprises:
when the duration of the SIM card in the network abnormal state reaches the preset time, acquiring the current geographical position information, searching a base station to which the SIM card is currently accessed from the map database, and marking the state of the base station as the abnormal state;
and reporting the abnormal state to a server, so that the base station is marked as an abnormal base station when the server receives the report times of the abnormal state in a preset time period and reaches a preset threshold value.
Optionally, the environmental condition is a terrain environmental condition, and the determining whether it is necessary to switch the SIM card according to the preset environmental condition includes:
according to the obtained current geographical position information, searching corresponding topographic environment information from a preset map database;
and when the terrain environment information indicates abnormal network terrain, judging that the SIM card is not necessary to be switched, otherwise, judging that the SIM card is necessary to be switched.
Optionally, each SIM card is set with a priority, and the method further includes:
according to the obtained current geographical position information, a base station which can be accessed currently is found out from a preset map database;
and judging whether the SIM cards are necessary to be switched or not according to the base station which can be accessed currently and the priority of each SIM card.
According to another aspect of the present invention, there is provided a SIM card switching apparatus for use in a mobile device including a data communication module, the data communication module being connected to one of two or more SIM cards through a SIM card switching module, the apparatus including:
the judging unit is used for judging whether the SIM card is necessary to be switched according to the preset environmental condition when the SIM card switching condition is triggered; the environmental conditions comprise terrain environmental conditions and/or base station environmental conditions;
and the notification unit is used for notifying the SIM card switching module to switch the SIM card when the SIM card switching module is judged to be necessary to switch the SIM card so as to connect the data communication module with the switched SIM card.
Optionally, the SIM card switching condition includes:
the duration of the SIM card in the network abnormal state reaches the preset time;
and/or the presence of a gas in the gas,
and according to the obtained current geographical position information, finding out that the base station accessed by the SIM card is an abnormal base station from a preset map database.
Optionally, the environmental condition is a base station environmental condition;
the judging unit is used for calculating the geographical position information when the switching time arrives according to the acquired current geographical position information, the current speed, a preset route and the preset switching time, searching a normal base station set determined according to the environmental conditions of the base stations from a preset map database according to the geographical position information when the switching time arrives, and judging that the SIM cards are necessary to be switched when the base stations in the normal base station set can be accessed by one or more SIM cards which are not connected with the data communication module currently, or judging that the SIM cards are not necessary to be switched.
Optionally, the apparatus further comprises:
and the map data maintenance unit is used for acquiring current geographical position information when the duration of the SIM card in the network abnormal state reaches preset time, searching a base station which is accessed by the SIM card currently from the map database, marking the state of the base station as an abnormal state, and reporting the abnormal state to a server, so that the base station is marked as an abnormal base station when the server receives the report times of the abnormal state in a preset time period and reaches a preset threshold value.
Optionally, the environmental condition is a terrain environmental condition;
the judging unit is used for searching corresponding topographic environment information from a preset map database according to the acquired current geographic position information; and when the terrain environment information indicates abnormal network terrain, judging that the SIM card is not necessary to be switched, otherwise, judging that the SIM card is necessary to be switched.
Optionally, each SIM card is set with a priority level;
the judging unit is used for searching a base station which can be accessed currently from a preset map database according to the acquired current geographic position information; and judging whether the SIM cards are necessary to be switched or not according to the base station which can be accessed currently and the priority of each SIM card.
Optionally, a processor and a machine-readable storage medium storing machine-executable instructions executable by the processor, the processor being caused by the machine-executable instructions to: implementing a method as described in any of the above.
Optionally, there are stored machine executable instructions that, when invoked and executed by a processor, cause the processor to: implementing a method as described in any of the above.
According to the technical scheme, the base station environmental conditions, the terrain environmental conditions and other environmental conditions are set after the SIM card switching conditions are triggered, and the SIM cards are switched when the environmental conditions are met.
Drawings
Fig. 1 is a flowchart illustrating a method for switching a SIM card according to an embodiment of the present invention;
fig. 2 is a schematic structural diagram of a SIM card switching apparatus according to an embodiment of the present invention;
FIG. 3 illustrates a schematic structural diagram of a computing device in accordance with one embodiment of the present invention;
fig. 4 shows a schematic structural diagram of a mobile device according to an embodiment of the present invention.
Detailed Description
Currently, a method for switching a multi-card single-standby SIM card generally includes: and when the network of the currently used SIM card is abnormal, switching to the standby SIM card.
However, such a switching method with a single judgment condition often causes meaningless switching. Here, the meaningless switching means that when switching to another SIM card, the system detects that the other SIM card does not satisfy the use condition, and then when the SIM card used before does not recover the service, the system switches back and forth between the two SIM cards. Meaningless switching may exist in many scenarios, such as: access to the base station is difficult in tunnels, valleys, etc., where even a SIM card switch is usually meaningless. If the corresponding switching condition is not set, the SIM card is repeatedly switched, so that meaningless switching is caused, and resources are wasted. For another example, if the SIM card after the handover cannot access the base station (for example, is located in an area where the operator corresponding to the SIM card does not deploy the base station) or the service of the accessed base station is abnormal, the handover is also meaningless.
To at least partially solve the above problems, the technical idea of the present invention is to: and reasonably avoiding the scenes, and avoiding meaningless switching as much as possible, namely not switching the SIM cards when the scenes are in the scenes. The question is then how to properly select such a scenario.
Therefore, the embodiment of the invention discloses a method and a device for switching an SIM card, which aim to solve the problem that resources are wasted due to frequent switching of the SIM card in certain scenes in the prior art. In order to make the objects, technical solutions and advantages of the present invention more apparent, embodiments of the present invention will be described in detail with reference to the accompanying drawings.
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present application. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present application, as detailed in the appended claims.
The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. As used in this application and the appended claims, the singular forms "a", "an", and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and/or" as used herein refers to and encompasses any and all possible combinations of one or more of the associated listed items.
It is to be understood that although the terms first, second, third, etc. may be used herein to describe various information, such information should not be limited to these terms. These terms are only used to distinguish one type of information from another. For example, first information may also be referred to as second information, and similarly, second information may also be referred to as first information, without departing from the scope of the present application. The word "if" as used herein may be interpreted as "at … …" or "when … …" or "in response to a determination", depending on the context.
Fig. 1 is a flowchart illustrating a method for switching a SIM card according to an embodiment of the present invention, which can be applied to a mobile device including a data communication module, where the data communication module is connected to one of two or more SIM cards through the SIM card switching module, and the method includes:
step S110, when the SIM card switching condition is triggered, judging whether the SIM card is necessary to be switched according to a preset environment condition; the environmental conditions include terrain environmental conditions and/or base station environmental conditions.
As can be seen from the above description, when the environment of the mobile device is an environment (e.g. tunnel, valley) that is difficult to provide better network service or the environment of the base station is poor, the SIM card switching has no practical meaning, and only resources are wasted. Environmental conditions are set in this embodiment to determine the necessity of switching SIM cards. The data communication module can be a 4G module, and comprises a baseband chip and a radio frequency chip.
Step S120, when the SIM card switching is necessary, the SIM card switching module is informed to switch the SIM card so that the data communication module is connected with the switched SIM card.
The switching module can be realized by adopting a SIM card switching circuit. The mobile device in this embodiment may be a 4G router deployed on a mobile vehicle such as a train, but may also be another mobile device.
It can be seen that, in the method shown in fig. 1, by setting the environmental conditions after triggering the SIM card switching conditions, and switching the SIM card when the environmental conditions are met, useful switching of the SIM card can be realized, so that resources are prevented from being wasted by meaningless switching, and the cost of the mobile device does not need to be greatly increased, which is low and effective. In some optional embodiments described above, when it is determined to perform a handover operation according to a preset environmental condition, when a base station providing normal base station services for a geographic location where the mobile device is located can be accessed by one or more SIM cards not currently connected to the data communication module, it is determined that there is a need to handover the SIM cards.
In an embodiment of the present invention, in the method, the SIM card switching condition includes: the duration of the SIM card in the network abnormal state reaches the preset time; and/or according to the acquired current geographic position information, finding out that the base station accessed by the SIM card is an abnormal base station from a preset map database.
The first condition shown above is to acquire the network status of the currently used SIM card (i.e. the SIM card currently connected to the data communication module), and when the SIM card is in a network abnormal state (or the state lasts for a while), the SIM card switching condition is triggered. A more time-saving condition is that, when the network abnormal state of the SIM card is obtained, it is determined whether the base station to which the SIM card is accessed is an abnormal base station. To achieve this, a map database with updatable data may be set in the mobile device, the current geographical location information of the mobile device may be obtained through a GPS module or a data communication module, and whether the base station accessed by the SIM card is an abnormal base station may be determined by searching the map database. The map database may store information on base stations such as geographical position information, coverage, the operator to which the base station belongs, and whether or not the status is abnormal. The abnormal base station in the embodiment of the present invention may be a base station that cannot provide normal base station services, for example, a base station that cannot provide normal base station services due to technical failure, or a base station that cannot provide better network signals. The normal base station may be a base station that is capable of providing normal base station services, such as a base station that is capable of providing better network signals.
In an embodiment of the present invention, in the method, the environmental condition is a base station environmental condition, and determining whether there is a need to switch the SIM card according to a preset environmental condition includes: calculating the geographical position information when the switching time arrives according to the acquired current geographical position information, the current speed, the preset route and the preset switching time; according to the geographical position information when the switching time is up, searching a normal base station set determined according to the base station environmental conditions from a preset map database; and when the base stations in the normal base station set can be accessed by one or more SIM cards which are not connected with the data communication module currently, judging that the SIM cards are necessary to be switched, otherwise, judging that the SIM cards are not necessary to be switched.
In this embodiment, it is specifically shown how to judge the necessity of switching the SIM card according to the environmental conditions of the base station. The base station environmental conditions herein may include whether or not the coverage area by the base station signal, whether or not the base station network is abnormal, whether or not the base station service can be normally provided, and the like. Here, whether the base station network is abnormal may be determined by: if the base station signal is weaker than a certain threshold value, and/or there is a base station signal but no base station network, the base station network may be considered abnormal. The embodiment of the invention determines whether the abnormal base station exists according to the base station environmental condition, optionally, the determination of whether the abnormal base station exists includes two aspects: considering the signal coverage range of each base station, regarding the current position, whether a base station with a signal capable of covering the current position exists or not is judged, and if the base station with the signal capable of covering the current position does not exist, an abnormal base station incapable of providing the base station service is considered to exist; and secondly, under the condition that a base station capable of covering the current position exists, determining whether the base station is an abnormal base station according to whether the base station network is abnormal, and if the base station network is abnormal, determining that the base station is an abnormal base station. By the method, the abnormal base station set can be determined according to the base station environmental conditions, the abnormal base station set is removed from the preset map database, and the rest base station set can be regarded as a normal base station set.
In some alternative embodiments, determining whether a normal base station exists may also be performed as follows. First, considering the signal coverage of each base station, for the current location, whether there is a base station that can cover the current location with signals, and if there is a base station that can cover the current location with signals, it can be considered that there is a normal base station providing a base station service. And secondly, under the condition that the base station capable of covering the current position exists, determining whether the base station is an abnormal base station according to whether the base station network is abnormal, and if the base station network is normal, determining that the base station is a normal base station.
The current moving speed can be calculated through the acquired geographic position information. Of course, it is not stated here that the mobile device must be equipped with a power module, but can be calculated according to the scene in which it is installed (e.g., on a train). For example, the current geographic location information is acquired several times by the GPS module within a period of time (e.g. 3s), and the current velocity is calculated according to the acquired geographic location information, specifically, the current velocity can be calculated by a differential method, or a doppler shift method, and similar mathematical methods are many, which are not limited herein. When the GPS module can output the message of the NMEA0183 protocol, the current speed can be read directly from the message.
It is simple to calculate the geographical location information at the time of the arrival of the switching time based on the current geographical location information, the current speed, the preset route information, and the preset switching time (after the current SIM card is switched to another SIM card, it takes a period of time for the data communication module to identify the switched SIM card and re-dial to establish a connection to resume data communication, which may be referred to as the switching time, and is typically about 20 s). This calculated geographical location information can be determined which base stations are within its coverage area by looking up a map database (which can be referred to in the previous embodiment). Then a normal set of base stations (and possibly an empty set) can naturally be obtained depending on the status of the base stations. For example, the currently used SIM card is a universal SIM card, and the base stations in the normal base station set are respectively the mobile and the telecom, so if the mobile device is provided with the mobile SIM card, it is necessary to switch the SIM card at this time. If it is an empty set, there is no need to switch SIM cards. If a plurality of SIM cards can be switched, one can be selected randomly or according to priority.
In the above embodiment, the map database includes the base station information, and in an embodiment of the present invention, a method for maintaining the base station information is provided, that is, the method further includes: when the duration of the SIM card in the network abnormal state reaches the preset time, acquiring the current geographical position information, searching a base station currently accessed by the SIM card from a map database, and marking the state of the base station as the abnormal state; and reporting the abnormal state to a server, so that when the reporting times of the abnormal state received by the server in a preset time period reach a preset threshold value, the base station is marked as an abnormal base station.
In the foregoing embodiments, it is mentioned that the map database may be updated, and in combination with the present embodiment, specifically, the base station information sent by the server may be received, or the base station information may be requested from the server at regular time, and the state of each base station in the map database may be updated according to the base station information. The server may receive the abnormal status reported by the mobile device (specifically, when the mobile device is capable of networking), and if a plurality of mobile devices report the abnormal status of a certain base station within a predetermined time period, the base station is marked as an abnormal base station. It may be considered to actively push base station information or to actively acquire base station information by the mobile device when the status of the base station changes. Considering the maintenance efficiency of the base station, the server can also actively restore the abnormal base station to the mark of the normal base station within a period of time, and if the abnormal state of the reported base station is received, the marking of the abnormal base station is carried out again according to the method when the conditions are met.
In an embodiment of the present invention, in the method, the environmental condition is a topographic environmental condition, and determining whether there is a need to switch the SIM card according to a preset environmental condition includes: according to the obtained current geographical position information, searching corresponding topographic environment information from a preset map database; and when the terrain environment information indicates that the terrain environment condition is abnormal terrain of the network, judging that the SIM card is not necessary to be switched, otherwise, judging that the SIM card is necessary to be switched. The network anomaly topography may be a geographical environment that is prone to base station network anomalies and/or fails to provide normal base station services, such as a valley, a tunnel, an overlapping area of different network operator services, and so forth.
In which case network anomalies such as valleys, tunnels, etc. may be identified in the map database. The advantages here compared to the prior art are also: in the prior art, after the mobile equipment enters the abnormal network terrain, SIM card switching is continuously carried out, and when the mobile equipment leaves the abnormal network terrain, the SIM card in the abnormal network state is just switched to, and at the moment, another SIM card needs to be switched to; in this embodiment, if the network state of the original SIM card is recovered to normal when the mobile device leaves the abnormal terrain of the network, the SIM card does not need to be switched. Thus saving about 20s (i.e. the switching time mentioned in the previous embodiment) of time in the best case.
In an embodiment of the present invention, in the method, each SIM card is set with a priority, and the method further includes: according to the obtained current geographical position information, a base station which can be accessed currently is found out from a preset map database; and judging whether the SIM cards are necessary to be switched or not according to the base station which can be accessed currently and the priority of each SIM card.
In many cases, a user inserts multiple SIM cards into a mobile device, but more wants to use one of them. Priority may be set for each SIM card, for example, a user may wish to use one telecommunications SIM card and use the associated SIM card as a backup (e.g., from a billing perspective, for example only). In this case, if the mobile device determines that the mobile device currently enters the coverage area of the telecommunication base station after the telecommunication SIM card is switched to the connected SIM card, the mobile device may switch back to the telecommunication SIM card although the network status of the connected SIM card may be good. Thus, the requirements of users are more met.
The SIM card switching methods shown in the above embodiments may be applied individually, or may be combined in a certain manner according to actual requirements, which is not limited in the present invention.
The following is an exemplary description in connection with a specific scenario: A4G router is deployed on a certain train, a communication SIM card and a mobile SIM card are arranged in the 4G router, and the communication SIM card is connected in a default mode, wherein the 4G router is further provided with a map database for storing base station information such as geographical position information, coverage range, operators to which the base station belongs, whether the state is abnormal and the like of the base station.
During train operation, the following situation is likely to occur:
1) when the train runs to the network abnormal terrain such as a tunnel, a valley and the like, the condition of extremely poor network state can occur. If according to the prior art, the 4G router easily triggers the SIM card switching condition to switch the connected SIM card to the mobile SIM card, but obviously, the switching is meaningless, the switched mobile SIM card is also in a very bad network state, the mobile SIM card is switched back to the connected SIM card, and the steps are repeated until the mobile SIM card leaves the abnormal terrain of the network. Therefore, according to the technical scheme provided by the embodiment of the invention, when the SIM card switching condition is fully triggered, whether the SIM card is necessary to be switched is judged according to the terrain environment condition, under the situation, the SIM card switching is obviously judged to belong to the network abnormal terrain, the SIM card switching is not executed, and the judgment can be executed until the train leaves the network abnormal terrain. The 4G module will attempt to restore the network environment the first time after leaving the network's abnormal terrain. If according to the switching process in the prior art, when leaving the abnormal network terrain, the SIM card switching can be triggered just once, the technical scheme of the embodiment of the invention can save the switching time T at most.
2) When the SIM card switching condition is triggered, it may also be determined whether the switched SIM card (in this example, the mobile SIM card) can access a normal base station after the switching time T. Taking T as 20s as an example, if SIM card switching is performed according to the prior art, and the position where the train runs after 20s is not covered by the mobile base station, the switched mobile SIM card is also not passed through the network, and still meets the SIM card switching condition, which is a meaningless switching, therefore, in the embodiment of the present invention, it may be determined whether the position where the train runs after 20s is covered by the mobile base station capable of providing services normally, and if not, SIM card switching is not performed, which may also save the switching time T at most.
The determinations performed in 1) and 2) above may be performed in parallel or may be performed with priority.
If the judgment results in 1) and 2) indicate that the SIM card is necessary to be switched, the SIM card switching can be executed, and then the connected SIM card is switched to the mobile SIM card. If the mobile SIM card is still not connected with the network, the state of the base station accessed by the mobile SIM card at the moment is considered to be abnormal, the abnormal state of the base station can be recorded, and the abnormal state is reported to the server when the network is recovered. At this time, the judgment in 1) and 2) can be repeated to see whether the connected SIM card needs to be switched back.
Fig. 2 is a schematic structural diagram of a SIM card switching apparatus according to an embodiment of the present invention, which can be applied to a mobile device including a data communication module, where the data communication module can be connected to one of two or more SIM cards through the SIM card switching module. As shown in fig. 2, the SIM card switching apparatus 200 includes:
a determining unit 210, configured to determine whether it is necessary to switch the SIM card according to a preset environmental condition when the SIM card switching condition is triggered; the environmental conditions include terrain environmental conditions and/or base station environmental conditions.
A notification unit 220, configured to notify the SIM card switching module to perform SIM card switching when it is determined that there is a need to switch the SIM card, so that the data communication module is connected to the switched SIM card.
In some optional embodiments described above, when it is determined to perform a handover operation according to a preset environmental condition, when a base station providing normal base station services for a geographic location where the mobile device is located can be accessed by one or more SIM cards not currently connected to the data communication module, it is determined that there is a need to handover the SIM cards.
As can be seen from the above description, when the environment of the mobile device is an environment (e.g. tunnel, valley) that is difficult to provide better network service or the environment of the base station is poor, the SIM card switching has no practical meaning, and only resources are wasted. Environmental conditions are set in this embodiment to determine the necessity of switching SIM cards. The data communication module can be a 4G module, and comprises a baseband chip and a radio frequency chip.
The switching module can be realized by adopting a SIM card switching circuit. The mobile device in this embodiment may be a 4G router deployed on a mobile vehicle such as a train, but may also be another mobile device.
It can be seen that, in the apparatus shown in fig. 2, by setting the environmental condition after triggering the SIM card switching condition, and switching the SIM card when the environmental condition is satisfied, the useful switching of the SIM card can be realized, the resource waste caused by the meaningless switching is avoided, and the cost of the mobile device does not need to be greatly increased, which is cheap and effective.
In an embodiment of the present invention, in the above apparatus, the SIM card switching condition includes: the duration of the SIM card in the network abnormal state reaches the preset time; and/or according to the acquired current geographic position information, finding out that the base station accessed by the SIM card is an abnormal base station from a preset map database.
In an embodiment of the present invention, in the above apparatus, the environmental condition is a base station environmental condition; a determining unit 210, configured to calculate geographic location information when the switching time arrives according to the obtained current geographic location information, the current speed, the preset route, and the preset switching time, and find a normal base station set determined according to the base station environmental conditions from a preset map database according to the geographic location information when the switching time arrives, where when a base station in the normal base station set can be accessed by one or more SIM cards that are not currently connected to the data communication module, it is determined that there is a need to switch the SIM card, and otherwise, it is determined that there is no need to switch the SIM card.
In an embodiment of the present invention, the apparatus further includes: and a map data maintenance unit (not shown) configured to, when the duration of the SIM card in the network abnormal state reaches a predetermined time, acquire current geographical location information, find a base station to which the SIM card is currently accessed from a map database, mark the state of the base station as an abnormal state, and report the abnormal state to the server, so that when the number of reports of the abnormal state received by the server within a preset time period reaches a preset threshold, the base station is marked as an abnormal base station.
In one embodiment of the present invention, in the above apparatus, the environmental condition is a topographic environmental condition; the determining unit 210 is configured to find corresponding geographic environment information from a preset map database according to the obtained current geographic location information; and when the terrain environment information indicates that the terrain environment condition is abnormal terrain of the network, judging that the SIM card is not necessary to be switched, otherwise, judging that the SIM card is necessary to be switched. The network anomaly topography may be a geographical environment that is prone to base station network anomalies and/or fails to provide normal base station services, such as a valley, a tunnel, an overlapping area of different network operator services, and so forth.
In an embodiment of the present invention, in the above apparatus, each SIM card is set with a priority; a determining unit 210, configured to find a currently accessible base station from a preset map database according to the obtained current geographic location information; and judging whether the SIM cards are necessary to be switched or not according to the currently accessible base station and the priority of each SIM card.
The SIM card switching apparatus 200 provided in the present invention can be implemented by software, or can be implemented by hardware or a combination of hardware and software. For example, in the case of a software implementation, machine executable instructions corresponding to the SIM card switching device 200 in the non-volatile memory 350 may be read by the processor 310 into the volatile memory 340 for execution. In this case, the machine executable instructions corresponding to the SIM card switching apparatus 200 are run in the operating system of the computing device, i.e., the host.
From the hardware level, as shown in fig. 3, which is a schematic structural diagram of a computing device according to an embodiment of the present invention, in addition to the processor 310, the internal bus 320, the network interface 330, the volatile memory 340, and the non-volatile memory 350 shown in fig. 3, other hardware may be included according to the actual functions of the computing device.
For example, fig. 4 shows a schematic structural diagram of a mobile device according to an embodiment of the present invention, and as shown in fig. 4, the mobile device 400 includes a processor 310, a 4G module 420, a SIM card switching module 420, a SIM card slot 430, a SIM card switching apparatus 200, a GPS module 440, and a map database 450. The mobile device 400 may also include the internal bus 320, the network interface 330, the volatile memory 340, and the non-volatile memory 350 shown in fig. 3, but are not shown in fig. 4.
In various embodiments, the non-volatile memory 350 may be: a storage drive (e.g., hard disk drive), a solid state drive, any type of storage disk (e.g., compact disk, DVD, etc.), or similar storage medium, or a combination thereof. The volatile memory 340 may be: RAM (random Access Memory).
Further, the non-volatile memory 350 and the volatile memory 340 serve as machine-readable storage media on which machine-executable instructions corresponding to the switching device 200 of the SIM card executed by the processor 310 may be stored.
For the device embodiment, since it basically corresponds to the method embodiment, the relevant points may be referred to the partial description of the method embodiment, and will not be repeated here. The above-described embodiments of the apparatus are merely illustrative, and the units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment. One of ordinary skill in the art can understand and implement it without inventive effort.
In summary, according to the technical scheme of the present invention, by setting the environmental condition after triggering the SIM card switching condition, and switching the SIM card when the environmental condition is satisfied, the useful switching of the SIM card can be realized, so that the resource waste caused by meaningless switching is avoided, and the cost of the mobile device does not need to be greatly increased, which is low and effective.
The above description is only for the preferred embodiment of the present invention, and is not intended to limit the scope of the present invention. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention shall fall within the protection scope of the present invention.

Claims (12)

1. A method for switching SIM cards, the method being applied to a mobile device including a data communication module, the data communication module being connected to one of two or more SIM cards through a SIM card switching module, the method comprising:
when the SIM card switching condition is triggered, judging whether the SIM card is necessary to be switched according to a preset environment condition; the environmental conditions comprise terrain environmental conditions, or the environmental conditions comprise terrain environmental conditions and base station environmental conditions;
when the SIM card is judged to be necessary to be switched, informing the SIM card switching module to switch the SIM card so as to connect the data communication module with the switched SIM card;
the judging whether the SIM card is necessary to be switched according to the preset environmental condition comprises the following steps:
according to the obtained current geographical position information, searching corresponding topographic environment information from a preset map database;
and when the terrain environment information indicates abnormal network terrain, judging that the SIM card is not necessary to be switched, otherwise, judging that the SIM card is necessary to be switched.
2. The method of claim 1, wherein the SIM card switching condition comprises:
the duration of the SIM card in the network abnormal state reaches the preset time;
and/or the presence of a gas in the gas,
and according to the obtained current geographical position information, finding out that the base station accessed by the SIM card is an abnormal base station from a preset map database.
3. The method of claim 1, wherein the determining whether switching of the SIM card is necessary according to the preset environmental condition comprises:
calculating the geographical position information when the switching time arrives according to the acquired current geographical position information, the current speed, a preset route and preset switching time;
according to the geographical position information when the switching time is up, searching a normal base station set determined according to the base station environmental conditions from a preset map database;
and when the base stations in the normal base station set can be accessed by one or more SIM cards which are not connected with the data communication module currently, judging that the SIM cards are necessary to be switched, otherwise, judging that the SIM cards are not necessary to be switched.
4. A method according to claim 2 or 3, characterized in that the method further comprises:
when the duration of the SIM card in the network abnormal state reaches the preset time, acquiring the current geographical position information, searching a base station to which the SIM card is currently accessed from the map database, and marking the state of the base station as the abnormal state;
and reporting the abnormal state to a server, so that the base station is marked as an abnormal base station when the server receives the report times of the abnormal state in a preset time period and reaches a preset threshold value.
5. The method of claim 1, wherein each SIM card is respectively set with a priority, the method further comprising:
according to the obtained current geographical position information, a base station which can be accessed currently is found out from a preset map database;
and judging whether the SIM cards are necessary to be switched or not according to the base station which can be accessed currently and the priority of each SIM card.
6. A SIM card switching apparatus, applied in a mobile device including a data communication module, the data communication module being connected to one of two or more SIM cards through a SIM card switching module, the apparatus comprising:
the judging unit is used for judging whether the SIM card is necessary to be switched according to the preset environmental condition when the SIM card switching condition is triggered; the environmental conditions comprise terrain environmental conditions, or the environmental conditions comprise terrain environmental conditions and base station environmental conditions;
the notification unit is used for notifying the SIM card switching module to switch the SIM card when the SIM card switching module is judged to be necessary to switch the SIM card so as to connect the data communication module with the switched SIM card;
the judging unit is used for searching corresponding topographic environment information from a preset map database according to the acquired current geographic position information; and when the terrain environment information indicates abnormal network terrain, judging that the SIM card is not necessary to be switched, otherwise, judging that the SIM card is necessary to be switched.
7. The apparatus of claim 6, wherein the SIM card switching condition comprises:
the duration of the SIM card in the network abnormal state reaches the preset time;
and/or the presence of a gas in the gas,
and according to the obtained current geographical position information, finding out that the base station accessed by the SIM card is an abnormal base station from a preset map database.
8. The apparatus according to claim 6, wherein the determining unit is configured to calculate the geographical location information when the handover time arrives according to the obtained current geographical location information, the current speed, and a preset route and a preset handover time, and find a normal base station set determined according to base station environment conditions from a preset map database according to the geographical location information when the handover time arrives, and determine that there is a need to switch SIM cards when base stations in the normal base station set can be accessed by one or more SIM cards not currently connected to the data communication module, otherwise determine that there is no need to switch SIM cards.
9. The apparatus of claim 7 or 8, further comprising:
and the map data maintenance unit is used for acquiring current geographical position information when the duration of the SIM card in the network abnormal state reaches preset time, searching a base station which is accessed by the SIM card currently from the map database, marking the state of the base station as an abnormal state, and reporting the abnormal state to a server, so that the base station is marked as an abnormal base station when the server receives the report times of the abnormal state in a preset time period and reaches a preset threshold value.
10. The apparatus of claim 6, wherein each SIM card is set with a priority;
the judging unit is used for searching a base station which can be accessed currently from a preset map database according to the acquired current geographic position information; and judging whether the SIM cards are necessary to be switched or not according to the base station which can be accessed currently and the priority of each SIM card.
11. A SIM card switching apparatus comprising a processor and a machine-readable storage medium storing machine-executable instructions executable by the processor, the processor being caused by the machine-executable instructions to: carrying out the method of any one of claims 1 to 5.
12. A machine-readable storage medium having stored thereon machine-executable instructions that, when invoked and executed by a processor, cause the processor to: carrying out the method of any one of claims 1 to 5.
CN201710750851.1A 2017-08-28 2017-08-28 SIM card switching method and device Active CN107548114B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710750851.1A CN107548114B (en) 2017-08-28 2017-08-28 SIM card switching method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710750851.1A CN107548114B (en) 2017-08-28 2017-08-28 SIM card switching method and device

Publications (2)

Publication Number Publication Date
CN107548114A CN107548114A (en) 2018-01-05
CN107548114B true CN107548114B (en) 2020-10-27

Family

ID=60957514

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710750851.1A Active CN107548114B (en) 2017-08-28 2017-08-28 SIM card switching method and device

Country Status (1)

Country Link
CN (1) CN107548114B (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111182602A (en) * 2018-11-12 2020-05-19 奇酷互联网络科技(深圳)有限公司 SIM card switching method of mobile terminal, mobile terminal and computer storage medium
CN110495209B (en) * 2019-06-25 2023-11-14 小米通讯技术有限公司 Method and device for determining wireless resources
CN112533192B (en) * 2019-09-19 2022-04-22 华为技术有限公司 Method and device for switching SIM (subscriber identity Module) card and electronic equipment
CN110708733A (en) * 2019-11-07 2020-01-17 RealMe重庆移动通信有限公司 Network connection control method and device, storage medium and electronic equipment
CN110868746B (en) * 2019-11-18 2022-04-05 RealMe重庆移动通信有限公司 Network switching method and device, electronic equipment and storage medium
CN114143840B (en) * 2020-09-04 2023-11-17 华为技术有限公司 Communication method and device

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103167476A (en) * 2013-03-12 2013-06-19 广东欧珀移动通信有限公司 Method and device for dynamically switching over a plurality of SIM (subscriber identity module) cards of mobile terminal
CN105392166A (en) * 2015-11-06 2016-03-09 广东欧珀移动通信有限公司 Method and apparatus for data network switching of dual-card electronic terminal
EP2490492B1 (en) * 2011-02-19 2016-04-20 ST-Ericsson SA Subscriber identity switch of a communication terminal
CN106604258A (en) * 2016-12-20 2017-04-26 深圳市优克联新技术有限公司 User identity identification card switching method and apparatus
CN106878929A (en) * 2017-03-13 2017-06-20 贵州财富之舟科技有限公司 The communication handover method and system of NB IoT equipment

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP2490492B1 (en) * 2011-02-19 2016-04-20 ST-Ericsson SA Subscriber identity switch of a communication terminal
CN103167476A (en) * 2013-03-12 2013-06-19 广东欧珀移动通信有限公司 Method and device for dynamically switching over a plurality of SIM (subscriber identity module) cards of mobile terminal
CN105392166A (en) * 2015-11-06 2016-03-09 广东欧珀移动通信有限公司 Method and apparatus for data network switching of dual-card electronic terminal
CN106604258A (en) * 2016-12-20 2017-04-26 深圳市优克联新技术有限公司 User identity identification card switching method and apparatus
CN106878929A (en) * 2017-03-13 2017-06-20 贵州财富之舟科技有限公司 The communication handover method and system of NB IoT equipment

Also Published As

Publication number Publication date
CN107548114A (en) 2018-01-05

Similar Documents

Publication Publication Date Title
CN107548114B (en) SIM card switching method and device
EP3337245B1 (en) Method and apparatus for handling abnormality of network communication function and storage medium
CN102137487B (en) Method and equipment for selecting service gateway
JP2002368681A (en) Radio telecommunication network
CN105075316B (en) Wireless Local Area Network (WLAN) traffic load measurement provided to a wireless cellular network
CN106658508B (en) Method, equipment and system for pseudo base station identification and pseudo base station information sharing
CN101981986A (en) Avoiding excessive signaling during wireless terminal toggling
RU2006103993A (en) GETTING A SERVICE OUTSIDE THE COMMUNICATION SYSTEM
CN104144423B (en) The localization method and network server of pseudo-base station
CN108886830A (en) Information processing method and relevant device and computer program
CN102870470B (en) Re-orientation processes method, equipment and system
CN104811923A (en) Wireless roaming method and device
CN113573372B (en) Cell selection method and terminal
EP3373654A1 (en) Autonomous learning and geographic-based energy efficient network communication
CN103974231A (en) Position updating method and mobile terminal
CN113784286B (en) Paging method, paging device, paging storage medium, and paging communication system
CN109756382B (en) Fault positioning method and device
CN112954711B (en) Information reporting and receiving method and device, related equipment and storage medium
CN102917336A (en) Method and equipment for subscribing RLF (radio link failure) report
CN103781174A (en) Paging method, mobility management network element and communication system
CN112822791B (en) Information reporting and processing method, terminal, network side equipment and core network equipment
CN102711160A (en) Method and device for information configuration
CN114205804B (en) SIM card replacement method, device, server and readable storage medium
CN101854678A (en) Access control method and device
JP2024520957A (en) METHOD AND APPARATUS FOR IDENTIFYING TRAFFIC PATTERNS AND CONTROLING NETWORK FUNCTIONS PRIORITY CLAIMS AND CROSS-REFERENCES This application claims priority to Provisional Application No. 63/222,383, filed July 15, 2021, and Nonprovisional Application No. 17/456,629, filed November 26, 2021, both of which are incorporated by reference in their entireties into this application.

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