CN107484154B - Data switching method and device, terminal and computer readable storage medium - Google Patents

Data switching method and device, terminal and computer readable storage medium Download PDF

Info

Publication number
CN107484154B
CN107484154B CN201710939714.2A CN201710939714A CN107484154B CN 107484154 B CN107484154 B CN 107484154B CN 201710939714 A CN201710939714 A CN 201710939714A CN 107484154 B CN107484154 B CN 107484154B
Authority
CN
China
Prior art keywords
virtual sim
sim card
identifier
mcc
flow information
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
CN201710939714.2A
Other languages
Chinese (zh)
Other versions
CN107484154A (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.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp 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 Guangdong Oppo Mobile Telecommunications Corp Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority to CN201710939714.2A priority Critical patent/CN107484154B/en
Publication of CN107484154A publication Critical patent/CN107484154A/en
Application granted granted Critical
Publication of CN107484154B publication Critical patent/CN107484154B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W8/00Network data management
    • H04W8/18Processing of user or subscriber data, e.g. subscribed services, user preferences or user profiles; Transfer of user or subscriber data
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/24Accounting or billing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W8/00Network data management
    • H04W8/02Processing 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

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Business, Economics & Management (AREA)
  • Accounting & Taxation (AREA)
  • Databases & Information Systems (AREA)
  • Telephone Function (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

The application relates to a data switching method and device, a terminal and a computer readable storage medium. The method comprises the following steps: when detecting that the country code MCC of a mobile signal changes, acquiring the identifier of a virtual SIM card in an activated state, wherein the identifier of the virtual SIM card has the MCC to which the virtual SIM card belongs; judging whether the identifier of the virtual SIM card is matched with the current MCC or not; if not, acquiring an identifier of the virtual SIM card which is not activated, detecting an identifier matched with the current MCC in the identifier of the virtual SIM card which is not activated, and selecting the virtual SIM card corresponding to the identifier matched with the current MCC as a target virtual SIM card; and closing the virtual SIM card in the activated state at present, and activating the target virtual SIM card. By the data switching method, the meal data of the virtual SIM card can be automatically switched according to user requirements, convenience is brought to user use, and user experience is improved.

Description

Data switching method and device, terminal and computer readable storage medium
Technical Field
The present application relates to the field of communications technologies, and in particular, to a data switching method and apparatus, a terminal, and a computer-readable storage medium.
Background
With the development of the internet, the usage demand of the user for the mobile phone traffic is also developing towards diversification. After the user goes abroad, the user needs to use the traffic internet surfing function, and the internet surfing function can be realized in a mode of purchasing traffic packages in advance. When a user needs to use multiple traffic packages, for example, to go to different destinations in a short period of time, a single traffic package cannot meet the user's needs. When a user purchases a plurality of flow packages and needs to switch packages, different flow packages can be manually selected through the terminal, and if the packages are not switched timely or switched forgotten, extra cost caused by exceeding the package range can be generated, so that the user experience is not high.
Disclosure of Invention
The embodiment of the application provides a data switching method and device, a terminal and a computer readable storage medium, which can automatically switch virtual SIM cards.
A method of data handover, the method comprising:
when detecting that the country code MCC of a mobile signal changes, acquiring the identifier of a virtual SIM card in an activated state, wherein the identifier of the virtual SIM card has the MCC to which the virtual SIM card belongs;
judging whether the identifier of the virtual SIM card is matched with the current MCC or not;
if not, acquiring an identifier of the virtual SIM card which is not activated, detecting an identifier matched with the current MCC in the identifier of the virtual SIM card which is not activated, and selecting the virtual SIM card corresponding to the identifier matched with the current MCC as a target virtual SIM card;
and closing the virtual SIM card in the activated state at present, and activating the target virtual SIM card.
A data switching apparatus, the apparatus comprising:
the mobile terminal comprises a detection module, a judging module and a judging module, wherein the detection module is used for acquiring the identifier of a virtual SIM card in an activated state when detecting that a mobile signal country code MCC changes, and the identifier of the virtual SIM card is provided with the MCC to which the virtual SIM card belongs;
the judging module is used for judging whether the identifier of the virtual SIM card is matched with the current MCC or not;
a selecting module, configured to, if the determination result of the determining module is negative, obtain an identifier of an inactive virtual SIM card, detect an identifier matching the current MCC in the identifier of the inactive virtual SIM card, and select a virtual SIM card corresponding to the identifier matching the current MCC as a target virtual SIM card;
and the switching module is used for closing the virtual SIM card in the current activation state and activating the target virtual SIM card.
A terminal comprising a memory and a processor, wherein the memory stores a computer program, and the computer program, when executed by the processor, causes the processor to perform the steps of the data switching method when executed.
A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the data switching method.
According to the data switching method and device, the terminal and the computer readable storage medium, when the change of the mobile signal country code MCC is detected, the identification of the virtual SIM card in an activated state is obtained, if the identification of the virtual SIM card is not matched with the current MCC, the identification of the virtual SIM card which is not activated is obtained, the virtual SIM card corresponding to the identification matched with the current MCC is selected as the target virtual SIM card, the virtual SIM card in the activated state is closed, and the target virtual SIM card is activated. By the data switching method, the meal data of the virtual SIM card can be automatically switched according to user requirements, convenience is brought to user use, and user experience is improved.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
FIG. 1 is a diagram of an exemplary data switching method;
FIG. 2 is a partial block diagram of a terminal in one embodiment;
FIG. 3 is a flow chart illustrating a data handover method according to an embodiment;
FIG. 4 is a flow chart illustrating a data handover method according to another embodiment;
FIG. 5 is a flow chart illustrating a data handover method according to yet another embodiment;
FIG. 6 is a block diagram of a data switch device in one embodiment;
fig. 7 is a schematic diagram of the internal structure of the terminal in one embodiment;
FIG. 8 is a diagram showing an internal configuration of a server in one embodiment;
fig. 9 is a block diagram of a partial structure of a mobile phone related to a terminal according to an embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
It will be understood that, as used herein, the terms "first," "second," and the like may be used herein to describe various elements, but these elements are not limited by these terms. These terms are only used to distinguish one element from another. For example, a first client may be referred to as a second client, and similarly, a second client may be referred to as a first client, without departing from the scope of the present application. Both the first client and the second client are clients, but they are not the same client.
Fig. 1 is a diagram of an application environment of a network communication processing method according to an embodiment. As shown in fig. 1, the application environment includes a server 110 and a terminal 120. The server 110 is a server, which may be a cloud server, used by a virtual network operator to provide network traffic to the terminal 120. The server 110 may provide the terminal 120 with virtual Subscriber Identity Module (SIM) card data and services for implementing network communication using the virtual SIM card. A virtual SIM card refers to a virtual SIM card without a physical SIM card physical carrier. The terminal 110 may be provided with a virtual SIM Application (APP) 121, a virtual SIM operating system 122, and a virtual SIM adaptation layer 123. The virtual SIM card APP 121, the virtual SIM card operating system 122 and the virtual SIM card adapting layer 123 may all be disposed in an Application Processor (AP) on the terminal 120. The server 110 may send virtual SIM card data to the virtual SIM card operating system 122 through the virtual SIM card APP 121; the virtual SIM card operating system 122 may implement communication with radio frequency communication control software disposed in a Baseband Processor (Baseband Processor, BP) through the virtual SIM card adaptation layer 123, so as to implement network communication using the virtual SIM card.
Among other things, the server 110 may provide the virtual SIM card APP 121 of the terminal 120 with an associated interface through which communication with the terminal 120 is enabled. The interface may include interfaces for user and equipment management, package and order management, encrypted transmission of SIM resources, etc. The server 110 may provide the virtual SIM card APP 121 with a related interface in the form of a REST full Application Programming Interface (API). The implemented content of network communication using the virtual SIM card includes, but is not limited to, implementing interactive management of virtual SIM card data, dynamic update of state, statistics and rate limitation of traffic, and the like, such as implementing deletion of storage of virtual SIM card data and enabling and closing of the virtual SIM card.
Fig. 2 is a partial architecture diagram of a terminal, including modules associated with a virtual SIM card, according to one embodiment. As shown in fig. 2, a virtual SIM card operating system, a virtual SIM card adapting layer, a virtual SIM card APP, and a phonebook/information module may be disposed on the application layer of the terminal. A Telephony Interface Layer and a Radio Interface Layer (RIL) java Layer may be disposed in the Framework Layer (Framework Layer). The Modem (Modem module) can be a module consisting of a baseband processor, radio frequency and other peripheral chips, and is a GSM/GPRS Modem module. The Telephony interface layer is used for providing a universal interface, and the virtual SIM card operating system performs Socket interaction with the Modem module through the Telephony interface layer, so that whether a virtual SIM card exists or not and the position of a card slot of the virtual SIM card can be judged. The virtual SIM card operating system performs Socket interaction with the Modem module switched to the virtual SIM card channel through the virtual SIM card adapting layer, and can realize the functions of activating and closing the virtual SIM card, performing network communication function and flow monitoring by using the virtual SIM card, and the like. It will be appreciated that the structure shown in fig. 2 is only a part of the modules related to the present application, and does not constitute a limitation of the terminal to which the present application is applied, and a specific terminal may include more or less modules than those shown in the drawings, or combine some modules, or have a different arrangement of modules. For example, a dual card management module can be arranged on the framework layer, and the dual card management module can communicate with the Telephony interface layer.
In one embodiment, the terminal may provide a management operation interface of the virtual SIM card to the user through the virtual SIM card APP, and when detecting a relevant operation acting on the management operation interface, generate a corresponding virtual SIM card processing instruction, and send the processing instruction to the virtual SIM card operating system. The virtual SIM operating system can simulate the system logic of a real SIM card, implementing a protocol and file system of relevant specifications required for network communication. The virtual SIM card operating system can receive a processing instruction from the virtual SIM card App, send a message corresponding to the processing instruction to the Modem module through the virtual SIM card adapting layer, instruct the Modem module to perform corresponding processing on the virtual SIM card basic data, receive response information made by the Modem module, and jointly realize the function of using the virtual SIM card to perform network communication. The above-mentioned related protocols may include protocols of International Organization for Standardization (ISO) 7816 and 3rd Generation Partnership Project (3 GPP) specifications for Universal Integrated Circuit Card (UICC) and Universal Subscriber Identity Module (USIM).
In one embodiment, the virtual SIM card adaptation layer may be preset with corresponding weights, so that communication with the RIL layer may be performed through the virtual SIM card adaptation layer. For example, the virtual SIM card adaptation layer may be set with the same level of rights as the phone process.
In one embodiment, the processing instructions may include package purchase instructions, enable instructions, disable instructions, close instructions, and the like for the corresponding virtual SIM card. The implemented content of network communication using the virtual SIM card includes, but is not limited to, implementing interactive management of virtual SIM card information, dynamic update of state, statistics and rate limitation of traffic, and the like, such as implementing deletion of storage of the virtual SIM card information and enabling and closing of the virtual SIM card.
As shown in fig. 3, in an embodiment, a data switching method is provided, and this embodiment is exemplified by applying the traffic information updating method to the terminal 120 of the application environment in fig. 1. The data switching method specifically comprises the following steps:
step 302: when detecting that the country code MCC of the mobile signal changes, acquiring the identifier of the virtual SIM card in an activated state, wherein the identifier of the virtual SIM card has the MCC to which the virtual SIM card belongs.
Specifically, the terminal may monitor a Mobile Country Code (MCC) through a preset interface, and detect whether the MCC changes, where the MCC may be used to uniquely identify a Country or a region corresponding to the Mobile network. In one embodiment, a terminal may obtain base station information at regular time, and may monitor the base station information through a Telephony Manager interface, where the base station information may include MCC, Mobile Network Code (MNC), Location Area Code (LAC), base station number, and the like, the MNC may be used to identify a Mobile Network to which the terminal belongs, and the LAC may be used to identify different Location areas, and the like. When the terminal detects that the information of the base station changes, it can further determine whether the MCC changes, where the MCC change indicates that the MCC in the current acquired information of the base station is different from the MCC in the last acquired information of the base station.
Further, if the terminal detects that the MCC changes, an identifier of the virtual SIM card currently in an active state is obtained, where the identifier of the virtual SIM card includes an International Mobile Subscriber Identity (IMSI), and the IMSI of the International Mobile Subscriber identity is composed of a Mobile signal country code MCC, a Mobile network Number MNC, and a Mobile Subscriber Identity Number (MSIN). After a user purchases a virtual SIM card meal through the virtual SIM card APP, the server issues IMSI and virtual SIM card meal data to the terminal through the virtual SIM card APP.
Step 304: and judging whether the identifier of the virtual SIM card is matched with the current MCC or not, if so, executing step 302, and if not, executing step 306.
The MCC is a country code number of the mobile subscriber, occupies 3 digits, and is used for identifying the country to which the mobile subscriber belongs, determining whether the MCC in the identifier of the virtual SIM card is the same as the changed MCC detected by the terminal, and if not, indicating that the virtual SIM card currently in an activated state does not meet the use requirement of the current country or region, and needing to switch the virtual SIM card.
In one embodiment, the MCC in china is 460, the MCC in thailand is 520, when the terminal detects that the MCC is changed from 460 to 520, the country to which the mobile network accessed by the terminal belongs is changed from china to thailand, at this time, the terminal detects whether the MCC in the identifier of the virtual SIM card currently in an activated state is 520, and if not, the package data in the virtual SIM card currently cannot access the data network in thailand.
Step 306: acquiring an identifier of an inactivated virtual SIM card, detecting an identifier matched with the current MCC in the identifier of the inactivated virtual SIM card, and selecting the virtual SIM card corresponding to the identifier matched with the current MCC as a target virtual SIM card.
Specifically, a user can purchase a plurality of virtual SIM cards through a virtual SIM card APP, the virtual SIM cards contain virtual SIM card meal data, the virtual SIM cards are stored in a terminal, when the virtual SIM cards in an activated state do not meet the use requirements of the current country or region, identifiers of all the virtual SIM cards which are not activated are obtained, identifiers of the virtual SIM cards with the same MCC as the current MCC in the identifiers of all the virtual SIM cards which are not activated are detected, the corresponding virtual SIM card is selected as a target virtual SIM card according to the detected identifiers of the virtual SIM cards, and the target virtual SIM card represents the virtual SIM card meeting the use requirements of the current country or region.
In one embodiment, a user may purchase a virtual SIM card package in advance through a virtual SIM card APP set on a terminal, and the user may purchase a plurality of different types of virtual SIM card packages according to a schedule, for example, the user may need to go to a plurality of countries or regions in a short period of time and may purchase virtual SIM card packages of different countries respectively. Optionally, the virtual SIM card package may also be a directed traffic package, where the directed traffic package represents a traffic package provided for a specific application to use, and the user may purchase different virtual SIM card packages according to a favorite application, for example, the user may purchase a directed traffic package supporting the use of a chat application and a directed traffic package supporting the use of a video application, respectively.
It is understood that, among the inactive virtual SIM cards, one or at least two virtual SIM cards matching the current MCC may be used. When there are multiple virtual SIM cards matching the current MCC, the terminal may select one of the virtual SIM cards as a target virtual SIM card according to a preset priority, for example, select a virtual SIM card with the largest remaining traffic in a virtual SIM card package as the target virtual SIM card. Optionally, the terminal may also switch the directional traffic package meeting the use condition according to the running application program, so as to meet different use requirements of the user.
Step 308: and closing the virtual SIM card in the activated state at present, and activating the target virtual SIM card.
After the target virtual SIM card is determined, the terminal closes the virtual SIM card in the current activation state, and activates the target virtual SIM card so as to complete the switching process of the virtual SIM card. Further, the terminal stores the flow information of the virtual SIM card in the current activated state into a local database, reads the flow information of the target virtual SIM card from the local database, and respectively stores the flow information of different virtual SIM cards to ensure the accuracy of the flow information statistics of different virtual SIM cards.
In one embodiment, the terminal may display a flow state page through the virtual SIM card APP, the user initiates a flow display request by operating the virtual SIM card APP, and the terminal reads flow information from the local database and returns the flow information to the virtual SIM card APP through the virtual SIM card operating system, so that a page of the virtual SIM card flow state updated in real time appears on the virtual SIM card APP.
Further, when the virtual SIM card currently in the activated state is closed, the terminal stores the traffic information with the identifier of the virtual SIM card into the local database through the virtual SIM card operating system, and when the terminal is switched to the virtual SIM card next time, the traffic information with the identifier of the virtual SIM card can be read from the local database. And the flow information is not lost in the virtual SIM card switching process.
Further, when the target virtual SIM card is activated, the terminal reads the traffic information with the identifier of the target virtual SIM card from the local database through the virtual SIM card operating system, returns the traffic information to the virtual SIM card APP, and displays the traffic state page of the target virtual SIM card through the virtual SIM card APP. The accuracy of the flow information in the virtual SIM card switching process is ensured.
In one embodiment, the traffic information is obtained according to first traffic information recorded in a file system and second traffic information recorded in a cache.
The file system refers to a storage space in a kernel of the terminal for storing the traffic information for a long time. The written traffic information is recorded in the file system. The cache module is a storage space for temporarily storing the traffic information. The cache module stores flow information with preset duration. The traffic information recorded in the cache module is written into the file system at predetermined time intervals.
Further, the process of acquiring the traffic information further includes: acquiring first flow information recorded in a file system; calculating second flow information recorded in the cache module; and obtaining current flow information according to the first flow information and the second flow information and storing the current flow information into a local database. Wherein the first traffic information represents traffic information written to the file system. And summing the first flow information and the second flow information to obtain current flow information, and then outputting the current flow information. The current traffic information is traffic information up to the current time when the traffic query instruction is received.
Further, calculating the second traffic information recorded in the cache further includes: acquiring third flow information from the starting time to the current time; acquiring fourth flow information recorded in the file system from the starting time to the current time; and obtaining the second flow information according to the third flow information and the fourth flow information. The starting-up time refers to the time when the terminal is started up after being restarted. The current time is a time when the traffic statistic request is received, and the third traffic information from the starting time to the current time of the terminal may include traffic information written into the file system and traffic information not written into the file system. And if the fourth traffic information is excluded from the third traffic information, the second traffic information, that is, the traffic information stored in the cache module, can be obtained. In the embodiment, in the process of acquiring the flow information, the flow information in the cache does not need to be written into the file system every time, so that the write operation on the system kernel is reduced, and the consumption of system resources is reduced.
According to the data switching method, when the change of the mobile signal country code MCC is detected, the identification of the virtual SIM card in the activated state is obtained, if the identification of the virtual SIM card is not matched with the current MCC, the identification of the virtual SIM card which is not activated is obtained, the virtual SIM card corresponding to the identification matched with the current MCC is selected as the target virtual SIM card, the virtual SIM card in the activated state is closed, and the target virtual SIM card is activated. By the data switching method, the meal data of the virtual SIM card can be automatically switched according to user requirements, convenience is brought to user use, and user experience is improved.
As shown in fig. 4, in one embodiment, the data switching method further includes the following steps.
Step 402: when the number of the target virtual SIM cards comprises at least two.
When at least two virtual SIM cards are matched with the current MCC and the meal data of the virtual SIM cards in the at least two virtual SIM cards are all directed flow packages, the virtual SIM card meeting the use condition is switched to be used as a target virtual SIM card according to the running application program.
Step 404: and acquiring application program white lists in at least two target virtual SIM cards.
Specifically, the virtual SIM card meal data includes an application white list, in which an application having a network use permission when connected to a data network via virtual SIM card information corresponding to the virtual SIM card meal data may be recorded, and when the terminal purchases the virtual SIM card meal data and acquires the virtual SIM card information, and connects to the data network via the virtual SIM card information for network communication, the application in the corresponding application white list may have the network use permission and may access the data network, and an application not in the application white list may not access the data network. Different applications may be recorded in the application white list included in the different virtual SIM card package data.
Step 406: and acquiring the identifier of the currently running application program, and selecting the virtual SIM card containing the identifier of the application program in the white list of the application program as a target virtual SIM card.
Specifically, the terminal obtains an application program identifier currently running, and selects a directional flow package containing the application program identifier currently running from at least two pieces of virtual SIM card package data, that is, selects a virtual SIM card containing the application program identifier in an application program white list as a target virtual SIM card. For example, the terminal stores a directional traffic package supporting the use of the chat application and a directional traffic package supporting the use of the video application, and when the chat application runs on the terminal, the terminal is switched to the directional traffic package supporting the use of the chat application; when the video application runs on the terminal, switching to the directional flow package supporting the video application to use.
In this embodiment, by obtaining an application program white list and a currently running application program identifier in at least two target virtual SIM cards, a virtual SIM card including the application program identifier in the application program white list is selected as a target virtual SIM card. The meal data of the virtual SIM card can be automatically switched according to the application program operated by the user terminal, convenience is brought to the user, and user experience is improved.
As shown in fig. 5, in one embodiment, the data switching method further includes the following steps.
Step 502: and when a package display request is received, displaying a recommended virtual SIM card corresponding to the changed MCC, wherein the virtual SIM card contains virtual SIM card package data.
Step 504: transferring the numerical value resource matched with the selected recommended virtual SIM card to a server according to the received selection instruction, and acquiring the virtual SIM card information corresponding to the selected recommended virtual SIM card from the server.
Specifically, a user may purchase a virtual SIM card package through a virtual SIM card APP set on a terminal, a package interface of the virtual SIM card APP may display package data of one or more virtual SIM cards, where the package data of the virtual SIM card may include information about a country or a region to which a data network accessed by the virtual SIM card belongs, a traffic resource amount owned by the virtual SIM card, an effective time, and a numerical resource that needs to be paid, and the traffic resource amount owned by the virtual SIM card refers to a maximum number of bytes that can be consumed when the terminal uses the virtual SIM card for network communication. The user can select the required virtual SIM card package to purchase on the package interface, the terminal can acquire the virtual SIM card information corresponding to the selected virtual SIM card package by transferring corresponding numerical value resources to the server, and the terminal can access the data network through the acquired virtual SIM card information to realize the network communication of the virtual SIM card. The virtual SIM card information may include identification information of the user, authentication information that can be used for accessing a data network, and the like, and may include information such as an international mobile subscriber identity IMSI, a SIM card number, and the like. In one embodiment, the terminal may obtain a corresponding data network through information such as IMSI in the virtual SIM card information, send a network access request to the data network, upload authentication information to the data network, access the data network after passing authentication of the data network, and implement network communication through the virtual SIM card.
If the terminal detects that the MCC changes, a country or a region corresponding to the changed MCC can be determined first, and meal data of the virtual SIM card of the accessed data network belonging to the country or the region can be acquired. For example, when the terminal detects that the MCC changes, and a country corresponding to the changed MCC is japan, the terminal can acquire meal data of a virtual SIM card of which the accessed data network belongs to japan; if the region corresponding to the changed MCC is hong Kong, the virtual SIM card meal data and the like of which the accessed data network belongs to hong Kong can be acquired.
In this embodiment, by displaying the recommended virtual SIM card corresponding to the changed MCC when the package display request is received, the numerical resource matched with the selected recommended virtual SIM card is transferred to the server according to the received selection instruction, and the virtual SIM card information corresponding to the selected recommended virtual SIM card is acquired from the server. The purchase of virtual SIM card package data is realized, so that a user can purchase flow packages of different countries or regions in advance, and the user experience is improved.
As shown in fig. 6, in one embodiment, a data switching apparatus is provided, and the apparatus includes a detecting module 601, a determining module 602, a selecting module 603, and a switching module 604.
A detecting module 601, configured to obtain an identifier of a virtual SIM card in an active state when detecting that a mobile signal country code MCC changes, where the identifier of the virtual SIM card has the MCC to which the virtual SIM card belongs;
a determining module 602, configured to determine whether the identifier of the virtual SIM card matches the current MCC;
a selecting module 603, configured to obtain an identifier of an inactive virtual SIM card, detect an identifier matching the current MCC in the identifier of the inactive virtual SIM card, and select a virtual SIM card corresponding to the identifier matching the current MCC as a target virtual SIM card when the determination result of the determining module 602 is negative;
the switching module 604 is configured to close the currently activated virtual SIM card and activate the target virtual SIM card.
In one embodiment, the detection module 601 is further configured to obtain application white lists in at least two target virtual SIM cards when the number of the target virtual SIM cards includes at least two. The selecting module 603 is further configured to obtain an identifier of the currently running application program, and select a virtual SIM card containing the identifier of the application program in the white list of the application program as a target virtual SIM card.
The data switching device acquires the identifier of the virtual SIM card in an activated state when detecting that the mobile signal country code MCC changes, acquires the identifier of the inactive virtual SIM card if the identifier of the virtual SIM card is not matched with the current MCC, selects the virtual SIM card corresponding to the identifier matched with the current MCC as a target virtual SIM card, closes the virtual SIM card in the activated state, and activates the target virtual SIM card. Can be according to user's demand automatic switch virtual SIM card cover meal data, use for the user and bring the convenience, promoted user experience.
The division of each module in the data switching device is only used for illustration, and in other embodiments, the data switching device may be divided into different modules as needed to complete all or part of the functions of the data switching device.
Fig. 7 is a schematic diagram of an internal structure of a terminal (or an electronic device, etc.) in one embodiment. As shown in fig. 7, the terminal includes a processor, a memory, and a network interface connected through a system bus. Wherein, the processor is used for providing calculation and control capability and supporting the operation of the whole terminal. The memory is used for storing data, programs and the like, and at least one computer program is stored on the memory, and can be executed by the processor to realize the data processing method provided in the embodiment of the application. The Memory may include a non-volatile storage medium such as a magnetic disk, an optical disk, a Read-Only Memory (ROM), or a Random-Access-Memory (RAM). For example, in one embodiment, the memory includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and data for implementing the data switching method applicable to the terminal provided in the embodiment of the present application, for example, interface data for communicating with the virtual SIM cards APP and SDK on the terminal, and related virtual SIM card information, and the like may be stored. The internal memory provides an operating environment of the cache module for an operating system in the nonvolatile storage medium and a data processing method applicable to the terminal. The network interface may be an ethernet card or a wireless network card, and is used for communicating with an external terminal. The terminal can be a mobile phone, a tablet computer, a personal digital assistant or a wearable device.
Fig. 8 is a schematic diagram of an internal structure of a server (or a cloud, etc.) in one embodiment. As shown in fig. 8, the server includes a processor, a nonvolatile storage medium, an internal memory, and a network interface connected through a system bus. Wherein, the processor is used for providing calculation and control capability and supporting the operation of the whole terminal. The memory is used to store data, programs, and the like. The Memory may include a non-volatile storage medium such as a magnetic disk, an optical disk, a Read-Only Memory (ROM), or a Random-Access-Memory (RAM). For example, in one embodiment, the memory includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and data for implementing the data switching method applicable to the terminal provided in the embodiment of the present application, for example, interface data for communicating with the virtual SIM cards APP and SDK on the terminal, and related virtual SIM card information, and the like may be stored. The internal memory provides an operating environment of the cache module for an operating system in the nonvolatile storage medium and a data processing method applicable to the terminal. The network interface may be an ethernet card or a wireless network card, and is used for communicating with an external terminal. The server may be implemented as a stand-alone server or as a server cluster consisting of a plurality of servers. Those skilled in the art will appreciate that the architecture shown in fig. 8 is a block diagram of only a portion of the architecture associated with the subject application, and does not constitute a limitation on the servers to which the subject application applies, as a particular server may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.
The embodiment of the application also provides a computer readable storage medium. One or more non-transitory computer-readable storage media containing computer-executable instructions that, when executed by one or more processors, cause the processors to perform the data switching methods as described in the embodiments above.
The embodiment of the application also provides a computer program product. A computer program product comprising instructions which, when run on a computer, cause the computer to perform the data switching method described in the embodiments above.
The embodiment of the application also provides a terminal. As shown in fig. 9, for convenience of explanation, only the parts related to the embodiments of the present application are shown, and details of the technology are not disclosed, please refer to the method part of the embodiments of the present application. The terminal may be any terminal device including a mobile phone, a tablet computer, a PDA (Personal Digital Assistant), a POS (Point of sales), a vehicle-mounted computer, a wearable device, and so on, taking the terminal as the mobile phone as an example:
fig. 9 is a block diagram of a partial structure of a mobile phone related to a terminal according to an embodiment of the present application. Referring to fig. 9, the handset includes: radio Frequency (RF) circuit 910, memory 920, input unit 930, display unit 940, sensor 950, audio circuit 960, wireless fidelity (WiFi) module 970, processor 980, and power supply 990. Those skilled in the art will appreciate that the handset configuration shown in fig. 9 is not intended to be limiting and may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components.
The RF circuit 910 may be used for receiving and transmitting signals during information transmission or communication, and may receive downlink information of a base station and then process the downlink information to the processor 980; the uplink data may also be transmitted to the base station. Typically, the RF circuitry includes, but is not limited to, an antenna, at least one Amplifier, a transceiver, a coupler, a Low Noise Amplifier (LNA), a duplexer, and the like. In addition, the RF circuit 910 may also communicate with networks and other devices via wireless communication. The wireless communication may use any communication standard or protocol, including but not limited to Global System for mobile communication (GSM), General Packet Radio Service (GPRS), Code Division Multiple Access (CDMA), Wideband Code Division Multiple Access (WCDMA), Long Term Evolution (LTE)), e-mail, Short Messaging Service (SMS), and the like.
The memory 920 may be used to store software programs and modules, and the processor 980 may execute various functional applications and data processing of the mobile phone by operating the software programs and modules stored in the memory 920. The memory 920 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application program required for at least one function (such as an application program for a sound playing function, an application program for an image playing function, and the like), and the like; the data storage area may store data (such as audio data, an address book, etc.) created according to the use of the mobile phone, and the like. Further, the memory 920 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device.
The input unit 930 may be used to receive input numeric or character information and generate key signal inputs related to user settings and function control of the cellular phone 900. Specifically, the input unit 930 may include a touch panel 931 and other input devices 932. The touch panel 931, which may also be referred to as a touch screen, may collect a touch operation performed by a user on or near the touch panel 931 (e.g., a user operating the touch panel 931 or near the touch panel 931 by using a finger, a stylus, or any other suitable object or accessory), and drive the corresponding connection device according to a preset program. In one embodiment, the touch panel 931 may include two parts of a touch detection device and a touch controller. The touch detection device detects the touch direction of a user, detects a signal brought by touch operation and transmits the signal to the touch controller; the touch controller receives touch information from the touch sensing device, converts the touch information into touch point coordinates, sends the touch point coordinates to the processor 980, and can receive and execute commands sent by the processor 980. In addition, the touch panel 931 may be implemented by various types, such as a resistive type, a capacitive type, an infrared ray, and a surface acoustic wave. The input unit 930 may include other input devices 932 in addition to the touch panel 931. In particular, other input devices 932 may include, but are not limited to, one or more of a physical keyboard, function keys (e.g., volume control keys, switch keys, etc.), and the like.
The display unit 940 may be used to display information input by the user or information provided to the user and various menus of the mobile phone. The display unit 940 may include a display panel 941. In one embodiment, the Display panel 941 may be configured in the form of a Liquid Crystal Display (LCD), an organic light-Emitting Diode (OLED), or the like. In one embodiment, the touch panel 931 may overlay the display panel 941, and when the touch panel 931 detects a touch operation thereon or nearby, the touch operation is transmitted to the processor 980 to determine the type of touch event, and then the processor 980 provides a corresponding visual output on the display panel 941 according to the type of touch event. Although in fig. 9, the touch panel 931 and the display panel 941 are two independent components to implement the input and output functions of the mobile phone, in some embodiments, the touch panel 931 and the display panel 941 may be integrated to implement the input and output functions of the mobile phone.
Cell phone 900 may also include at least one sensor 950, such as a light sensor, motion sensor, and other sensors. Specifically, the light sensor may include an ambient light sensor that adjusts the brightness of the display panel 941 according to the brightness of ambient light, and a proximity sensor that turns off the display panel 941 and/or backlight when the mobile phone is moved to the ear. The motion sensor can comprise an acceleration sensor, the acceleration sensor can detect the magnitude of acceleration in each direction, the magnitude and the direction of gravity can be detected when the mobile phone is static, and the motion sensor can be used for identifying the application of the gesture of the mobile phone (such as horizontal and vertical screen switching), the vibration identification related functions (such as pedometer and knocking) and the like; the mobile phone may be provided with other sensors such as a gyroscope, a barometer, a hygrometer, a thermometer, and an infrared sensor.
Audio circuitry 960, speaker 961 and microphone 962 may provide an audio interface between a user and a cell phone. The audio circuit 960 may transmit the electrical signal converted from the received audio data to the speaker 961, and convert the electrical signal into a sound signal for output by the speaker 961; on the other hand, the microphone 962 converts the collected sound signal into an electrical signal, converts the electrical signal into audio data after being received by the audio circuit 960, and then outputs the audio data to the processor 980 for processing, and then the audio data can be transmitted to another mobile phone through the RF circuit 910, or the audio data can be output to the memory 920 for subsequent processing.
WiFi belongs to short-distance wireless transmission technology, and the mobile phone can help a user to receive and send e-mails, browse webpages, access streaming media and the like through the WiFi module 970, and provides wireless broadband Internet access for the user. Although fig. 9 shows WiFi module 970, it is to be understood that it does not belong to the essential components of cell phone 900 and may be omitted as desired.
The processor 980 is a control center of the mobile phone, connects various parts of the entire mobile phone by using various interfaces and lines, and performs various functions of the mobile phone and processes data by operating or executing software programs and/or modules stored in the memory 920 and calling data stored in the memory 920, thereby integrally monitoring the mobile phone. In one embodiment, processor 980 may include one or more processing units. In one embodiment, the processor 980 may integrate an application processor and a modem, wherein the application processor primarily handles operating systems, user interfaces, applications, and the like; the modem handles primarily wireless communications. It is to be appreciated that the modem may not be integrated into the processor 980. For example, the processor 980 may integrate an application processor and a baseband processor, which may constitute a modem with other peripheral chips, etc. The handset 900 also includes a power supply 990 (e.g., a battery) for supplying power to various components, which may preferably be logically connected to the processor 980 via a power management system, such that the power management system may be used to manage charging, discharging, and power consumption.
In one embodiment, the cell phone 900 may also include a camera, a bluetooth module, and the like.
In the embodiment of the present application, when the processor included in the mobile phone executes the computer program stored in the memory, the data switching method described in the above embodiments is implemented.
Any reference to memory, storage, database, or other medium used herein may include non-volatile and/or volatile memory. Suitable non-volatile memory can include read-only memory (ROM), Programmable ROM (PROM), Electrically Programmable ROM (EPROM), Electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM), which acts as external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms, such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), Enhanced SDRAM (ESDRAM), synchronous Link (Synchlink) DRAM (SLDRAM), Rambus Direct RAM (RDRAM), direct bus dynamic RAM (DRDRAM), and bus dynamic RAM (RDRAM).
The above-mentioned embodiments only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the scope of the present application. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present patent shall be subject to the appended claims.

Claims (9)

1. A method of data handover, the method comprising:
when detecting that the country code MCC of a mobile signal changes, acquiring the identifier of a virtual SIM card in an activated state, wherein the identifier of the virtual SIM card has the MCC to which the virtual SIM card belongs;
judging whether the identifier of the virtual SIM card is matched with the current MCC or not;
if not, acquiring an identifier of the virtual SIM card which is not activated, detecting an identifier matched with the current MCC in the identifier of the virtual SIM card which is not activated, and selecting the virtual SIM card corresponding to the identifier matched with the current MCC as a target virtual SIM card;
when the number of the target virtual SIM cards comprises at least two;
acquiring application program white lists in at least two target virtual SIM cards;
acquiring an application program identifier which is currently running, and selecting a virtual SIM card which contains the application program identifier in an application program white list as a target virtual SIM card;
and closing the virtual SIM card in the activated state at present, and activating the target virtual SIM card.
2. The data handover method according to claim 1, wherein before the detecting of the change in the mobile country code MCC, the method further comprises:
when a package display request is received, displaying a recommended virtual SIM card corresponding to the changed MCC, wherein the virtual SIM card comprises virtual SIM card package data;
transferring the numerical value resource matched with the selected recommended virtual SIM card to a server according to the received selection instruction, and acquiring the virtual SIM card information corresponding to the selected recommended virtual SIM card from the server.
3. The data switching method according to claim 1, wherein the step of turning off the currently activated virtual SIM card and activating the target virtual SIM card further comprises:
and storing the flow information of the virtual SIM card in the current activated state into a local database, and reading the flow information of the target virtual SIM card from the local database.
4. The data switching method according to claim 3, wherein the traffic information is obtained from first traffic information recorded in a file system and second traffic information recorded in a cache.
5. The data switching method according to claim 4, wherein the traffic information is obtained according to first traffic information recorded in a file system and second traffic information recorded in a cache, and the method comprises:
acquiring first flow information recorded in a file system, wherein the first flow information represents flow information written into the file system;
calculating second flow information recorded in a cache, wherein the second flow information represents flow information cached by a system in a preset time period;
and obtaining flow information according to the first flow information and the second flow information and storing the flow information in a local database.
6. The data switching method according to claim 5, wherein the calculating the second traffic information recorded in the buffer includes:
acquiring third flow information from the starting time to the current time;
acquiring fourth flow information recorded in the file system from the starting time to the current time;
and obtaining the second flow information according to the third flow information and the fourth flow information.
7. A data switching apparatus, characterized in that the apparatus comprises:
the mobile terminal comprises a detection module, a judging module and a judging module, wherein the detection module is used for acquiring the identifier of a virtual SIM card in an activated state when detecting that a mobile signal country code MCC changes, and the identifier of the virtual SIM card is provided with the MCC to which the virtual SIM card belongs;
the judging module is used for judging whether the identifier of the virtual SIM card is matched with the current MCC or not;
a selecting module, configured to, if the determination result of the determining module is negative, obtain an identifier of an inactive virtual SIM card, detect an identifier matching the current MCC in the identifier of the inactive virtual SIM card, and select a virtual SIM card corresponding to the identifier matching the current MCC as a target virtual SIM card;
the switching module is used for closing the virtual SIM card in the current activation state and activating the target virtual SIM card;
the detection module is further configured to, when the number of the target virtual SIM cards includes at least two; acquiring application program white lists in at least two target virtual SIM cards;
the selection module is further configured to acquire an application identifier currently running, and select a virtual SIM card containing the application identifier in an application white list as a target virtual SIM card.
8. A terminal comprising a memory and a processor, the memory having stored therein a computer program that, when executed by the processor, causes the processor to perform the steps of the data switching method of any one of claims 1 to 6 when executed.
9. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the data switching method according to any one of claims 1 to 6.
CN201710939714.2A 2017-09-30 2017-09-30 Data switching method and device, terminal and computer readable storage medium Active CN107484154B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710939714.2A CN107484154B (en) 2017-09-30 2017-09-30 Data switching method and device, terminal and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710939714.2A CN107484154B (en) 2017-09-30 2017-09-30 Data switching method and device, terminal and computer readable storage medium

Publications (2)

Publication Number Publication Date
CN107484154A CN107484154A (en) 2017-12-15
CN107484154B true CN107484154B (en) 2020-09-22

Family

ID=60605289

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710939714.2A Active CN107484154B (en) 2017-09-30 2017-09-30 Data switching method and device, terminal and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN107484154B (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108200569B (en) * 2017-12-29 2020-11-13 惠州Tcl移动通信有限公司 Communication method of virtual SIM card, electronic equipment and device
CN108596604A (en) * 2018-05-09 2018-09-28 北京小米移动软件有限公司 Communication means, device and electronic equipment
CN109343944B (en) * 2018-09-11 2021-06-18 宇龙计算机通信科技(深圳)有限公司 Data processing method and device for eSIM card, terminal and storage medium
CN110446171A (en) * 2019-07-16 2019-11-12 深圳市奥克多普科技有限公司 A kind of flow managing method and system
CN111372235B (en) * 2020-02-21 2022-09-06 深圳市广和通无线股份有限公司 Identification card configuration information determination method and device, computer equipment and storage medium
CN111132016A (en) * 2020-03-31 2020-05-08 友刻(北京)通讯技术有限公司 Method and device for selecting flow package

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106792640A (en) * 2016-12-20 2017-05-31 北京小米移动软件有限公司 The communication means of virtual SIM card, mobile terminal and server
CN107105427A (en) * 2017-04-28 2017-08-29 天津泰岳小漫科技有限公司 Communication means and device based on passage SIM card

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
HUE038867T2 (en) * 2013-03-29 2018-12-28 Intel Ip Corp Control of wlan selection policies in roaming scenarios
CN104955126A (en) * 2015-06-26 2015-09-30 小米科技有限责任公司 Operator network access method and device

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106792640A (en) * 2016-12-20 2017-05-31 北京小米移动软件有限公司 The communication means of virtual SIM card, mobile terminal and server
CN107105427A (en) * 2017-04-28 2017-08-29 天津泰岳小漫科技有限公司 Communication means and device based on passage SIM card

Also Published As

Publication number Publication date
CN107484154A (en) 2017-12-15

Similar Documents

Publication Publication Date Title
CN107484154B (en) Data switching method and device, terminal and computer readable storage medium
CN107708168B (en) SIM card switching method, mobile terminal and computer readable storage medium
CN107682910B (en) Traffic resource sharing method and device, mobile terminal and storage medium
US10367537B2 (en) Mobile communication using a plurality of subscriber identity modules
CN107734584A (en) The method and apparatus of network connection switching, computer equipment, readable storage medium storing program for executing
CN107770746B (en) Data processing method and device, computer equipment and computer readable storage medium
WO2018014745A1 (en) Network search method and device after roaming ends
CN107708084B (en) Data processing method and device, computer equipment and computer readable storage medium
CN108549698B (en) File processing method and device, mobile terminal and computer readable storage medium
CN107743305B (en) Method and device for loading configuration information and computer equipment
CN109450949B (en) Method for unbinding numbers of multiple applications, mobile terminal and readable storage medium
CN109445917B (en) Application processing method and device, electronic equipment and computer readable storage medium
CN107623612B (en) Flow display method and device, computer equipment and computer readable storage medium
CN105320882A (en) Method and device for controlling permission of application programs
CN107734495B (en) Information processing method, device, storage medium and terminal
CN104965722A (en) Method and apparatus for displaying information
CN107484201B (en) Flow statistical method and device, terminal and computer readable storage medium
CN108509788B (en) Information sharing method and device, computer readable storage medium and terminal
US11109226B2 (en) Information process method, computer readable storage medium and computer device
CN107770767B (en) Information processing method, device, mobile terminal and computer readable storage medium
CN107743303B (en) Information processing method, device, mobile terminal and computer readable storage medium
CN108256466B (en) Data processing method and device, electronic equipment and computer readable storage medium
CN107682552B (en) Information processing method, device, mobile terminal and computer readable storage medium
CN110430252B (en) Resource data processing method and device, equipment and readable storage medium
CN112997507B (en) Audio system control method, device, terminal and computer readable storage medium

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
CB02 Change of applicant information

Address after: Changan town in Guangdong province Dongguan 523860 usha Beach Road No. 18

Applicant after: GUANGDONG OPPO MOBILE TELECOMMUNICATIONS Corp.,Ltd.

Address before: Changan town in Guangdong province Dongguan 523860 usha Beach Road No. 18

Applicant before: GUANGDONG OPPO MOBILE TELECOMMUNICATIONS Corp.,Ltd.

CB02 Change of applicant information
GR01 Patent grant
GR01 Patent grant