[go: up one dir, main page]

CN114363882A - Data card switching method and device - Google Patents

Data card switching method and device Download PDF

Info

Publication number
CN114363882A
CN114363882A CN202111682923.6A CN202111682923A CN114363882A CN 114363882 A CN114363882 A CN 114363882A CN 202111682923 A CN202111682923 A CN 202111682923A CN 114363882 A CN114363882 A CN 114363882A
Authority
CN
China
Prior art keywords
sim card
advertisement message
network
route advertisement
card
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.)
Pending
Application number
CN202111682923.6A
Other languages
Chinese (zh)
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.)
Spreadtrum Semiconductor Chengdu Co Ltd
Original Assignee
Spreadtrum Semiconductor Chengdu 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 Spreadtrum Semiconductor Chengdu Co Ltd filed Critical Spreadtrum Semiconductor Chengdu Co Ltd
Priority to CN202111682923.6A priority Critical patent/CN114363882A/en
Publication of CN114363882A publication Critical patent/CN114363882A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

本申请实施例提供了一种数据卡切换方法及装置,该方法包括:在网络设备将数据卡从第一SIM卡切换至第二SIM卡,且第二SIM卡支持的网络类型为IPV6时,接收来自网络设备的第一路由通告消息,该第一路由通告消息携带第二SIM卡的IPV6前缀和域名系统DNS代理租约,使得在数据卡从第一SIM卡切换到第二SIM卡时,终端设备可以能够快速连接网络设备、恢复上网功能,提高用户体验。

Figure 202111682923

Embodiments of the present application provide a data card switching method and device, the method comprising: when a network device switches a data card from a first SIM card to a second SIM card, and the network type supported by the second SIM card is IPV6, Receive the first route advertisement message from the network device, where the first route advertisement message carries the IPV6 prefix of the second SIM card and the DNS proxy lease of the domain name system, so that when the data card is switched from the first SIM card to the second SIM card, the terminal The device can quickly connect to network devices, restore Internet access, and improve user experience.

Figure 202111682923

Description

数据卡切换方法及装置Data card switching method and device

技术领域technical field

本申请涉及通信技术领域,尤其涉及一种数据卡切换方法及装置。The present application relates to the field of communication technologies, and in particular, to a data card switching method and device.

背景技术Background technique

目前,移动无线路由器(Mobile WIFI,MIFI)可支持多张用户识别卡(SubscriberIdentity Module,SIM),当MIFI路由器从SIM卡1切换到SIM卡2时,SIM卡2需要进行公用数据网络(Public Data Network,PDN)激活,并重启WIFI热点和通用串行总线(UniversalSerial Bus,USB)网络共享,使得连接MIFI路由器的终端设备重新连接网络设备并获取正确的IP地址和DNS Server,但在切换过程中,连接MIFI路由器的终端设备会长时间上不了网,影响用户体验。At present, a mobile wireless router (Mobile WIFI, MIFI) can support multiple SubscriberIdentity Modules (SIM). When the MIFI router switches from SIM card 1 to SIM card 2, SIM card 2 needs to connect to the public data network (Public Data Network). Network, PDN) activation, and restart the WIFI hotspot and Universal Serial Bus (Universal Serial Bus, USB) network sharing, so that the terminal device connected to the MIFI router reconnects the network device and obtains the correct IP address and DNS Server, but during the switching process , the terminal device connected to the MIFI router will not be able to access the Internet for a long time, affecting the user experience.

发明内容SUMMARY OF THE INVENTION

本申请实施例提供了一种数据卡切换方法及装置,能够减少网络设备进行SIM卡时,与该网络设备连接的终端设备恢复上网的时间,从而增强了用户体验。The embodiments of the present application provide a data card switching method and device, which can reduce the time for a terminal device connected to the network device to resume Internet access when the network device performs a SIM card, thereby enhancing user experience.

第一方面,本申请实施例提供一种数据卡切换方法,应用于终端设备,所述方法包括:In a first aspect, an embodiment of the present application provides a data card switching method, which is applied to a terminal device, and the method includes:

在网络设备将数据卡从第一SIM卡切换至第二SIM卡,且所述第二SIM卡支持的网络类型为IPV6时,接收来自所述网络设备的第一路由通告消息,所述第一路由通告消息携带所述第二SIM卡的IPV6前缀和域名系统DNS代理租约;When the network device switches the data card from the first SIM card to the second SIM card, and the network type supported by the second SIM card is IPV6, a first route advertisement message from the network device is received, and the first route advertisement message is received. The route advertisement message carries the IPV6 prefix of the second SIM card and the DNS proxy lease of the domain name system;

基于所述IPV6前缀和DNS代理租约向公共数据网络PDN进行数据通信。Data communication is performed to the public data network PDN based on the IPV6 prefix and the DNS proxy lease.

第二方面,本申请实施例提供一种数据卡切换方法,应用于网络设备,所述方法包括:In a second aspect, an embodiment of the present application provides a data card switching method, which is applied to a network device, and the method includes:

在将数据卡从第一SIM卡切换至第二SIM卡时,获取所述第二SIM卡支持的网络类型;When switching the data card from the first SIM card to the second SIM card, acquiring the network type supported by the second SIM card;

在所述网络类型为IPV6时,向所述终端设备发送第一路由通告消息,所述第一路由通告消息携带所述第二SIM卡的IPV6前缀和域名系统DNS代理租约。When the network type is IPV6, a first route advertisement message is sent to the terminal device, where the first route advertisement message carries the IPV6 prefix of the second SIM card and the DNS proxy lease of the domain name system.

第三方面,本申请实施例提供一种数据卡切换装置,应用于终端设备,所述装置包括:In a third aspect, an embodiment of the present application provides a data card switching apparatus, which is applied to a terminal device, and the apparatus includes:

收发单元,用于在网络设备将数据卡从第一SIM卡切换至第二SIM卡,且所述第二SIM卡支持的网络类型为IPV6时,接收来自所述网络设备的第一路由通告消息,所述第一路由通告消息携带所述第二SIM卡的IPV6前缀和域名系统DNS代理租约;A transceiver unit, configured to receive a first route advertisement message from the network device when the network device switches the data card from the first SIM card to the second SIM card, and the network type supported by the second SIM card is IPV6 , the first route advertisement message carries the IPV6 prefix of the second SIM card and the DNS proxy lease of the domain name system;

所述收发单元,还用于基于所述IPV6前缀和DNS代理租约向公共数据网络PDN进行数据通信。The transceiver unit is further configured to perform data communication to the public data network PDN based on the IPV6 prefix and the DNS proxy lease.

第四方面,本申请实施例提供一种数据卡切换装置,应用于网络设备,所述装置包括:In a fourth aspect, an embodiment of the present application provides a data card switching apparatus, which is applied to network equipment, and the apparatus includes:

处理单元,用于在将数据卡从第一SIM卡切换至第二SIM卡时,获取所述第二SIM卡支持的网络类型;a processing unit, configured to acquire the network type supported by the second SIM card when the data card is switched from the first SIM card to the second SIM card;

收发单元,用于在所述网络类型为IPV6时,向所述终端设备发送第一路由通告消息,所述第一路由通告消息携带所述第二SIM卡的IPV6前缀和域名系统DNS代理租约。A transceiver unit, configured to send a first route advertisement message to the terminal device when the network type is IPV6, where the first route advertisement message carries the IPV6 prefix of the second SIM card and the DNS proxy lease of the domain name system.

第五方面,本申请实施例提供一种芯片,包括处理器、存储器以及存储在所述存储器上的计算机程序或指令,所述处理器执行所述计算机程序或指令以实现上述第一方面或第二方面所述的数据卡切换方法。In a fifth aspect, an embodiment of the present application provides a chip, including a processor, a memory, and a computer program or instruction stored on the memory, where the processor executes the computer program or instruction to implement the first aspect or the first aspect. The data card switching method described in the second aspect.

第六方面,本申请实施例提供一种芯片模组,包括收发组件和芯片,所述芯片包括处理器、存储器以及存储在所述存储器上的计算机程序或指令,所述处理器执行所述计算机程序或指令以实现上述第一方面或第二方面所述的数据卡切换方法。In a sixth aspect, an embodiment of the present application provides a chip module, including a transceiver component and a chip, where the chip includes a processor, a memory, and a computer program or instruction stored on the memory, and the processor executes the computer A program or instruction is used to implement the data card switching method described in the first aspect or the second aspect.

第七方面,本申请实施例提供一种终端设备,所述终端设备包括处理器、存储器、通信接口,以及一个或多个程序,所述一个或多个程序被存储在所述存储器中,并且被配置由所述处理器执行,所述程序包括用于执行上述第一方面或第二方面所述的方法中所描述的部分或全部步骤的指令。In a seventh aspect, an embodiment of the present application provides a terminal device, the terminal device includes a processor, a memory, a communication interface, and one or more programs, the one or more programs are stored in the memory, and Configured to be executed by the processor, the program includes instructions for performing some or all of the steps described in the method of the first or second aspect above.

第八方面,本申请实施例提供一种计算机可读存储介质,所述计算机可读存储介质存储用于电子数据交换的计算机程序,其中,所述计算机程序使得计算机执行上述第一方面或第二方面所述的方法中所描述的部分或全部步骤。In an eighth aspect, an embodiment of the present application provides a computer-readable storage medium, where the computer-readable storage medium stores a computer program for electronic data exchange, wherein the computer program causes a computer to execute the first aspect or the second aspect above Some or all of the steps described in the method of the aspect.

第九方面,本申请实施例提供了一种包含指令的计算机程序产品,当所述计算机程序产品在电子设备上运行时,使得所述电子设备执行上述第一方面或第二方面所述的方法。In a ninth aspect, an embodiment of the present application provides a computer program product containing instructions, when the computer program product is run on an electronic device, the electronic device is made to execute the method described in the first aspect or the second aspect. .

本申请提供的技术方案,在网络设备将数据卡从第一SIM卡切换至第二SIM卡,且第二SIM卡支持的网络类型为IPV6时,接收来自网络设备的第一路由通告消息,该第一路由通告消息携带第二SIM卡的IPV6前缀和域名系统DNS代理租约,使得在数据卡从第一SIM卡切换到第二SIM卡时,终端设备可以能够快速连接网络设备、恢复上网功能,提高用户体验。In the technical solution provided by the present application, when the network device switches the data card from the first SIM card to the second SIM card, and the network type supported by the second SIM card is IPV6, the first route advertisement message from the network device is received, the The first routing advertisement message carries the IPV6 prefix of the second SIM card and the DNS proxy lease of the domain name system, so that when the data card is switched from the first SIM card to the second SIM card, the terminal device can quickly connect to the network device and restore the Internet access function, Improve user experience.

附图说明Description of drawings

为了更清楚地说明本申请实施例中的技术方案,下面将对实施例中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to illustrate the technical solutions in the embodiments of the present application more clearly, the following briefly introduces the accompanying drawings that need to be used in the embodiments. Obviously, the drawings in the following description are some embodiments of the present application. For those of ordinary skill in the art, other drawings can also be obtained from these drawings without any creative effort.

图1是本申请实施例提供的一种数据卡切换方法的流程示意图;1 is a schematic flowchart of a data card switching method provided by an embodiment of the present application;

图2是本申请实施例提供的另一种数据卡切换方法的流程示意图;2 is a schematic flowchart of another data card switching method provided by an embodiment of the present application;

图3是本申请实施例提供的一种数据卡切换装置的功能单元组成框图;3 is a block diagram of functional units of a data card switching device provided by an embodiment of the present application;

图4是本申请实施例提供的一种电子设备的结构示意图。FIG. 4 is a schematic structural diagram of an electronic device provided by an embodiment of the present application.

具体实施方式Detailed ways

下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行描述。The technical solutions in the embodiments of the present application will be described below with reference to the accompanying drawings in the embodiments of the present application.

为了更好地理解本申请实施例的方案,下面先对本申请实施例可能涉及的相关术语和概念进行介绍。In order to better understand the solutions of the embodiments of the present application, related terms and concepts that may be involved in the embodiments of the present application are first introduced below.

用户识别模块(Subscriber Identity Module,SIM),也称为SIM卡,用于实现到移动网络的连接,如实现到全球移动通讯系统(Global System for MobileCommunications,GSM)网络或到通用移动通信系统(Universal MobileTelecommunications System,UMTS)网络的接入。在LTE 3GPP标准所使用的用户识别模块也被称为通用用户识别模块(Universal Subscriber Identity Module,USIM),USIM也是SIM的一种。SIM卡是一种通用集成电路卡(UICC)。A Subscriber Identity Module (SIM), also known as a SIM card, is used to implement a connection to a mobile network, such as to a Global System for Mobile Communications (GSM) network or to a Universal Mobile Communications System (Universal) Mobile Telecommunications System, UMTS) network access. The subscriber identity module used in the LTE 3GPP standard is also called a universal subscriber identity module (Universal Subscriber Identity Module, USIM), and the USIM is also a type of SIM. A SIM card is a Universal Integrated Circuit Card (UICC).

IP地址,是指互联网协议地址又译为网际协议地址(Internet ProtocolAddress,IP Address),IP地址是IP协议提供的一种统一的地址格式,它为互联网上的每一个网络和每一台主机分配一个逻辑地址,以此来屏蔽物理地址的差异。在Internet上,每一个节点都依靠唯一的IP地址互相区分和相互联系。IP地址包括两种类型:IPV4和IPV6。IPV4是一个32位二进制数的地址,由4个8位字段组成,每个字段之间用点号隔开,用于标识TCP/IP宿主机。每个IP地址都包含两部分:网络ID和主机ID。相比较IPV4,IPV6将地址长度从32位增加到了128为,其可支持更多的地址需求。其中网络ID标识在同一个物理网络上的所有宿主机,主机ID标识该物理网络上的每一个宿主机,于是整个Internet上的每个计算机都依靠各自唯一的IP地址来标识。IP address refers to the Internet Protocol address and is translated into Internet Protocol Address (IP Address). IP address is a unified address format provided by the IP protocol. It is assigned to each network and each host on the Internet. A logical address to mask differences in physical addresses. On the Internet, each node distinguishes and communicates with each other by a unique IP address. There are two types of IP addresses: IPV4 and IPV6. IPV4 is a 32-bit binary number address, which consists of 4 8-bit fields, each of which is separated by a dot, which is used to identify the TCP/IP host. Every IP address consists of two parts: the network ID and the host ID. Compared with IPV4, IPV6 increases the address length from 32 bits to 128 bits, which can support more address requirements. The network ID identifies all hosts on the same physical network, and the host ID identifies each host on the physical network, so each computer on the entire Internet is identified by its own unique IP address.

域名系统(Domain Name System,DNS)是因特网上作为域名和IP地址相互映射的一个分布式数据库,能够使用户更方便的访问互联网,而不用去记住能够被机器直接读取的IP数串。将域名映射为IP地址的过程就称为“域名解析”。域名解析需要由专门的域名解析服务器来完成,DNS就是进行域名解析的服务器。当用户在应用程序中输入DNS名称(域名)时,DNS服务器可以将此名称解析为与之相对应的IP地址。因而,用户在上网时输入的域名,却是通过该域名指向的IP地址才能最终上网。Domain Name System (DNS) is a distributed database on the Internet that maps domain names and IP addresses to each other, which enables users to access the Internet more conveniently without having to remember IP strings that can be directly read by machines. The process of mapping a domain name to an IP address is called "domain name resolution". Domain name resolution needs to be completed by a dedicated domain name resolution server, and DNS is the server that performs domain name resolution. When a user enters a DNS name (domain name) in the application, the DNS server can resolve this name to its corresponding IP address. Therefore, the domain name entered by the user when surfing the Internet can be finally accessed through the IP address pointed to by the domain name.

终端设备,又称之为用户设备(User Equipment,UE),是一种向用户提供语音和/或数据连通性的设备,如具有无线连接功能的手持式设备、车载设备等。常见的终端设备例如包括:手机、平板电脑、笔记本电脑、掌上电脑、移动互联网设备(Mobile InternetDevice,MID)、可穿戴设备、智能手环、计步器、动态影像专家压缩标准音频层面3(MovingPicture Experts Group Audio Layer III,MP3播放器)、动态影像专家压缩标准音频层面4(Moving Picture Experts Group Audio Layer IV,MP4)播放器、个人数字助理(Personal Digital Assistant,PDA)和膝上型便携计算机等。A terminal device, also called user equipment (User Equipment, UE), is a device that provides voice and/or data connectivity to a user, such as a handheld device with a wireless connection function, a vehicle-mounted device, and the like. Common terminal devices include, for example, mobile phones, tablet computers, notebook computers, PDAs, Mobile Internet Devices (MIDs), wearable devices, smart bracelets, pedometers, and moving image experts. Experts Group Audio Layer III, MP3 players), Moving Picture Experts Group Audio Layer IV (MP4) players, Personal Digital Assistants (PDAs) and laptop computers, etc. .

网络设备,也可称之为路由设备,是一种部署在无线接入网用以提供无线路由功能的装置,例如终端设备与PDN之间的任一路由设备或接入设备,如MIFI路由器。A network device, also referred to as a routing device, is a device deployed in a wireless access network to provide wireless routing functions, such as any routing device or access device between a terminal device and a PDN, such as a MIFI router.

目前MIFI可支持多张SIM卡,终端设备可通过SIM卡1作为数据卡激活PDN,并且通过WIFI热点或者USB连接上MIFI来可以进行上网,但当SIM卡1由于一些原因导致不能上网(比如数据流量用完等),这时需要切换数据卡到SIM卡2,再进行切换时需要对SIM卡2做PDN激活、重启WIFI热点和USB网络共享。但是SIM卡2做完PDN激活后,外网网卡的信息(如IP地址、DNS Server等)会发生变化,终端设备需要重新连接MIFI并获取正确的外网信息。因此在SIM卡的切换过程中,连接MIFI的终端设备会长时间上不了网,影响用户体验。At present, MIFI can support multiple SIM cards. The terminal device can activate PDN through SIM card 1 as a data card, and connect to MIFI through WIFI hotspot or USB to access the Internet. However, when SIM card 1 cannot access the Internet due to some reasons (such as data When the data is used up, etc.), you need to switch the data card to SIM card 2, and then you need to do PDN activation on SIM card 2, restart the WIFI hotspot and USB network sharing. However, after the SIM card 2 is activated by PDN, the information of the external network card (such as IP address, DNS Server, etc.) will change, and the terminal device needs to reconnect to the MIFI and obtain the correct external network information. Therefore, in the process of switching the SIM card, the terminal device connected to the MIFI will not be able to access the Internet for a long time, which affects the user experience.

为了解决上述问题,本申请提出了一种数据卡切换方法,在终端设备从第一SIM卡切换到第二SIM卡,且第二SIM卡所支持的网络类型为IPV6时,接收网络设备发送的路由通告消息以获取第二SIM卡的IPV6前缀和域名系统DNS代理租约,使得终端设备能够快速连接网络、恢复上网功能,提高用户体验。In order to solve the above problems, the present application proposes a data card switching method. When the terminal device switches from the first SIM card to the second SIM card, and the network type supported by the second SIM card is IPV6, it receives the data sent by the network device. The route advertisement message is used to obtain the IPV6 prefix of the second SIM card and the DNS proxy lease of the domain name system, so that the terminal device can quickly connect to the network, restore the Internet access function, and improve the user experience.

为了使本技术领域的人员更好地理解本申请方案,下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。In order to make those skilled in the art better understand the solutions of the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only It is a part of the embodiments of the present application, but not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present application.

请参阅图1,图1为本申请实施例提供的一种数据卡切换方法流程示意图。如图1所示,该方法包括如下步骤。Please refer to FIG. 1 , which is a schematic flowchart of a data card switching method according to an embodiment of the present application. As shown in Figure 1, the method includes the following steps.

S110、在将数据卡从第一SIM卡切换至第二SIM卡时,网络设备获取所述第二SIM卡支持的网络类型。S110. When switching the data card from the first SIM card to the second SIM card, the network device acquires the network type supported by the second SIM card.

其中,所述网络设备可以是与终端设备连接的MIFI路由器。在MIFI路由器使用第一SIM卡作为数据卡与PDN进行数据通信,但第一SIM卡由于一些原因导致不能再作为数据卡进行上网(比如数据流量用完等)时,MIFI路由器会将数据卡从第一SIM卡切换至第二SIM卡。由于在数据卡的切换过程中,需要对第二SIM卡先进行PDN激活后再重新连接MIFI来获取正确上网的IP地址和DNS代理服务,其耗时较长,从而使得终端设备长时间无法上网。因此,在本申请实施例中,当网络设备将数据卡从第一SIM卡切换至第二SIM卡时,MIFI可获取第二SIM卡所支持的网络类型,进而根据其支持的网络类型确定获取该终端设备上网参数的措施,减少在网络设备进行SIM卡时恢复上网的时间,提高用户体验。Wherein, the network device may be a MIFI router connected to the terminal device. When the MIFI router uses the first SIM card as the data card to communicate with the PDN, but the first SIM card can no longer be used as the data card to access the Internet due to some reasons (for example, when the data traffic is used up), the MIFI router will transfer the data card from the data card to the PDN. The first SIM card is switched to the second SIM card. During the switching process of the data card, it is necessary to activate the PDN on the second SIM card and then reconnect to the MIFI to obtain the correct IP address and DNS proxy service for Internet access, which takes a long time and makes the terminal device unable to access the Internet for a long time. . Therefore, in this embodiment of the present application, when the network device switches the data card from the first SIM card to the second SIM card, the MIFI can obtain the network type supported by the second SIM card, and then determine and obtain the network type supported by the second SIM card. The measures of the terminal device's Internet access parameters reduce the time for recovering the Internet access when the network device performs the SIM card, and improve the user experience.

可选的,所述方法还包括:在获取所述第二SIM卡支持的网络类型之前,断开与所述第一SIM卡的连接,建立与所述第二SIM卡的连接。Optionally, the method further includes: before acquiring the network type supported by the second SIM card, disconnecting the connection with the first SIM card and establishing a connection with the second SIM card.

其中,当网络设备使用第一SIM卡作为数据卡进行数据通信时,第一SIM卡需要进行PDN激活,即建立第一SIM卡与PDN之间的连接,获取第一SIM卡对应的上网参数(如子网掩码、IP地址、DNS代理租约,网关、运营商等),以使得第一SIM卡使用其对应的上网参数与PDN进行数据通信。Wherein, when the network device uses the first SIM card as a data card to perform data communication, the first SIM card needs to perform PDN activation, that is, establish a connection between the first SIM card and the PDN, and obtain the Internet access parameters corresponding to the first SIM card ( Such as subnet mask, IP address, DNS proxy lease, gateway, operator, etc.), so that the first SIM card uses its corresponding Internet access parameters to perform data communication with the PDN.

具体的,当MIFI路由器将数据卡从第一SIM卡切换到第二SIM卡时,外网网关会发生变化,第一SIM卡对应的上网参数可能不适用于第二SIM卡。因此,本申请在将数据卡从第一SIM卡切换至第二SIM卡时,MIFI路由器可对第一SIM卡进行去PDN激活操作,以断开与第一SIM卡连接,并注销终端设备存储的第一SIM卡对应的上网参数。同时MIFI路由器对第二SIM卡进行PDN激活操作,以建立与第二SIM卡的连接,从而将第二SIN卡对应的上网参数发送给终端设备进行更新。Specifically, when the MIFI router switches the data card from the first SIM card to the second SIM card, the external network gateway will change, and the Internet access parameters corresponding to the first SIM card may not be applicable to the second SIM card. Therefore, when switching the data card from the first SIM card to the second SIM card in the present application, the MIFI router can perform a de-PDN activation operation on the first SIM card to disconnect the connection with the first SIM card and cancel the terminal device storage The Internet access parameters corresponding to the first SIM card. At the same time, the MIFI router performs a PDN activation operation on the second SIM card to establish a connection with the second SIM card, thereby sending the Internet access parameters corresponding to the second SIN card to the terminal device for updating.

进一步地,所述方法还包括:更新NAT转换配置参数和路由参数。其中,在将数据卡从第一SIM卡切换到第二SIM卡时,由于外网的网卡会发生变化,网络设备进行数据通信时的NAT转换配置参数和路由参数也会发生变化。因此本申请在进行数据卡切换时,MIFI路由器可更新数据卡切换后的所使用的NAT转换配置参数和路由参数,以使得终端设备可以恢复上网。Further, the method further includes: updating NAT translation configuration parameters and routing parameters. Wherein, when the data card is switched from the first SIM card to the second SIM card, since the network card of the external network will change, the NAT conversion configuration parameters and routing parameters when the network device performs data communication will also change. Therefore, in the present application, when the data card is switched, the MIFI router can update the NAT translation configuration parameters and routing parameters used after the data card switch, so that the terminal device can resume the Internet access.

S120、在所述网络类型为IPV6时,网络设备向终端设备发送第一路由通告消息,所述第一路由通告消息携带所述第二SIM卡的IPV6前缀和域名系统DNS代理租约。S120. When the network type is IPV6, the network device sends a first route advertisement message to the terminal device, where the first route advertisement message carries the IPV6 prefix of the second SIM card and the DNS proxy lease of the domain name system.

其中,当第二SIM卡所支持的网络类型为IPV6时,由于IPV6使用Global地址,在外网网卡发生变化,其分配的地址也会发生变化,IPV6使用Global地址和DNS服务需要更新。而由于MIFI路由器将数据卡从第一SIM卡切换至第二SIM卡的过程终端设备无法获知,因此MIFI路由器在确定第二SIM卡所支持的网络类型为IPV6时,就向终端设备发送第一路由通告(Router Advertisement,RA)消息,该第一路由通告消息可携带第二SIM卡对应外网网卡的IPV6前缀和代理租约,且其生命周期lifetime设置为有效值。因此终端设备接收到该第一路由通告消息后会更新终端设备上第二SIM卡的IPV6前缀和域名系统DNS代理租约。Wherein, when the network type supported by the second SIM card is IPV6, since IPV6 uses the Global address, the network card in the external network changes, and the allocated address will also change. IPV6 needs to update the Global address and DNS service. Since the terminal device cannot know the process of switching the data card from the first SIM card to the second SIM card by the MIFI router, the MIFI router sends the first SIM card to the terminal device when it determines that the network type supported by the second SIM card is IPV6. A route advertisement (Router Advertisement, RA) message, the first route advertisement message can carry the IPV6 prefix and the proxy lease of the second SIM card corresponding to the external network card, and the lifetime is set to a valid value. Therefore, after receiving the first route advertisement message, the terminal device will update the IPV6 prefix of the second SIM card on the terminal device and the DNS proxy lease of the domain name system.

可选的,在向所述终端设备发送第一路由通告消息之前,所述方法还包括:向所述终端设备发送第二路由通告消息,所述第二路由通告消息用于指示所述第一SIM卡对应的IPV6前缀和DNS代理租约无效。Optionally, before sending the first route advertisement message to the terminal device, the method further includes: sending a second route advertisement message to the terminal device, where the second route advertisement message is used to indicate the first route advertisement message. The IPV6 prefix and DNS proxy lease corresponding to the SIM card are invalid.

在本申请实施例中,当MIFI路由器将数据卡从第一SIM卡切换至第二SIM卡后,可先向终端设备发送第二路由通告消息,该第二路由通告消息可携带第一SIM卡对应的外网网卡的IPV6前缀和代理租约,且设置其生命周期lifetime为0。In the embodiment of the present application, after the MIFI router switches the data card from the first SIM card to the second SIM card, it can first send a second routing advertisement message to the terminal device, and the second routing advertisement message can carry the first SIM card IPV6 prefix and proxy lease of the corresponding external network card, and set its lifetime to 0.

相应的,终端设备接收来自所述网络设备的第二路由通告消息,由于其lifetime为0,因此终端设备在接收到该第二路由通告消息后,会注销第二路由通告消息携带的IPV6前缀和代理租约,即注销第一SIM卡对应的IPV6前缀和DNS代理租约。Correspondingly, when the terminal device receives the second route advertisement message from the network device, since its lifetime is 0, the terminal device will cancel the IPV6 prefix and the IPV6 prefix carried in the second route advertisement message after receiving the second route advertisement message. Proxy lease, that is, cancel the IPV6 prefix and DNS proxy lease corresponding to the first SIM card.

S130、终端设备接收来自所述网络设备的第一路由通告消息,并基于所述IPV6前缀和DNS代理租约向公共数据网络PDN进行数据通信。S130. The terminal device receives the first route advertisement message from the network device, and performs data communication with the public data network PDN based on the IPV6 prefix and the DNS proxy lease.

具体地,终端设备接收到MIFI路由器发送的第一路由通告消息后,可将其携带的第二SIM卡的IPV6前缀和DNS代理租作为终端设备的上网的IPV6前缀以及DNS代理租约。在终端设备需要与PDN进行数据通信时,终端设备可使用更新后的IPV6前缀以及DNS代理租约向MIFI路由器发送数据包。MIFI路由器接收到该数据包后,自己正常处理NAT转换、路由转发,实现与PDN的数据通信,从而使得终端设备可以快速恢复上网。Specifically, after receiving the first route advertisement message sent by the MIFI router, the terminal device can lease the IPV6 prefix and DNS proxy of the second SIM card carried by the terminal device as the IPV6 prefix and DNS proxy lease of the terminal device for accessing the Internet. When the terminal device needs to perform data communication with the PDN, the terminal device can use the updated IPV6 prefix and the DNS proxy lease to send data packets to the MIFI router. After the MIFI router receives the data packet, it normally processes NAT translation and routing forwarding to realize data communication with the PDN, so that the terminal device can quickly resume the Internet access.

可以看出,本申请提出了一种数据卡切换方法,在网络设备将数据卡从第一SIM卡切换至第二SIM且第二SIM卡支持的网络类型为IPV6时,接收来自网络设备的第一路由通告消息,该路由通告消息携带第二SIM卡的IPV6前缀和域名系统DNS代理租约,从而在数据卡从第一SIM卡切换到第二SIM卡时,使得终端设备可以能够快速连接网络设备、恢复上网功能,提高用户体验。It can be seen that the present application proposes a data card switching method. When the network device switches the data card from the first SIM card to the second SIM and the network type supported by the second SIM card is IPV6, the first SIM card is received from the network device. A route advertisement message, which carries the IPV6 prefix of the second SIM card and the DNS proxy lease of the domain name system, so that the terminal device can quickly connect to the network device when the data card is switched from the first SIM card to the second SIM card , restore the Internet access function, improve the user experience.

请参阅图2,图2为本申请实施例提供的另一种数据卡切换方法流程示意图。如图2所示,该方法包括如下步骤。Please refer to FIG. 2 , which is a schematic flowchart of another data card switching method provided by an embodiment of the present application. As shown in Figure 2, the method includes the following steps.

S210、在将数据卡从所述第一SIM卡切换至所述第二SIM卡时,网络设备获取所述第二SIM卡支持的网络类型。S210. When switching the data card from the first SIM card to the second SIM card, the network device acquires the network type supported by the second SIM card.

S220、在所述网络类型为IPV6时,网络设备向终端设备发送第一路由通告消息,所述第一路由通告消息携带所述第二SIM卡的IPV6前缀和域名系统DNS代理租约。S220. When the network type is IPV6, the network device sends a first route advertisement message to the terminal device, where the first route advertisement message carries the IPV6 prefix of the second SIM card and the DNS proxy lease of the domain name system.

S230、在所述网络类型为IPV4时,终端设备接收来自所述网络设备的第一路由通告消息,并基于所述IPV6前缀和DNS代理租约向公共数据网络PDN进行数据通信。S230. When the network type is IPV4, the terminal device receives the first route advertisement message from the network device, and performs data communication with the public data network PDN based on the IPV6 prefix and the DNS proxy lease.

其中,上述S210-S230的具体实现方式可参照上述图1所述的具体实现方式,在此不再赘述。The specific implementation manner of the foregoing S210-S230 may refer to the specific implementation manner described in the foregoing FIG. 1 , and details are not described herein again.

S240、在所述网络类型为IPV4时,终端设备保持第一信息不变,并基于所述第一信息向所述PDN进行数据通信,所述第一信息包括所述终端设备连接所述网络设备所需的至少一个参数。S240. When the network type is IPV4, the terminal device keeps the first information unchanged, and performs data communication with the PDN based on the first information, where the first information includes that the terminal device is connected to the network device at least one parameter required.

其中,由于IPV4的IP地址为局域网的IP地址,当终端设备未发生移动或者其未移动至该局域网外时,终端设备进行上网使用的IP地址不变。因此,在本申请实施例中,当第二SIM卡所支持的网络类型为IPV4时,终端设备上网的参数不变。终端设备可使用之前的上网参数发送数据包,接收到该数据包的MIFI路由器自己正常处理NAT转换、路由转发,实现与PDN的数据通信,从而使得终端设备可以快速恢复上网。Wherein, since the IP address of the IPV4 is the IP address of the local area network, when the terminal device does not move or does not move outside the local area network, the IP address used by the terminal device to access the Internet remains unchanged. Therefore, in this embodiment of the present application, when the network type supported by the second SIM card is IPV4, the parameters for the terminal device to access the Internet remain unchanged. The terminal device can use the previous Internet access parameters to send data packets, and the MIFI router that receives the data packets normally processes NAT translation and routing forwarding by itself to realize data communication with the PDN, so that the terminal device can quickly resume the Internet access.

在本申请实施例中,在网络设备将数据卡从第一SIM卡切换到第二SIM卡时,若第二SIM卡所支持的网络类型为IPV4,则直接使用终端设备之前上网的参数与PDN进行数据通信,减少终端设备快速恢复上网的时间;若第二SIM卡所支持的网络类型为IPV6,则接收网络设备发送的第一路由通告消息获取更新的IPV6前缀和DNS代理租约,使得终端设备能够快速连接网络设备、恢复上网功能,提高用户体验。In the embodiment of the present application, when the network device switches the data card from the first SIM card to the second SIM card, if the network type supported by the second SIM card is IPV4, the parameters and PDN of the terminal device to surf the Internet directly are used. Carry out data communication to reduce the time for the terminal device to quickly restore the Internet; if the network type supported by the second SIM card is IPV6, then receive the first route advertisement message sent by the network device to obtain the updated IPV6 prefix and DNS proxy lease, so that the terminal device It can quickly connect network devices, restore Internet access, and improve user experience.

上述主要从方法侧执行过程的角度对本申请实施例的方案进行了介绍。可以理解的是,网络设备为了实现上述功能,其包含了执行各个功能相应的硬件结构和/或软件模块。本领域技术人员应该很容易意识到,结合本文中所提供的实施例描述的各示例的单元及算法步骤,本申请能够以硬件或硬件和计算机软件的结合形式来实现。某个功能究竟以硬件还是计算机软件驱动硬件的方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。The foregoing mainly introduces the solutions of the embodiments of the present application from the perspective of the method-side execution process. It can be understood that, in order to implement the above functions, the network device includes corresponding hardware structures and/or software modules for performing each function. Those skilled in the art should easily realize that the present application can be implemented in hardware or in the form of a combination of hardware and computer software, in combination with the units and algorithm steps of each example described in the embodiments provided herein. Whether a function is performed by hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Skilled artisans may implement the described functionality using different methods for each particular application, but such implementations should not be considered beyond the scope of this application.

请参阅图3,图3是本申请实施例提供的一种数据卡切换装置300的功能单元组成框图,该装置300可应用于终端设备,该装置也可以应用于网络设备。所述装置300包括:收发单元310和处理单元320。Please refer to FIG. 3 . FIG. 3 is a block diagram of functional units of a data card switching apparatus 300 according to an embodiment of the present application. The apparatus 300 can be applied to terminal equipment, and the apparatus can also be applied to network equipment. The apparatus 300 includes: a transceiver unit 310 and a processing unit 320 .

在一种可能的实现方式中,装置300用于执行上述指示方法中终端设备对应的各个流程和步骤。In a possible implementation manner, the apparatus 300 is configured to execute each process and step corresponding to the terminal device in the above-mentioned instruction method.

所述收发单元310,用于在网络设备将数据卡从第一SIM卡切换至第二SIM卡,且所述第二SIM卡支持的网络类型为IPV6时,接收来自所述网络设备的第一路由通告消息,所述第一路由通告消息携带所述第二SIM卡的IPV6前缀和域名系统DNS代理租约;The transceiver unit 310 is configured to receive the first SIM card from the network device when the network device switches the data card from the first SIM card to the second SIM card, and the network type supported by the second SIM card is IPV6. a route advertisement message, where the first route advertisement message carries the IPV6 prefix of the second SIM card and the DNS proxy lease of the Domain Name System;

所述收发单元310,还用于基于所述IPV6前缀和DNS代理租约向公共数据网络PDN进行数据通信。The transceiver unit 310 is further configured to perform data communication to the public data network PDN based on the IPV6 prefix and the DNS proxy lease.

可选的,所述处理单元320,还用于在所述网络类型为IPV4时,保持第一信息不变,所述第一信息包括所述终端设备连接所述网络设备所需的至少一个参数;Optionally, the processing unit 320 is further configured to keep the first information unchanged when the network type is IPV4, where the first information includes at least one parameter required by the terminal device to connect to the network device ;

所述收发单元310,还用于基于所述第一信息向公共数据网络PDN进行数据通信。The transceiver unit 310 is further configured to perform data communication to the public data network PDN based on the first information.

可选的,在接收来自网络设备的第一路由通告消息之前,所述收发单元310还用于:接收来自所述网络设备的第二路由通告消息,所述第二路由通告消息用于指示所述第一SIM卡对应的IPV6前缀和DNS代理租约无效;Optionally, before receiving the first route advertisement message from the network device, the transceiver unit 310 is further configured to: receive a second route advertisement message from the network device, where the second route advertisement message is used to indicate the The IPV6 prefix and DNS proxy lease corresponding to the first SIM card are invalid;

所述处理单元320还用于:基于所述第二路由通告消息,注销所述第一SIM卡对应的IPV6前缀和DNS代理租约。The processing unit 320 is further configured to: based on the second route advertisement message, cancel the IPV6 prefix and the DNS proxy lease corresponding to the first SIM card.

在另一种可能的实现方式中,装置300用于执行上述指示方法中网络设备对应的各个流程和步骤。In another possible implementation manner, the apparatus 300 is configured to execute each process and step corresponding to the network device in the above-mentioned instruction method.

所述处理单元320,用于在将数据卡从第一SIM卡切换至第二SIM卡时,获取所述第二SIM卡支持的网络类型;The processing unit 320 is configured to acquire the network type supported by the second SIM card when the data card is switched from the first SIM card to the second SIM card;

所述收发单元310,用于在所述网络类型为IPV6时,向所述终端设备发送第一路由通告消息,所述第一路由通告消息携带所述第二SIM卡的IPV6前缀和域名系统DNS代理租约。The transceiver unit 310 is configured to send a first routing advertisement message to the terminal device when the network type is IPV6, where the first routing advertisement message carries the IPV6 prefix of the second SIM card and the domain name system DNS Agency lease.

可选的,在向所述终端设备发送第一路由通告消息之前,所述收发单元310还用于:向所述终端设备发送第二路由通告消息,所述第二路由通告消息用于指示所述第一SIM卡对应的IPV6前缀和DNS代理租约无效。Optionally, before sending the first route advertisement message to the terminal device, the transceiver unit 310 is further configured to: send a second route advertisement message to the terminal device, where the second route advertisement message is used to indicate the The IPV6 prefix and DNS proxy lease corresponding to the first SIM card are invalid.

可选的,所述处理单元320还用于:在获取所述第二SIM卡支持的网络类型之前,断开与所述第一SIM卡的连接,建立与所述第二SIM卡的连接。Optionally, the processing unit 320 is further configured to: disconnect the connection with the first SIM card and establish a connection with the second SIM card before acquiring the network type supported by the second SIM card.

应理解,这里的装置300以功能单元的形式体现。这里的术语“单元”可以指应用特有集成电路(application specific integrated circuit,ASIC)、电子电路、用于执行一个或多个软件或固件程序的处理器(例如共享处理器、专有处理器或组处理器等)和存储器、合并逻辑电路和/或其它支持所描述的功能的合适组件。在一个可选例子中,本领域技术人员可以理解,装置300可以具体为上述实施例中的终端设备,装置300可以用于执行上述方法实施例中与终端设备对应的各个流程和/或步骤,为避免重复,在此不再赘述。It should be understood that the apparatus 300 here is embodied in the form of functional units. The term "unit" herein may refer to an application specific integrated circuit (ASIC), an electronic circuit, a processor for executing one or more software or firmware programs (eg, a shared processor, a proprietary processor, or a group of processors, etc.) and memory, merge logic, and/or other suitable components to support the described functions. In an optional example, those skilled in the art can understand that the apparatus 300 may be specifically the terminal device in the foregoing embodiment, and the apparatus 300 may be configured to execute each process and/or step corresponding to the terminal device in the foregoing method embodiment, To avoid repetition, details are not repeated here.

上述各个方案的装置300具有实现上述方法中终端设备执行的相应步骤的功能;所述功能可以通过硬件实现,也可以通过硬件执行相应的软件实现。所述硬件或软件包括一个或多个与上述功能相对应的模块;例如收发单元310可以由发送机和接收机替代、处理单元320可以由处理器代替,分别执行各个方法实施例中的收发操作以及相关的处理操作。The apparatus 300 of each of the above solutions has the function of implementing the corresponding steps performed by the terminal device in the above method; the function may be implemented by hardware, or by executing corresponding software by hardware. The hardware or software includes one or more modules corresponding to the above functions; for example, the transceiver unit 310 may be replaced by a transmitter and a receiver, and the processing unit 320 may be replaced by a processor, which respectively perform the transceiver operations in each method embodiment. and related processing operations.

在本申请的实施例,装置300也可以是芯片或者芯片系统,例如:片上系统(systemon chip,SoC)。对应的,检测单元可以是该芯片的检测电路,在此不做限定。In this embodiment of the present application, the apparatus 300 may also be a chip or a chip system, such as a system on chip (system on chip, SoC). Correspondingly, the detection unit may be a detection circuit of the chip, which is not limited herein.

请参阅图4,图4是本申请实施例提供的一种终端设备的结构示意图,该终端设备包括:一个或多个处理器、一个或多个存储器、一个或多个通信接口,以及一个或多个程序;所述一个或多个程序被存储在所述存储器中,并且被配置由所述一个或多个处理器执行。Please refer to FIG. 4. FIG. 4 is a schematic structural diagram of a terminal device provided by an embodiment of the present application. The terminal device includes: one or more processors, one or more memories, one or more communication interfaces, and one or more a plurality of programs; the one or more programs stored in the memory and configured to be executed by the one or more processors.

在一种可能的实现方式中,该电子设备为终端设备,上述程序包括用于执行以下步骤的指令:In a possible implementation manner, the electronic device is a terminal device, and the above program includes instructions for executing the following steps:

在网络设备将数据卡从第一SIM卡切换至第二SIM卡,且所述第二SIM卡支持的网络类型为IPV6时,接收来自所述网络设备的第一路由通告消息,所述第一路由通告消息携带所述第二SIM卡的IPV6前缀和域名系统DNS代理租约;When the network device switches the data card from the first SIM card to the second SIM card, and the network type supported by the second SIM card is IPV6, a first route advertisement message from the network device is received, and the first route advertisement message is received. The route advertisement message carries the IPV6 prefix of the second SIM card and the DNS proxy lease of the domain name system;

基于所述IPV6前缀和DNS代理租约向公共数据网络PDN进行数据通信。Data communication is performed to the public data network PDN based on the IPV6 prefix and the DNS proxy lease.

在另一种可能的实现方式中,该电子设备为网络设备,上述程序包括用于执行以下步骤的指令:In another possible implementation manner, the electronic device is a network device, and the above program includes instructions for executing the following steps:

在将数据卡从第一SIM卡切换至第二SIM卡时,获取所述第二SIM卡支持的网络类型;When switching the data card from the first SIM card to the second SIM card, acquiring the network type supported by the second SIM card;

在所述网络类型为IPV6时,向所述终端设备发送第一路由通告消息,所述第一路由通告消息携带所述第二SIM卡的IPV6前缀和域名系统DNS代理租约。When the network type is IPV6, a first route advertisement message is sent to the terminal device, where the first route advertisement message carries the IPV6 prefix of the second SIM card and the DNS proxy lease of the domain name system.

其中,上述方法实施例涉及的各场景的所有相关内容均可以援引到对应功能模块的功能描述,在此不再赘述。Wherein, all the relevant contents of the scenarios involved in the above method embodiments can be cited in the functional description of the corresponding functional module, which will not be repeated here.

应理解,上述存储器可以包括只读存储器和随机存取存储器,并向处理器提供指令和数据。存储器的一部分还可以包括非易失性随机存取存储器。例如,存储器还可以存储设备类型的信息。It should be understood that the memory described above may include read-only memory and random access memory and provide instructions and data to the processor. A portion of the memory may also include non-volatile random access memory. For example, the memory may also store device type information.

在本申请实施例中,上述装置的处理器可以是中央处理单元(CentralProcessing Unit,CPU),该处理器还可以是其他通用处理器、数字信号处理器(DSP)、专用集成电路(ASIC)、现场可编程门阵列(FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件等。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。In this embodiment of the present application, the processor of the above device may be a central processing unit (Central Processing Unit, CPU), and the processor may also be other general-purpose processors, digital signal processors (DSPs), application specific integrated circuits (ASICs), Field Programmable Gate Arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.

应理解,本申请实施例中涉及的“至少一个”是指一个或者多个,“多个”是指两个或两个以上。“和/或”,描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B的情况,其中A,B可以是单数或者复数。字符“/”一般表示前后关联对象是一种“或”的关系。“以下至少一项(个)”或其类似表达,是指的这些项中的任意组合,包括单项(个)或复数项(个)的任意组合。例如,a,b,或c中的至少一项(个),可以表示:a,b,c,a-b,a-c,b-c,或a-b-c,其中a,b,c可以是单个,也可以是多个。It should be understood that "at least one" referred to in the embodiments of the present application refers to one or more, and "a plurality" refers to two or more. "And/or", which describes the relationship of the associated objects, indicates that there can be three kinds of relationships, for example, A and/or B, it can indicate that A exists alone, A and B exist at the same time, and B exists alone, where A, B can be singular or plural. The character "/" generally indicates that the associated objects are an "or" relationship. "At least one item(s) below" or similar expressions thereof refer to any combination of these items, including any combination of single item(s) or plural items(s). For example, at least one item (a) of a, b, or c can represent: a, b, c, a-b, a-c, b-c, or a-b-c, where a, b, c may be single or multiple .

以及,除非有相反的说明,本申请实施例提及“第一”、“第二”等序数词是用于对多个对象进行区分,不用于限定多个对象的顺序、时序、优先级或者重要程度。例如,第一信息和第二信息,只是为了区分不同的信息,而并不是表示这两种信息的内容、优先级、发送顺序或者重要程度等的不同。And, unless stated to the contrary, the ordinal numbers such as “first” and “second” mentioned in the embodiments of the present application are used to distinguish multiple objects, and are not used to limit the order, sequence, priority or priority of multiple objects. Importance. For example, the first information and the second information are only for distinguishing different information, and do not indicate the difference in content, priority, transmission order, or importance of the two kinds of information.

在实现过程中,上述方法的各步骤可以通过处理器中的硬件的集成逻辑电路或者软件形式的指令完成。结合本申请实施例所公开的方法的步骤可以直接体现为硬件处理器执行完成,或者用处理器中的硬件及软件单元组合执行完成。软件单元可以位于随机存储器,闪存、只读存储器,可编程只读存储器或者电可擦写可编程存储器、寄存器等本领域成熟的存储介质中。该存储介质位于存储器,处理器执行存储器中的指令,结合其硬件完成上述方法的步骤。为避免重复,这里不再详细描述。In the implementation process, each step of the above-mentioned method can be completed by a hardware integrated logic circuit in a processor or an instruction in the form of software. The steps of the method disclosed in combination with the embodiments of the present application may be directly embodied as executed by a hardware processor, or executed by a combination of hardware and software units in the processor. The software unit may be located in random access memory, flash memory, read-only memory, programmable read-only memory or electrically erasable programmable memory, registers and other storage media mature in the art. The storage medium is located in the memory, and the processor executes the instructions in the memory, and completes the steps of the above method in combination with its hardware. To avoid repetition, detailed description is omitted here.

本申请实施例还提供一种芯片,包括处理器、存储器以及存储在所述存储器上的计算机程序或指令,所述处理器执行所述计算机程序或指令以实现上述方法实施例中记载的任一所述的数据卡切换方法。An embodiment of the present application further provides a chip, including a processor, a memory, and a computer program or instruction stored on the memory, where the processor executes the computer program or instruction to implement any one of the method embodiments described above The described data card switching method.

本申请实施例还提供一种芯片模组,包括收发组件和芯片,所述芯片包括处理器、存储器以及存储在所述存储器上的计算机程序或指令,所述处理器执行所述计算机程序或指令以实现上述方法实施例中记载的任一方所述的数据卡切换方法。An embodiment of the present application further provides a chip module, including a transceiver component and a chip, the chip includes a processor, a memory, and a computer program or instruction stored on the memory, and the processor executes the computer program or instruction In order to realize the data card switching method described in any one of the above method embodiments.

本申请实施例还提供一种计算机存储介质,其中,该计算机存储介质存储用于电子数据交换的计算机程序,该计算机程序使得计算机执行如上述方法实施例中记载的任一方法的部分或全部步骤。Embodiments of the present application further provide a computer storage medium, wherein the computer storage medium stores a computer program for electronic data exchange, and the computer program causes the computer to execute part or all of the steps of any method described in the above method embodiments .

本申请实施例还提供一种包含指令的计算机程序产品,当所述计算机程序产品在电子设备上运行时,使得所述电子设备执行上述方法实施例中记载的任一方法的部分或全部步骤。Embodiments of the present application further provide a computer program product including instructions, which, when the computer program product runs on an electronic device, enables the electronic device to execute some or all of the steps of any method described in the above method embodiments.

需要说明的是,对于前述的各方法实施例,为了简单描述,故将其都表述为一系列的动作组合,但是本领域技术人员应该知悉,本申请并不受所描述的动作顺序的限制,因为依据本申请,某些步骤可以采用其他顺序或者同时进行。其次,本领域技术人员也应该知悉,说明书中所描述的实施例均属于优选实施例,所涉及的动作和模块并不一定是本申请所必须的。It should be noted that, for the sake of simple description, the foregoing method embodiments are all expressed as a series of action combinations, but those skilled in the art should know that the present application is not limited by the described action sequence. Because in accordance with the present application, certain steps may be performed in other orders or concurrently. Secondly, those skilled in the art should also know that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present application.

在上述实施例中,对各个实施例的描述都各有侧重,某个实施例中没有详述的部分,可以参见其他实施例的相关描述。In the above-mentioned embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference may be made to the relevant descriptions of other embodiments.

在本申请所提供的几个实施例中,应该理解到,所揭露的装置,可通过其它的方式实现。例如,以上所描述的装置实施例仅是示意性的,例如上述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性或其它的形式。In the several embodiments provided in this application, it should be understood that the disclosed apparatus may be implemented in other manners. For example, the device embodiments described above are only illustrative. For example, the division of the above units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated. to another system, or some features can be ignored, or not implemented. On the other hand, the shown or discussed mutual coupling or direct coupling or communication connection may be through some interfaces, indirect coupling or communication connection of devices or units, and may be in electrical or other forms.

上述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本申请实施例方案的目的。The units described above as separate components may or may not be physically separated, and components shown as units may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solutions of the embodiments of the present application.

另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically alone, or two or more units may be integrated into one unit. The above-mentioned integrated units may be implemented in the form of hardware, or may be implemented in the form of software functional units.

上述集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储器中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储器中,包括若干指令用以使得一台计算机设备(可为个人计算机、服务器或者TRP等)执行本申请各个实施例方法的全部或部分步骤。而前述的存储器包括:U盘、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,RandomAccess Memory)、移动硬盘、磁碟或者光盘等各种可以存储程序代码的介质。The above-mentioned integrated units, if implemented in the form of software functional units and sold or used as independent products, may be stored in a computer-readable memory. Based on this understanding, the technical solution of the present application can be embodied in the form of a software product in essence, or the part that contributes to the prior art, or all or part of the technical solution, and the computer software product is stored in a memory, Several instructions are included to cause a computer device (which may be a personal computer, a server, or a TRP, etc.) to execute all or part of the steps of the methods of various embodiments of the present application. The aforementioned memory includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, magnetic disk or optical disk and other media that can store program codes.

本领域普通技术人员可以理解上述实施例的各种方法中的全部或部分步骤是可以通过程序来指令相关的硬件来完成,该程序可以存储于一计算机可读存储器中,存储器可以包括:闪存盘、ROM、RAM、磁盘或光盘等。Those skilled in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by instructing relevant hardware through a program, and the program can be stored in a computer-readable memory, and the memory can include: a flash disk , ROM, RAM, disk or CD, etc.

以上对本申请实施例进行了详细介绍,本文中应用了具体个例对本申请的原理及实施方式进行了阐述,以上实施例的说明只是用于帮助理解本申请的方法及其核心思想;同时,对于本领域的一般技术人员,依据本申请的思想,在具体实施方式及应用范围上均会有改变之处,综上所述,本说明书内容不应理解为对本申请的限制。The embodiments of the present application have been introduced in detail above, and the principles and implementations of the present application are described in this paper by using specific examples. The descriptions of the above embodiments are only used to help understand the methods and core ideas of the present application; at the same time, for Persons of ordinary skill in the art, based on the idea of the present application, will have changes in the specific implementation manner and application scope. In summary, the contents of this specification should not be construed as limitations on the present application.

Claims (12)

1.一种数据卡切换方法,其特征在于,应用于终端设备,所述方法包括:1. A data card switching method, characterized in that, applied to a terminal device, the method comprising: 在网络设备将数据卡从第一SIM卡切换至第二SIM卡,且所述第二SIM卡支持的网络类型为IPV6时,接收来自所述网络设备的第一路由通告消息,所述第一路由通告消息携带所述第二SIM卡的IPV6前缀和域名系统DNS代理租约;When the network device switches the data card from the first SIM card to the second SIM card, and the network type supported by the second SIM card is IPV6, a first route advertisement message from the network device is received, and the first route advertisement message is received. The route advertisement message carries the IPV6 prefix of the second SIM card and the DNS proxy lease of the domain name system; 基于所述IPV6前缀和DNS代理租约向公共数据网络PDN进行数据通信。Data communication is performed to the public data network PDN based on the IPV6 prefix and the DNS proxy lease. 2.根据权利要求1所述的方法,其特征在于,所述方法还包括:2. The method according to claim 1, wherein the method further comprises: 在所述网络类型为IPV4时,保持第一信息不变,所述第一信息包括所述终端设备连接所述网络设备所需的至少一个参数;When the network type is IPV4, keep the first information unchanged, where the first information includes at least one parameter required by the terminal device to connect to the network device; 基于所述第一信息向所述PDN进行数据通信。Data communication is performed to the PDN based on the first information. 3.根据权利要求1或2所述的方法,其特征在于,在接收来自网络设备的第一路由通告消息之前,所述方法还包括:3. The method according to claim 1 or 2, wherein before receiving the first route advertisement message from the network device, the method further comprises: 接收来自所述网络设备的第二路由通告消息,所述第二路由通告消息用于指示所述第一SIM卡对应的IPV6前缀和DNS代理租约无效;receiving a second route advertisement message from the network device, where the second route advertisement message is used to indicate that the IPV6 prefix and DNS proxy lease corresponding to the first SIM card are invalid; 基于所述第二路由通告消息,注销所述第一SIM卡对应的IPV6前缀和DNS代理租约。Based on the second route advertisement message, cancel the IPV6 prefix and DNS proxy lease corresponding to the first SIM card. 4.一种数据卡切换装置,其特征在于,应用于网络设备,所述方法包括:4. A data card switching device, characterized in that, when applied to network equipment, the method comprises: 在将数据卡从第一SIM卡切换至第二SIM卡时,获取所述第二SIM卡支持的网络类型;When switching the data card from the first SIM card to the second SIM card, acquiring the network type supported by the second SIM card; 在所述网络类型为IPV6时,向所述终端设备发送第一路由通告消息,所述第一路由通告消息携带所述第二SIM卡的IPV6前缀和域名系统DNS代理租约。When the network type is IPV6, a first route advertisement message is sent to the terminal device, where the first route advertisement message carries the IPV6 prefix of the second SIM card and the DNS proxy lease of the domain name system. 5.根据权利要求4所述的方法,其特征在于,在向所述终端设备发送第一路由通告消息之前,所述方法还包括:5. The method according to claim 4, wherein before sending the first route advertisement message to the terminal device, the method further comprises: 向所述终端设备发送第二路由通告消息,所述第二路由通告消息用于指示所述第一SIM卡对应的IPV6前缀和DNS代理租约无效。Send a second route advertisement message to the terminal device, where the second route advertisement message is used to indicate that the IPV6 prefix and DNS proxy lease corresponding to the first SIM card are invalid. 6.根据权利要求4或5所述方法,其特征在于,所述方法还包括:6. The method according to claim 4 or 5, wherein the method further comprises: 在获取所述第二SIM卡支持的网络类型之前,断开与所述第一SIM卡的连接,建立与所述第二SIM卡的连接。Before acquiring the network type supported by the second SIM card, the connection with the first SIM card is disconnected, and the connection with the second SIM card is established. 7.一种数据卡切换装置,其特征在于,应用于终端设备,所述装置包括:7. A data card switching device, characterized in that, applied to terminal equipment, the device comprising: 收发单元,用于在网络设备将数据卡从第一SIM卡切换至第二SIM卡,且所述第二SIM卡支持的网络类型为IPV6时,接收来自所述网络设备的第一路由通告消息,所述第一路由通告消息携带所述第二SIM卡的IPV6前缀和域名系统DNS代理租约;A transceiver unit, configured to receive a first route advertisement message from the network device when the network device switches the data card from the first SIM card to the second SIM card, and the network type supported by the second SIM card is IPV6 , the first route advertisement message carries the IPV6 prefix of the second SIM card and the DNS proxy lease of the domain name system; 所述收发单元,还用于基于所述IPV6前缀和DNS代理租约向公共数据网络PDN进行数据通信。The transceiver unit is further configured to perform data communication to the public data network PDN based on the IPV6 prefix and the DNS proxy lease. 8.一种数据卡切换装置,其特征在于,应用于网络设备,所述装置包括:8. A data card switching device, characterized in that, applied to network equipment, the device comprising: 处理单元,用于在将数据卡从第一SIM卡切换至第二SIM卡时,获取所述第二SIM卡支持的网络类型;a processing unit, configured to acquire the network type supported by the second SIM card when the data card is switched from the first SIM card to the second SIM card; 收发单元,用于在所述网络类型为IPV6时,向所述终端设备发送第一路由通告消息,所述第一路由通告消息携带所述第二SIM卡的IPV6前缀和域名系统DNS代理租约。A transceiver unit, configured to send a first route advertisement message to the terminal device when the network type is IPV6, where the first route advertisement message carries the IPV6 prefix of the second SIM card and the DNS proxy lease of the domain name system. 9.一种芯片,其特征在于,包括处理器、存储器以及存储在所述存储器上的计算机程序或指令,所述处理器执行所述计算机程序或指令以实现权利要求1-3或如权利要求4-6中任一项所述的数据卡切换方法。9. A chip, characterized by comprising a processor, a memory, and a computer program or instruction stored on the memory, the processor executing the computer program or instruction to implement claims 1-3 or as claimed in claims The data card switching method described in any one of 4-6. 10.一种芯片模组,其特征在于,包括收发组件和芯片,所述芯片包括处理器、存储器以及存储在所述存储器上的计算机程序或指令,所述处理器执行所述计算机程序或指令以实现权利要求1-3或如权利要求4-6中任一项所述的数据卡切换方法。10. A chip module, characterized by comprising a transceiver component and a chip, the chip comprising a processor, a memory, and a computer program or instruction stored on the memory, the processor executing the computer program or instruction In order to realize the data card switching method according to any one of claims 1-3 or claims 4-6. 11.一种电子设备,其特征在于,所述电子设备包括处理器、存储器、通信接口,以及一个或多个程序,所述一个或多个程序被存储在所述存储器中,并且被配置由所述处理器执行,所述程序包括用于执行如权利要求1-3或如权利要求4-6中任一项所述的方法中的步骤的指令。11. An electronic device comprising a processor, a memory, a communication interface, and one or more programs, the one or more programs being stored in the memory and configured by The processor executes the program comprising instructions for performing the steps in the method of any of claims 1-3 or any of claims 4-6. 12.一种计算机可读存储介质,其特征在于,所述计算机可读存储介质存储用于电子数据交换的计算机程序,其中,所述计算机程序使得计算机执行如权利要求1-3或如权利要求4-6中任一项所述的方法的步骤。12. A computer-readable storage medium, characterized in that the computer-readable storage medium stores a computer program for electronic data exchange, wherein the computer program causes a computer to perform as claimed in claims 1-3 or as claimed in claims The steps of any one of 4-6.
CN202111682923.6A 2021-12-31 2021-12-31 Data card switching method and device Pending CN114363882A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111682923.6A CN114363882A (en) 2021-12-31 2021-12-31 Data card switching method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111682923.6A CN114363882A (en) 2021-12-31 2021-12-31 Data card switching method and device

Publications (1)

Publication Number Publication Date
CN114363882A true CN114363882A (en) 2022-04-15

Family

ID=81104402

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111682923.6A Pending CN114363882A (en) 2021-12-31 2021-12-31 Data card switching method and device

Country Status (1)

Country Link
CN (1) CN114363882A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115643549A (en) * 2022-09-27 2023-01-24 上汽通用五菱汽车股份有限公司 A vehicle communication control method, device, server and storage medium
CN116033507A (en) * 2022-12-30 2023-04-28 山东有人物联网股份有限公司 Multimode router network switching method and system based on subnet equipment characteristics

Citations (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101233723A (en) * 2005-08-05 2008-07-30 三星电子株式会社 Method for applying fast mobile IPv6 to mobile node in mobile network and its mobile router and mobile network
CN103634929A (en) * 2013-11-28 2014-03-12 中国联合网络通信集团有限公司 Network switching method and system of MIFI equipment
CN103987092A (en) * 2013-02-08 2014-08-13 华为终端有限公司 Method and device for selecting network device in switching process
CN103987098A (en) * 2014-04-28 2014-08-13 广州杰赛科技股份有限公司 Handover method and system between IPV4 network and IPV6 network
CN104640120A (en) * 2015-02-11 2015-05-20 杭州中威电子股份有限公司 Covering method and transmission equipment for high-speed mobile WIFI (Wireless Fidelity)
US20150180774A1 (en) * 2013-12-20 2015-06-25 Sandvine Incorporated Ulc System and method for analyzing devices accessing a network
CN104753793A (en) * 2013-12-26 2015-07-01 联芯科技有限公司 Method for statefull management of access terminal under stateless internet protocol version 6 (IPv6) configuration
CN104754558A (en) * 2013-12-25 2015-07-01 中国移动通信集团公司 Method and corresponding equipment for selecting network connection
CN105657689A (en) * 2015-11-06 2016-06-08 乐卡汽车智能科技(北京)有限公司 MiFi control method and device
CN105813062A (en) * 2016-04-28 2016-07-27 上海吾游信息技术有限公司 Automatic switching method and device for SIM (Subscriber Identity Module) card
CN107231704A (en) * 2016-03-25 2017-10-03 中兴通讯股份有限公司 Method for connecting network and device
CN109041140A (en) * 2018-07-09 2018-12-18 深圳绿米联创科技有限公司 It is switched fast wireless network methods, Intelligent hardware and terminal device
CN110868702A (en) * 2018-08-27 2020-03-06 深圳市讯扬通信有限公司 Software implementation of shared intelligent terminal data traffic

Patent Citations (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101233723A (en) * 2005-08-05 2008-07-30 三星电子株式会社 Method for applying fast mobile IPv6 to mobile node in mobile network and its mobile router and mobile network
CN103987092A (en) * 2013-02-08 2014-08-13 华为终端有限公司 Method and device for selecting network device in switching process
CN103634929A (en) * 2013-11-28 2014-03-12 中国联合网络通信集团有限公司 Network switching method and system of MIFI equipment
US20150180774A1 (en) * 2013-12-20 2015-06-25 Sandvine Incorporated Ulc System and method for analyzing devices accessing a network
CN104754558A (en) * 2013-12-25 2015-07-01 中国移动通信集团公司 Method and corresponding equipment for selecting network connection
CN104753793A (en) * 2013-12-26 2015-07-01 联芯科技有限公司 Method for statefull management of access terminal under stateless internet protocol version 6 (IPv6) configuration
CN103987098A (en) * 2014-04-28 2014-08-13 广州杰赛科技股份有限公司 Handover method and system between IPV4 network and IPV6 network
CN104640120A (en) * 2015-02-11 2015-05-20 杭州中威电子股份有限公司 Covering method and transmission equipment for high-speed mobile WIFI (Wireless Fidelity)
CN105657689A (en) * 2015-11-06 2016-06-08 乐卡汽车智能科技(北京)有限公司 MiFi control method and device
CN107231704A (en) * 2016-03-25 2017-10-03 中兴通讯股份有限公司 Method for connecting network and device
CN105813062A (en) * 2016-04-28 2016-07-27 上海吾游信息技术有限公司 Automatic switching method and device for SIM (Subscriber Identity Module) card
CN109041140A (en) * 2018-07-09 2018-12-18 深圳绿米联创科技有限公司 It is switched fast wireless network methods, Intelligent hardware and terminal device
CN110868702A (en) * 2018-08-27 2020-03-06 深圳市讯扬通信有限公司 Software implementation of shared intelligent terminal data traffic

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
""C1-174563 was C1-173868 Clarification on IPv6 addresses comparison during handover"", 3GPP TSG_CT\\WG1_MM-CC-SM_EX-CN1, pages 1 - 12 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115643549A (en) * 2022-09-27 2023-01-24 上汽通用五菱汽车股份有限公司 A vehicle communication control method, device, server and storage medium
CN116033507A (en) * 2022-12-30 2023-04-28 山东有人物联网股份有限公司 Multimode router network switching method and system based on subnet equipment characteristics

Similar Documents

Publication Publication Date Title
US9350814B2 (en) Internet protocol connectivity over a service-oriented architecture bus
EP2939399B1 (en) Methods and system for seamless network communications between ipv4 and ipv6 devices
CN113824642B (en) Method for sending message, network equipment and computer readable storage medium
WO2012111999A2 (en) Method and system of providing internet protocol (ip) data communication in a nfc peer to peer communication environment
CN106713522B (en) Wireless fidelity Wi-Fi connection method and mobile terminal
CN113162857B (en) Method and gateway for acquiring route on demand
CN114363882A (en) Data card switching method and device
US12089145B2 (en) Network connection control method and related products
CN109495369B (en) Message forwarding method and device
CN104426816B (en) A kind of virtual machine communication method and device
CN117917880A (en) Method and device for selecting access network
WO2017166038A1 (en) Communication method and terminal
CN114024903A (en) Network switching method, device and gateway device
US8923311B2 (en) Communication system and method
CN116647536A (en) Method, device, equipment and storage medium for dial-up Internet access
CN105429880A (en) Network equipment and method for routing and forwarding the same
CN112565482B (en) Electronic equipment, domain name query method and related product
WO2021043178A1 (en) Roaming control method and apparatus, udm device, and storage medium
CN111417163A (en) IP address recovery method, terminal and storage medium
CN107113295B (en) Communication method, device and system
CN115529680B (en) Method and apparatus for performing internet reachability management by means of indicators
CN102790679A (en) Internet connection method of network card and network card
CN116366590A (en) Message transmission method and communication device
CN115397033A (en) Wireless communication method, wireless communication apparatus, wireless communication module, medium, and program product
CN106507446B (en) Wireless fidelity Wi-Fi connection method and mobile terminal

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
RJ01 Rejection of invention patent application after publication

Application publication date: 20220415

RJ01 Rejection of invention patent application after publication