CN104080077B - Method of data synchronization and device based on smart card - Google Patents
Method of data synchronization and device based on smart card Download PDFInfo
- Publication number
- CN104080077B CN104080077B CN201410341516.2A CN201410341516A CN104080077B CN 104080077 B CN104080077 B CN 104080077B CN 201410341516 A CN201410341516 A CN 201410341516A CN 104080077 B CN104080077 B CN 104080077B
- Authority
- CN
- China
- Prior art keywords
- smart card
- terminal
- server
- group
- module
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
- 238000000034 method Methods 0.000 title claims abstract description 26
- 238000004891 communication Methods 0.000 claims description 41
- 230000005540 biological transmission Effects 0.000 claims 1
- 238000010586 diagram Methods 0.000 description 9
- 230000001360 synchronised effect Effects 0.000 description 3
- 238000012795 verification Methods 0.000 description 3
- 238000013500 data storage Methods 0.000 description 2
- 238000005516 engineering process Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
Landscapes
- Information Transfer Between Computers (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
本发明提供一种基于智能卡的数据同步方法和装置,通过加载第一智能卡的第一终端向服务器发送同步请求后,接收服务器发送的第一智能卡所属的智能卡组的操作记录,若操作记录中的最近一次执行写操作的第二智能卡不为所述第一智能卡,则第一终端与加载第二智能卡的第二终端进行交互,以对第一智能卡与第二智能卡进行数据同步,从而避免了用户下载或存储用户数据时,需要分别在该至少两张智能卡中均进行上述操作,解决了如何在至少两张智能卡之间进行数据同步的技术问题。
The present invention provides a smart card-based data synchronization method and device. After the first terminal loaded with the first smart card sends a synchronization request to the server, the server receives the operation record of the smart card group to which the first smart card belongs. The second smart card that performed the last write operation is not the first smart card, then the first terminal interacts with the second terminal loaded with the second smart card to synchronize data between the first smart card and the second smart card, thus avoiding the user When downloading or storing user data, the above-mentioned operations need to be performed on the at least two smart cards, which solves the technical problem of how to synchronize data between the at least two smart cards.
Description
技术领域technical field
本发明涉及通信技术,尤其涉及一种基于智能卡的数据同步方法和装置。The invention relates to communication technology, in particular to a smart card-based data synchronization method and device.
背景技术Background technique
智能卡是一种能够插入到移动终端中的具有较大存储空间的客户识别模块(Subscriber Identity Module,SIM)卡。该智能卡包括通信模块和文件存储模块。其中,通信模块用于提供移动终端进行通信所必须的数据,例如:用于鉴权、选网策略和用户数据等;大容量存储模块用于提供大容量的存储空间。当移动终端加载智能卡后,该移动终端可分别利用智能卡中的通信模块进行通信,以及利用大容量存储模块进行数据存储。A smart card is a Subscriber Identity Module (Subscriber Identity Module, SIM) card that can be inserted into a mobile terminal and has a relatively large storage space. The smart card includes a communication module and a file storage module. Among them, the communication module is used to provide data necessary for the mobile terminal to communicate, for example: used for authentication, network selection strategy and user data, etc.; the large-capacity storage module is used to provide large-capacity storage space. After the mobile terminal is loaded with the smart card, the mobile terminal can use the communication module in the smart card for communication and the large-capacity storage module for data storage.
但是,当同一用户使用位于不同终端中的至少两张智能卡时,由于现有技术中缺乏一种对至少两张智能卡中的大容量存储模块所存储的数据进行数据同步的方法,导致用户下载或存储用户数据时,需要分别在该至少两张智能卡中均进行上述操作,导致操作复杂,效率较低。However, when the same user uses at least two smart cards located in different terminals, due to the lack of a method for synchronizing the data stored in the mass storage modules in the at least two smart cards in the prior art, the user downloads or When storing user data, the above operations need to be performed on the at least two smart cards respectively, resulting in complicated operations and low efficiency.
发明内容Contents of the invention
本发明提供一种基于智能卡的数据同步方法和装置,用于在至少两张智能卡之间进行数据同步。The invention provides a smart card-based data synchronization method and device for data synchronization between at least two smart cards.
本发明的第一个方面是提供一种基于智能卡的数据同步方法,包括:A first aspect of the present invention is to provide a smart card-based data synchronization method, including:
第一终端向服务器发送同步请求,所述同步请求用于指示所述第一终端所加载的第一智能卡所属的智能卡组,以使所述服务器发送所述智能卡组的操作记录;所述操作记录用于指示所述智能卡组中的智能卡历次执行写操作的时刻The first terminal sends a synchronization request to the server, and the synchronization request is used to indicate the smart card group to which the first smart card loaded on the first terminal belongs, so that the server sends the operation record of the smart card group; the operation record It is used to indicate the time when the smart cards in the smart card group have performed write operations all the time
所述第一终端接收所述智能卡组的操作记录;The first terminal receives the operation record of the smart card group;
若所述操作记录中的最近一次执行写操作的第二智能卡不为所述第一智能卡,则所述第一终端与加载所述第二智能卡的第二终端进行交互,以对所述第一智能卡与所述第二智能卡进行数据同步。If the second smart card that performed the last write operation in the operation record is not the first smart card, the first terminal interacts with the second terminal loaded with the second smart card to write the first The smart card performs data synchronization with the second smart card.
本发明的第二个方面是提供一种基于智能卡的数据同步方法,包括:A second aspect of the present invention provides a smart card-based data synchronization method, including:
服务器接收第一终端发送的同步请求;所述同步请求用于指示所述第一终端所加载的第一智能卡所属的智能卡组;The server receives the synchronization request sent by the first terminal; the synchronization request is used to indicate the smart card group to which the first smart card loaded by the first terminal belongs;
所述服务器查询预先存储的所述智能卡组的操作记录;所述操作记录用于指示所述智能卡组中的智能卡历次执行写操作的时刻;The server queries the pre-stored operation records of the smart card group; the operation records are used to indicate the times when the smart cards in the smart card group have performed write operations;
所述服务器向所述第一终端发送所述操作记录,以使若所述操作记录中的最近一次执行写操作的第二智能卡不为所述第一智能卡,则所述第一终端与加载所述第二智能卡的第二终端进行交互,以对所述第一智能卡与所述第二智能卡进行数据同步。The server sends the operation record to the first terminal, so that if the second smart card that performs the last write operation in the operation record is not the first smart card, the first terminal and the loaded Interacting with the second terminal of the second smart card to synchronize data between the first smart card and the second smart card.
本发明的第三个方面是提供一种基于智能卡的数据同步装置,包括:A third aspect of the present invention provides a smart card-based data synchronization device, including:
第一发送模块,用于向服务器发送同步请求,所述同步请求用于指示所述第一终端所加载的第一智能卡所属的智能卡组,以使所述服务器查询所述智能卡组的操作记录;所述操作记录用于指示所述智能卡组中的智能卡历次执行写操作的时刻;A first sending module, configured to send a synchronization request to a server, where the synchronization request is used to indicate the smart card group to which the first smart card loaded on the first terminal belongs, so that the server can query the operation record of the smart card group; The operation record is used to indicate the times when the smart cards in the smart card group have performed write operations;
接收模块,用于接收所述智能卡组的操作记录;A receiving module, configured to receive the operation record of the smart card group;
同步模块,用于若所述操作记录中的最近一次执行写操作的第二智能卡不为所述第一智能卡,则所述第一终端与加载所述第二智能卡的第二终端进行交互,以对所述第一智能卡与所述第二智能卡进行数据同步。A synchronization module, configured to interact with the first terminal and the second terminal loaded with the second smart card if the second smart card that performed the last write operation in the operation record is not the first smart card, to and performing data synchronization on the first smart card and the second smart card.
本发明的第四个方面是提供一种基于智能卡的数据同步装置,包括:A fourth aspect of the present invention provides a smart card-based data synchronization device, including:
接收模块,用户接收第一终端发送的同步请求;所述同步请求用于指示所述第一终端所加载的第一智能卡所属的智能卡组;A receiving module, the user receives a synchronization request sent by the first terminal; the synchronization request is used to indicate the smart card group to which the first smart card loaded by the first terminal belongs;
查询模块,用于查询预先存储的所述智能卡组的操作记录;所述操作记录用于指示所述智能卡组中的智能卡历次执行写操作的时刻;A query module, configured to query the pre-stored operation records of the smart card group; the operation records are used to indicate the times when the smart cards in the smart card group have previously performed write operations;
发送模块,用于向所述第一终端发送所述操作记录,以使若所述操作记录中的最近一次执行写操作的第二智能卡不为所述第一智能卡,则所述第一终端与加载所述第二智能卡的第二终端进行交互,以对所述第一智能卡与所述第二智能卡进行数据同步。A sending module, configured to send the operation record to the first terminal, so that if the second smart card that performs the last write operation in the operation record is not the first smart card, then the first terminal and The second terminal loaded with the second smart card interacts to synchronize data between the first smart card and the second smart card.
本发明提供的基于智能卡的数据同步方法和装置,通过加载第一智能卡的第一终端向服务器发送同步请求后,接收服务器发送的第一智能卡所属的智能卡组的操作记录,若操作记录中的最近一次执行写操作的第二智能卡不为所述第一智能卡,则第一终端与加载第二智能卡的第二终端进行交互,以对第一智能卡与第二智能卡进行数据同步,从而避免了用户下载或存储用户数据时,需要分别在该至少两张智能卡中均进行上述操作,解决了如何在在至少两张智能卡之间进行数据同步的技术问题。In the smart card-based data synchronization method and device provided by the present invention, after the first terminal loaded with the first smart card sends a synchronization request to the server, the server receives the operation record of the smart card group to which the first smart card belongs. The second smart card that performs the write operation at one time is not the first smart card, then the first terminal interacts with the second terminal loaded with the second smart card to synchronize data between the first smart card and the second smart card, thereby avoiding the user from downloading Or when storing user data, the above operations need to be performed on the at least two smart cards respectively, which solves the technical problem of how to synchronize data between the at least two smart cards.
附图说明Description of drawings
图1为本发明一实施例提供的基于智能卡的数据同步方法的流程示意图;Fig. 1 is a schematic flow chart of a data synchronization method based on a smart card provided by an embodiment of the present invention;
图2为本发明另一实施例提供的基于智能卡的数据同步方法的流程示意图;2 is a schematic flow diagram of a smart card-based data synchronization method provided by another embodiment of the present invention;
图3为本发明一实施例提供的一种基于智能卡的数据同步装置的结构示意图;3 is a schematic structural diagram of a data synchronization device based on a smart card provided by an embodiment of the present invention;
图4为本发明一实施例提供的另一种基于智能卡的数据同步装置的结构示意图;4 is a schematic structural diagram of another smart card-based data synchronization device provided by an embodiment of the present invention;
图5为本发明另一实施例提供的一种基于智能卡的数据同步装置的结构示意图;FIG. 5 is a schematic structural diagram of a data synchronization device based on a smart card provided by another embodiment of the present invention;
图6为本发明另一实施例提供的另一种基于智能卡的数据同步装置的结构示意图。FIG. 6 is a schematic structural diagram of another smart card-based data synchronization device provided by another embodiment of the present invention.
具体实施方式detailed description
图1为本发明一实施例提供的基于智能卡的数据同步方法的流程示意图,本实施例中的智能卡不仅包括通信模块,还包括新增的大容量存储模块,其中,通信模块用于提供终端进行通信所必须的数据,例如:用于鉴权、选网策略和用户数据等,大容量存储模块用于提供大容量的存储空间,为了简便以下简称大容量存储模块为存储模块。当终端加载智能卡后,该终端可利用智能卡中的通信模块进行通信,以及利用大容量存储模块进行数据存储,如图1所示,数据同步方法包括:Figure 1 is a schematic flowchart of a data synchronization method based on a smart card provided by an embodiment of the present invention. The smart card in this embodiment not only includes a communication module, but also includes a newly added large-capacity storage module, wherein the communication module is used to provide terminals for The data necessary for communication, such as authentication, network selection strategy and user data, etc., the mass storage module is used to provide a large capacity of storage space, for the sake of simplicity, the mass storage module is hereinafter referred to as the storage module. When the terminal is loaded with a smart card, the terminal can use the communication module in the smart card to communicate, and use the large-capacity storage module for data storage, as shown in Figure 1, the data synchronization method includes:
101、第一终端向服务器发送同步请求。101. The first terminal sends a synchronization request to the server.
其中,同步请求用于指示用户使用的第一终端所加载的第一智能卡所属的智能卡组,包括第一终端的存储模块的标识和智能卡组的标识。Wherein, the synchronization request is used to indicate the smart card group to which the first smart card loaded on the first terminal used by the user belongs, including the identification of the storage module of the first terminal and the identification of the smart card group.
可选的,对第一智能卡执行写操作之前,第一终端向服务器发送同步请求,以使所述服务器根据预先建立的存储模块的标识、通信模块的标识与智能卡组的标识之间的对应关系,确定同步请求中的存储模块的标识和智能卡组的标识相对应,确定相对应之后,服务器查询所述智能卡组的操作记录。也就是说,对应关系用于服务器查询所述智能卡组的操作记录之前,确定加载所述存储模块和所述通信模块的第一智能卡所属的智能卡组。Optionally, before performing the write operation on the first smart card, the first terminal sends a synchronization request to the server, so that the server can perform the synchronization according to the pre-established correspondence between the identification of the storage module, the identification of the communication module, and the identification of the smart card group. It is determined that the identifier of the storage module in the synchronization request corresponds to the identifier of the smart card set, and after determining the correspondence, the server queries the operation record of the smart card set. That is to say, the corresponding relationship is used to determine the smart card group to which the first smart card loaded with the storage module and the communication module belongs before the server queries the operation record of the smart card group.
进一步,101之前,还包括:第一终端向服务器发送用于指示将第一终端所加载的第一智能卡加入到该智能卡组的请求,以使服务器将该第一智能卡加入到该智能卡组中。Further, before step 101, the method further includes: the first terminal sends a request to the server for instructing to add the first smart card loaded on the first terminal to the smart card group, so that the server adds the first smart card to the smart card group.
具体的,第一终端从第一智能卡中读取通信模块的标识和存储模块的标识,以及第一终端接收用户输入的包含用户名和密码在内的用户认证信息。该第一终端将用户输入的用户名作为智能卡组的标识之后,向服务器发送包含存储模块的标识、通信模块的标识、智能卡组的标识和用户认证信息的请求,以使服务器根据用户认证信息进行认证通过后,建立存储模块的标识、通信模块的标识与智能卡组的标识之间的对应关系,从而将第一终端加入到智能卡组中。其中,存储模块的标识可为集成电路卡识别码(Integrate circuitcard identity,ICCID)。通信模块的标识可为国际移动用户识别码(InternationalMobile Subscriber Identification Number,IMSI)或者国际移动用户综合业务数字网/公共交换电话网络号码(Mobile Subscriber International ISDN/PSTN number,MSISDN)。Specifically, the first terminal reads the identification of the communication module and the identification of the storage module from the first smart card, and the first terminal receives the user authentication information input by the user including the user name and password. After the first terminal uses the user name input by the user as the identifier of the smart card group, it sends to the server a request including the identifier of the storage module, the identifier of the communication module, the identifier of the smart card group, and the user authentication information, so that the server can perform user authentication based on the user authentication information. After the authentication is passed, the corresponding relationship between the identification of the storage module, the identification of the communication module and the identification of the smart card group is established, so that the first terminal is added to the smart card group. Wherein, the identification of the storage module may be an integrated circuit card identification code (Integrate circuit card identity, ICCID). The identification of the communication module may be International Mobile Subscriber Identification Number (IMSI) or International Mobile Subscriber Integrated Services Digital Network/Public Switched Telephone Network Number (Mobile Subscriber International ISDN/PSTN number, MSISDN).
例如:第一终端开机读取第一智能卡的ICCID,将该ICCID作为第一智能卡存储模块的标识。第一终端在对第一智能卡执行写操作之前,检查第一智能卡的通信模块是否存有用于标识已加入智能卡组的加密数据,若有,则直接根据加密数据中的智能卡组的标识,发送同步请求,以执行智能卡的数据同步流程,否则,第一终端在执行上述同步流程之前,首先发出是否创建新智能卡组的提示。若接收到用户返回的创建新智能卡组的指示,其中,该指示中包含用户输入的用户名和密码,则第一终端将该用户名作为智能卡组的标识,以及对该智能卡组的标识、密码和读取的ICCID,利用加密算法进行加密,获得加密数据,第一终端将该加密数据存储在第一智能卡的通信模块中,以及将该加密数据和通信模块的标识上传到服务器中,以使服务器利用解密算法进行解密后,建立智能卡组的标识和存储模块的标识之间的对应关系表,以及存储模块的标识和通信模块的标识之间的对应关系表,并且存储包括密码和作为智能卡组标识的用户名在内的用户认证信息。若第一终端接收到用户返回的使用已有智能卡组的指示,则将该指示中用户输入的用户名作为智能卡组的标识,以及根据智能卡组的标识、密码和第一终端读取的第一智能卡的ICCID,利用加密算法进行加密,获得加密数据,将该加密数据和通信模块的标识上传到服务器,服务器利用对应的解密算法进行解密后,获得包括密码和作为智能卡组标识的用户名在内的用户认证信息,将预存的用户认证信息与解密获得的用户认证信息进行比对,若一致则通过验证。验证通过后,服务器建立智能卡组的标识和第一智能卡的ICCID之间的对应关系,以及存储模块的标识和通信模块的标识之间的对应关系表,从而将第一智能卡加入到智能卡组中。For example: the first terminal reads the ICCID of the first smart card when it is turned on, and uses the ICCID as the identifier of the storage module of the first smart card. Before the first terminal executes the write operation on the first smart card, it checks whether the communication module of the first smart card has encrypted data used to identify the smart card group, and if so, sends a synchronous request to execute the data synchronization process of the smart card; otherwise, the first terminal first sends a prompt whether to create a new smart card group before executing the above synchronization process. If receiving an instruction to create a new smart card group returned by the user, wherein the instruction includes the user name and password input by the user, the first terminal uses the user name as the identification of the smart card group, and the identification, password and password of the smart card group. The read ICCID is encrypted with an encryption algorithm to obtain encrypted data, the first terminal stores the encrypted data in the communication module of the first smart card, and uploads the encrypted data and the identification of the communication module to the server, so that the server After using the decryption algorithm to decrypt, establish the correspondence table between the identification of the smart card group and the identification of the storage module, and the correspondence table between the identification of the storage module and the identification of the communication module, and store the password and the identification as the smart card group User authentication information including the username. If the first terminal receives an instruction to use an existing smart card group returned by the user, the user name input by the user in the instruction is used as the identification of the smart card group, and according to the identification and password of the smart card group and the first terminal read by the first terminal The ICCID of the smart card is encrypted with an encryption algorithm to obtain encrypted data, and the encrypted data and the identification of the communication module are uploaded to the server. After the server uses the corresponding decryption algorithm to decrypt, the user name including the password and the identification of the smart card group is obtained. Compare the pre-stored user authentication information with the decrypted user authentication information, and pass the verification if they are consistent. After the verification is passed, the server establishes the correspondence between the identification of the smart card group and the ICCID of the first smart card, and the correspondence table between the identification of the storage module and the identification of the communication module, thereby adding the first smart card to the smart card group.
102、第一终端接收服务器发送的智能卡组的操作记录。102. The first terminal receives the operation record of the smart card group sent by the server.
其中,操作记录用于指示智能卡组中的智能卡历次执行写操作的时刻。Wherein, the operation record is used to indicate the times when the smart cards in the smart card group have performed write operations.
可选的,服务器根据同步请求中第一智能卡的存储模块的标识,查询预先建立的大容量存储模块的标识、通信模块的标识与智能卡组的标识之间的对应关系,获得第一智能卡所属的智能卡组的标识,根据智能卡组的标识,查询获得该智能卡组的操作记录。其中,每一条操作记录对应一次写操作,每一条操作记录包括本次执行写操作的智能卡的存储模块的标识、执行写操作的时刻和写操作位置。Optionally, according to the identification of the storage module of the first smart card in the synchronization request, the server queries the pre-established correspondence between the identification of the large-capacity storage module, the identification of the communication module, and the identification of the smart card group, and obtains the corresponding relationship between the identification of the first smart card. The identification of the smart card group, according to the identification of the smart card group, query to obtain the operation record of the smart card group. Wherein, each operation record corresponds to a write operation, and each operation record includes the identification of the storage module of the smart card that performs the write operation, the time when the write operation is performed, and the location of the write operation.
103、若操作记录中的最近一次执行写操作的第二智能卡不为第一智能卡,则第一终端通过服务器与加载第二智能卡的第二终端进行交互,以对第一智能卡与第二智能卡进行数据同步。103. If the second smart card that performed the last write operation in the operation record is not the first smart card, then the first terminal interacts with the second terminal that loads the second smart card through the server, so as to write the first smart card and the second smart card. data synchronization.
可选的,根据操作记录中记录的执行写操作的时刻,确定最近一次执行写操作的第二智能卡的存储模块的标识。若操作记录中存储模块的标识不同于第一智能卡的存储模块标识,则确定操作记录中的最近一次执行写操作的第二智能卡不为第一智能卡,第一终端通过服务器获取第二智能卡的通信模块的标识,进而根据通信模块的标识与第二终端进行交互,对第一智能卡与第二智能卡进行数据同步。具体的同步方法包括:若操作记录还包括写操作的位置,则第一终端根据查询到的最近一次写操作的操作记录A,将第二智能卡中操作记录A所记录的写操作的位置上的数据同步到第一智能卡。然后,第一终端继续查询倒数第二次写操作的操作记录B,若操作记录B所记录的智能卡不为第一智能卡,则将该操作记录B所记录的智能卡中,该操作记录B所记录的写操作的位置上的数据同步到第一智能卡。第一终端重复执行上述过程,直至查询到的操作记录所记载的智能卡为第一终端自身所加载的第一智能卡。Optionally, according to the moment when the write operation is performed recorded in the operation record, the identifier of the storage module of the second smart card that performs the write operation last time is determined. If the identification of the storage module in the operation record is different from the storage module identification of the first smart card, it is determined that the second smart card that performed the write operation last time in the operation record is not the first smart card, and the first terminal obtains the communication information of the second smart card through the server. The identification of the module, and then interact with the second terminal according to the identification of the communication module, and perform data synchronization between the first smart card and the second smart card. The specific synchronization method includes: if the operation record also includes the location of the write operation, the first terminal, according to the query operation record A of the latest write operation, records the location of the write operation recorded in the operation record A in the second smart card Data is synchronized to the first smart card. Then, the first terminal continues to inquire about the operation record B of the penultimate write operation. If the smart card recorded in the operation record B is not the first smart card, then in the smart card recorded in the operation record B, the operation record B records The data on the location of the write operation is synchronized to the first smart card. The first terminal repeatedly executes the above process until the smart card recorded in the queried operation record is the first smart card loaded on the first terminal itself.
或者,具体的同步方法包括:第一终端通过服务器向第二终端请求数据之后,第二终端向服务器上传第二智能卡的存储模块中的全部数据,以使服务器的存储单元进行备份,进而第一智能卡采用从服务器中下载第二终端预先备份的第二智能卡的存储模块中的全部数据的方式,对第一智能卡与第二智能卡进行数据同步。Or, the specific synchronization method includes: after the first terminal requests data from the second terminal through the server, the second terminal uploads all the data in the storage module of the second smart card to the server, so that the storage unit of the server is backed up, and then the first The smart card downloads from the server all the data in the storage module of the second smart card backed up by the second terminal in advance, and performs data synchronization between the first smart card and the second smart card.
进一步,第一终端通过服务器与第二终端进行交互,以对第一智能卡与第二智能卡进行数据同步之后,还包括:当第一智能卡执行写操作时,第一终端向服务器发送更新请求,以使服务器根据更新请求,对操作记录进行更新。其中,更新请求用于指示第一终端对第一智能卡执行写操作的时刻。Further, after the first terminal interacts with the second terminal through the server to synchronize data between the first smart card and the second smart card, the method further includes: when the first smart card performs a write operation, the first terminal sends an update request to the server to Make the server update the operation record according to the update request. Wherein, the update request is used to indicate the time when the first terminal performs a write operation on the first smart card.
例如:当第一智能卡执行写操作时,记录该写操作的位置,如文件或文件夹或位图文件,以及记录写操作的时间戳,生成新操作记录,将该新操作记录存在写操作对应的文件夹下,并向服务器发送包含上述新操作记录的更新请求,以使服务器根据更新请求,对服务器中存储的操作记录进行更新,也就是说,操作记录还包括写操作的位置。For example: when the first smart card performs a write operation, record the location of the write operation, such as a file or folder or a bitmap file, and record the timestamp of the write operation, generate a new operation record, and store the new operation record in the corresponding write operation folder, and send an update request containing the above-mentioned new operation record to the server, so that the server can update the operation record stored in the server according to the update request, that is to say, the operation record also includes the location of the write operation.
需要说明的是,当用户利用终端对智能卡中存储的数据进行访问时,为了增强数据安全性,终端可提示用户输入用户名和密码,验证通过后,方可允许用户利用终端对智能卡中存储的数据进行访问。It should be noted that when the user uses the terminal to access the data stored in the smart card, in order to enhance data security, the terminal can prompt the user to enter the user name and password. After the verification is passed, the user is allowed to use the terminal to access the data stored in the smart card. to visit.
本实施例中,通过加载第一智能卡的第一终端向服务器发送同步请求后,接收服务器发送的第一智能卡所属的智能卡组的操作记录,若操作记录中的最近一次执行写操作的第二智能卡不为所述第一智能卡,则第一终端与加载第二智能卡的第二终端进行交互,以对第一智能卡与第二智能卡进行数据同步,从而避免了用户下载或存储用户数据时,需要分别在该至少两张智能卡中均进行上述操作,解决了如何在在至少两张智能卡之间进行数据同步的技术问题。In this embodiment, after the first terminal loaded with the first smart card sends a synchronization request to the server, the server receives the operation record of the smart card group to which the first smart card belongs. If the first smart card is not the first smart card, the first terminal interacts with the second terminal loaded with the second smart card to synchronize data between the first smart card and the second smart card, thereby avoiding the need for the user to download or store user data separately Performing the above operations on the at least two smart cards solves the technical problem of how to synchronize data between the at least two smart cards.
图2为本发明另一实施例提供的基于智能卡的数据同步方法的流程示意图,如图2所示,包括:Fig. 2 is a schematic flow chart of a data synchronization method based on a smart card provided by another embodiment of the present invention, as shown in Fig. 2 , including:
201、服务器接收第一终端发送的同步请求。201. The server receives a synchronization request sent by a first terminal.
其中,同步请求用于指示用户使用的第一终端所加载的第一智能卡所属的智能卡组,包括第一终端的存储模块的标识和智能卡组的标识。Wherein, the synchronization request is used to indicate the smart card group to which the first smart card loaded on the first terminal used by the user belongs, including the identification of the storage module of the first terminal and the identification of the smart card group.
202、服务器查询预先存储的智能卡组的操作记录。202. The server queries the pre-stored operation records of the smart card set.
其中,操作记录用于指示智能卡组中的智能卡历次执行写操作的时刻。Wherein, the operation record is used to indicate the times when the smart cards in the smart card group have performed write operations.
可选的,服务器预先接收第一终端发送的包含存储模块的标识、通信模块的标识、智能卡组的标识和认证信息的请求,服务器根据认证信息进行认证通过后,建立存储模块的标识、通信模块的标识与智能卡组的标识之间的对应关系,从而将第一智能卡加入到该智能卡组中。进一步,服务器建立存储模块的标识、通信模块的标识与智能卡组的标识之间的对应关系之后,还可向加载该智能卡组中智能卡的终端发送该对应关系,以使当该终端确定操作记录中存储模块的标识不同于自身所加载智能卡的存储模块标识时,根据该对应关系查询获得加载有操作记录中存储模块的第二终端的通信模块标识,进而根据该通信模块的标识与第二终端交互,以进行数据同步。若服务器根据同步请求,确定第一终端的存储模块的标识与智能卡组的标识之间存在对应关系,则查询该智能卡组的操作记录。Optionally, the server receives in advance the request including the identification of the storage module, the identification of the communication module, the identification of the smart card group, and the authentication information sent by the first terminal. The corresponding relationship between the identification of the smart card group and the identification of the smart card group, so as to add the first smart card to the smart card group. Further, after the server establishes the corresponding relationship between the identification of the storage module, the identification of the communication module and the identification of the smart card group, it can also send the corresponding relationship to the terminal loaded with the smart card in the smart card group, so that when the terminal determines that the operation record is When the identification of the storage module is different from the identification of the storage module of the smart card loaded by itself, according to the correspondence query, the identification of the communication module of the second terminal loaded with the storage module in the operation record is obtained, and then the identification of the communication module is used to interact with the second terminal , for data synchronization. If the server determines that there is a corresponding relationship between the identifier of the storage module of the first terminal and the identifier of the smart card group according to the synchronization request, query the operation record of the smart card group.
203、服务器向第一终端发送操作记录,以使若操作记录中的第二智能卡不为第一智能卡,则第一终端通过服务器与加载第二智能卡的第二终端进行交互,以对第一智能卡与第二智能卡进行数据同步。203. The server sends the operation record to the first terminal, so that if the second smart card in the operation record is not the first smart card, the first terminal interacts with the second terminal loaded with the second smart card through the server, so that the first smart card Data synchronization with the second smart card.
进一步,服务器向第一终端发送操作记录之后,服务器接收更新请求。其中,更新请求是第一智能卡执行写操作时,第一终端向服务器发送的,用于指示第一终端对第一智能卡执行写操作的时刻。服务器将更新请求中的第一智能卡的标识、第一终端对所述第一智能卡执行写操作的时刻和写操作位置,添加到所述操作记录中,从而完成对操作记录的更新。Further, after the server sends the operation record to the first terminal, the server receives an update request. Wherein, the update request is sent by the first terminal to the server when the first smart card performs a write operation, and is used to instruct the first terminal to perform a write operation on the first smart card. The server adds the identifier of the first smart card in the update request, the time when the first terminal performs a write operation on the first smart card, and the location of the write operation to the operation record, thereby completing the update of the operation record.
本实施例中,通过服务器接收第一终端发送的同步请求后,查询预先存储的智能卡组的操作记录,向第一终端发送操作记录,以使若操作记录中的第二智能卡不为所述第一智能卡,则第一终端与加载第二智能卡的第二终端进行交互,以对第一智能卡与第二智能卡进行数据同步,从而避免了用户下载或存储用户数据时,需要分别在该至少两张智能卡中均进行上述操作,解决了如何在在至少两张智能卡之间进行数据同步的技术问题。In this embodiment, after receiving the synchronization request sent by the first terminal, the server queries the pre-stored operation record of the smart card group, and sends the operation record to the first terminal, so that if the second smart card in the operation record is not the first a smart card, the first terminal interacts with the second terminal loaded with the second smart card to synchronize data between the first smart card and the second smart card, thereby avoiding the need for the user to download or store user data in the at least two All the above operations are performed in the smart cards, which solves the technical problem of how to synchronize data between at least two smart cards.
图3为本发明一实施例提供的一种基于智能卡的数据同步装置的结构示意图,本实施例所提供的装置可设置于终端中,如图3所示,包括:第一发送模块31、接收模块32、同步模块33。Fig. 3 is a schematic structural diagram of a data synchronization device based on a smart card provided by an embodiment of the present invention. The device provided in this embodiment can be set in a terminal, as shown in Fig. 3 , including: a first sending module 31, a receiving Module 32, synchronization module 33.
第一发送模块31,用于向服务器发送同步请求,以使所述服务器查询智能卡组的操作记录。The first sending module 31 is configured to send a synchronization request to the server, so that the server can query the operation record of the smart card group.
其中,同步请求用于指示第一终端所加载的第一智能卡所属的智能卡组;所述操作记录用于指示智能卡组中的智能卡历次执行写操作的时刻。Wherein, the synchronization request is used to indicate the smart card group to which the first smart card loaded by the first terminal belongs; the operation record is used to indicate the time when the smart cards in the smart card group have performed previous write operations.
接收模块32,与第一发送模块31连接,用于接收服务器发送的所述智能卡组的操作记录。The receiving module 32 is connected with the first sending module 31, and is used for receiving the operation record of the smart card group sent by the server.
同步模块33,与接收模块32连接,用于若所述操作记录中最近一次执行写操作的第二智能卡不为所述第一智能卡,则所述第一终端与加载所述第二智能卡的第二终端进行交互,以对所述第一智能卡与所述第二智能卡进行数据同步。Synchronization module 33, connected with receiving module 32, used for if the second smart card that performs the last write operation in the operation record is not the first smart card, then the first terminal and the second smart card loaded with the second smart card The two terminals interact to synchronize data between the first smart card and the second smart card.
本实施例中,通过加载第一智能卡的第一终端向服务器发送同步请求后,接收服务器发送的第一智能卡所属的智能卡组的操作记录,若操作记录中的第二智能卡不为所述第一智能卡,则第一终端与加载第二智能卡的第二终端进行交互,以对第一智能卡与第二智能卡进行数据同步,从而避免了用户下载或存储用户数据时,需要分别在该至少两张智能卡中均进行上述操作,解决了如何在在至少两张智能卡之间进行数据同步的技术问题。In this embodiment, after the first terminal loaded with the first smart card sends a synchronization request to the server, the server receives the operation record of the smart card group to which the first smart card belongs. If the second smart card in the operation record is not the first smart card, the first terminal interacts with the second terminal loaded with the second smart card to synchronize the data between the first smart card and the second smart card, thereby avoiding the need for the user to download or store user data, respectively, in the at least two smart cards The above operations are performed in all of them, and the technical problem of how to perform data synchronization between at least two smart cards is solved.
图4为本发明一实施例提供的另一种基于智能卡的数据同步装置的结构示意图,在上一实施例的基础上,本实施例中的装置进一步包括:Figure 4 is a schematic structural diagram of another smart card-based data synchronization device provided by an embodiment of the present invention. On the basis of the previous embodiment, the device in this embodiment further includes:
第二发送模块34,与同步模块33连接,用于第一终端与加载所述第二智能卡的第二终端进行交互,以对所述第一智能卡与所述第二智能卡进行数据同步之后,当所述第一智能卡执行写操作时,向所述服务器发送更新请求,以使所述服务器根据所述更新请求,对所述操作记录进行更新;所述更新请求包括所述第一智能卡的标识和所述第一智能卡执行写操作的时刻。The second sending module 34 is connected with the synchronization module 33, and is used for the first terminal to interact with the second terminal loaded with the second smart card, so that after data synchronization is performed between the first smart card and the second smart card, when When the first smart card performs a write operation, it sends an update request to the server, so that the server updates the operation record according to the update request; the update request includes the identification of the first smart card and The moment when the first smart card executes the write operation.
获取模块35,用于从所述第一智能卡中读取大容量存储模块的标识和通信模块的标识,以及接收用户输入的所述智能卡组的标识和认证信息。The obtaining module 35 is configured to read the identifier of the mass storage module and the identifier of the communication module from the first smart card, and receive the identifier and authentication information of the smart card set input by the user.
第三发送模块36,与获取模块35和第一发送模块31连接,用于向服务器发送同步请求之前,向服务器发送包含所述存储模块的标识、所述通信模块的标识、所述智能卡组的标识和所述认证信息的请求,以使所述服务器根据所述认证信息进行认证通过后,建立所述存储模块的标识、所述通信模块的标识与所述智能卡组的标识之间的对应关系。The third sending module 36 is connected with the acquiring module 35 and the first sending module 31, and before sending the synchronization request to the server, sends to the server the identification of the storage module, the identification of the communication module, and the ID of the smart card group. identification and the request for the authentication information, so that the server establishes a correspondence between the identification of the storage module, the identification of the communication module, and the identification of the smart card group after the server passes the authentication according to the authentication information .
其中,对应关系用于确定加载该存储模块和该通信模块的第一智能卡属于所述智能卡组,该智能卡组的标识预先建立与所述第二智能卡的存储模块的标识和所述第二智能卡的通信模块的标识之间的对应关系,也就是说,智能卡组包括所述第二智能卡。Wherein, the corresponding relationship is used to determine that the first smart card loaded with the storage module and the communication module belongs to the smart card group, and the identification of the smart card group is pre-established with the identification of the storage module of the second smart card and the identification of the second smart card. The correspondence between the identifications of the communication modules, that is, the smart card group includes the second smart card.
本实施例中,通过加载第一智能卡的第一终端向服务器发送同步请求后,接收服务器发送的第一智能卡所属的智能卡组的操作记录,若操作记录中的第二智能卡不为所述第一智能卡,则第一终端与加载第二智能卡的第二终端进行交互,以对第一智能卡与第二智能卡进行数据同步,从而避免了用户下载或存储用户数据时,需要分别在该至少两张智能卡中均进行上述操作,解决了如何在在至少两张智能卡之间进行数据同步的技术问题。In this embodiment, after the first terminal loaded with the first smart card sends a synchronization request to the server, the server receives the operation record of the smart card group to which the first smart card belongs. If the second smart card in the operation record is not the first smart card, the first terminal interacts with the second terminal loaded with the second smart card to synchronize the data between the first smart card and the second smart card, thereby avoiding the need for the user to download or store user data, respectively, in the at least two smart cards The above operations are performed in all of them, and the technical problem of how to perform data synchronization between at least two smart cards is solved.
图5为本发明另一实施例提供的一种基于智能卡的数据同步装置的结构示意图,本实施例所提供的装置可设置于服务器中,如图5所示,包括:接收模块51、查询模块52和发送模块53。Fig. 5 is a schematic structural diagram of a data synchronization device based on a smart card provided by another embodiment of the present invention. The device provided by this embodiment can be set in a server, as shown in Fig. 5, including: a receiving module 51, a query module 52 and sending module 53.
接收模块51,用户接收第一终端发送的同步请求。In the receiving module 51, the user receives the synchronization request sent by the first terminal.
其中,同步请求用于指示所述第一终端所加载的第一智能卡所属的智能卡组。Wherein, the synchronization request is used to indicate the smart card group to which the first smart card loaded on the first terminal belongs.
查询模块52,与接收模块51连接,用于查询预先存储的智能卡组的操作记录。The query module 52 is connected with the receiving module 51 and is used for querying the pre-stored operation records of the smart card group.
其中,操作记录用于指示智能卡组中的智能卡历次执行写操作的时刻。Wherein, the operation record is used to indicate the times when the smart cards in the smart card group have performed write operations.
发送模块53,与查询模块52连接,用于向第一终端发送操作记录,以使若所述操作记录中最近一次执行写操作的第二智能卡不为所述第一智能卡,则所述第一终端与加载所述第二智能卡的第二终端进行交互,以对所述第一智能卡与所述第二智能卡进行数据同步。The sending module 53, connected with the query module 52, is used to send the operation record to the first terminal, so that if the second smart card that performs the last write operation in the operation record is not the first smart card, the first The terminal interacts with the second terminal loaded with the second smart card to synchronize data between the first smart card and the second smart card.
本实施例中,通过服务器接收第一终端发送的同步请求后,查询预先存储的智能卡组的操作记录,向第一终端发送操作记录,以使若操作记录中的第二智能卡不为所述第一智能卡,则第一终端与加载第二智能卡的第二终端进行交互,以对第一智能卡与第二智能卡进行数据同步,从而避免了用户下载或存储用户数据时,需要分别在该至少两张智能卡中均进行上述操作,解决了如何在在至少两张智能卡之间进行数据同步的技术问题。In this embodiment, after receiving the synchronization request sent by the first terminal, the server queries the pre-stored operation record of the smart card group, and sends the operation record to the first terminal, so that if the second smart card in the operation record is not the first a smart card, the first terminal interacts with the second terminal loaded with the second smart card to synchronize data between the first smart card and the second smart card, thereby avoiding the need for the user to download or store user data in the at least two All the above operations are performed in the smart cards, which solves the technical problem of how to synchronize data between at least two smart cards.
图6为本发明另一实施例提供的另一种基于智能卡的数据同步装置的结构示意图,在上一实施例的基础上,本实施例中的接收模块51,还用于接收更新请求;所述更新请求包括所述第一智能卡的标识和所述第一智能卡执行写操作的时刻。FIG. 6 is a schematic structural diagram of another smart card-based data synchronization device provided by another embodiment of the present invention. On the basis of the previous embodiment, the receiving module 51 in this embodiment is also used to receive an update request; The update request includes the identifier of the first smart card and the time when the first smart card performs a write operation.
基于此,基于智能卡的数据同步装置,还包括:Based on this, the data synchronization device based on the smart card also includes:
更新模块54,与接收模块51连接,用于根据所述更新请求中的第一智能卡的标识和所述第一终端对所述第一智能卡执行写操作的时刻,对所述操作记录进行更新。An update module 54, connected to the receiving module 51, configured to update the operation record according to the identifier of the first smart card in the update request and the time when the first terminal performs a write operation on the first smart card.
本实施例中,通过服务器接收第一终端发送的同步请求后,查询预先存储的智能卡组的操作记录,向第一终端发送操作记录,以使操作记录中的第二智能卡不为所述第一智能卡,则第一终端与加载第二智能卡的第二终端进行交互,以对第一智能卡与第二智能卡进行数据同步,从而避免了用户下载或存储用户数据时,需要分别在该至少两张智能卡中均进行上述操作,解决了如何在在至少两张智能卡之间进行数据同步的技术问题。In this embodiment, after receiving the synchronization request sent by the first terminal, the server queries the pre-stored operation records of the smart card group, and sends the operation records to the first terminal, so that the second smart card in the operation records is not the first smart card, the first terminal interacts with the second terminal loaded with the second smart card to synchronize the data between the first smart card and the second smart card, thereby avoiding the need for the user to download or store user data, respectively, in the at least two smart cards The above operations are performed in all of them, and the technical problem of how to perform data synchronization between at least two smart cards is solved.
本领域普通技术人员可以理解:实现上述各方法实施例的全部或部分步骤可以通过程序指令相关的硬件来完成。前述的程序可以存储于一计算机可读取存储介质中。该程序在执行时,执行包括上述各方法实施例的步骤;而前述的存储介质包括:ROM、RAM、磁碟或者光盘等各种可以存储程序代码的介质。Those of ordinary skill in the art can understand that all or part of the steps for implementing the above method embodiments can be completed by program instructions and related hardware. The aforementioned program can be stored in a computer-readable storage medium. When the program is executed, it executes the steps of the above-mentioned method embodiments; and the aforementioned storage medium includes: ROM, RAM, magnetic disk or optical disk and other various media that can store program codes.
最后应说明的是:以上各实施例仅用以说明本发明的技术方案,而非对其限制;尽管参照前述各实施例对本发明进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分或者全部技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本发明各实施例技术方案的范围。Finally, it should be noted that: the above embodiments are only used to illustrate the technical solutions of the present invention, rather than limiting them; although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that: It is still possible to modify the technical solutions described in the foregoing embodiments, or perform equivalent replacements for some or all of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the technical solutions of the various embodiments of the present invention. scope.
Claims (6)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410341516.2A CN104080077B (en) | 2014-07-17 | 2014-07-17 | Method of data synchronization and device based on smart card |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410341516.2A CN104080077B (en) | 2014-07-17 | 2014-07-17 | Method of data synchronization and device based on smart card |
Publications (2)
Publication Number | Publication Date |
---|---|
CN104080077A CN104080077A (en) | 2014-10-01 |
CN104080077B true CN104080077B (en) | 2017-09-22 |
Family
ID=51601079
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201410341516.2A Active CN104080077B (en) | 2014-07-17 | 2014-07-17 | Method of data synchronization and device based on smart card |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN104080077B (en) |
Families Citing this family (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106209769B (en) * | 2016-06-22 | 2019-08-23 | 捷开通讯(深圳)有限公司 | Data interactive method, cloud server and intelligent terminal |
CN107968993B (en) * | 2016-10-20 | 2020-08-07 | 中国移动通信有限公司研究院 | Data synchronization method, smart card and terminal |
CN109302700B (en) * | 2017-07-25 | 2021-03-23 | 展讯通信(上海)有限公司 | Multi-card mobile terminal, service processing method thereof and computer readable storage medium |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101751593A (en) * | 2008-11-28 | 2010-06-23 | 爱思开电讯投资(中国)有限公司 | Smart card and backup, recovering method and system thereof |
CN102098812A (en) * | 2011-02-16 | 2011-06-15 | 中兴通讯股份有限公司 | Data synchronization method and mobile terminal |
CN103812900A (en) * | 2012-11-13 | 2014-05-21 | 中国移动通信集团公司 | Data synchronization method, device and system |
CN103823726A (en) * | 2014-03-13 | 2014-05-28 | 中国联合网络通信集团有限公司 | SIM (subscriber identity module) card data backup method and terminal |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7051923B2 (en) * | 2003-09-12 | 2006-05-30 | Visa U.S.A., Inc. | Method and system for providing interactive cardholder rewards image replacement |
-
2014
- 2014-07-17 CN CN201410341516.2A patent/CN104080077B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101751593A (en) * | 2008-11-28 | 2010-06-23 | 爱思开电讯投资(中国)有限公司 | Smart card and backup, recovering method and system thereof |
CN102098812A (en) * | 2011-02-16 | 2011-06-15 | 中兴通讯股份有限公司 | Data synchronization method and mobile terminal |
CN103812900A (en) * | 2012-11-13 | 2014-05-21 | 中国移动通信集团公司 | Data synchronization method, device and system |
CN103823726A (en) * | 2014-03-13 | 2014-05-28 | 中国联合网络通信集团有限公司 | SIM (subscriber identity module) card data backup method and terminal |
Also Published As
Publication number | Publication date |
---|---|
CN104080077A (en) | 2014-10-01 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US11617073B2 (en) | Method enabling migration of a subscription | |
US12022571B2 (en) | Profile between devices in wireless communication system | |
US11868762B2 (en) | Method for authenticating and updating eUICC firmware version and related apparatus | |
US12238515B2 (en) | Apparatus and method for SSP device and server to negotiate digital certificates | |
KR102284954B1 (en) | Method and apparatus for downloading a profile in a wireless communication system | |
US11356841B2 (en) | Method and apparatus for handling remote profile management exception | |
US8863240B2 (en) | Method and system for smart card migration | |
CN107396360A (en) | Block verification method and device | |
CN113785532B (en) | Methods and devices for managing and verifying certificates | |
CN116032680B (en) | Configuration method and device of intelligent equipment, electronic equipment and storage medium | |
US20210160684A1 (en) | Method and apparatus for negotiating euicc version | |
CN114491455B (en) | Directory authorization method and device, processor and electronic device | |
CN104080077B (en) | Method of data synchronization and device based on smart card | |
CN114731283B (en) | Mutual device-to-device authentication method and device during device-to-device bundle or profile transfer | |
WO2016179866A1 (en) | Method and system for updating smart card of mobile terminal | |
CN103856535B (en) | A kind of method and apparatus obtaining user data | |
US20050246395A1 (en) | Databases synchronization | |
CN118632228A (en) | Method, apparatus and system for authorizing remote profile management | |
WO2018010448A1 (en) | File transmission method and apparatus | |
CN113242060A (en) | Network access method and device, storage medium and electronic device | |
CN112803957B (en) | Data processing method and system, embedded user card and terminal | |
CN118828482A (en) | Authentication system and configuration method | |
CN119806566A (en) | A firmware update method, terminal device and server | |
CN118803751A (en) | Authentication method, device, network equipment and storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |