Movatterモバイル変換


[0]ホーム

URL:


CN107295500A - SIM card data control method, device, storage medium and computer equipment - Google Patents

SIM card data control method, device, storage medium and computer equipment
Download PDF

Info

Publication number
CN107295500A
CN107295500ACN201710326808.2ACN201710326808ACN107295500ACN 107295500 ACN107295500 ACN 107295500ACN 201710326808 ACN201710326808 ACN 201710326808ACN 107295500 ACN107295500 ACN 107295500A
Authority
CN
China
Prior art keywords
card
phonesubid
card slot
phone
subid
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201710326808.2A
Other languages
Chinese (zh)
Other versions
CN107295500B (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
Oneplus Technology Shenzhen 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 Oneplus Technology Shenzhen Co LtdfiledCriticalOneplus Technology Shenzhen Co Ltd
Priority to CN201710326808.2ApriorityCriticalpatent/CN107295500B/en
Publication of CN107295500ApublicationCriticalpatent/CN107295500A/en
Application grantedgrantedCritical
Publication of CN107295500BpublicationCriticalpatent/CN107295500B/en
Activelegal-statusCriticalCurrent
Anticipated expirationlegal-statusCritical

Links

Classifications

Landscapes

Abstract

Translated fromChinese

本发明涉及一种SIM卡数据控制方法、装置、存储介质和计算机设备。侦听换卡或拔卡事件,当换卡或拔卡事件触发后,进行卡信息加载,当卡信息加载完成后,获取网络请求。根据网络请求对卡槽的电话身份标识PhoneSubId进行更新,根据更新后的电话身份标识PhoneSubId进行注册数据网络,当成功注册数据网络后,通过数据拨号进行上网。当发生了换卡或拔卡事件后,在终端注册数据网络之前,对卡槽的电话身份标识PhoneSubId进行了更新。因为注册数据上网是根据卡槽的电话身份标识PhoneSubId来对应到相应的SIM卡的,将卡槽的电话身份标识PhoneSubId更新为最新状态,这样就保证了卡槽的电话身份标识PhoneSubId与SIM卡的对应关系是正确的。

The invention relates to a SIM card data control method, device, storage medium and computer equipment. Listen to the card replacement or card removal event, when the card replacement or card removal event is triggered, the card information is loaded, and when the card information is loaded, the network request is obtained. Update the phone ID PhoneSubId of the card slot according to the network request, register the data network according to the updated phone ID PhoneSubId, and access the Internet through data dialing after successfully registering the data network. When a card replacement or card removal event occurs, the PhoneSubId of the card slot is updated before the terminal registers with the data network. Because the registration data online is corresponding to the corresponding SIM card according to the phone ID PhoneSubId of the card slot, the phone ID PhoneSubId of the card slot is updated to the latest state, thus ensuring that the phone ID PhoneSubId of the card slot is consistent with the SIM card The correspondence is correct.

Description

Translated fromChinese
SIM卡数据控制方法、装置、存储介质和计算机设备SIM card data control method, device, storage medium and computer equipment

技术领域technical field

本发明涉及通信技术领域,特别是涉及一种SIM卡数据控制方法、装置、存储介质和计算机设备。The invention relates to the technical field of communication, in particular to a SIM card data control method, device, storage medium and computer equipment.

背景技术Background technique

SIM(Subscriber Identity Module客户识别模块)卡,也称为智能卡、用户身份识别卡,移动终端必须装上此卡方能使用通信功能。双卡双待手机是指一部手机,可以同时装下两张SIM卡,并且这两张卡均处于待机状态。当双卡双待手机中的两张SIM卡交换卡槽,或者只插入了一张SIM卡,但现在将这张SIM卡换到了另一张卡槽中时候,手机无法感知从而造成SIM卡无法注册数据网络,使得用户不能使用数据网络进行上网、收发短信及收发彩信等业务。所以如何在这种情况下,解决用户使用数据网络进行正常上网、收发短信及收发彩信是一个亟待解决的问题。SIM (Subscriber Identity Module customer identification module) card, also known as smart card, subscriber identity card, mobile terminal must install this card to use the communication function. A dual-card dual-standby mobile phone refers to a mobile phone that can hold two SIM cards at the same time, and both cards are in a standby state. When the two SIM cards in the dual-card dual-standby mobile phone exchange card slots, or only one SIM card is inserted, but now this SIM card is changed to another card slot, the mobile phone cannot sense it, causing the SIM card to fail. Register the data network, so that the user cannot use the data network to surf the Internet, send and receive short messages, send and receive MMS and other services. Therefore, in this case, how to solve the problem that users use the data network to surf the Internet normally, send and receive short messages and send and receive multimedia messages is an urgent problem to be solved.

发明内容Contents of the invention

基于此,有必要针对上述技术问题,提供一种能够保证用户正常上网、收发短信及收发彩信的SIM卡数据控制方法、装置、存储介质和计算机设备。Based on this, it is necessary to address the above-mentioned technical problems and provide a SIM card data control method, device, storage medium and computer equipment capable of ensuring that users can surf the Internet normally, send and receive short messages and send and receive multimedia messages.

一种SIM卡数据控制方法,所述方法包括:A SIM card data control method, the method comprising:

侦听换卡或拔卡事件;Listen for card replacement or card removal events;

当所述换卡或拔卡事件触发后,进行卡信息加载;When the card changing or card pulling event is triggered, the card information is loaded;

当卡信息加载完成后,获取网络请求;When the card information is loaded, get the network request;

根据所述网络请求对卡槽的电话身份标识PhoneSubId进行更新;Update the phone ID PhoneSubId of the card slot according to the network request;

根据更新后的电话身份标识PhoneSubId进行注册数据网络;Register the data network according to the updated phone ID PhoneSubId;

当成功注册数据网络后,通过数据拨号进行上网。After successfully registering the data network, access the Internet through data dial-up.

在其中一个实施例中,所述根据所述网络请求对卡槽的电话身份标识PhoneSubId进行更新,包括:In one of the embodiments, the updating of the phone ID PhoneSubId of the card slot according to the network request includes:

判断卡槽中是否有卡;Determine whether there is a card in the card slot;

若有,则判断卡槽已经保存的电话身份标识PhoneSubId是否等于所述卡槽中当前所插入的卡的身份标识SubId,所述卡槽已经保存的电话身份标识PhoneSubId为所述卡槽在换卡或拔卡前所述卡槽中的卡的身份标识SubId;If there is, then judge whether the phone ID PhoneSubId that the card slot has saved is equal to the ID SubId of the card currently inserted in the card slot, and the phone ID PhoneSubId that the card slot has saved is that the card slot is changing cards Or the identity SubId of the card in the card slot mentioned before pulling out the card;

若不等于,则将所述卡槽已经保存的电话身份标识PhoneSubId更新为所述插入的卡的身份标识SubId。If not, update the PhoneSubId stored in the card slot with the SubId of the inserted card.

在其中一个实施例中,所述在判断卡槽中是否有卡之后,包括:In one of the embodiments, after determining whether there is a card in the card slot, it includes:

若卡槽中没有卡,则将所述卡槽已经保存的电话身份标识PhoneSubId更新为无效值。If there is no card in the card slot, update the PhoneSubId stored in the card slot to an invalid value.

在其中一个实施例中,所述若卡槽中有卡,则判断卡槽已经保存电话身份标识PhoneSubId是否等于所述卡槽中当前所插入的卡的身份标识SubId之后,包括:In one of the embodiments, if there is a card in the card slot, after judging whether the card slot has saved the phone identity PhoneSubId equal to the identity SubId of the card currently inserted in the card slot, it includes:

若卡槽已经保存的电话身份标识PhoneSubId与所述卡槽中当前所插入的卡的身份标识SubId相等,则所述卡槽已经保存电话身份标识PhoneSubId不变。If the phone ID PhoneSubId already stored in the card slot is equal to the ID SubId of the card currently inserted in the card slot, then the phone ID PhoneSubId already stored in the card slot remains unchanged.

在其中一个实施例中,所述方法还包括:In one embodiment, the method also includes:

当在双卡双待模式下重新设置默认数据卡时,获取所要设置为默认数据卡的卡的身份标识SubId;When resetting the default data card in the dual-card dual-standby mode, obtain the identity SubId of the card to be set as the default data card;

判断所述要设置为默认数据卡的卡的身份标识SubId是否与原默认数据卡的身份标识SubId相等;Judging whether the identity SubId of the card to be set as the default data card is equal to the identity SubId of the original default data card;

若不相等,则更新默认数据卡的身份标识SubId为所述要设置为默认数据卡的卡的身份标识SubId。If not, update the identity SubId of the default data card to the identity SubId of the card to be set as the default data card.

一种SIM卡数据控制装置,所述装置包括:A SIM card data control device, said device comprising:

侦听模块,用于侦听换卡或拔卡事件;The listening module is used to listen to card changing or card pulling events;

卡信息加载模块,用于当所述换卡或拔卡事件触发后,进行卡信息加载;The card information loading module is used to load the card information when the card changing or card pulling event is triggered;

网络请求获取模块,用于当卡信息加载完成后,获取网络请求;The network request acquisition module is used to obtain the network request after the card information is loaded;

卡槽的电话身份标识PhoneSubId更新模块,用于根据所述网络请求对卡槽的电话身份标识PhoneSubId进行更新;The telephone identity mark PhoneSubId update module of the card slot, for updating the phone identity mark PhoneSubId of the card slot according to the network request;

数据网络注册模块,用于根据更新后的电话身份标识PhoneSubId进行注册数据网络;The data network registration module is used to register the data network according to the updated phone identity PhoneSubId;

数据拨号模块,用于当成功注册数据网络后,通过数据拨号进行上网。The data dial-up module is used to access the Internet through data dial-up after successfully registering the data network.

在其中一个实施例中,所述卡槽的电话身份标识PhoneSubId更新模块包括:In one of the embodiments, the phone identification PhoneSubId update module of the card slot includes:

卡槽中是否有卡判断模块,用于判断卡槽中是否有卡;Whether there is a card judging module in the card slot, used to judge whether there is a card in the card slot;

身份标识判断模块,用于若有,则判断卡槽已经保存的电话身份标识PhoneSubId是否等于所述卡槽中当前所插入的卡的身份标识SubId,所述卡槽已经保存的电话身份标识PhoneSubId为所述卡槽在换卡或拔卡前所述卡槽中的卡的身份标识SubId;Identity identification judging module, for if having, then judge whether the phone identity identification PhoneSubId that card slot has saved is equal to the identification identification SubId of the card currently inserted in the described card slot, the phone identification identification PhoneSubId that described card slot has preserved is The card slot SubId of the card in the card slot before the card is changed or pulled out;

更新模块,用于若不等于,则将所述卡槽已经保存的电话身份标识PhoneSubId更新为所述插入的卡的身份标识SubId。The update module is configured to update the PhoneSubId saved in the card slot to the SubId of the inserted card if not equal.

在其中一个实施例中,所述卡槽的电话身份标识PhoneSubId更新模块,还包括:In one of the embodiments, the phone identity identification PhoneSubId update module of the card slot also includes:

无卡模块,用于若卡槽中没有卡,则将所述卡槽已经保存的电话身份标识PhoneSubId更新为无效值。The no-card module is configured to update the PhoneSubId saved in the card slot to an invalid value if there is no card in the card slot.

一种计算机可读存储介质,其上存储有计算机程序,该程序被处理器执行时实现以下步骤:A computer-readable storage medium, on which a computer program is stored, and when the program is executed by a processor, the following steps are implemented:

侦听换卡或拔卡事件;Listen for card replacement or card removal events;

当所述换卡或拔卡事件触发后,进行卡信息加载;When the card changing or card pulling event is triggered, the card information is loaded;

当卡信息加载完成后,获取网络请求;When the card information is loaded, get the network request;

根据所述网络请求对卡槽的电话身份标识PhoneSubId进行更新;Update the phone ID PhoneSubId of the card slot according to the network request;

根据更新后的电话身份标识PhoneSubId进行注册数据网络;Register the data network according to the updated phone ID PhoneSubId;

当成功注册数据网络后,通过数据拨号进行上网。After successfully registering the data network, access the Internet through data dial-up.

一种计算机设备,所述计算机设备包括存储器,处理器及存储在所述存储器上并可在所述处理器上运行的计算机程序,所述处理器执行所述计算机程序时实现以下步骤:A computer device, the computer device comprising a memory, a processor and a computer program stored on the memory and operable on the processor, the processor implements the following steps when executing the computer program:

侦听换卡或拔卡事件;Listen for card replacement or card removal events;

当所述换卡或拔卡事件触发后,进行卡信息加载;When the card changing or card pulling event is triggered, the card information is loaded;

当卡信息加载完成后,获取网络请求;When the card information is loaded, get the network request;

根据所述网络请求对卡槽的电话身份标识PhoneSubId进行更新;Update the phone ID PhoneSubId of the card slot according to the network request;

根据更新后的电话身份标识PhoneSubId进行注册数据网络;Register the data network according to the updated phone ID PhoneSubId;

当成功注册数据网络后,通过数据拨号进行上网。After successfully registering the data network, access the Internet through data dial-up.

上述SIM卡数据控制方法、装置、存储介质和计算机设备,侦听换卡或拔卡事件,当换卡或拔卡事件触发后,进行卡信息加载,当卡信息加载完成后,获取网络请求。根据网络请求对卡槽的电话身份标识PhoneSubId进行更新,根据更新后的电话身份标识PhoneSubId进行注册数据网络,当成功注册数据网络后,通过数据拨号进行上网。当发生了换卡或拔卡事件后,在终端注册数据网络之前,对卡槽的电话身份标识PhoneSubId进行了更新。因为注册数据上网是根据卡槽的电话身份标识PhoneSubId来对应到相应的SIM卡的,将卡槽的电话身份标识PhoneSubId更新为最新状态,这样就保证了卡槽的电话身份标识PhoneSubId与SIM卡的对应关系是正确的,即使用了正确的SIM卡进行拨号上网。这样就避免了后续进行上网、收发短信及收发彩信等业务时将数据错误地切到空的或者错误的卡槽,造成用户无法使用这些业务或者通过错误的卡进行了这些业务。The above-mentioned SIM card data control method, device, storage medium and computer equipment listen to the card replacement or card removal event, when the card replacement or card removal event is triggered, the card information is loaded, and when the card information is loaded, the network request is obtained. Update the phone ID PhoneSubId of the card slot according to the network request, register the data network according to the updated phone ID PhoneSubId, and access the Internet through data dialing after successfully registering the data network. When a card replacement or card removal event occurs, before the terminal registers with the data network, the PhoneSubId of the card slot is updated. Because the registration data online is corresponding to the corresponding SIM card according to the phone ID PhoneSubId of the card slot, the phone ID PhoneSubId of the card slot is updated to the latest state, thus ensuring that the phone ID PhoneSubId of the card slot is consistent with the SIM card The corresponding relationship is correct, that is, the correct SIM card is used for dial-up Internet access. In this way, it is avoided that the data is wrongly switched to an empty or wrong card slot when performing subsequent services such as surfing the Internet, sending and receiving short messages, sending and receiving MMS, etc., causing the user to be unable to use these services or to perform these services through the wrong card.

附图说明Description of drawings

图1为一个实施例中双卡双待手机中插入了两张卡的应用环境图;Fig. 1 is the application environment diagram of inserting two cards in the dual-card dual-standby mobile phone in an embodiment;

图2为将图1中两张卡互换的应用环境图;Figure 2 is an application environment diagram for exchanging the two cards in Figure 1;

图3为一个实施例中双卡双待手机中将一张卡拔出又插入另一个卡槽的应用环境图;Fig. 3 is an application environment diagram in which a card is pulled out and inserted into another card slot in a dual-card dual-standby mobile phone in an embodiment;

图4为一个实施例中SIM卡数据控制方法的流程图;Fig. 4 is the flowchart of SIM card data control method in one embodiment;

图5为一个实施例中SIM卡数据控制方法的流程图;Fig. 5 is the flowchart of SIM card data control method in one embodiment;

图6为一个实施例中SIM卡数据控制方法的流程图;Fig. 6 is the flowchart of SIM card data control method in one embodiment;

图7为一个实施例中SIM卡数据控制方法的流程图;Fig. 7 is the flowchart of SIM card data control method in one embodiment;

图8为一个实施例中SIM卡数据控制方法的流程图;Fig. 8 is the flowchart of SIM card data control method in one embodiment;

图9为一个实施例中SIM卡数据控制装置的结构示意图;Fig. 9 is a schematic structural diagram of a SIM card data control device in an embodiment;

图10为图9中卡槽的电话身份标识PhoneSubId更新模块的结构示意图;Fig. 10 is the structural representation of the phone identification PhoneSubId update module of the card slot in Fig. 9;

图11为图9中卡槽的电话身份标识PhoneSubId更新模块的结构示意图。FIG. 11 is a schematic structural diagram of the PhoneSubId update module of the card slot in FIG. 9 .

具体实施方式detailed description

为使本发明的上述目的、特征和优点能够更加明显易懂,下面结合附图对本发明的具体实施方式做详细的说明。在下面的描述中阐述了很多具体细节以便于充分理解本发明。但是本发明能够以很多不同于在此描述的其它方式来实施,本领域技术人员可以在不违背本发明内涵的情况下做类似改进,因此本发明不受下面公开的具体实施的限制。In order to make the above objects, features and advantages of the present invention more comprehensible, specific implementations of the present invention will be described in detail below in conjunction with the accompanying drawings. In the following description, numerous specific details are set forth in order to provide a thorough understanding of the present invention. However, the present invention can be implemented in many other ways different from those described here, and those skilled in the art can make similar improvements without departing from the connotation of the present invention, so the present invention is not limited by the specific implementations disclosed below.

除非另有定义,本文所使用的所有的技术和科学术语与属于本发明的技术领域的技术人员通常理解的含义相同。本文中在本发明的说明书中所使用的术语只是为了描述具体的实施例的目的,不是旨在于限制本发明。以上实施例的各技术特征可以进行任意的组合,为使描述简洁,未对上述实施例中的各个技术特征所有可能的组合都进行描述,然而,只要这些技术特征的组合不存在矛盾,都应当认为是本说明书记载的范围。Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the technical field of the invention. The terms used herein in the description of the present invention are for the purpose of describing specific embodiments only, and are not intended to limit the present invention. The technical features of the above embodiments can be combined arbitrarily. To make the description concise, all possible combinations of the technical features in the above embodiments are not described. However, as long as there is no contradiction in the combination of these technical features, they should be It is considered to be within the range described in this specification.

本发明实施例提供的SIM卡数据控制方法可应用于如图1所示的环境中。参考图1所示,双卡双待手机的卡托上有两个卡槽,卡槽一102a和卡槽二104a,将SIM卡一102插入卡槽一102a,将SIM卡二104插入卡槽二104a。The SIM card data control method provided by the embodiment of the present invention can be applied to the environment shown in FIG. 1 . As shown in Figure 1, there are two card slots on the card tray of the dual-card dual-standby mobile phone, card slot one 102a and card slot two 104a, insert SIM card one 102 into card slot one 102a, insert SIM card two 104 into the card slot II 104a.

每一个SIM卡有唯一一个ICCID(Integrate circuit card identity,集成电路卡识别码),这个ICCID是固化在SIM卡中,通过ICCID可以识别不同的SIM卡。Each SIM card has a unique ICCID (Integrate circuit card identity, integrated circuit card identification code). This ICCID is solidified in the SIM card, and different SIM cards can be identified through the ICCID.

如图2所示,可将SIM卡一102和SIM卡二104互换卡槽,即将SIM卡一102插入卡槽二104a,将SIM卡二104插入卡槽一102a。As shown in FIG. 2 , SIM card 1 102 and SIM card 2 104 can be interchanged into card slots, that is, SIM card 1 102 is inserted into card slot 2 104 a, and SIM card 2 104 is inserted into card slot 1 102 a.

本发明实施例提供的SIM卡数据控制方法也可应用于如图3所示的环境中。双卡双待手机中只插入了一张SIM卡,将SIM卡一102从卡槽一102a中拔出插入了卡槽二104a。The SIM card data control method provided by the embodiment of the present invention can also be applied to the environment shown in FIG. 3 . Only one SIM card is inserted into the dual-card dual-standby mobile phone, and the SIM card one 102 is pulled out from the card slot one 102a and inserted into the card slot two 104a.

在一个实施例中,如图4所示,提供了一种SIM卡数据控制方法,包括:In one embodiment, as shown in Figure 4, a SIM card data control method is provided, including:

步骤410,侦听换卡或拔卡事件。Step 410, listen to the event of card replacement or card removal.

双卡双待手机是指同时支持两张SIM卡的手机,两个SIM卡可以同时待机,但不能同时通话。在待机时,任何一个SIM卡对应的电话号码都能被呼叫,但如果其中一个正在通话,则另外一个电话号码就不能接收呼叫,也无法拨打电话。双卡双待手机侦听如图2所示的换卡事件或如图3所示的拔卡事件。A dual-card dual-standby mobile phone refers to a mobile phone that supports two SIM cards at the same time. The two SIM cards can be on standby at the same time, but they cannot talk at the same time. When in standby, any phone number corresponding to the SIM card can be called, but if one of them is talking, the other phone number cannot receive calls or make calls. The dual-card dual-standby mobile phone listens to the card replacement event shown in Figure 2 or the card removal event shown in Figure 3 .

步骤420,当换卡或拔卡事件触发后,进行卡信息加载。Step 420, when the card replacement or card removal event is triggered, the card information is loaded.

当如图2所示的换卡事件触发后,即卡槽一中所插的卡,从SIM卡一变为SIM卡二。卡槽二中所插的卡,从SIM卡二变为SIM卡一。手机启动卡信息加载流程,获取SIM卡一和SIM卡二的ICCID,然后给每个ICCID分配一个不同的身份标识SubId,也就是给SIM卡一和SIM卡二分别分配了一个不同的身份标识SubId,用来区别两张卡。每一张SIM卡的ICCID不同,分配的身份标识SubId也不同,但同一张卡无论哪次插入,所分配的身份标识SubId是相同的。When the card replacement event shown in Figure 2 is triggered, that is, the card inserted in the card slot 1 changes from SIM card 1 to SIM card 2. The card inserted in card slot 2 changes from SIM card 2 to SIM card 1. The mobile phone starts the card information loading process, obtains the ICCID of SIM card 1 and SIM card 2, and then assigns a different identity SubId to each ICCID, that is, assigns a different identity SubId to SIM card 1 and SIM card 2 respectively , used to distinguish between two cards. The ICCID of each SIM card is different, and the assigned identity identifier SubId is also different, but no matter which time the same card is inserted, the assigned identity identifier SubId is the same.

当如图3所示的拔卡事件触发后,卡一从卡槽一中拔出插入了卡槽二中。手机启动卡信息加载流程,本次就只对卡一进行卡信息加载。获取卡一的ICCID,然后给这个ICCID分配一个不同的身份标识SubId,此时卡槽一中没有卡了,卡槽二中为卡一。When the card pulling event shown in FIG. 3 is triggered, card one is pulled out from card slot one and inserted into card slot two. The mobile phone starts the card information loading process, and this time only card information is loaded for card one. Obtain the ICCID of card 1, and then assign a different identity SubId to this ICCID. At this time, there is no card in card slot 1, and card 1 is in card slot 2.

步骤430,当卡信息加载完成后,获取网络请求。Step 430, after the card information is loaded, obtain a network request.

当卡信息加载完成后,手机获取网络请求,网络请求来自某一张卡。After the card information is loaded, the mobile phone obtains a network request, and the network request comes from a certain card.

步骤440,根据网络请求对卡槽的电话身份标识PhoneSubId进行更新。Step 440, update the PhoneSubId of the card slot according to the network request.

电话(Phone)对象是整个电话通讯(Telephony)服务的核心,主要的Telephony服务(IccSmsInterfaceManager、IccPhoneBookInterfaceManager、PhoneSubInfo)及数据连接功能都通过具体的Phone对象提供,具体的Phone对象包括CDMAPhone、CDMALTEPhone、GSMPhone及SipPhone。每一个卡槽对应一个Phone对象。The Phone object is the core of the entire Telephony service. The main Telephony services (IccSmsInterfaceManager, IccPhoneBookInterfaceManager, PhoneSubInfo) and data connection functions are provided through specific Phone objects. The specific Phone objects include CDMAPhone, CDMALTEPhone, GSMPhone and SipPhone. Each card slot corresponds to a Phone object.

一般情况下,是将卡槽中所插入的卡的身份标识SubId的值赋给卡槽(即卡槽所对应的Phone对象)的电话身份标识PhoneSubId。但是当发生如图2所示的换卡事件后,卡一从卡槽一换至卡槽二中,卡槽对应的Phone对象的电话身份标识PhoneSubId还未及时进行更新为当前所插入的卡的身份标识SubId。此时手机获取到来自卡一的网络请求,手机根据卡一的SubId找到对应的PhoneSubId,再根据PhoneSubId找到的是卡槽一,那么就出现手机将数据错误地切到卡槽一,但实际卡槽一中所插的并不是卡一。这样卡槽一中插入的是卡二,那么就会使用卡二进行注册数据网络,因此用户体验非常差。Generally, the value of the identity identifier SubId of the card inserted into the card slot is assigned to the phone identity identifier PhoneSubId of the card slot (that is, the Phone object corresponding to the card slot). However, when the card change event as shown in Figure 2 occurs, card one is changed from card slot one to card slot two, and the phone ID PhoneSubId of the Phone object corresponding to the card slot has not been updated in time to be that of the currently inserted card. Identity identifier SubId. At this time, the mobile phone obtains the network request from card 1, and the mobile phone finds the corresponding PhoneSubId according to the SubId of card 1, and then finds the card slot 1 according to the PhoneSubId, then the mobile phone mistakenly switches the data to card slot 1, but the actual card What is inserted in slot one is not card one. In this way, the second card is inserted into the first card slot, and the second card will be used to register the data network, so the user experience is very poor.

当发生如图3所示的拔卡事件后,则卡一从卡槽一拔出又插入了卡槽二,卡槽一中无卡。卡槽一对应的Phone对象的电话身份标识PhoneSubId不能及时发现卡槽为空,PhoneSubId还保存为卡一的SubId的值。手机根据卡一的SubId找到对应的PhoneSubId,再根据PhoneSubId找到的是卡槽一,那么就出现手机将数据错误地切到卡槽一,而卡槽一中为空,那么就无法注册数据网络,用户体验非常差。After the card pulling event as shown in Figure 3 occurs, the card one is pulled out from the card slot one and then inserted into the card slot two, and there is no card in the card slot one. The phone ID PhoneSubId of the Phone object corresponding to card slot 1 cannot find that the card slot is empty in time, and PhoneSubId is also saved as the value of SubId of card 1. The mobile phone finds the corresponding PhoneSubId according to the SubId of the card 1, and then finds the card slot 1 according to the PhoneSubId, then the mobile phone switches the data to the card slot 1 by mistake, and the card slot 1 is empty, then the data network cannot be registered. User experience is very poor.

所以当手机获取网络请求后,会对卡槽的电话身份标识PhoneSubId进行更新。具体为,判断卡槽中是否有卡,若有,则先判断卡槽对应的Phone对象已经保存的PhoneSubId是否等于卡槽中当前所插入的卡的身份标识SubId,所插入的卡的身份标识SubId是在卡信息加载流程中获取的。若相等则不做处理,若不等则将卡槽已经保存的电话身份标识PhoneSubId更新为插入的卡的身份标识SubId。若卡槽中无卡,则将卡槽已经保存的电话身份标识PhoneSubId更新为无效值。Therefore, when the mobile phone obtains the network request, it will update the PhoneSubId of the card slot. Specifically, it is judged whether there is a card in the card slot, and if so, it is first judged whether the PhoneSubId stored in the Phone object corresponding to the card slot is equal to the identity SubId of the card currently inserted in the card slot, and the identity SubId of the inserted card It is obtained during the card information loading process. If they are equal, no processing is performed, and if they are not equal, the phone identity identifier PhoneSubId stored in the card slot is updated to the identity identifier SubId of the inserted card. If there is no card in the card slot, update the PhoneSubId stored in the card slot to an invalid value.

步骤450,根据更新后的电话身份标识PhoneSubId进行注册数据网络。Step 450, registering with the data network according to the updated phone ID PhoneSubId.

手机根据更新后的电话身份标识PhoneSubId进行注册数据网络。具体的,当发生如图2所示的换卡后,将每个卡槽已经保存的电话身份标识PhoneSubId更新为插入的卡的身份标识SubId。手机获取到来自卡一的网络请求,手机根据卡一的SubId找到对应的PhoneSubId,再根据PhoneSubId找到的就是卡槽二,那么手机就将数据正确地切到卡槽二,卡槽二中插入的就是卡一。The mobile phone registers with the data network according to the updated phone ID PhoneSubId. Specifically, when the card is changed as shown in FIG. 2 , the phone identity identifier PhoneSubId saved in each card slot is updated to the identity identifier SubId of the inserted card. The mobile phone obtains the network request from card one, and the mobile phone finds the corresponding PhoneSubId according to the SubId of card one, and then finds the card slot two according to the PhoneSubId, then the mobile phone correctly cuts the data to the second card slot, and inserts the It's Kayi.

当发生如图3所示的拔卡后,即用户将卡一从卡槽一拔出又插入了卡槽二,卡槽一中无卡则将卡槽一已经保存的电话身份标识PhoneSubId更新为无效值,将卡槽二已经保存的电话身份标识PhoneSubId更新为当前所插入的卡(卡一)的身份标识SubId。这样手机获取到来自卡一的网络请求,手机根据卡一的SubId找到对应的PhoneSubId,再根据PhoneSubId找到的就是卡槽二,那么手机就将数据正确地切到卡槽二,卡槽二中插入的是卡一。手机通过卡槽二的接口对卡一进行注册数据网络。After pulling out the card as shown in Figure 3, promptly the user pulls out card one from card slot one and inserts card slot two again, if there is no card in card slot one, then the phone identification PhoneSubId that card slot one has saved is updated to Invalid value, update the phone ID PhoneSubId saved in card slot 2 to the ID SubId of the currently inserted card (card 1). In this way, the mobile phone obtains the network request from card one, and the mobile phone finds the corresponding PhoneSubId according to the SubId of card one, and then finds the card slot two according to the PhoneSubId, then the mobile phone correctly cuts the data to the second card slot, and inserts it into the second It's Kayi. The mobile phone registers the card 1 with the data network through the interface of the card slot 2.

步骤460,当成功注册数据网络后,通过数据拨号进行上网。Step 460, after successfully registering the data network, go online through data dialing.

当手机通过卡一成功注册数据网络后,通过数据拨号进行上网。After the mobile phone successfully registers with the data network through card 1, it can access the Internet through data dial-up.

本实施例中,当发生了换卡或拔卡事件后,在手机注册数据网络之前,对卡槽的电话身份标识PhoneSubId进行了更新。因为注册数据上网是根据卡槽的(对应的Phone对象)电话身份标识PhoneSubId来对应到相应的SIM卡的,将卡槽的电话身份标识PhoneSubId更新为最新状态,这样就保证了卡槽的电话身份标识PhoneSubId与SIM卡的对应关系是实时对应的,即使用了正确的SIM卡进行拨号上网。这样就避免了后续进行上网、收发短信及收发彩信等业务时将数据错误地切到空的或者错误的卡槽,造成用户无法使用这些业务或者通过错误的卡进行了这些业务。In this embodiment, when the event of changing or pulling out the card occurs, the PhoneSubId of the card slot is updated before the mobile phone registers with the data network. Because the registration data online is corresponding to the corresponding SIM card according to the phone identity of the card slot (corresponding to the Phone object) PhoneSubId, the phone identity of the card slot PhoneSubId is updated to the latest state, thus ensuring the phone identity of the card slot The corresponding relationship between the identified PhoneSubId and the SIM card is real-time corresponding, that is, the correct SIM card is used for dial-up Internet access. In this way, it is avoided that the data is wrongly switched to an empty or wrong card slot when performing subsequent services such as surfing the Internet, sending and receiving short messages, sending and receiving MMS, etc., causing the user to be unable to use these services or to perform these services through the wrong card.

在一个实施例中,如图5所示,,根据网络请求对卡槽的电话身份标识PhoneSubId进行更新,包括:In one embodiment, as shown in FIG. 5 , updating the phone identity of the card slot PhoneSubId according to the network request includes:

步骤441,判断卡槽中是否有卡。Step 441, judging whether there is a card in the card slot.

插拔卡的过程会有广播消息发出,手机通过接收广播消息,就能获取SIM卡的状态,如果广播中带的是IccCardConstants.INTENT_VALUE_ICC_ABSENT,表示已经拔卡了,这个卡槽中当前无卡,如果广播中未带有IccCardConstants.INTENT_VALUE_ICC_ABSENT,就表示这个卡槽有卡。During the process of inserting and removing the card, a broadcast message will be sent out. The mobile phone can obtain the status of the SIM card by receiving the broadcast message. If the broadcast contains IccCardConstants.INTENT_VALUE_ICC_ABSENT, it means that the card has been pulled out. If there is no IccCardConstants.INTENT_VALUE_ICC_ABSENT in the broadcast, it means that there is a card in this card slot.

步骤442,若有,则判断卡槽已经保存的电话身份标识PhoneSubId是否等于卡槽中当前所插入的卡的身份标识SubId,卡槽已经保存的电话身份标识PhoneSubId为卡槽在换卡或拔卡前卡槽中的卡的身份标识SubId。Step 442, if there is, then judge whether the phone ID PhoneSubId that the card slot has saved is equal to the ID SubId of the card currently inserted in the card slot, and the phone ID PhoneSubId that the card slot has saved is that the card slot is changing or pulling out a card SubId of the card in the front card slot.

如果判断结果为卡槽中有卡,那么再判断卡槽已经保存的电话身份标识PhoneSubId是否等于卡槽中当前所插入的卡的身份标识SubId,所插入的卡的身份标识SubId是在卡信息加载流程中获取的。卡槽(对应的Phone对象)已经保存的电话身份标识PhoneSubId为卡槽在换卡或拔卡前记录的上次插入的卡的身份标识SubId。在上次插入卡的时候,将卡的身份标识SubId的值赋给了卡槽(对应的Phone对象)电话身份标识PhoneSubId。If the judgment result is that there is a card in the card slot, then judge whether the phone ID PhoneSubId saved in the card slot is equal to the ID SubId of the card currently inserted in the card slot, and the ID SubId of the inserted card is loaded in the card information obtained during the process. The phone ID PhoneSubId saved by the card slot (corresponding Phone object) is the ID SubId of the last inserted card recorded by the card slot before the card is replaced or pulled out. When the card was inserted last time, the value of the card's identity identifier SubId was assigned to the card slot (corresponding Phone object) telephone identity identifier PhoneSubId.

步骤443,若不等于,则将卡槽已经保存的电话身份标识PhoneSubId更新为插入的卡的身份标识SubId。Step 443, if not, update the PhoneSubId saved in the card slot to the SubId of the inserted card.

若卡槽(对应的Phone对象)已经保存的电话身份标识PhoneSubId不等于卡槽中当前所插入的卡的身份标识SubId,那么将当前所插入的卡的身份标识SubId的值赋给该卡槽(对应的Phone对象)的PhoneSubId。If the phone ID PhoneSubId that has been stored in the card slot (corresponding Phone object) is not equal to the ID SubId of the currently inserted card in the card slot, then assign the value of the ID SubId of the currently inserted card to the card slot ( PhoneSubId of the corresponding Phone object).

在本实施例中,先判断卡槽中是否有卡,当卡槽中有卡时,判断卡槽(对应的Phone对象)已经保存的电话身份标识PhoneSubId是否等于当前所插入的卡的身份标识SubId。若不相等,那么就说明是进行了换卡或者拔卡,那么卡槽(对应的Phone对象)PhoneSubId就可能发生了改变。此时就应该及时对卡槽(对应的Phone对象)已经保存的电话身份标识PhoneSubId进行验证,验证卡槽(对应的Phone对象)已经保存的电话身份标识PhoneSubId与当前所插入的卡的身份标识SubId的值是否一致。这样就避免了后续根据卡槽(对应的Phone对象)的PhoneSubId来选择哪一张卡来进行注册数据网络时出错。In this embodiment, first judge whether there is a card in the card slot, and when there is a card in the card slot, judge whether the phone ID PhoneSubId that the card slot (corresponding Phone object) has saved is equal to the ID SubId of the currently inserted card . If they are not equal, it means that the card has been replaced or removed, and the PhoneSubId of the card slot (corresponding Phone object) may have changed. At this time, the phone ID PhoneSubId that has been saved in the card slot (corresponding Phone object) should be verified in time, and the phone ID PhoneSubId that has been saved in the card slot (corresponding Phone object) and the ID SubId of the currently inserted card should be verified. Are the values consistent. In this way, mistakes are avoided when selecting which card to register data network according to the PhoneSubId of the card slot (corresponding Phone object).

在一个实施例中,如图6所示,在判断卡槽中是否有卡之后,包括:In one embodiment, as shown in FIG. 6, after judging whether there is a card in the card slot, include:

步骤444,若卡槽中没有卡,则将卡槽已经保存的电话身份标识PhoneSubId更新为无效值。Step 444, if there is no card in the card slot, update the PhoneSubId stored in the card slot to an invalid value.

插拔卡的过程会有广播消息发出,手机通过接收广播消息,就能获取SIM卡的状态,如果广播中带的是IccCardConstants.INTENT_VALUE_ICC_ABSENT,表示已经拔卡了,当前卡槽中无卡。则将该卡槽(对应的Phone对象)已经保存的电话身份标识PhoneSubId更新为无效值。During the process of inserting and removing the card, a broadcast message will be sent out. The mobile phone can obtain the status of the SIM card by receiving the broadcast message. If the broadcast contains IccCardConstants.INTENT_VALUE_ICC_ABSENT, it means that the card has been pulled out and there is no card in the current card slot. Then update the PhoneSubId stored in the card slot (corresponding Phone object) to an invalid value.

在本实施例中,当判断某个卡槽中无卡时,将该卡槽(对应的Phone对象)的PhoneSubId更新为无效值。手机获取到无效值是不能够进行后续的注册数据网络,所以将该卡槽(对应的Phone对象)的PhoneSubId更新为无效值,就避免了手机将数据切至PhoneSubId为无效值所对应的卡槽。In this embodiment, when it is judged that there is no card in a certain card slot, the PhoneSubId of the card slot (corresponding Phone object) is updated to an invalid value. If the mobile phone obtains an invalid value, the subsequent registration data network cannot be performed, so the PhoneSubId of the card slot (corresponding to the Phone object) is updated to an invalid value, which prevents the mobile phone from switching data to the card slot corresponding to the invalid value of PhoneSubId .

在一个实施例中,如图7所示,若卡槽中有卡,则判断卡槽已经保存电话身份标识PhoneSubId是否等于卡槽中当前所插入的卡的身份标识SubId之后,包括:In one embodiment, as shown in Figure 7, if there is a card in the card slot, after judging whether the card slot has saved the phone identity identifier PhoneSubId equal to the identity identifier SubId of the card currently inserted in the card slot, it includes:

步骤445,若卡槽已经保存的电话身份标识PhoneSubId与卡槽中当前所插入的卡的身份标识SubId相等,则卡槽已经保存电话身份标识PhoneSubId不变。Step 445, if the phone ID PhoneSubId already saved in the card slot is equal to the ID SubId of the card currently inserted in the card slot, then the phone ID PhoneSubId already saved in the card slot remains unchanged.

在本实施例中,可能多次插拔卡后,上次插入在某个卡槽中的卡原插回了该卡槽,所以就会出现卡槽(对应的Phone对象)已经保存的电话身份标识PhoneSubId与卡槽中当前所插入的卡的身份标识SubId相等。此时是正确的,那么该卡槽(对应的Phone对象)已经保存的电话身份标识PhoneSubId就保持不变。In this embodiment, after the card may be plugged and unplugged many times, the card that was inserted in a certain card slot last time was originally inserted back into the card slot, so there will be the phone identity saved by the card slot (corresponding Phone object) The identifier PhoneSubId is equal to the identifier SubId of the card currently inserted in the card slot. It is correct at this time, then the phone identity identifier PhoneSubId that this card slot (corresponding Phone object) has saved just remains unchanged.

在一个实施例中,如图8所示,方法还包括:In one embodiment, as shown in Figure 8, the method further includes:

步骤470,当在双卡双待模式下重新设置默认数据卡时,获取所要设置为默认数据卡的卡的身份标识SubId。Step 470, when resetting the default data card in the dual-card dual-standby mode, obtain the identity SubId of the card to be set as the default data card.

默认数据卡是指手机在进行上网、收发短信及收发彩信等业务时默认使用的卡。每一个SIM卡有唯一一个ICCID,手机启动卡信息加载流程,给每个ICCID分配一个不同的SubId,也就是给SIM卡分配了一个不同的SubId,用来区别不同的卡。在双卡双待模式下重新设置默认数据卡时,获取所要设置为默认数据卡的卡的身份标识SubId。The default data card refers to the card that the mobile phone uses by default when surfing the Internet, sending and receiving text messages, sending and receiving MMS messages, and other services. Each SIM card has a unique ICCID. The mobile phone starts the card information loading process and assigns a different SubId to each ICCID, that is, assigns a different SubId to the SIM card to distinguish different cards. When resetting the default data card in the dual-card dual-standby mode, obtain the identity SubId of the card to be set as the default data card.

步骤480,判断要设置为默认数据卡的卡的身份标识SubId是否与原默认数据卡的身份标识SubId相等。Step 480, judging whether the identity SubId of the card to be set as the default data card is equal to the identity SubId of the original default data card.

defaultDataSub用来标记默认数据卡,将原设置为默认数据卡的卡的身份标识SubId的值赋给默认身份标识defaultDataSub,判断要设置为默认数据卡的卡的身份标识SubId与defaultDataSub是否相等。defaultDataSub is used to mark the default data card, assign the value of the SubId of the card originally set as the default data card to the default dataSub, and determine whether the SubId of the card to be set as the default data card is equal to defaultDataSub.

步骤490,若不相等,则更新默认数据卡的身份标识SubId为要设置为默认数据卡的卡的身份标识SubId。Step 490, if not equal, update the identity SubId of the default data card to the identity SubId of the card to be set as the default data card.

若要设置为默认数据卡的卡的身份标识SubId与defaultDataSub不相等,则将要设置为默认数据卡的卡的身份标识SubId的值赋给defaultDataSub,即更新了defaultDataSub的值。If the identity SubId of the card to be set as the default data card is not equal to defaultDataSub, the value of the identity SubId of the card to be set as the default data card is assigned to defaultDataSub, that is, the value of defaultDataSub is updated.

例如卡一为移动卡,卡二为联通卡,卡一被用户设置成了默认数据卡,卡一的subId=3,卡二的subId=4,原来设置默认数据卡的defaultDataSub=3。如果用户此时手动修改默认数据卡,设置卡二是默认数据卡。这时需要先获取用户所要设置为默认数据卡的卡二的subId=4,然后比较卡二的subId的值4和原defaultDataSub的值3是否相等,如果不相等,那么就需要将defaultDataSub的值更新为4。这样当用户在使用默认数据卡来进行注册数据网络,并通过数据拨号进行上网、收发短信及收发彩信等业务时,使用的就是用户所要设置为默认数据卡的卡(即卡二),而不会出错。For example, card 1 is a mobile card, card 2 is a China Unicom card, card 1 is set as a default data card by the user, card 1 has subId=3, card 2 has subId=4, and the defaultDataSub=3 of the default data card was originally set. If the user manually modifies the default data card at this time, set card 2 as the default data card. At this time, it is necessary to first obtain the subId=4 of the card 2 that the user wants to set as the default data card, and then compare whether the value 4 of the subId of the card 2 is equal to the value 3 of the original defaultDataSub, if not, then the value of defaultDataSub needs to be updated for 4. In this way, when the user uses the default data card to register the data network, and uses data dialing to access the Internet, send and receive text messages, send and receive multimedia messages, etc., the card that the user wants to set as the default data card (that is, card 2) is used instead of will go wrong.

在本实施例中,当在双卡双待模式下重新设置默认数据卡时,判断所要设置为默认数据卡的卡的身份标识SubId与原来的defaultDataSub是否一致,若不一致则将所要设置为默认数据卡的卡的身份标识SubId设置为defaultDataSub。通过defaultDataSub即可找到默认数据卡,然后用户就可以使用默认数据卡来进行注册数据网络,并通过数据拨号进行上网、收发短信及收发彩信等业务。In this embodiment, when resetting the default data card in the dual-card dual-standby mode, it is judged whether the identity SubId of the card to be set as the default data card is consistent with the original defaultDataSub, and if not, the desired data is set as the default data The card's card identity SubId is set to defaultDataSub. The default data card can be found through defaultDataSub, and then the user can use the default data card to register the data network, and use the data dial-up to access the Internet, send and receive short messages, send and receive MMS and other services.

在一个实施例中,如图9所示,还提供了一种SIM卡数据控制装置,该装置包括:侦听模块910、卡信息加载模块920、网络请求获取模块930、卡槽的电话身份标识PhoneSubId更新模块940、数据网络注册模块950及数据拨号模块960。In one embodiment, as shown in FIG. 9 , a SIM card data control device is also provided, which includes: a listening module 910, a card information loading module 920, a network request obtaining module 930, and a phone ID of the card slot PhoneSubId updating module 940 , data network registration module 950 and data dialing module 960 .

侦听模块910,用于侦听换卡或拔卡事件;Listening module 910, is used for listening to changing card or pulling card event;

卡信息加载模块920,用于当换卡或拔卡事件触发后,进行卡信息加载;The card information loading module 920 is used to load the card information when the card changing or card pulling event is triggered;

网络请求获取模块930,用于当卡信息加载完成后,获取网络请求;A network request acquisition module 930, configured to obtain a network request after the card information is loaded;

卡槽的电话身份标识PhoneSubId更新模块940,用于根据网络请求对卡槽的电话身份标识PhoneSubId进行更新;The phone identity of the card slot PhoneSubId update module 940, for updating the phone identity of the card slot PhoneSubId according to network requests;

数据网络注册模块950,用于根据更新后的电话身份标识PhoneSubId进行注册数据网络;The data network registration module 950 is used for registering the data network according to the updated phone identification PhoneSubId;

数据拨号模块960,用于当成功注册数据网络后,通过数据拨号进行上网。The data dialing module 960 is used for surfing the Internet through data dialing after successfully registering the data network.

在一个实施例中,如图10所示,卡槽的电话身份标识PhoneSubId更新模块940包括:卡槽中是否有卡判断模块941、身份标识判断模块942及更新模块943。In one embodiment, as shown in FIG. 10 , the phone ID PhoneSubId update module 940 of the card slot includes: a card slot judging module 941 , an ID judging module 942 and an updating module 943 .

卡槽中是否有卡判断模块941,用于判断卡槽中是否有卡;Whether there is a card judging module 941 in the card slot, for judging whether there is a card in the card slot;

身份标识判断模块942,用于若有,则判断卡槽已经保存的电话身份标识PhoneSubId是否等于卡槽中当前所插入的卡的身份标识SubId,卡槽已经保存的电话身份标识PhoneSubId为卡槽在换卡或拔卡前卡槽中的卡的身份标识SubId;Identity identification judging module 942 is used for, if there is, then judges whether the phone identification PhoneSubId that the card slot has saved is equal to the identification SubId of the card that is currently inserted in the card slot, and the phone identification PhoneSubId that the card slot has saved is the card slot in the card slot. SubId of the card in the card slot before changing or pulling out the card;

更新模块943,用于若不等于,则将卡槽已经保存的电话身份标识PhoneSubId更新为插入的卡的身份标识SubId。The updating module 943 is configured to update the PhoneSubId saved in the card slot to the SubId of the inserted card if not equal.

在一个实施例中,如图11所示,卡槽的电话身份标识PhoneSubId更新模块940,还包括:无卡模块944,用于若卡槽中没有卡,则将卡槽已经保存的电话身份标识PhoneSubId更新为无效值。In one embodiment, as shown in Figure 11, the phone identification PhoneSubId update module 940 of the card slot also includes: no card module 944, for if there is no card in the card slot, then the phone ID that the card slot has saved PhoneSubId updated to an invalid value.

在一个实施例中,还提供了一种计算机可读存储介质,其上存储有计算机程序,该程序被处理器执行时实现以下步骤:侦听换卡或拔卡事件,当换卡或拔卡事件触发后,进行卡信息加载,当卡信息加载完成后,获取网络请求。根据网络请求对卡槽的电话身份标识PhoneSubId进行更新,根据更新后的电话身份标识PhoneSubId进行注册数据网络,当成功注册数据网络后,通过数据拨号进行上网。In one embodiment, a computer-readable storage medium is also provided, on which a computer program is stored, and when the program is executed by a processor, the following steps are implemented: listening to a card replacement or card removal event, and when the card replacement or card removal After the event is triggered, the card information is loaded, and when the card information is loaded, the network request is obtained. Update the phone ID PhoneSubId of the card slot according to the network request, register the data network according to the updated phone ID PhoneSubId, and access the Internet through data dialing after successfully registering the data network.

在一个实施例中,根据网络请求对卡槽的电话身份标识PhoneSubId进行更新,包括:判断卡槽中是否有卡,若有则判断卡槽已经保存的电话身份标识PhoneSubId是否等于卡槽中当前所插入的卡的身份标识SubId,卡槽已经保存的电话身份标识PhoneSubId为卡槽在换卡或拔卡前卡槽中的卡的身份标识SubId。若不等于,则将卡槽已经保存的电话身份标识PhoneSubId更新为插入的卡的身份标识SubId。In one embodiment, updating the phone ID PhoneSubId of the card slot according to the network request includes: judging whether there is a card in the card slot, and if so, judging whether the phone ID PhoneSubId that the card slot has saved is equal to the current one in the card slot. The SubId of the inserted card, and the PhoneSubId saved in the card slot is the SubId of the card in the card slot before the card is replaced or pulled out. If not, update the PhoneSubId saved in the card slot to the SubId of the inserted card.

在一个实施例中,在判断卡槽中是否有卡之后,包括:若卡槽中没有卡,则将卡槽已经保存的电话身份标识PhoneSubId更新为无效值。In one embodiment, after judging whether there is a card in the card slot, it includes: if there is no card in the card slot, updating the PhoneSubId stored in the card slot to an invalid value.

在一个实施例中,若卡槽中有卡,则判断卡槽已经保存电话身份标识PhoneSubId是否等于卡槽中当前所插入的卡的身份标识SubId之后,包括:若卡槽已经保存的电话身份标识PhoneSubId与卡槽中当前所插入的卡的身份标识SubId相等,则卡槽已经保存电话身份标识PhoneSubId不变。In one embodiment, if there is a card in the card slot, after judging whether the card slot has saved the phone identity PhoneSubId equal to the identity SubId of the card currently inserted in the card slot, it includes: if the card slot has saved the phone identity If the PhoneSubId is equal to the identity SubId of the card currently inserted in the card slot, then the card slot has saved the phone identity PhoneSubId unchanged.

在一个实施例中,方法还包括:当在双卡双待模式下重新设置默认数据卡时,获取所要设置为默认数据卡的卡的身份标识SubId。判断要设置为默认数据卡的卡的身份标识SubId是否与原默认数据卡的身份标识SubId相等。若不相等,则更新默认数据卡的身份标识SubId为要设置为默认数据卡的卡的身份标识SubId。In one embodiment, the method further includes: when resetting the default data card in the dual-card dual-standby mode, acquiring the identity SubId of the card to be set as the default data card. It is judged whether the identity SubId of the card to be set as the default data card is equal to the identity SubId of the original default data card. If not, update the identity SubId of the default data card to the identity SubId of the card to be set as the default data card.

在一个实施例中,还提供了一种计算机设备,该计算机设备包括存储器,处理器及存储在存储器上并可在处理器上运行的计算机程序,处理器执行计算机程序时实现以下步骤:侦听换卡或拔卡事件,当换卡或拔卡事件触发后,进行卡信息加载,当卡信息加载完成后,获取网络请求。根据网络请求对卡槽的电话身份标识PhoneSubId进行更新,根据更新后的电话身份标识PhoneSubId进行注册数据网络,当成功注册数据网络后,通过数据拨号进行上网。In one embodiment, a computer device is also provided. The computer device includes a memory, a processor, and a computer program stored on the memory and operable on the processor. When the processor executes the computer program, the following steps are implemented: intercepting Card replacement or card removal event, when the card replacement or card removal event is triggered, the card information is loaded, and when the card information is loaded, the network request is obtained. Update the phone ID PhoneSubId of the card slot according to the network request, register the data network according to the updated phone ID PhoneSubId, and access the Internet through data dialing after successfully registering the data network.

在一个实施例中,根据网络请求对卡槽的电话身份标识PhoneSubId进行更新,包括:判断卡槽中是否有卡,若有则判断卡槽已经保存的电话身份标识PhoneSubId是否等于卡槽中当前所插入的卡的身份标识SubId,卡槽已经保存的电话身份标识PhoneSubId为卡槽在换卡或拔卡前卡槽中的卡的身份标识SubId。若不等于,则将卡槽已经保存的电话身份标识PhoneSubId更新为插入的卡的身份标识SubId。In one embodiment, updating the phone ID PhoneSubId of the card slot according to the network request includes: judging whether there is a card in the card slot, and if so, judging whether the phone ID PhoneSubId that the card slot has saved is equal to the current one in the card slot. The SubId of the inserted card, and the PhoneSubId saved in the card slot is the SubId of the card in the card slot before the card is replaced or pulled out. If not, update the PhoneSubId saved in the card slot to the SubId of the inserted card.

在一个实施例中,在判断卡槽中是否有卡之后,包括:若卡槽中没有卡,则将卡槽已经保存的电话身份标识PhoneSubId更新为无效值。In one embodiment, after judging whether there is a card in the card slot, it includes: if there is no card in the card slot, updating the PhoneSubId stored in the card slot to an invalid value.

在一个实施例中,若卡槽中有卡,则判断卡槽已经保存电话身份标识PhoneSubId是否等于卡槽中当前所插入的卡的身份标识SubId之后,包括:若卡槽已经保存的电话身份标识PhoneSubId与卡槽中当前所插入的卡的身份标识SubId相等,则卡槽已经保存电话身份标识PhoneSubId不变。In one embodiment, if there is a card in the card slot, after judging whether the card slot has saved the phone ID PhoneSubId equal to the ID SubId of the card currently inserted in the card slot, it includes: if the card slot has saved the phone ID If the PhoneSubId is equal to the identity SubId of the card currently inserted in the card slot, then the card slot has saved the phone identity PhoneSubId unchanged.

在一个实施例中,方法还包括:当在双卡双待模式下重新设置默认数据卡时,获取所要设置为默认数据卡的卡的身份标识SubId。判断要设置为默认数据卡的卡的身份标识SubId是否与原默认数据卡的身份标识SubId相等。若不相等,则更新默认数据卡的身份标识SubId为要设置为默认数据卡的卡的身份标识SubId。In one embodiment, the method further includes: when resetting the default data card in the dual-card dual-standby mode, acquiring the identity SubId of the card to be set as the default data card. It is judged whether the identity SubId of the card to be set as the default data card is equal to the identity SubId of the original default data card. If not, update the identity SubId of the default data card to the identity SubId of the card to be set as the default data card.

以上所述实施例仅表达了本发明的几种实施方式,其描述较为具体和详细,但并不能因此而理解为对发明专利范围的限制。应当指出的是,对于本领域的普通技术人员来说,在不脱离本发明构思的前提下,还可以做出若干变形和改进,这些都属于本发明的保护范围。因此,本发明专利的保护范围应以所附权利要求为准。The above-mentioned embodiments only express several implementation modes of the present invention, and the descriptions thereof are relatively specific and detailed, but should not be construed as limiting the patent scope of the invention. It should be noted that those skilled in the art can make several modifications and improvements without departing from the concept of the present invention, and these all belong to the protection scope of the present invention. Therefore, the protection scope of the patent for the present invention should be based on the appended claims.

Claims (10)

Translated fromChinese
1.一种SIM卡数据控制方法,所述方法包括:1. A SIM card data control method, said method comprising:侦听换卡或拔卡事件;Listen for card replacement or card removal events;当所述换卡或拔卡事件触发后,进行卡信息加载;When the card changing or card pulling event is triggered, the card information is loaded;当卡信息加载完成后,获取网络请求;When the card information is loaded, get the network request;根据所述网络请求对卡槽的电话身份标识PhoneSubId进行更新;Update the phone ID PhoneSubId of the card slot according to the network request;根据更新后的电话身份标识PhoneSubId进行注册数据网络;Register the data network according to the updated phone ID PhoneSubId;当成功注册数据网络后,通过数据拨号进行上网。After successfully registering the data network, access the Internet through data dial-up.2.根据权利要求1所述的方法,其特征在于,所述根据所述网络请求对卡槽的电话身份标识PhoneSubId进行更新,包括:2. The method according to claim 1, wherein the updating of the phone ID PhoneSubId of the card slot according to the network request comprises:判断卡槽中是否有卡;Determine whether there is a card in the card slot;若有,则判断卡槽已经保存的电话身份标识PhoneSubId是否等于所述卡槽中当前所插入的卡的身份标识SubId,所述卡槽已经保存的电话身份标识PhoneSubId为所述卡槽在换卡或拔卡前所述卡槽中的卡的身份标识SubId;If there is, then judge whether the phone ID PhoneSubId that the card slot has saved is equal to the ID SubId of the card currently inserted in the card slot, and the phone ID PhoneSubId that the card slot has saved is that the card slot is changing cards Or the identity SubId of the card in the card slot mentioned before pulling out the card;若不等于,则将所述卡槽已经保存的电话身份标识PhoneSubId更新为所述插入的卡的身份标识SubId。If not, update the PhoneSubId stored in the card slot with the SubId of the inserted card.3.根据权利要求2所述的方法,其特征在于,所述在判断卡槽中是否有卡之后,包括:3. The method according to claim 2, characterized in that, after determining whether there is a card in the card slot, comprising:若卡槽中没有卡,则将所述卡槽已经保存的电话身份标识PhoneSubId更新为无效值。If there is no card in the card slot, update the PhoneSubId stored in the card slot to an invalid value.4.根据权利要求2所述的方法,其特征在于,所述若卡槽中有卡,则判断卡槽已经保存电话身份标识PhoneSubId是否等于所述卡槽中当前所插入的卡的身份标识SubId之后,包括:4. The method according to claim 2, wherein if there is a card in the said card slot, it is judged whether the card slot has saved the phone identity identifier PhoneSubId equal to the identity identifier SubId of the currently inserted card in the said card slot After that, include:若卡槽已经保存的电话身份标识PhoneSubId与所述卡槽中当前所插入的卡的身份标识SubId相等,则所述卡槽已经保存电话身份标识PhoneSubId不变。If the phone ID PhoneSubId already stored in the card slot is equal to the ID SubId of the card currently inserted in the card slot, then the phone ID PhoneSubId already stored in the card slot remains unchanged.5.根据权利要求1所述的方法,其特征在于,所述方法还包括:5. The method according to claim 1, wherein the method further comprises:当在双卡双待模式下重新设置默认数据卡时,获取所要设置为默认数据卡的卡的身份标识SubId;When resetting the default data card in the dual-card dual-standby mode, obtain the identity SubId of the card to be set as the default data card;判断所述要设置为默认数据卡的卡的身份标识SubId是否与原默认数据卡的身份标识SubId相等;Judging whether the identity SubId of the card to be set as the default data card is equal to the identity SubId of the original default data card;若不相等,则更新默认数据卡的身份标识SubId为所述要设置为默认数据卡的卡的身份标识SubId。If not, update the identity SubId of the default data card to the identity SubId of the card to be set as the default data card.6.一种SIM卡数据控制装置,其特征在于,所述装置包括:6. A SIM card data control device, characterized in that said device comprises:侦听模块,用于侦听换卡或拔卡事件;The listening module is used to listen to card changing or card pulling events;卡信息加载模块,用于当所述换卡或拔卡事件触发后,进行卡信息加载;The card information loading module is used to load the card information when the card changing or card pulling event is triggered;网络请求获取模块,用于当卡信息加载完成后,获取网络请求;The network request acquisition module is used to obtain the network request after the card information is loaded;卡槽的电话身份标识PhoneSubId更新模块,用于根据所述网络请求对卡槽的电话身份标识PhoneSubId进行更新;The telephone identity mark PhoneSubId update module of the card slot, for updating the phone identity mark PhoneSubId of the card slot according to the network request;数据网络注册模块,用于根据更新后的电话身份标识PhoneSubId进行注册数据网络;The data network registration module is used to register the data network according to the updated phone identity PhoneSubId;数据拨号模块,用于当成功注册数据网络后,通过数据拨号进行上网。The data dial-up module is used to access the Internet through data dial-up after successfully registering the data network.7.根据权利要求6所述的装置,其特征在于,所述卡槽的电话身份标识PhoneSubId更新模块包括:7. The device according to claim 6, characterized in that, the PhoneSubId update module of the card slot comprises:卡槽中是否有卡判断模块,用于判断卡槽中是否有卡;Whether there is a card judging module in the card slot, used to judge whether there is a card in the card slot;身份标识判断模块,用于若有,则判断卡槽已经保存的电话身份标识PhoneSubId是否等于所述卡槽中当前所插入的卡的身份标识SubId,所述卡槽已经保存的电话身份标识PhoneSubId为所述卡槽在换卡或拔卡前所述卡槽中的卡的身份标识SubId;Identity identification judging module, for if having, then judge whether the phone identity identification PhoneSubId that card slot has saved is equal to the identification identification SubId of the card currently inserted in the described card slot, the phone identification identification PhoneSubId that described card slot has preserved is The card slot SubId of the card in the card slot before the card is changed or pulled out;更新模块,用于若不等于,则将所述卡槽已经保存的电话身份标识PhoneSubId更新为所述插入的卡的身份标识SubId。The update module is configured to update the PhoneSubId saved in the card slot to the SubId of the inserted card if not equal.8.根据权利要求7所述的装置,其特征在于,所述卡槽的电话身份标识PhoneSubId更新模块,还包括:8. The device according to claim 7, characterized in that, the PhoneSubId update module of the card slot also includes:无卡模块,用于若卡槽中没有卡,则将所述卡槽已经保存的电话身份标识PhoneSubId更新为无效值。The no-card module is configured to update the PhoneSubId saved in the card slot to an invalid value if there is no card in the card slot.9.一种计算机可读存储介质,其上存储有计算机程序,其特征在于,该程序被处理器执行时实现以下步骤:9. A computer-readable storage medium, on which a computer program is stored, characterized in that, when the program is executed by a processor, the following steps are implemented:侦听换卡或拔卡事件;Listen for card replacement or card removal events;当所述换卡或拔卡事件触发后,进行卡信息加载;When the card changing or card pulling event is triggered, the card information is loaded;当卡信息加载完成后,获取网络请求;When the card information is loaded, get the network request;根据所述网络请求对卡槽的电话身份标识PhoneSubId进行更新;Update the phone ID PhoneSubId of the card slot according to the network request;根据更新后的电话身份标识PhoneSubId进行注册数据网络;Register the data network according to the updated phone ID PhoneSubId;当成功注册数据网络后,通过数据拨号进行上网。After successfully registering the data network, access the Internet through data dial-up.10.一种计算机设备,所述计算机设备包括存储器,处理器及存储在所述存储器上并可在所述处理器上运行的计算机程序,其特征在于,所述处理器执行所述计算机程序时实现以下步骤:10. A computer device, the computer device comprising a memory, a processor and a computer program stored on the memory and operable on the processor, characterized in that, when the processor executes the computer program Implement the following steps:侦听换卡或拔卡事件;Listen for card replacement or card removal events;当所述换卡或拔卡事件触发后,进行卡信息加载;When the card changing or card pulling event is triggered, the card information is loaded;当卡信息加载完成后,获取网络请求;When the card information is loaded, get the network request;根据所述网络请求对卡槽的电话身份标识PhoneSubId进行更新;Update the phone ID PhoneSubId of the card slot according to the network request;根据更新后的电话身份标识PhoneSubId进行注册数据网络;Register the data network according to the updated phone ID PhoneSubId;当成功注册数据网络后,通过数据拨号进行上网。After successfully registering the data network, access the Internet through data dial-up.
CN201710326808.2A2017-05-102017-05-10 SIM card data control method, device and computer equipmentActiveCN107295500B (en)

Priority Applications (1)

Application NumberPriority DateFiling DateTitle
CN201710326808.2ACN107295500B (en)2017-05-102017-05-10 SIM card data control method, device and computer equipment

Applications Claiming Priority (1)

Application NumberPriority DateFiling DateTitle
CN201710326808.2ACN107295500B (en)2017-05-102017-05-10 SIM card data control method, device and computer equipment

Publications (2)

Publication NumberPublication Date
CN107295500Atrue CN107295500A (en)2017-10-24
CN107295500B CN107295500B (en)2020-01-07

Family

ID=60095087

Family Applications (1)

Application NumberTitlePriority DateFiling Date
CN201710326808.2AActiveCN107295500B (en)2017-05-102017-05-10 SIM card data control method, device and computer equipment

Country Status (1)

CountryLink
CN (1)CN107295500B (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN109769279A (en)*2019-01-152019-05-17深圳市万普拉斯科技有限公司 Out-of-service state control method, device and mobile terminal
CN113556721A (en)*2020-04-232021-10-26深圳市万普拉斯科技有限公司User identity identification card account switching method and device, storage medium and equipment
CN113891453A (en)*2021-09-262022-01-04努比亚技术有限公司Registration method and device of user identification card and computer readable storage medium
CN114567856A (en)*2022-02-092022-05-31维沃移动通信有限公司Dialing method and device and electronic equipment
CN114599024A (en)*2022-03-102022-06-07北京中广瑞波科技股份有限公司Equipment for processing multiple user identification modules

Citations (3)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN105530626A (en)*2015-12-222016-04-27东莞酷派软件技术有限公司 A network mode configuration method and mobile terminal
CN105657644A (en)*2016-01-282016-06-08宇龙计算机通信科技(深圳)有限公司Main data card setting method and terminal
CN106028308A (en)*2016-05-202016-10-12深圳市万普拉斯科技有限公司 Hot-swappable multi-card data control method and system

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN105530626A (en)*2015-12-222016-04-27东莞酷派软件技术有限公司 A network mode configuration method and mobile terminal
CN105657644A (en)*2016-01-282016-06-08宇龙计算机通信科技(深圳)有限公司Main data card setting method and terminal
CN106028308A (en)*2016-05-202016-10-12深圳市万普拉斯科技有限公司 Hot-swappable multi-card data control method and system

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
于长敏: "《Android 5.0-6.0双卡适配指南》", 17 July 2016*

Cited By (8)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN109769279A (en)*2019-01-152019-05-17深圳市万普拉斯科技有限公司 Out-of-service state control method, device and mobile terminal
CN109769279B (en)*2019-01-152021-07-20深圳市万普拉斯科技有限公司 Out-of-service state control method, device and mobile terminal
CN113556721A (en)*2020-04-232021-10-26深圳市万普拉斯科技有限公司User identity identification card account switching method and device, storage medium and equipment
CN113891453A (en)*2021-09-262022-01-04努比亚技术有限公司Registration method and device of user identification card and computer readable storage medium
CN114567856A (en)*2022-02-092022-05-31维沃移动通信有限公司Dialing method and device and electronic equipment
WO2023151591A1 (en)*2022-02-092023-08-17维沃移动通信有限公司Dialing method and apparatus, and electronic device
CN114599024A (en)*2022-03-102022-06-07北京中广瑞波科技股份有限公司Equipment for processing multiple user identification modules
CN114599024B (en)*2022-03-102023-12-19北京中广瑞波科技股份有限公司Device for processing multiple user identity modules

Also Published As

Publication numberPublication date
CN107295500B (en)2020-01-07

Similar Documents

PublicationPublication DateTitle
CN107295500B (en) SIM card data control method, device and computer equipment
CN102137389B (en)Multi-card mobile terminal and method for transferring data of SIM card
CN109495875B (en) SIM card selection method, device, electronic device and storage medium
CN102833699B (en)Method, system and the mobile communication terminal of simulation bilateral function
US20160094982A1 (en)Call Management Method and Apparatus for Multi-SIM Multi-Active Terminal
CN104936282A (en)Method and device for registering converged communication service
CN105530626A (en) A network mode configuration method and mobile terminal
CN106211250B (en)Mobile terminal and self-adaptive switching method and system of card slot of mobile terminal
CN110267314B (en)Method and device for switching network slices
WO2019179492A1 (en)Multi-sim multi-standby system, method and device, computer device, and computer readable storage medium
CN110177368B (en) A call establishment method and system, and a video communication server
CN110475229B (en)Method and device for accessing service data, computer equipment and storage medium
EP2685780B1 (en)Mobile phone and data processing method therefor
CN114401492A (en) Incoming call information notification method, device, call notification server and storage medium
CN104539508A (en)Access control method and device
CN109787789B (en)Compatibility management method, device and equipment for software upgrading and storage medium
WO2014176891A1 (en)Method, device and system for voice communication
CN107734496B (en) Mobile terminal search network control method, device and mobile terminal
CN110968574B (en)Data migration method and terminal
CN103974215B (en)Control method of electronic device and electronic equipment
CN102378101B (en)Method and device for implementing communication of one-card multi-number terminal
CN102264043B (en) Short message sending method, calling method and communication terminal
CN108684032A (en) Interception setting method and related equipment
CN104427529B (en)A kind of information processing method and terminal
CN108574503B (en)Setting method of interception setting option and related equipment

Legal Events

DateCodeTitleDescription
PB01Publication
PB01Publication
SE01Entry into force of request for substantive examination
SE01Entry into force of request for substantive examination
GR01Patent grant
GR01Patent grant
TR01Transfer of patent right

Effective date of registration:20250220

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

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

Country or region after:China

Address before:518000 Room 201, building A, 1 front Bay Road, Shenzhen Qianhai cooperation zone, Shenzhen, Guangdong

Patentee before:ONEPLUS TECHNOLOGY (SHENZHEN) Co.,Ltd.

Country or region before:China

TR01Transfer of patent right

[8]ページ先頭

©2009-2025 Movatter.jp