CN113242549B - Data processing method, mobile device, UICC (Universal Integrated Circuit card) and terminal - Google Patents
Data processing method, mobile device, UICC (Universal Integrated Circuit card) and terminal Download PDFInfo
- Publication number
- CN113242549B CN113242549B CN202110472861.XA CN202110472861A CN113242549B CN 113242549 B CN113242549 B CN 113242549B CN 202110472861 A CN202110472861 A CN 202110472861A CN 113242549 B CN113242549 B CN 113242549B
- Authority
- CN
- China
- Prior art keywords
- processed
- data
- current
- data processing
- uicc
- 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
- 238000003672 processing method Methods 0.000 title claims abstract description 39
- 230000004044 response Effects 0.000 claims abstract description 168
- 238000000034 method Methods 0.000 claims abstract description 64
- 230000008569 process Effects 0.000 claims abstract description 43
- 230000002159 abnormal effect Effects 0.000 claims description 20
- 238000004590 computer program Methods 0.000 claims description 11
- 238000004891 communication Methods 0.000 abstract description 15
- 238000005516 engineering process Methods 0.000 abstract description 3
- 230000005540 biological transmission Effects 0.000 description 11
- 230000007246 mechanism Effects 0.000 description 11
- 230000005856 abnormality Effects 0.000 description 8
- 238000001514 detection method Methods 0.000 description 2
- 238000010586 diagram Methods 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 239000000725 suspension Substances 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 238000000605 extraction Methods 0.000 description 1
- 230000003993 interaction Effects 0.000 description 1
- 230000001172 regenerating effect Effects 0.000 description 1
- 230000000717 retained effect Effects 0.000 description 1
- 230000001960 triggered effect Effects 0.000 description 1
Images
Landscapes
- Mobile Radio Communication Systems (AREA)
Abstract
本发明提供一种数据处理方法,涉及通信技术领域,包括:响应于所述移动设备上的终端应用发送的基于GBA的数据处理请求,获取所述终端应用的待处理数据;基于所述待处理数据生成数据处理请求命令,并将所述数据处理请求命令发送至所述UICC,以供所述UICC利用预设共享密钥对所述待处理数据进行处理;获取所述UICC利用所述预设共享密钥处理后的所述待处理数据。本发明还提供一种移动设备、UICC及终端。
The present invention provides a data processing method, which relates to the field of communication technologies, and includes: in response to a GBA-based data processing request sent by a terminal application on the mobile device, acquiring data to be processed of the terminal application; generating a data processing request command from the data, and sending the data processing request command to the UICC for the UICC to process the data to be processed by using a preset shared key; obtaining the UICC using the preset shared key The data to be processed after the shared key is processed. The present invention also provides a mobile device, a UICC and a terminal.
Description
技术领域technical field
本发明涉及通信技术领域,具体涉及一种数据处理方法、移动设备、UICC及终端。The present invention relates to the technical field of communication, in particular to a data processing method, a mobile device, a UICC and a terminal.
背景技术Background technique
在第三代无线通信标准中,通用鉴权框架(Generic AuthenticationArchitecture,简称GAA)是多种应用业务实体使用的一个用于完成对用户身份进行验证的通用结构,应用GAA可实现用户终端(UE)与应用服务器(Network Application Function,简称NAF)之间的通信加密处理。GAA包含两种认证机制,一种为基于通信实体间的共享密钥进行认证(General Bootstrapping Architecture,简称GBA),另一种为基于公钥的证书进行认证。GBA机制通过生成UE与NAF之间的共享密钥,而使UE与NAF之间通过共享密钥进行通信。根据UE的实体能力和分工不同,GBA可分为GBA_ME和GBA_U两种,其中,UE的实体包括移动设备(Mobile Equipment,ME)和通用集成电路卡(Universal Integrated CircuitCard,简称UICC),GBA_ME是指密钥的协商和生成在UE的移动设备(简称ME)上完成,GBA_U是指密钥的协商和生成都在UICC上完成,GBA_U相较于GBA_ME具有更高的安全性。In the third-generation wireless communication standards, the Generic Authentication Architecture (GAA) is a general structure used by various application business entities to complete the authentication of user identities. The application of GAA can realize the user terminal (UE) Encryption processing of communication with an application server (Network Application Function, NAF for short). GAA includes two authentication mechanisms, one is authentication based on a shared key between communicating entities (General Bootstrapping Architecture, GBA for short), and the other is authentication based on a public key certificate. The GBA mechanism enables communication between the UE and the NAF through the shared key by generating the shared key between the UE and the NAF. According to the UE's physical capabilities and division of labor, GBA can be divided into two types: GBA_ME and GBA_U. Among them, UE entities include mobile equipment (Mobile Equipment, ME) and Universal Integrated Circuit Card (UICC for short), and GBA_ME refers to The negotiation and generation of the key are completed on the UE's mobile equipment (referred to as ME). GBA_U means that the negotiation and generation of the key are completed on the UICC. Compared with GBA_ME, GBA_U has higher security.
在GBA_U机制下,UICC生成的共享密钥包含两个,其中一个共享密钥存储于UICC中,不泄露给UE的ME,而另一个共享密钥则由UICC发送至ME进行存储。现有技术中,对于UE的移动设备和UICC相互关联的应用而言,UE中安装于ME中的应用在与NAF进行通信时,通常将存储于ME中的密钥作为共享密钥,而安装于UICC中的应用在与NAF进行通信时,通常将存储于UICC中的密钥作为共享密钥,ME侧的应用和UICC侧的应用共同支撑业务功能的实现,如UICC侧的应用提供安全能力、证书的存储和使用等,ME侧的应用提供用户服务和本地管理等。在这种情况下,ME侧的应用和UICC侧的应用均可能需要进行GBA业务,如ME侧的应用的接入认证业务和UICC侧的应用的证书加密传输业务等。在进行GBA业务过程中,对于ME应用和UICC应用公用的NAF来说,NAF也需要使用不同的共享密钥来分别对ME应用的通信数据和UICC应用的通信数据进行数据处理,这导致NAF管理共享密钥的复杂度较高,不便于对共享密钥进行统一管理。Under the GBA_U mechanism, the shared key generated by the UICC includes two, one of which is stored in the UICC and will not be disclosed to the ME of the UE, and the other shared key is sent by the UICC to the ME for storage. In the prior art, for applications associated with the mobile equipment of the UE and the UICC, when the application installed in the ME in the UE communicates with the NAF, the key stored in the ME is usually used as a shared key, and the installed When the application in the UICC communicates with the NAF, the key stored in the UICC is usually used as a shared key. The application on the ME side and the application on the UICC side jointly support the realization of business functions. For example, the application on the UICC side provides security capabilities , storage and use of certificates, etc., and applications on the ME side provide user services and local management. In this case, both the ME side application and the UICC side application may need to perform GBA services, such as the access authentication service of the ME side application and the certificate encryption transmission service of the UICC side application. During the GBA business process, for the NAF shared by the ME application and the UICC application, the NAF also needs to use different shared keys to process the communication data of the ME application and the communication data of the UICC application respectively, which causes the NAF management The complexity of the shared key is high, and it is inconvenient to perform unified management on the shared key.
发明内容SUMMARY OF THE INVENTION
本发明旨在至少解决现有技术中存在的技术问题之一,提出了一种数据处理方法、移动设备、UICC及终端。The present invention aims to solve at least one of the technical problems existing in the prior art, and proposes a data processing method, a mobile device, a UICC and a terminal.
第一方面,本发明提供一种数据处理方法,应用于用户终端的移动设备,所述用户终端包括所述移动设备和UICC,所述数据处理方法包括:In a first aspect, the present invention provides a data processing method applied to a mobile device of a user terminal, where the user terminal includes the mobile device and a UICC, and the data processing method includes:
响应于所述移动设备上的终端应用发送的基于GBA的数据处理请求,获取所述终端应用的待处理数据;Responding to a GBA-based data processing request sent by a terminal application on the mobile device, acquiring data to be processed by the terminal application;
基于所述待处理数据生成数据处理请求命令,并将所述数据处理请求命令发送至所述UICC,以供所述UICC利用预设共享密钥对所述待处理数据进行处理;generating a data processing request command based on the data to be processed, and sending the data processing request command to the UICC, so that the UICC can process the data to be processed by using a preset shared key;
获取所述UICC利用所述预设共享密钥处理后的所述待处理数据。Obtaining the data to be processed processed by the UICC using the preset shared key.
优选的,所述待处理数据包括多个第一待处理数据块,所述数据处理请求命令包括多个数据处理请求子命令,每个所述数据处理请求子命令对应包括一个所述第一待处理数据块;Preferably, the data to be processed includes a plurality of first data blocks to be processed, the data processing request command includes a plurality of data processing request subcommands, each of the data processing request subcommands includes one of the first pending process data blocks;
所述根据所述待处理数据生成数据处理请求命令,并将所述数据处理请求命令发送至所述UICC的步骤,包括:The step of generating a data processing request command according to the data to be processed, and sending the data processing request command to the UICC includes:
针对多个所述第一待处理数据块中的当前所述第一待处理数据块,根据当前所述第一待处理数据块生成当前所述数据处理请求子命令;For the current first data block to be processed among the plurality of first data blocks to be processed, generate the current data processing request subcommand according to the current first data block to be processed;
向所述UICC发送当前所述数据处理请求子命令,当前所述数据处理请求子命令包括当前所述第一待处理数据块;sending the current data processing request subcommand to the UICC, where the current data processing request subcommand includes the current first data block to be processed;
响应于所述UICC针对当前所述数据处理请求子命令返回的当前第一命令响应消息,将多个所述第一待处理数据块中的下一个所述第一待处理数据块作为当前所述第一待处理数据块,以及In response to the current first command response message returned by the UICC for the current data processing request subcommand, use the next first data block to be processed among the multiple first data blocks to be processed as the current the first pending data block, and
执行所述根据当前所述第一待处理数据块生成当前所述数据处理请求子命令的步骤。Executing the step of generating the current data processing request subcommand according to the current first data block to be processed.
优选的,所述根据所述待处理数据生成数据处理请求命令,并将所述数据处理请求命令发送至所述UICC的步骤,包括:Preferably, the step of generating a data processing request command according to the data to be processed, and sending the data processing request command to the UICC includes:
根据完整的所述待处理数据生成所述数据处理请求命令,所述数据处理请求命令包含完整的所述待处理数据;generating the data processing request command according to the complete data to be processed, the data processing request command including the complete data to be processed;
向所述UICC发送包含完整的所述待处理数据的所述数据处理请求命令。sending the data processing request command including the complete data to be processed to the UICC.
优选的,所述向所述UICC发送当前所述数据处理请求子命令的步骤之后,还包括:Preferably, after the step of sending the current data processing request subcommand to the UICC, it further includes:
接收所述UICC针对当前所述数据处理请求子命令返回的当前第一命令响应消息;receiving the current first command response message returned by the UICC for the current data processing request subcommand;
若所述当前第一命令响应消息指示重传当前所述第一待处理数据块,则执行所述根据当前所述第一待处理数据块生成当前所述数据处理请求子命令的步骤;If the current first command response message indicates retransmission of the current first data block to be processed, performing the step of generating the current data processing request subcommand according to the current first data block to be processed;
若所述当前第一命令响应消息指示发送下一个所述第一待处理数据块,则执行所述响应于所述UICC针对当前所述数据处理请求子命令返回的当前第一命令响应消息,将多个所述第一待处理数据块中的下一个所述第一待处理数据块作为当前所述第一待处理数据块的步骤。If the current first command response message indicates to send the next first data block to be processed, execute the current first command response message returned by the UICC in response to the current data processing request subcommand, and send The next first data block to be processed among the plurality of first data blocks to be processed is used as the step of the current first data block to be processed.
优选的,所述获取所述UICC利用所述预设共享密钥处理后的所述待处理数据的步骤,包括:Preferably, the step of obtaining the data to be processed processed by the UICC using the preset shared key includes:
接收所述UICC返回的数据处理响应消息,所述数据处理响应消息包含所述处理后的所述待处理数据。receiving a data processing response message returned by the UICC, where the data processing response message includes the processed data to be processed.
优选的,所述处理后的所述待处理数据包括多个第二待处理数据块;Preferably, the processed data to be processed includes a plurality of second data blocks to be processed;
所述获取所述UICC利用所述预设共享密钥处理后的所述待处理数据的步骤,包括:The step of obtaining the data to be processed processed by the UICC using the preset shared key includes:
接收所述UICC返回的当前数据处理响应消息,当前数据处理响应消息包含多个第二待处理数据块中的当前所述第二待处理数据块,以及用于指示通过发送命令获取下一个所述第二待处理数据块的信息;Receiving the current data processing response message returned by the UICC, the current data processing response message includes the current second data block to be processed among the plurality of second data blocks to be processed, and is used to indicate that the next data block to be processed is obtained by sending a command information of the second data block to be processed;
检测所述当前数据处理响应消息是否存在异常;Detecting whether the current data processing response message is abnormal;
若检测出所述当前数据处理响应消息存在异常,生成用于指示所述UICC重传当前第二待处理数据块的当前数据获取请求命令,并向所述UICC发送该当前数据获取请求命令,以供所述UICC响应于该当前数据获取请求命令,基于当前所述第二待处理数据块重新生成当前数据处理响应消息;If it is detected that the current data processing response message is abnormal, generate a current data acquisition request command for instructing the UICC to retransmit the current second data block to be processed, and send the current data acquisition request command to the UICC, to Responding to the current data acquisition request command, the UICC regenerates a current data processing response message based on the current second data block to be processed;
若检测出所述当前数据处理响应消息不存在异常,生成用于指示所述UICC传送下一个所述第二待处理数据块的当前数据获取请求命令,并向所述UICC发送该当前数据获取请求命令,以供所述UICC响应于该当前数据获取请求命令,将下一个所述第二待处理数据块作为当前所述第二待处理数据块,并基于当前所述第二待处理数据块生成当前数据处理响应消息;If it is detected that there is no abnormality in the current data processing response message, generate a current data acquisition request command for instructing the UICC to transmit the next second data block to be processed, and send the current data acquisition request to the UICC The command is used for the UICC to respond to the current data acquisition request command, use the next second data block to be processed as the current second data block to be processed, and generate the data based on the current second data block to be processed Current data processing response message;
执行所述接收所述UICC返回的当前数据处理响应消息的步骤。Executing the step of receiving the current data processing response message returned by the UICC.
第二方面,本发明还提供一种数据处理方法,应用于用户终端的UICC,所述用户终端包括移动设备和所述UICC,所述数据处理方法包括:In a second aspect, the present invention also provides a data processing method applied to a UICC of a user terminal, where the user terminal includes a mobile device and the UICC, and the data processing method includes:
接收所述移动设备发送的数据处理请求命令,所述数据处理请求命令为所述移动设备基于终端应用发送的基于GBA的待处理数据生成的命令;receiving a data processing request command sent by the mobile device, where the data processing request command is a command generated by the mobile device based on the GBA-based data to be processed sent by the terminal application;
利用预设共享密钥对所述待处理数据进行处理;Processing the data to be processed by using a preset shared key;
将处理后的所述待处理数据发送至所述移动设备。sending the processed data to be processed to the mobile device.
优选的,所述待处理数据包括多个第一待处理数据块,所述数据处理请求命令包括多个数据处理请求子命令,每个所述数据处理请求子命令对应包括一个所述第一待处理数据块;Preferably, the data to be processed includes a plurality of first data blocks to be processed, the data processing request command includes a plurality of data processing request subcommands, each of the data processing request subcommands includes one of the first pending process data blocks;
所述接收所述移动设备发送的数据处理请求命令的步骤包括:The step of receiving the data processing request command sent by the mobile device includes:
接收所述移动设备发送的当前所述数据处理请求子命令,当前所述数据处理请求子命令包括当前所述第一待处理数据块;receiving the current data processing request subcommand sent by the mobile device, where the current data processing request subcommand includes the current first pending data block;
响应于当前所述数据处理请求子命令,生成当前第一命令响应消息,并将所述当前第一命令响应消息发送至所述移动设备,以供所述移动设备针对当前所述第一命令响应消息,将多个所述第一待处理数据块中的下一个所述第一待处理数据块作为当前所述第一待处理数据块,并根据当前所述第一待处理数据块生成当前所述数据处理请求子命令;In response to the current data processing request subcommand, generate a current first command response message, and send the current first command response message to the mobile device, for the mobile device to respond to the current first command message, using the next first data block to be processed among the multiple first data blocks to be processed as the current first data block to be processed, and generating the current data block according to the current first data block to be processed The above data processing request subcommand;
执行所述接收所述移动设备发送的当前所述数据处理请求子命令的步骤。Executing the step of receiving the current data processing request subcommand sent by the mobile device.
优选的,所述接收所述移动设备发送的数据处理请求命令的步骤包括:Preferably, the step of receiving the data processing request command sent by the mobile device includes:
接收所述移动设备发送的数据处理请求命令,所述数据处理请求命令为所述移动设备根据完整的所述待处理数据生成,所述数据处理请求命令包含完整的所述待处理数据。Receive a data processing request command sent by the mobile device, the data processing request command is generated by the mobile device based on the complete data to be processed, and the data processing request command includes the complete data to be processed.
优选的,所述接收所述移动设备发送的当前所述数据处理请求子命令的步骤之后,还包括:Preferably, after the step of receiving the current data processing request subcommand sent by the mobile device, it further includes:
检测当前所述数据处理请求子命令是否存在异常;Detect whether the current data processing request subcommand is abnormal;
若检测出当前所述数据处理请求子命令存在异常,则生成用于指示所述移动设备重传当前所述第一待处理数据块的当前第一命令响应消息,以供所述移动设备根据当前所述第一待处理数据块生成当前所述数据处理请求子命令;If it is detected that the current data processing request sub-command is abnormal, a current first command response message for instructing the mobile device to retransmit the current first data block to be processed is generated for the mobile device to use according to the current The first data block to be processed generates the current data processing request subcommand;
若检测出当前所述数据处理请求子命令不存在异常,则生成用于指示所述移动设备传送下一个所述第一待处理数据块的当前第一命令响应消息,以供所述移动设备针对当前所述第一命令响应消息,将多个所述第一待处理数据块中的下一个所述第一待处理数据块作为当前所述第一待处理数据块,并根据当前所述第一待处理数据块生成当前所述数据处理请求子命令。If it is detected that there is no abnormality in the current data processing request subcommand, a current first command response message for instructing the mobile device to transmit the next first data block to be processed is generated for the mobile device to respond to The current first command response message uses the next first data block to be processed among the plurality of first data blocks to be processed as the current first data block to be processed, and according to the current first data block The data block to be processed generates the current data processing request subcommand.
优选的,所述将处理后的所述待处理数据发送至所述移动设备的步骤包括:Preferably, the step of sending the processed data to be processed to the mobile device includes:
根据处理后的所述待处理数据生成数据处理响应消息,所述数据处理响应消息包括处理后的所述待处理数据;generating a data processing response message according to the processed data to be processed, where the data processing response message includes the processed data to be processed;
将所述数据处理响应消息发送至所述移动设备。sending the data processing response message to the mobile device.
优选的,所述处理后的所述待处理数据包括多个第二待处理数据块;Preferably, the processed data to be processed includes a plurality of second data blocks to be processed;
所述将处理后的所述待处理数据发送至所述移动设备的步骤包括:The step of sending the processed data to be processed to the mobile device includes:
针对多个所述第二待处理数据块中的当前所述第二待处理数据块,根据当前所述第二待处理数据块生成当前数据处理响应消息;For the current second data block to be processed among the plurality of second data blocks to be processed, generate a current data processing response message according to the current second data block to be processed;
向所述移动设备发送当前所述数据处理响应消息,当前所述数据处理响应消息包括当前所述第二待处理数据块;sending the current data processing response message to the mobile device, where the current data processing response message includes the current second data block to be processed;
响应于所述移动设备针对当前所述数据处理响应消息返回的当前数据获取请求命令指示传送下一个所述第二待处理数据块,将多个所述第二待处理数据块中的下一个所述第二待处理数据块作为当前所述第二待处理数据块,并In response to the current data acquisition request command returned by the mobile device for the current data processing response message indicating to transmit the next second data block to be processed, the next one of the plurality of second data blocks to be processed The second data block to be processed is used as the current second data block to be processed, and
执行所述根据当前所述第二待处理数据块生成当前数据处理响应消息的步骤;Executing the step of generating a current data processing response message according to the current second data block to be processed;
响应于所述移动设备针对当前所述数据处理响应消息返回的当前数据获取请求命令指示重传当前所述第二待处理数据块,直接执行所述根据当前所述第二待处理数据块生成当前数据处理响应消息的步骤。In response to the current data acquisition request command returned by the mobile device for the current data processing response message indicating to retransmit the current second data block to be processed, directly execute the generating the current data block according to the current second data block to be processed. Steps for data processing response messages.
优选的,所述预设共享密钥为Ks_int_NAF密钥。Preferably, the preset shared key is a Ks_int_NAF key.
第三方面,本发明提供一种移动设备,包括:存储模块和至少一个处理器,所述存储模块中存储有计算机程序,所述计算机程序被至少一个所述处理器执行时实现第一方面所提供的数据处理方法。In a third aspect, the present invention provides a mobile device, including: a storage module and at least one processor, wherein a computer program is stored in the storage module, and when the computer program is executed by at least one of the processors, the first aspect is implemented. provided data processing methods.
第四方面,本发明提供一种UICC,包括:存储模块和至少一个处理器,所述存储模块中存储有计算机程序,所述计算机程序被至少一个所述处理器执行时实现本发明第二方面所提供的数据处理方法。In a fourth aspect, the present invention provides a UICC, including: a storage module and at least one processor, wherein a computer program is stored in the storage module, and when the computer program is executed by at least one of the processors, the second aspect of the present invention is implemented Provided data processing methods.
第五方面,本发明还提供一种终端,包括移动设备和UICC,其中,所述移动设备采用本发明第三方面所提供的移动设备,所述UICC采用本发明第四方面所提供的UICC。In the fifth aspect, the present invention further provides a terminal, including a mobile device and a UICC, wherein the mobile device adopts the mobile device provided in the third aspect of the present invention, and the UICC adopts the UICC provided in the fourth aspect of the present invention.
本发明的有益技术效果:Beneficial technical effect of the present invention:
本发明提供的数据处理方法、移动设备、UICC及终端,安装于移动设备上的终端应用在基于GBA机制下需要与应用服务器进行通信时,将待处理数据发送至移动设备,移动设备基于该待处理数据生成基于GBA的数据处理请求命令,并将该数据处理请求命令发送至UICC,UICC响应于该数据处理请求命令而利用自身存储的预设共享密钥来对待处理数据进行处理,并将处理后的待处理数据返回至移动设备,以供终端应用使用,本发明实现了利用UICC内存储的共享密钥来对安装于移动设备中的终端应用的通信数据进行处理的过程,相较于现有技术,避免了使用不同的共享密钥来对用户终端上安装于不同模块(移动设备和UICC)的应用的通信数据进行处理,从而降低了应用服务器管理共享密钥的复杂度,实现了密钥的统一管理。In the data processing method, mobile device, UICC and terminal provided by the present invention, when the terminal application installed on the mobile device needs to communicate with the application server based on the GBA mechanism, the data to be processed is sent to the mobile device, and the mobile device based on the Process the data to generate a GBA-based data processing request command, and send the data processing request command to the UICC, and the UICC uses the preset shared key stored by itself to process the data to be processed, and the processing The final data to be processed is returned to the mobile device for use by the terminal application. The present invention realizes the process of using the shared key stored in the UICC to process the communication data of the terminal application installed in the mobile device. Compared with the current The technology avoids the use of different shared keys to process the communication data of applications installed in different modules (mobile devices and UICCs) on the user terminal, thereby reducing the complexity of the application server's management of shared keys and realizing encryption Unified management of keys.
附图说明Description of drawings
图1为本发明实施例提供的一种用户终端的结构示意图;FIG. 1 is a schematic structural diagram of a user terminal provided by an embodiment of the present invention;
图2为本发明实施例提供的一种数据处理方法的流程图;FIG. 2 is a flowchart of a data processing method provided by an embodiment of the present invention;
图3为本发明实施例提供的另一种数据处理方法的流程图;FIG. 3 is a flowchart of another data processing method provided by an embodiment of the present invention;
图4为本发明实施例提供的又一种数据处理方法的流程图;FIG. 4 is a flowchart of another data processing method provided by an embodiment of the present invention;
图5为本发明实施例提供的再一种数据处理方法的流程图;FIG. 5 is a flowchart of another data processing method provided by an embodiment of the present invention;
图6为本发明实施例提供的再一种数据处理方法的流程图;FIG. 6 is a flowchart of another data processing method provided by an embodiment of the present invention;
图7为本发明实施例提供的再一种数据处理方法的流程图;FIG. 7 is a flowchart of another data processing method provided by an embodiment of the present invention;
图8为本发明实施例提供的再一种数据处理方法的流程图;FIG. 8 is a flowchart of another data processing method provided by an embodiment of the present invention;
图9为本发明实施例提供的再一种数据处理方法的流程图。FIG. 9 is a flowchart of another data processing method provided by an embodiment of the present invention.
具体实施方式Detailed ways
为使本领域的技术人员更好地理解本发明的技术方案,下面结合附图来对本发明提供的数据处理方法、移动设备、UICC及终端进行详细描述。In order to enable those skilled in the art to better understand the technical solution of the present invention, the data processing method, mobile device, UICC and terminal provided by the present invention will be described in detail below in conjunction with the accompanying drawings.
本发明提供的数据处理方法用于处理用户终端与应用服务器进行通信时所涉及的数据,数据处理过程主要在用户终端内进行。图1为本发明实施例提供的一种用户终端的结构示意图,如图1所示,本发明中的用户终端(UE)具体包括移动设备1和UICC2,其中,UICC(Universal Integrated Circuit Card,通用集成电路卡)是一个通用智能卡平台,其上驻留有多种应用,例如USIM、银行及票务等智能卡应用,UICC为其上层应用提供统一的底层支撑。The data processing method provided by the present invention is used to process the data involved in the communication between the user terminal and the application server, and the data processing process is mainly carried out in the user terminal. FIG. 1 is a schematic structural diagram of a user terminal provided by an embodiment of the present invention. As shown in FIG. 1 , the user terminal (UE) in the present invention specifically includes a mobile device 1 and a UICC2, wherein a UICC (Universal Integrated Circuit Card, universal Integrated circuit card) is a general smart card platform, on which resides a variety of applications, such as USIM, banking and ticketing and other smart card applications, and UICC provides a unified underlying support for its upper-level applications.
下面将分别以移动设备和UICC作为执行主体来对本发明提供的数据处理方法进行详细描述。The data processing method provided by the present invention will be described in detail below with the mobile device and the UICC as execution bodies respectively.
图2为本发明实施例提供的一种数据处理方法的流程图,本实施例基于用户终端中的移动设备实现,如图2所示,该方法包括:FIG. 2 is a flowchart of a data processing method provided by an embodiment of the present invention. This embodiment is implemented based on a mobile device in a user terminal. As shown in FIG. 2 , the method includes:
步骤S101、响应于移动设备上的终端应用发送的基于GBA的数据处理请求,获取终端应用的待处理数据。Step S101 , in response to the GBA-based data processing request sent by the terminal application on the mobile device, acquire data to be processed by the terminal application.
GBA((General Bootstrapping Architecture,简称GBA))为一种基于通信实体间的共享密钥进行认证的认证机制,GBA机制通过生成UE与NAF之间的共享密钥,而使UE与NAF之间通过该共享密钥进行通信,GBA因UICC功能的不同而分为GBA_ME和GBA_U两种,本发明实施例特别涉及GBA_U机制下的数据处理过程,GBA_U是指密钥的协商和生成都在UICC上完成的GBA过程。GBA ((General Bootstrapping Architecture, GBA for short)) is an authentication mechanism based on the shared key between communication entities. The GBA mechanism generates a shared key between UE and NAF, so that the UE and NAF pass The shared key communicates. GBA is divided into GBA_ME and GBA_U due to different UICC functions. The embodiment of the present invention particularly relates to the data processing process under the GBA_U mechanism. GBA_U means that the key negotiation and generation are all completed on the UICC The GBA process.
本发明实施例中,当安装于移动设备上的终端应用需要与应用服务器进行通信时,其向移动设备发送数据处理请求,该数据处理请求是基于GBA机制下的数据处理请求,移动设备在接收到终端应用发送的基于GBA的数据处理请求后,获取终端应用的待处理数据,优选的,移动设备获取终端应用的待处理数据的方式可以是终端应用通过基于GBA的数据处理请求将待处理数据发送至移动设备。In the embodiment of the present invention, when the terminal application installed on the mobile device needs to communicate with the application server, it sends a data processing request to the mobile device. The data processing request is based on the data processing request under the GBA mechanism, and the mobile device receives After receiving the GBA-based data processing request sent by the terminal application, the data to be processed by the terminal application is obtained. Preferably, the mobile device obtains the data to be processed by the terminal application. Send to mobile device.
步骤S102、基于待处理数据生成数据处理请求命令,并将数据处理请求命令发送至UICC,以供UICC利用预设共享密钥对待处理数据进行处理。Step S102, generating a data processing request command based on the data to be processed, and sending the data processing request command to the UICC, so that the UICC can process the data to be processed by using a preset shared key.
移动设备在获取到待处理数据后,基于该待处理数据生成数据处理请求命令,并将该数据处理请求命令发送至UICC,UICC通过该数据处理请求命令获取到待处理数据,并且UICC响应于该数据处理请求命令而利用自身存储的预设共享密钥来对待处理数据进行处理,具体的,该处理过程包括数据加密、身份认证等。After obtaining the data to be processed, the mobile device generates a data processing request command based on the data to be processed, and sends the data processing request command to the UICC, and the UICC obtains the data to be processed through the data processing request command, and the UICC responds to the The data processing request command uses the preset shared key stored by itself to process the data to be processed. Specifically, the processing process includes data encryption, identity authentication, and so on.
本发明实施例中,数据处理请求命令是移动设备和UICC之间在GBA场景下的数据交互命令,满足了终端应用的待处理数据使用存储于UICC中的共享密钥来进行处理的要求,该数据处理请求命令可基于预设的第一命令格式生成。In the embodiment of the present invention, the data processing request command is a data interaction command between the mobile device and the UICC in the GBA scenario, which satisfies the requirement that the terminal application's data to be processed is processed using the shared key stored in the UICC. The data processing request command may be generated based on a preset first command format.
步骤S103、获取UICC利用预设共享密钥处理后的待处理数据。Step S103, acquiring the data to be processed processed by the UICC using the preset shared key.
UICC在对待处理数据进行处理后,将处理后的待处理数据返回至移动设备,以供移动移动设备上安装的终端应用使用。优选的,UICC可通过生成与上述数据处理请求命令对应的响应命令来将处理后的待处理数据反馈至移动设备。After the UICC processes the data to be processed, it returns the processed data to be processed to the mobile device for use by terminal applications installed on the mobile device. Preferably, the UICC can feed back the processed data to be processed to the mobile device by generating a response command corresponding to the above data processing request command.
本发明实施例中,安装于移动设备上的终端应用在基于GBA机制下需要与应用服务器进行通信时,将待处理数据发送至移动设备,移动设备基于该待处理数据生成基于GBA的数据处理请求命令,并将该数据处理请求命令发送至UICC,UICC响应于该数据处理请求命令而利用自身存储的预设共享密钥来对待处理数据进行处理,并将处理后的待处理数据返回至移动设备,以供终端应用使用,本发明实施例实现了利用UICC内存储的共享密钥来对安装于移动设备中的终端应用的通信数据进行处理的过程,相较于现有技术,避免了使用不同的共享密钥来对用户终端上安装于不同模块(移动设备和UICC)的应用的通信数据进行处理,从而降低了应用服务器管理共享密钥的复杂度,实现了密钥的统一管理。In the embodiment of the present invention, when the terminal application installed on the mobile device needs to communicate with the application server based on the GBA mechanism, it sends the data to be processed to the mobile device, and the mobile device generates a GBA-based data processing request based on the data to be processed command, and send the data processing request command to the UICC, and the UICC uses the preset shared key stored by itself to process the data to be processed in response to the data processing request command, and returns the processed data to be processed to the mobile device , for use by terminal applications. The embodiment of the present invention realizes the process of processing the communication data of the terminal application installed in the mobile device by using the shared key stored in the UICC. Compared with the prior art, it avoids the use of different The shared key is used to process the communication data of the applications installed in different modules (mobile device and UICC) on the user terminal, thereby reducing the complexity of managing the shared key by the application server and realizing the unified management of the key.
在一些实施例中,当终端应用的待处理数据的数据量较大时,移动设备在基于待处理数据生成数据处理请求命令并发送至UICC时可基于数据分块传输的方式实现。即,将待处理数据被分割为多个第一待处理数据块,对应的,数据处理请求命令包括多个数据处理请求子命令,每个数据处理请求子命令对应包括一个第一待处理数据块。具体的,如图3所示,图3为本发明实施例提供的另一种数据处理方法的流程图,本实施例在图2所示实施例的基础上,步骤S102可具体包括:In some embodiments, when the amount of data to be processed by the terminal application is large, the mobile device may transmit data in blocks when generating a data processing request command based on the data to be processed and sending it to the UICC. That is, the data to be processed is divided into multiple first data blocks to be processed, correspondingly, the data processing request command includes multiple data processing request subcommands, and each data processing request subcommand correspondingly includes a first data block to be processed . Specifically, as shown in FIG. 3, FIG. 3 is a flowchart of another data processing method provided by the embodiment of the present invention. In this embodiment, on the basis of the embodiment shown in FIG. 2, step S102 may specifically include:
步骤S1021、针对多个第一待处理数据块中的当前第一待处理数据块,根据当前第一待处理数据块生成当前数据处理请求子命令。Step S1021 , for the current first data block to be processed among the plurality of first data blocks to be processed, generate a current data processing request subcommand according to the current first data block to be processed.
步骤S1022、向UICC发送当前数据处理请求子命令。Step S1022, sending the current data processing request subcommand to the UICC.
步骤S1023、响应于UICC针对当前数据处理请求子命令返回的当前第一命令响应消息,将多个第一待处理数据块中的下一个第一待处理数据块作为当前第一待处理数据块,并返回执行步骤S1021。Step S1023, in response to the current first command response message returned by the UICC for the current data processing request subcommand, use the next first data block to be processed among the plurality of first data blocks to be processed as the current first data block to be processed, And return to step S1021.
在一些实施例中,待处理数据被分割为多个第一待处理数据块后,移动设备对该多个第一待处理数据块进行顺序处理,其中,当前第一待处理数据块是指多个第一待处理数据块中马上要被处理的数据块。In some embodiments, after the data to be processed is divided into multiple first data blocks to be processed, the mobile device sequentially processes the multiple first data blocks to be processed, wherein the current first data block to be processed refers to multiple The data block to be processed immediately in the first pending data block.
在步骤S1021中,移动设备基于预设的第一命令格式,根据当前第一待处理数据块生成当前数据处理请求子命令,该当前数据处理请求子命令中包括当前第一待处理数据块;在步骤S1023中,当UICC接收到该当前数据处理请求子命令后,生成当前第一命令响应消息,并将该当前第一命令响应消息反馈至移动设备,移动设备在接收待该当前第一命令响应消息后,将多个第一待处理数据块中下一个第一待处理数据块作为当前第一待处理数据块,并返回执行步骤S1021,直至将全部第一待处理数据块均通过数据处理请求子命令的方式成功发送至UICC。其中,下一个第一待处理数据块是指按照预设顺序排列的多个第一待处理数据中排在当前第一待处理数据块顺序之后的即将要被处理的第一待处理数据块,在实际应用中,为便于顺序提取第一待处理数据块,可在将待处理数据分割为多个第一待处理数据块后,对多个第一待处理数据块按顺序进行编号,在数据处理过程中按该编号的顺序提取第一待处理数据块。In step S1021, based on the preset first command format, the mobile device generates a current data processing request subcommand according to the current first data block to be processed, and the current data processing request subcommand includes the current first data block to be processed; In step S1023, after the UICC receives the current data processing request subcommand, it generates the current first command response message, and feeds back the current first command response message to the mobile device, and the mobile device waits for the current first command response message after receiving the current first command response message. After the message, take the next first data block to be processed among the multiple first data blocks to be processed as the current first data block to be processed, and return to step S1021 until all the first data blocks to be processed pass the data processing request Subcommand mode successfully sent to UICC. Wherein, the next first to-be-processed data block refers to the first to-be-processed data block that is about to be processed after the order of the current first to-be-processed data block among the plurality of first to-be-processed data arranged in a preset order, In practical applications, in order to facilitate sequential extraction of the first data blocks to be processed, after the data to be processed is divided into multiple first data blocks to be processed, the multiple first data blocks to be processed can be numbered in order, and the data During processing, the first data block to be processed is extracted in the order of the numbers.
在一些实施例中,在UICC侧,UICC在接收到当前数据处理请求子命令后,基于当前数据处理请求子命令判断移动设备中当前是否还剩余有第一待处理数据块需要发送,该判断过程可通过识别当前数据处理请求子命令中的相关字段来确定,例如,在当前数据处理请求子命令中设置某一字段用来标识剩余数据块的数量,UICC检测该字段以确定出剩余数据块的数量。当UICC判断出移动设备中当前还剩余有第一待处理数据块需要发送时,UICC将生成第一命令响应消息,以使移动设备响应该第一命令响应消息而继续发送剩余第一待处理数据块,而当判断出移动设备中的第一待处理数据块已发送完时,UICC将不再生成第一命令响应消息返回至移动设备,而是执行对待处理数据进行处理的过程,此时,上述步骤S1021~S1023的循环结束。In some embodiments, on the UICC side, after receiving the current data processing request subcommand, the UICC judges based on the current data processing request subcommand whether there is still a first pending data block to be sent in the mobile device. The judgment process It can be determined by identifying the relevant fields in the current data processing request subcommand. For example, a certain field is set in the current data processing request subcommand to identify the number of remaining data blocks, and the UICC detects this field to determine the number of remaining data blocks. quantity. When the UICC judges that there is still a first pending data block to be sent in the mobile device, the UICC will generate a first command response message, so that the mobile device continues to send the remaining first pending data in response to the first command response message block, and when it is determined that the first data block to be processed in the mobile device has been sent, the UICC will no longer generate the first command response message and return it to the mobile device, but will execute the process of processing the data to be processed. At this time, The loop of the above steps S1021 to S1023 ends.
在一些实施例中,当待处理数据的数据量较小时,可不对待处理数据进行分割而直接根据待处理数据生成数据处理请求命令。即,步骤S102包括:根据完整的待处理数据生成数据处理请求命令,并向UICC发送包含完整的待处理数据的数据处理请求命令。本实施例中,根据完整的待处理数据生成数据处理请求命令的过程与上一实施例中基于第一待处理数据块生成数据处理请求子命令的过程相似,两种命令皆为基于预设的第一命令格式生成的命令。In some embodiments, when the amount of data to be processed is small, the data processing request command may be generated directly according to the data to be processed without dividing the data to be processed. That is, step S102 includes: generating a data processing request command according to the complete data to be processed, and sending the data processing request command including the complete data to be processed to the UICC. In this embodiment, the process of generating a data processing request command based on the complete data to be processed is similar to the process of generating a data processing request subcommand based on the first data block to be processed in the previous embodiment, and both commands are based on preset Commands generated by the first command format.
在一些实施例中,在移动设备将待处理数据分块传输至UICC的过程中,移动设备所发送的当前数据处理请求子命令可能发生异常,在此情况下,移动设备需要重新基于当前第一待处理数据块生成当前数据处理请求子命令并发送至UICC。具体的,如图4所示,图4为本发明实施例提供的又一种数据处理方法的流程图,本实施例在图3所示实施例的基础上,在步骤S1022之后,还包括:In some embodiments, when the mobile device transmits the data to be processed in blocks to the UICC, the current data processing request subcommand sent by the mobile device may be abnormal. In this case, the mobile device needs to re-based on the current first The data block to be processed generates the current data processing request subcommand and sends it to the UICC. Specifically, as shown in FIG. 4, FIG. 4 is a flowchart of another data processing method provided by the embodiment of the present invention. On the basis of the embodiment shown in FIG. 3, this embodiment further includes after step S1022:
步骤S1022a、接收UICC针对当前数据处理请求子命令返回的当前第一命令响应消息。Step S1022a, receiving the current first command response message returned by the UICC for the current data processing request subcommand.
步骤S1022b、识别当前第一命令响应消息为指示重传当前第一待处理数据块或者指示传输下一个第一待处理数据块。Step S1022b, identifying the current first command response message as indicating retransmission of the current first data block to be processed or indicating transmission of the next first data block to be processed.
当识别出当前第一命令响应消息为指示重传(重新传输)当前第一待处理数据块时,返回执行步骤S1021;当识别出当前第一命令响应消息为指示传输下一个第一待处理数据块时,则执行步骤S1023。When it is recognized that the current first command response message is an instruction to retransmit (retransmit) the current first data block to be processed, return to step S1021; when it is recognized that the current first command response message is an instruction to transmit the next first data block to be processed block, execute step S1023.
本发明实施例中,数据处理请求子命令可能发生的异常包括命令中的数据格式错误和包含的第一待处理数据块不完整等等。数据处理请求子命令发生异常将导致UICC无法从数据处理请求子命令中获取到对应的完整的第一待处理数据块和/或UICC无法响应于该数据处理请求子命令而对对应的第一待处理数据块进行处理。因此,本发明实施例中,当移动设备将当前数据处理请求子命令发送至UICC后,UICC侧将对该当前数据处理请求子命令进行检测以确定该当前数据处理请求子命令是否存在异常,例如,UICC通过检测当前数据处理请求子命令的各字段是否符合预设规范来确定该当前数据处理请求子命令是否发生格式错误,以及通过检测当前数据处理请求子命令中所包含的第一待处理数据块的大小是否等于预设大小来确定该第一待处理数据块是否完整,等等。In the embodiment of the present invention, the exceptions that may occur in the data processing request subcommand include a data format error in the command, an incomplete first data block to be processed, and the like. An abnormality in the data processing request subcommand will cause the UICC to be unable to obtain the corresponding complete first pending data block from the data processing request subcommand and/or the UICC cannot respond to the data processing request subcommand for the corresponding first pending data block. Process data blocks for processing. Therefore, in the embodiment of the present invention, after the mobile device sends the current data processing request subcommand to the UICC, the UICC side will detect the current data processing request subcommand to determine whether there is any abnormality in the current data processing request subcommand, for example , the UICC determines whether a format error occurs in the current data processing request subcommand by detecting whether each field of the current data processing request subcommand conforms to the preset specification, and by detecting the first data to be processed contained in the current data processing request subcommand Whether the size of the block is equal to the preset size determines whether the first data block to be processed is complete, and so on.
UICC在对当前数据处理请求子命令检测完成后,根据检测结果生成包含不同信息的当前第一命令响应消息,该当前第一命令响应消息所包含的信息可包括两种,一种用于指示移动设备重传当前第一待处理数据块,另一种用于指示移动设备传送下一个第一待处理数据块。在UICC检测出当前数据处理请求子命令存在异常时,则当前第一命令响应消息中包含用于指示移动设备重传当前第一待处理数据块的信息;在UICC检测出当前数据处理请求子命令不存在异常时,且UICC识别出移动设备当前还剩余有第一待处理数据块需要发送,则当前第一命令响应消息中包含用于指示移动设备传送下一个第一待处理数据块的信息。在实际应用中,当前第一命令响应消息所包含的不同信息可通过设置其对应的参数不同来实现。After the UICC completes the detection of the current data processing request sub-command, it generates the current first command response message containing different information according to the detection result. The information contained in the current first command response message may include two types, one for indicating movement The device retransmits the current first data block to be processed, and the other is used to instruct the mobile device to transmit the next first data block to be processed. When the UICC detects that the current data processing request subcommand is abnormal, the current first command response message contains information for instructing the mobile device to retransmit the current first data block to be processed; when the UICC detects the current data processing request subcommand When there is no abnormality, and the UICC recognizes that the mobile device still has the first pending data block to be sent, the current first command response message includes information for instructing the mobile device to transmit the next first pending data block. In practical applications, the different information contained in the current first command response message can be realized by setting the corresponding parameters to be different.
本发明实施例通过在数据处理请求子命令发生错误、异常时,重新生成数据处理请求子命令并发送至UICC,保证了传输至UICC的待处理数据的完整性,以及能够正确触发UICC对待处理数据进行处理。In the embodiment of the present invention, by regenerating the data processing request subcommand and sending it to the UICC when an error or exception occurs in the data processing request subcommand, the integrity of the data to be processed transmitted to the UICC is ensured, and the data to be processed by the UICC can be correctly triggered. to process.
本发明实施例中,移动设备在将完整的待处理数据发送至UICC,且UICC接收到完整的待处理数据并完成处理后,移动设备将从UICC处获取处理后的待处理数据,如图2中的步骤S103。In the embodiment of the present invention, after the mobile device sends the complete data to be processed to the UICC, and the UICC receives the complete data to be processed and completes the processing, the mobile device will obtain the processed data to be processed from the UICC, as shown in Figure 2 Step S103 in.
作为步骤S103的一种可选实施方式,步骤S103具体包括:接收UICC返回的数据处理响应消息,该数据处理响应消息包含处理后的待处理数据。即,UICC基于处理后的待处理数据生成数据处理响应消息,该数据处理响应消息包含处理后的待处理数据,UICC将该数据处理响应消息发送至移动设备,移动设备接收该数据处理响应消息,并从该数据处理响应消息中获取处理后的待处理数据。该实施方式适用于处理后的待处理数据的数据量不大的情况。As an optional implementation manner of step S103, step S103 specifically includes: receiving a data processing response message returned by the UICC, where the data processing response message includes processed data to be processed. That is, the UICC generates a data processing response message based on the processed data to be processed, the data processing response message includes the processed data to be processed, the UICC sends the data processing response message to the mobile device, and the mobile device receives the data processing response message, And obtain the processed data to be processed from the data processing response message. This embodiment is applicable to the case where the amount of processed data to be processed is not large.
作为步骤S103的另一种可选的实施方式,当处理后的待处理数据的数据量较大时,UICC可以将处理后的待处理数据分块返回给移动设备,即移动设备可分多次从UICC处获取处理后的待处理数据。具体的,如图5所示,图5为本发明实施例提供的再一种数据处理方法的流程图,本实施例中,处理后的待处理数据包括多个第二待处理数据块,即,UICC在对待处理数据完成处理后,将处理后的待处理数据分割为多个第二待处理数据块。本实施例在图2所示实施例的基础上,步骤S103具体包括:As another optional implementation of step S103, when the amount of processed data to be processed is large, the UICC may return the processed data to be processed to the mobile device in blocks, that is, the mobile device may be divided into multiple Obtain processed data to be processed from UICC. Specifically, as shown in FIG. 5, FIG. 5 is a flowchart of another data processing method provided by an embodiment of the present invention. In this embodiment, the processed data to be processed includes a plurality of second data blocks to be processed, namely , after the UICC finishes processing the data to be processed, it divides the processed data to be processed into multiple second data blocks to be processed. In this embodiment, on the basis of the embodiment shown in FIG. 2, step S103 specifically includes:
步骤S1031、接收UICC返回的当前数据处理响应消息。Step S1031, receiving the current data processing response message returned by the UICC.
当前数据处理响应消息包含多个第二待处理数据块中的当前第二待处理数据块,其中,当前第二待处理数据块是指多个第二待处理数据块中马上要被传输的数据块;该数据处理响应消息用于指示移动设备通过发送命令获取下一个第二待处理数据块的信息,而当所有第二待处理数据块已发送完毕时,该数据处理响应消息还用于提示移动设备所有第二待处理数据块已发送完毕。The current data processing response message includes the current second data block to be processed among the multiple second data blocks to be processed, wherein the current second data block to be processed refers to the data to be transmitted immediately among the multiple second data blocks to be processed block; the data processing response message is used to instruct the mobile device to obtain the information of the next second data block to be processed by sending a command, and when all the second data blocks to be processed have been sent, the data processing response message is also used to prompt All second pending data blocks of the mobile device have been sent.
步骤S1032、检测当前数据处理响应消息是否存在异常。Step S1032, detecting whether the current data processing response message is abnormal.
在实际应用中,UICC在将第二待处理数据块返回至移动设备的过程中,UICC所发送的当前数据处理响应消息可能存在异常,在此情况下,移动设备需要生成重新获取当前第二待处理数据块的命令,以使UICC重传当前第二待处理数据块。其中,当前数据处理响应消息可能存在的异常请参照上述图4所示实施例中对数据处理请求子命令的异常情况的描述,此处不再赘述。In practical applications, when the UICC returns the second pending data block to the mobile device, the current data processing response message sent by the UICC may be abnormal. In this case, the mobile device needs to generate and reacquire the current second pending data block A command for processing a data block, so that the UICC retransmits the current second data block to be processed. For possible exceptions in the current data processing response message, please refer to the description of the abnormal situation of the data processing request subcommand in the above embodiment shown in FIG. 4 , which will not be repeated here.
在步骤S1032中,当检测出当前数据处理响应消息存在异常时,则生成用于指示UICC重传当前第二待处理数据块的当前数据获取请求命令,并向UICC发送该当前数据获取请求命令,以供UICC响应于该当前数据获取请求命令,基于当前第二待处理数据块重新生成当前数据处理响应消息;而当检测出当前数据处理响应消息不存在异常时,则执行下述步骤S1033,以进行下一个第二待处理数据块的传输。In step S1032, when it is detected that the current data processing response message is abnormal, a current data acquisition request command for instructing the UICC to retransmit the current second data block to be processed is generated, and the current data acquisition request command is sent to the UICC, For the UICC to respond to the current data acquisition request command, based on the current second data block to be processed to regenerate the current data processing response message; and when it is detected that there is no abnormality in the current data processing response message, then perform the following step S1033, to Carry out the transmission of the next second data block to be processed.
步骤S1033、识别当前数据处理响应消息是指示通过发送命令获取下一个第二待处理数据块还是提示所有第二待处理数据块已发送完毕。Step S1033, identifying whether the current data processing response message indicates to obtain the next second data block to be processed by sending a command or to indicate that all second data blocks to be processed have been sent.
当识别出当前数据处理响应消息为指示通过发送命令获取下一个第二待处理数据块时,执行步骤S1034,并顺序返回执行步骤S1031;而当识别出当前数据处理响应消息为提示所有第二待处理数据块已发送完毕时,则结束流程。When it is recognized that the current data processing response message indicates that the next second data block to be processed is obtained by sending a command, step S1034 is executed, and the sequence returns to step S1031; When the processing data block has been sent, the process ends.
步骤S1034、响应于当前数据处理响应消息,生成用于指示UICC传送下一个第二待处理数据块的当前数据获取请求命令,并向UICC发送当前数据获取请求命令。Step S1034 , in response to the current data processing response message, generate a current data acquisition request command for instructing the UICC to transmit the next second data block to be processed, and send the current data acquisition request command to the UICC.
UICC响应于当前数据获取请求命令,将下一个第二待处理数据块作为当前第二待处理数据块,并基于当前第二待处理数据块生成当前数据处理响应消息。In response to the current data acquisition request command, the UICC takes the next second data block to be processed as the current second data block to be processed, and generates a current data processing response message based on the current second data block to be processed.
本发明实施例中,移动设备在识别出当前数据处理响应消息为指示通过发送命令获取下一个第二待处理数据块时,基于预设的第一命令格式生成数据获取请求命令,并发送至UICC。In the embodiment of the present invention, when the mobile device recognizes that the current data processing response message indicates to obtain the next second data block to be processed by sending a command, it generates a data acquisition request command based on the preset first command format and sends it to the UICC .
在一些实施例中,UICC每次接收到数据获取请求命令后,均判断当前是否仅剩余一个第二待处理数据块未发送,当判断出当前仅剩余一个第二待处理数据块未发送时,则将下一个第二待处理数据块(最后一个待处理数据块)作为当前第二待处理数据块,并基于当前第二待处理数据块生成用于提示移动设备所有第二待处理数据块已发送完毕的当前数据处理响应消息,并发送至移动设备;而当判断出当前还剩余多个第二待处理数据块未发送时,则将下一个第二待处理数据块作为当前第二待处理数据块,并基于当前第二待处理数据块生成用于指示移动设备通过发送命令获取下一个第二待处理数据块的当前数据处理响应消息,并发送至移动设备。In some embodiments, each time the UICC receives the data acquisition request command, it judges whether there is only one second unprocessed data block left unsent, and when it is judged that there is only one second unprocessed data block left unsent, Then the next second data block to be processed (the last data block to be processed) is used as the current second data block to be processed, and based on the current second data block to be processed, it is used to prompt the mobile device that all the second data blocks to be processed have been processed. The current data processing response message that has been sent is sent to the mobile device; and when it is judged that there are still a plurality of second data blocks to be processed that have not been sent, the next second data block to be processed is used as the current second data block to be processed data block, and generate a current data processing response message for instructing the mobile device to acquire the next second data block to be processed based on the current second data block to be processed, and send the message to the mobile device.
在一些实施例中,UICC每次接收到数据获取请求命令后,均判断当前是否还存在未发送的第二待处理数据块,若存在,则将下一个第二待处理数据块作为当前第二待处理数据块,并基于当前第二待处理数据块生成当前数据处理响应消息,该当前数据处理响应消息包含当前第二待处理数据块及用于指示移动设备通过发送命令获取下一个第二待处理数据块的信息;若不存在,则生成当前数据处理响应消息,该当前数据处理响应消息不包含任何第二待处理数据块,但包含用于提示移动设备所有第二待处理数据块已发送完毕的信息。In some embodiments, each time the UICC receives the data acquisition request command, it judges whether there is currently an unsent second data block to be processed, and if so, uses the next second data block to be processed as the current second data block. A data block to be processed, and a current data processing response message is generated based on the current second data block to be processed, the current data processing response message includes the current second data block to be processed and is used to instruct the mobile device to obtain the next second data block to be processed by sending a command Processing the information of the data block; if it does not exist, then generate the current data processing response message, the current data processing response message does not contain any second data block to be processed, but contains information for prompting the mobile device that all the second data blocks to be processed have been sent Completed information.
在实际应用中,数据处理响应消息所包含的两种不同信息可通过设置预设第一命令格式中特定字段为不同值来实现。In practical applications, the two different information contained in the data processing response message can be realized by setting specific fields in the preset first command format to different values.
在上述实施例中,移动设备所发送的各种命令均可基于一种预设的第一命令格式并通过设置不同的字段值来实现,本发明实施例提供一种优选的第一命令格式,如下表所示:In the above embodiments, various commands sent by the mobile device can be implemented based on a preset first command format and by setting different field values. The embodiment of the present invention provides a preferred first command format, As shown in the table below:
该第一命令格式可同时适用于较大数据量的分块传输和较小数据量的整体传输,并能够提供继续、中止、重传等基本管理。该第一命令格式的各参数说明如下:The first command format can be applied to block transmission of large data volume and overall transmission of small data volume at the same time, and can provide basic management such as continuation, suspension, and retransmission. The parameters of the first command format are described as follows:
P1为命令参数1,表示本命令的管理要求,其中b1b2字段表示本次数据传输处理的会话编号,同时可以存在最多4个会话编号;b3字段表示本命令是否包含需传输的数据,其可以有两个取值,例如其取值为“0”时表示本命令不含需传输的数据,其取值为“1”时表示本命令包含需传输的数据;b4字段表示对于会话继续还是中止的要求,其可以有两个取值,例如其取值为“0”时表示继续会话,其取值为“1”时表示中止会话;b5字段表示对响应是否需要重传的要求,其可以有两个取值,例如其取值为“0”时表示本命令用于传输下一个数据块,其取值为“1”时表示本命令用于重传最近的响应所指示的需要重传的数据块。P1的其余字段的定义可以保留,具体各设置含义见上表。P1 is the command parameter 1, indicating the management requirements of this command, where the b1b2 field indicates the session number of this data transmission process, and there can be up to 4 session numbers at the same time; the b3 field indicates whether this command contains the data to be transmitted, which can have Two values, for example, when the value is "0", it means that the command does not contain data to be transmitted; when the value is "1", it means that the command contains data to be transmitted; the b4 field indicates whether the session is continued or terminated Requirements, it can have two values, for example, when its value is "0", it means to continue the session, when its value is "1", it means to terminate the session; the b5 field indicates whether the response needs to be retransmitted, and it can have Two values, for example, when the value is "0", it means that this command is used to transmit the next data block; when the value is "1", it means that this command is used to retransmit the data that needs to be retransmitted indicated by the latest response. data block. The definitions of the remaining fields of P1 can be reserved, and the specific meanings of each setting are shown in the above table.
P2为命令参数2,表示移动设备到UICC的剩余的数据块的数量,即未传输的数据块的数量。P2 is command parameter 2, indicating the number of remaining data blocks from the mobile device to the UICC, that is, the number of untransmitted data blocks.
Lc为命令中需传输的数据部分的长度,可选,当b3=0时不存在。Lc is the length of the data part to be transmitted in the command, which is optional and does not exist when b3=0.
NAF-ID为命令数据的组成部分,其是NAF(应用服务器)的身份标识,用于表示要求本次数据传输处理对应的NAF(应用服务器),其包括NAF-ID的长度和NAF-ID值。NAF-ID is a component of the command data, which is the identity of the NAF (application server), and is used to indicate the NAF (application server) that requires this data transmission processing, including the length of the NAF-ID and the value of the NAF-ID .
Data为命令数据的组成部分,表示本次传输的待处理数据或数据块,包括Data的长度和Data值,当b3=0时,Data的长度和Data值为空。Data is a component of the command data, indicating the data or data block to be processed in this transmission, including the length of Data and the value of Data. When b3=0, the length of Data and the value of Data are empty.
REQ为命令数据的组成部分,表示对待处理数据的处理需求,可包含终端应用可得到的本次数据处理的其它要求,如处理的类型、算法指示等。REQ is a component of the command data, which indicates the processing requirements of the data to be processed, and may include other requirements of the current data processing available to the terminal application, such as processing types, algorithm instructions, etc.
Le是期望的响应长度,可选,当b3=1时不存在。Le is the expected response length, optional, not present when b3=1.
上述各实施例中移动设备所发送的数据处理请求命令、数据处理请求子命令及数据获取请求命令等命令皆可基于该第一命令格式实现,其中各个字段的具体取值可根据实际情况设置。The data processing request command, data processing request subcommand, and data acquisition request command sent by the mobile device in the above embodiments can all be implemented based on the first command format, and the specific values of each field can be set according to the actual situation.
图6为本发明实施例提供的再一种数据处理方法的流程图,本实施例提供的数据处理方法基于用户终端中的UICC实现,如图6所示,该方法包括:FIG. 6 is a flow chart of another data processing method provided by the embodiment of the present invention. The data processing method provided by this embodiment is implemented based on the UICC in the user terminal. As shown in FIG. 6, the method includes:
步骤S201、接收移动设备发送的数据处理请求命令。Step S201, receiving a data processing request command sent by a mobile device.
数据处理请求命令为移动设备基于终端应用发送的基于GBA的待处理数据生成的命令。数据处理请求命令的生成过程与上述实施例中步骤S101中数据处理请求命令的生成过程相同,具体请参见步骤S101的描述,此处不再赘述。The data processing request command is a command generated by the mobile device based on the GBA-based data to be processed sent by the terminal application. The generation process of the data processing request command is the same as the generation process of the data processing request command in step S101 in the above embodiment, please refer to the description of step S101 for details, and will not be repeated here.
步骤S202、利用预设共享密钥对待处理数据进行处理。Step S202, using the preset shared key to process the data to be processed.
预设共享密钥为存储在UICC中的共享密钥,该共享密钥为GBA机制下生成的密钥,特别的,在GBA_U机制下,由UICC生成共享密钥,该共享密钥同时将被存储于应用服务器中,以供终端应用在与应用服务器进行通信时,使用该共享密钥进行数据处理(加解密处理、鉴权处理等)。The preset shared key is the shared key stored in the UICC, and the shared key is a key generated under the GBA mechanism. In particular, under the GBA_U mechanism, the shared key is generated by the UICC, and the shared key will be Stored in the application server, the terminal application uses the shared key to perform data processing (encryption and decryption processing, authentication processing, etc.) when communicating with the application server.
在一些实施例中,UICC内的预设共享密钥为Ks_int_NAF密钥。In some embodiments, the preset shared key in the UICC is a Ks_int_NAF key.
步骤S203、将处理后的待处理数据发送至移动设备。Step S203, sending the processed data to be processed to the mobile device.
本发明实施例中,UICC接收移动设备发送的数据处理请求命令,并从该数据处理请求命令中获取到待处理数据,基于预设共享密钥对该待处理数据进行处理,并将处理后的待处理数据返回至移动设备,以供终端应用使用,本发明实施例实现了利用UICC内存储的共享密钥来对安装于移动设备中的终端应用的通信数据进行处理的过程,相较于现有技术,避免了使用不同的共享密钥来对用户终端上安装于不同模块(移动设备和UICC)的应用的通信数据进行处理,从而降低了应用服务器管理共享密钥的复杂度,实现了密钥的统一管理。In the embodiment of the present invention, the UICC receives the data processing request command sent by the mobile device, and obtains the data to be processed from the data processing request command, processes the data to be processed based on the preset shared key, and sends the processed The data to be processed is returned to the mobile device for use by the terminal application. The embodiment of the present invention realizes the process of using the shared key stored in the UICC to process the communication data of the terminal application installed in the mobile device. Compared with the current The technology avoids the use of different shared keys to process the communication data of applications installed in different modules (mobile devices and UICCs) on the user terminal, thereby reducing the complexity of the application server's management of shared keys and realizing encryption Unified management of keys.
在一些实施例中,当终端应用的待处理数据的数据量较大时,移动设备将待处理数据分块传输至UICC,如图7所示,图7为本发明实施例提供的再一种数据处理方法的流程图,本实施例中,待处理数据包括多个第一待处理数据块,数据处理请求命令包括多个数据处理请求子命令,每个数据处理请求子命令对应包括一个第一待处理数据块,本实施例在图6所示实施例的基础上,步骤S201包括:In some embodiments, when the amount of data to be processed in the terminal application is large, the mobile device transmits the data to be processed to the UICC in blocks, as shown in FIG. 7 , which is another embodiment of the present invention. The flow chart of the data processing method. In this embodiment, the data to be processed includes a plurality of first data blocks to be processed, the data processing request command includes a plurality of data processing request subcommands, and each data processing request subcommand correspondingly includes a first The data block to be processed, in this embodiment, on the basis of the embodiment shown in Figure 6, step S201 includes:
步骤S2011、接收移动设备发送的当前数据处理请求子命令,当前数据处理请求子命令包括当前第一待处理数据块。Step S2011. Receive the current data processing request subcommand sent by the mobile device, where the current data processing request subcommand includes the current first data block to be processed.
步骤S2012、基于当前数据处理请求子命令判断移动设备中是否还剩余有第一待处理数据块需要发送。Step S2012. Based on the current data processing request subcommand, it is judged whether there is still the first data block to be processed in the mobile device to be sent.
UICC基于当前数据处理请求子命令判断移动设备中是否还剩余有第一待处理数据块需要发送可通过识别数据处理请求子命令中的相关字段来确定,例如,在数据处理请求子命令中设置某一字段用来标识剩余数据块的数量,UICC通过检测该字段以确定出剩余数据块的数量。The UICC judges based on the current data processing request subcommand whether there is still the first pending data block to be sent in the mobile device, which can be determined by identifying the relevant fields in the data processing request subcommand, for example, setting a certain value in the data processing request subcommand One field is used to identify the number of remaining data blocks, and the UICC determines the number of remaining data blocks by detecting this field.
在步骤S2012中,当UICC判断出移动设备中还剩余有第一待处理数据块需要发送时,执行下述步骤S2013,以使移动设备响应该第一命令响应消息而继续发送剩余第一待处理数据块,并顺序返回步骤S2011,直至UICC成功接收到移动设备发送的全部的第一待处理数据块;而当判断出移动设备中没有第一待处理数据块需要发送时,UICC不再生成第一命令响应消息,而是直接执行步骤S202来对接收到的第一待处理数据块进行处理。In step S2012, when the UICC determines that the mobile device still has the first pending data block to be sent, the following step S2013 is executed, so that the mobile device continues to send the remaining first pending data block in response to the first command response message. data blocks, and return to step S2011 in sequence until the UICC successfully receives all the first data blocks to be processed sent by the mobile device; and when it is judged that there is no first data block to be processed in the mobile device to be sent, the UICC will no longer generate the first data block to be processed A command response message, but directly execute step S202 to process the received first data block to be processed.
步骤S2013、响应于当前数据处理请求子命令,生成用于指示移动设备传送下一个第一待处理数据块的当前第一命令响应消息,并将该当前第一命令响应消息发送至移动设备。Step S2013: In response to the current data processing request subcommand, generate a current first command response message for instructing the mobile device to transmit the next first data block to be processed, and send the current first command response message to the mobile device.
移动设备在接收到当前第一命令响应消息后,针对该当前第一命令响应消息,将多个第一待处理数据块中的下一个第一待处理数据块作为当前第一待处理数据块,并根据当前第一待处理数据块生成当前数据处理请求子命令。After receiving the current first command response message, the mobile device uses the next first data block to be processed among the multiple first data blocks to be processed as the current first data block to be processed for the current first command response message, And generate the current data processing request subcommand according to the current first data block to be processed.
本实施例中的步骤S2011~S2013与上述实施例中的步骤S1021~S1023对应,具体请见上述实施例中对应步骤的描述,此处不再赘述。Steps S2011-S2013 in this embodiment correspond to steps S1021-S1023 in the above-mentioned embodiment. For details, please refer to the description of the corresponding steps in the above-mentioned embodiment, and details are not repeated here.
在一些实施例中,当待处理数据的数据量较小时,可不对待处理数据进行分割,此时,步骤S201的过程为:接收移动设备发送的数据处理请求命令,该数据处理请求命令为移动设备根据完整的待处理数据生成,该数据处理请求命令包含完整的待处理数据。In some embodiments, when the amount of data to be processed is small, the data to be processed may not be divided. At this time, the process of step S201 is: receiving the data processing request command sent by the mobile device, the data processing request command is the mobile device Generated according to complete data to be processed, the data processing request command includes complete data to be processed.
在一些实施例中,在移动设备将待处理数据分块传输至UICC的过程中,移动设备所发送的数据处理请求子命令可能发生错误或异常,在此情况下,UICC需要指示移动设备重新发送包含当前第一待处理数据块的数据处理请求子命令。如图8所示,图8为本发明实施例提供的再一种数据处理方法的流程图,本实施例在图7所示实施例的基础上,在步骤S2011之后,还包括:In some embodiments, when the mobile device transmits the data to be processed in chunks to the UICC, an error or exception may occur in the data processing request subcommand sent by the mobile device. In this case, the UICC needs to instruct the mobile device to resend Contains the data processing request subcommand of the current first pending data block. As shown in FIG. 8, FIG. 8 is a flowchart of another data processing method provided by the embodiment of the present invention. On the basis of the embodiment shown in FIG. 7, this embodiment also includes after step S2011:
步骤S2012a、检测当前数据处理请求子命令是否存在异常。Step S2012a, detecting whether the current data processing request subcommand is abnormal.
若检测出当前数据处理请求子命令存在异常,则生成用于指示移动设备重传当前第一待处理数据块的当前第一命令响应消息,并发送至移动设备,以供移动设备根据当前第一待处理数据块生成当前数据处理请求子命令;若检测出当前数据处理请求子命令不存在异常,则执行步骤S2012。If it is detected that the current data processing request sub-command is abnormal, a current first command response message for instructing the mobile device to retransmit the current first data block to be processed will be generated and sent to the mobile device for the mobile device to use according to the current first data block. The data block to be processed generates a current data processing request subcommand; if it is detected that there is no abnormality in the current data processing request subcommand, step S2012 is executed.
本发明实施例中,数据处理请求子命令可能发生的异常包括数据格式错误和包含的数据块不完整等等。数据处理请求子命令发生异常将导致UICC无法从数据处理请求子命令中获取到对应的完整的第一待处理数据块和/或UICC无法响应于该数据处理请求子命令而对对应的第一待处理数据块进行处理。因此,本发明实施例中,当移动设备将当前数据处理请求子命令发送至UICC后,UICC侧对该当前数据处理请求子命令进行检测以确定该当前数据处理请求子命令是否存在异常,例如,UICC通过检测当前数据处理请求子命令的各字段是否符合预设规范来确定该当前数据处理请求子命令是否发生格式错误,以及通过检测当前数据处理请求子命令中所包含的第一待处理数据块的大小是否等于预设大小来确定该第一待处理数据块是否完整,等等。In the embodiment of the present invention, the exceptions that may occur in the data processing request subcommand include data format errors, incomplete data blocks, and the like. An abnormality in the data processing request subcommand will cause the UICC to be unable to obtain the corresponding complete first pending data block from the data processing request subcommand and/or the UICC cannot respond to the data processing request subcommand for the corresponding first pending data block. Process data blocks for processing. Therefore, in the embodiment of the present invention, after the mobile device sends the current data processing request subcommand to the UICC, the UICC side detects the current data processing request subcommand to determine whether the current data processing request subcommand is abnormal, for example, The UICC determines whether a format error occurs in the current data processing request subcommand by detecting whether each field of the current data processing request subcommand conforms to the preset specification, and by detecting the first data block to be processed contained in the current data processing request subcommand Whether the size of is equal to the preset size determines whether the first data block to be processed is complete, and so on.
本发明图8所示实施例与本发明图4所示实施例的方法步骤对应,具体请参见图4所示实施例中对应方法步骤的描述,此处不再赘述。The embodiment shown in FIG. 8 of the present invention corresponds to the method steps of the embodiment shown in FIG. 4 of the present invention. For details, please refer to the description of the corresponding method steps in the embodiment shown in FIG. 4 , which will not be repeated here.
本发明中,UICC在对待处理数据完成处理后,可基于处理后待In the present invention, after the UICC finishes processing the data to be processed, it can
处理数据的数据量大小采用不同的方式将处理后的待处理数据返回至移动设备。The data size of the processed data uses different methods to return the processed pending data to the mobile device.
在一些实施例中,当处理后的待处理数据的数据量较小时,可直接将处理后的待处理数据通过响应消息的形式返回至移动设备。对应的,步骤S203的过程为:根据处理后的待处理数据生成数据处理响应消息,该数据处理响应消息包括处理后的待处理数据,将数据处理响应消息发送至移动设备。In some embodiments, when the amount of processed data to be processed is small, the processed data to be processed may be directly returned to the mobile device in the form of a response message. Correspondingly, the process of step S203 is: generate a data processing response message according to the processed data to be processed, the data processing response message includes the processed data to be processed, and send the data processing response message to the mobile device.
在另一些实施例中,当处理后的待处理数据的数据量较大时,可基于数据分块传输的方式将处理后的待处理数据返回至移动设备。具体的,如图9所示,图9为本发明实施例提供的再一种数据处理方法的流程图,本实施例中,处理后的待处理数据被分割为多个第二待处理数据块,本实施例在图6所示实施例的基础上,步骤S203具体包括:In some other embodiments, when the amount of the processed data to be processed is large, the processed data to be processed may be returned to the mobile device based on data block transmission. Specifically, as shown in FIG. 9, FIG. 9 is a flowchart of another data processing method provided by an embodiment of the present invention. In this embodiment, the processed data to be processed is divided into multiple second data blocks to be processed. In this embodiment, on the basis of the embodiment shown in FIG. 6, step S203 specifically includes:
步骤S2031、针对多个第二待处理数据块中的当前第二待处理数据块,根据当前第二待处理数据块生成用于指示移动设备获取下一个第二待处理数据块的当前数据处理响应消息,并将该当前数据处理响应消息发送至移动设备。Step S2031, for the current second data block to be processed among the plurality of second data blocks to be processed, generate a current data processing response for instructing the mobile device to acquire the next second data block to be processed according to the current second data block to be processed message, and send the current data processing response message to the mobile device.
当前数据处理响应消息包括当前第二待处理数据块。The current data processing response message includes the current second data block to be processed.
步骤S2032、响应于移动设备针对当前数据处理响应消息返回的当前数据获取请求命令,判断是否仅剩余一个第二待处理数据块未发送。Step S2032, in response to the current data acquisition request command returned by the mobile device in response to the current data processing response message, determine whether there is only one second pending data block that has not been sent.
当判断出仅剩余一个第二待处理数据块未发送时,执行步骤S2033;当判断出剩余多个第二待处理数据块未发送时,返回执行步骤S2031。When it is judged that only one second data block to be processed remains unsent, execute step S2033; when it is judged that multiple second data blocks to be processed remain unsent, return to execute step S2031.
步骤S2033、响应于移动设备针对当前数据处理响应消息返回的当前数据获取请求命令,将仅剩余的一个第二待处理数据块作为当前第二待处理数据块,根据当前第二待处理数据块生成用于提示移动设备第二待处理数据块已发送完毕的当前数据处理响应消息,并将该当前数据处理响应消息发送至移动设备。Step S2033, in response to the current data acquisition request command returned by the mobile device for the current data processing response message, use only one remaining second data block to be processed as the current second data block to be processed, and generate The current data processing response message is used to prompt the mobile device that the second data block to be processed has been sent, and the current data processing response message is sent to the mobile device.
本实施例中的方法步骤与图5所示实施例的方法步骤对应,具体请参见图5所述实施例的方法步骤的描述,此处不再赘述。The method steps in this embodiment correspond to the method steps in the embodiment shown in FIG. 5 . For details, refer to the description of the method steps in the embodiment shown in FIG. 5 , which will not be repeated here.
本发明实施例中,UICC所发送的各种响应消息可基于一种预设的第二命令格式并通过设置不同的字段值实现,本发明实施例提供一种优选的第二命令格式,如下表所示:In the embodiment of the present invention, various response messages sent by the UICC can be implemented based on a preset second command format and by setting different field values. The embodiment of the present invention provides a preferred second command format, as shown in the following table Shown:
该第二命令格式可同时适用于较大数据量的分块传输和较小数据量的整体传输,并提供继续、中止、重传等基本管理。该第二命令格式的各参数说明如下:The second command format can be applied to block transmission of large data volume and overall transmission of small data volume at the same time, and provides basic management such as continuation, suspension, and retransmission. The parameters of the second command format are described as follows:
NAF-ID和Data是UICC返回给移动设备的数据,格式同表中要求。NAF-ID and Data are the data returned by UICC to the mobile device, and the format is the same as that required in the table.
SW1是命令处理状态字,表示命令处理的基本结果,例如,SW1=92表示响应进行中,SW1=6A表示响应终止。SW1 is the command processing status word, which indicates the basic result of command processing, for example, SW1=92 indicates that the response is in progress, and SW1=6A indicates that the response is terminated.
SW2是命令处理状态字,表示响应的管理要求,其中b1字段表示是否还有待处理的数据块需要通过响应返回到移动设备,b2字段表示对命令是否需要重传的要求;b3b4字段表示处理的数据块对应的命令中的会话编号。SW2中其余字段的定义保留。SW2 is the command processing status word, indicating the management requirements of the response, where the b1 field indicates whether there are still pending data blocks that need to be returned to the mobile device through the response, the b2 field indicates whether the command needs to be retransmitted; the b3b4 field indicates the processed data The session number in the command corresponding to the block. The definitions of the remaining fields in SW2 are retained.
本发明实施例中UICC所发送的第一命令响应消息、数据处理响应消息等消息皆可基于该第二命令格式实现。In the embodiment of the present invention, the messages such as the first command response message and the data processing response message sent by the UICC can be realized based on the second command format.
基于以上描述,在一些实施例中,提供一种数据处理方法,其完整流程为:Based on the above description, in some embodiments, a data processing method is provided, the complete flow of which is:
步骤1、响应于移动设备上的终端应用发送的基于GBA的数据处理请求,移动设备获取终端应用的待处理数据。Step 1. In response to the GBA-based data processing request sent by the terminal application on the mobile device, the mobile device acquires data to be processed by the terminal application.
步骤2、移动设备将待处理数据分割为多个第一待处理数据块。Step 2. The mobile device divides the data to be processed into multiple first data blocks to be processed.
步骤3、移动设备基于当前第一待处理数据块生成数据处理请求子命令,并发送至UICC。Step 3: The mobile device generates a data processing request subcommand based on the current first data block to be processed, and sends it to the UICC.
步骤4、UICC接收到当前数据处理请求子命令,存储当前第一待处理数据块,并判断当前数据处理请求子命令是否异常,若判断出异常,则生成用于指示移动设备重新发送当前第一待处理数据块的第一命令响应消息并将该第一命令响应消息返回给移动设备,并进入步骤6;若判断出正常,执行步骤5。Step 4. The UICC receives the current data processing request subcommand, stores the current first data block to be processed, and judges whether the current data processing request subcommand is abnormal. The first command response message of the data block to be processed is returned to the mobile device, and step 6 is entered; if it is judged to be normal, step 5 is performed.
步骤5、判断是否收到全部数据,若判断出未收到全部数据,则返回用于指示移动设备发送下一个第一待处理数据块的第一命令响应消息;若判断出收到全部数据,则不返回第一命令响应消息,进入步骤7。Step 5, judge whether to receive all data, if judge not to receive all data, then return the first command response message that is used to instruct mobile equipment to send the next first data block to be processed; If judge to receive all data, Then the first command response message is not returned, and step 7 is entered.
步骤6、移动设备接收到第一命令响应消息,识别第一命令响应消息中的信息,若识别出第一命令响应消息为发送下一个第一待处理数据块,则将下一个第一待处理数据块作为当前第一待处理数据,并执行步骤3;若识别出第一命令响应消息为发送当前第一待处理数据块,则直接执行步骤3。Step 6, the mobile device receives the first command response message, identifies the information in the first command response message, and if it recognizes that the first command response message is to send the next first pending data block, then sends the next first pending data block The data block is used as the current first data block to be processed, and step 3 is performed; if it is recognized that the first command response message is to send the current first data block to be processed, step 3 is directly performed.
重复执行步骤3至步骤6,直到所有第一待处理数据块均成功且完整地发送至UICC。Repeat step 3 to step 6 until all the first data blocks to be processed are successfully and completely sent to the UICC.
步骤7、UICC利用预设共享密钥对待处理数据进行处理。Step 7. The UICC uses the preset shared key to process the data to be processed.
步骤8、UICC将处理后的待处理数据分割为多个第二待处理数据块。Step 8. The UICC divides the processed data to be processed into multiple second data blocks to be processed.
步骤9、UICC基于当前第二待处理数据块生成当前数据处理响应消息,并且,UICC基于第二待处理数据块的数量,在当前数据处理响应消息中添加信息,用于提示移动设备继续提取下一个第二待处理数据块或者提示移动设备所有第二待处理数据块已发送完毕。Step 9. The UICC generates a current data processing response message based on the current second data block to be processed, and the UICC adds information to the current data processing response message based on the number of the second data block to be processed, so as to prompt the mobile device to continue extracting the next data block. A second data block to be processed may prompt the mobile device that all the second data blocks to be processed have been sent.
步骤10、移动设备接收到当前数据处理响应消息,存储当前第二待处理数据块,并识别当前数据处理响应消息中的信息,当识别出信息为提取下一个第二待处理数据块时,生成当前数据获取请求命令,并发送至UICC,当识别出信息为所有第二待处理数据块已发送完毕时,仅存储当前第二待处理数据块,不再生成当前数据获取请求命令。Step 10, the mobile device receives the current data processing response message, stores the current second data block to be processed, and identifies the information in the current data processing response message, and generates The current data acquisition request command is sent to the UICC. When it is recognized that all the second data blocks to be processed have been sent, only the current second data block to be processed is stored, and the current data acquisition request command is no longer generated.
步骤11、UICC接收数据获取请求命令,将下一个第二待处理数据块作为当前第二待处理数据块,并执行步骤9。Step 11. The UICC receives the data acquisition request command, takes the next second data block to be processed as the current second data block to be processed, and executes step 9.
重复步骤9至步骤11,直到UICC将所有的第二待处理数据块成功且完整地返回至移动设备。Step 9 to step 11 are repeated until the UICC successfully and completely returns all second data blocks to be processed to the mobile device.
本发明实施例还提供一种移动设备,包括:存储模块和至少一个处理器,该存储模块中存储有计算机程序,该计算机程序被至少一个处理器执行时实现本发明基于移动设备实现的数据处理方法。The embodiment of the present invention also provides a mobile device, including: a storage module and at least one processor, a computer program is stored in the storage module, and when the computer program is executed by at least one processor, the data processing based on the mobile device of the present invention is realized method.
本发明实施例还提供一种UICC,包括:存储模块和至少一个处理器,该存储模块中存储有计算机程序,该计算机程序被至少一个处理器执行时实现本发明基于UICC实现的数据处理方法。The embodiment of the present invention also provides a UICC, including: a storage module and at least one processor, where a computer program is stored in the storage module, and when the computer program is executed by at least one processor, the UICC-based data processing method of the present invention is implemented.
本发明实施例还提供一种用户终端,如图1所示,该用户终端包括移动设备和UICC,其中,移动设备采用本发明实施例所提供的移动设备,UICC采用本发明实施例所提供的UICC。The embodiment of the present invention also provides a user terminal. As shown in FIG. 1, the user terminal includes a mobile device and a UICC, wherein the mobile device adopts the mobile device provided in the embodiment of the present invention, and the UICC adopts the mobile device provided in the embodiment of the present invention. UICC.
可以理解的是,以上实施方式仅仅是为了说明本发明的原理而采用的示例性实施方式,然而本发明并不局限于此。对于本领域内的普通技术人员而言,在不脱离本发明的精神和实质的情况下,可以做出各种变型和改进,这些变型和改进也视为本发明的保护范围。It can be understood that, the above embodiments are only exemplary embodiments adopted for illustrating the principle of the present invention, but the present invention is not limited thereto. For those skilled in the art, various modifications and improvements can be made without departing from the spirit and essence of the present invention, and these modifications and improvements are also regarded as the protection scope of the present invention.
Claims (16)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202110472861.XA CN113242549B (en) | 2021-04-29 | 2021-04-29 | Data processing method, mobile device, UICC (Universal Integrated Circuit card) and terminal |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202110472861.XA CN113242549B (en) | 2021-04-29 | 2021-04-29 | Data processing method, mobile device, UICC (Universal Integrated Circuit card) and terminal |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| CN113242549A CN113242549A (en) | 2021-08-10 |
| CN113242549B true CN113242549B (en) | 2022-10-28 |
Family
ID=77131352
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN202110472861.XA Active CN113242549B (en) | 2021-04-29 | 2021-04-29 | Data processing method, mobile device, UICC (Universal Integrated Circuit card) and terminal |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN113242549B (en) |
Citations (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN102348017A (en) * | 2011-09-07 | 2012-02-08 | 中国联合网络通信集团有限公司 | Calling method of terminal application, terminal device and UICC (Universal Integrated Circuit Card) |
Family Cites Families (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| WO2009046400A1 (en) * | 2007-10-05 | 2009-04-09 | Interdigital Technology Corporation | Techniques for secure channelization between uicc and a terminal |
| KR101188511B1 (en) * | 2008-04-07 | 2012-10-05 | 인터디지탈 패튼 홀딩스, 인크 | Secure session key generation |
| US8522334B2 (en) * | 2010-12-16 | 2013-08-27 | Verizon Patent And Licensing Inc. | Mobile middleware for generic bootstrapping architecture |
| EP2785011A1 (en) * | 2013-03-27 | 2014-10-01 | Gemalto SA | Method to establish a secure voice communication using generic bootstrapping architecture |
| CN108933662B (en) * | 2017-05-26 | 2021-02-26 | 展讯通信(上海)有限公司 | GBA-based authentication method, device and terminal |
| FI3687207T3 (en) * | 2017-10-10 | 2023-12-20 | Ntt Docomo Inc | Security establishing method and terminal device |
-
2021
- 2021-04-29 CN CN202110472861.XA patent/CN113242549B/en active Active
Patent Citations (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN102348017A (en) * | 2011-09-07 | 2012-02-08 | 中国联合网络通信集团有限公司 | Calling method of terminal application, terminal device and UICC (Universal Integrated Circuit Card) |
Also Published As
| Publication number | Publication date |
|---|---|
| CN113242549A (en) | 2021-08-10 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN111382985B (en) | To-do message integrated push system and working methods | |
| US8948382B2 (en) | Secure protocol for peer-to-peer network | |
| EP3154219A1 (en) | Communication network system, transmission node, reception node, message checking method, and computer program | |
| JP6522159B2 (en) | Voice communication processing method and system, electronic device, and storage medium | |
| US20150358167A1 (en) | Certificateless Multi-Proxy Signature Method and Apparatus | |
| CN113890730B (en) | Data transmission method and system | |
| CN106789876A (en) | The authentication method and its device of a kind of cloud terminal server | |
| CN105701240A (en) | Wearable device data processing method, device and system | |
| CN105933295A (en) | Credit distribution method, system and device | |
| CN102801686B (en) | Apparatus control method, main equipment, from equipment and master-slave equipment group | |
| CN115955358B (en) | Data stream transmission system based on point-to-point communication | |
| CN120910873B (en) | Intelligent password key management method and device based on SKF standard | |
| CN109040255A (en) | Internet of things equipment cut-in method, device, equipment and storage medium | |
| CN105592459A (en) | Security authentication device based on wireless communication | |
| CN113242549B (en) | Data processing method, mobile device, UICC (Universal Integrated Circuit card) and terminal | |
| US20170169239A1 (en) | Method for file synchronization, the receiver equipment and systems | |
| CN116166429B (en) | Channel attribute determining method of multiple security chips and security chip device | |
| CN105635227A (en) | Point to point communication method and system on the basis of serial server | |
| CN111523128B (en) | Information protection method, system, electronic equipment and medium | |
| CN116032548A (en) | Access authentication method and device of Internet of things, terminal equipment and gateway equipment | |
| CN114760025A (en) | Remote device control method, device, electronic device and medium | |
| CN114679312A (en) | Encryption method, electronic device, and computer-readable storage medium | |
| CN109962962B (en) | Socket connection method and device | |
| CN118944898B (en) | Large file signing technical method and equipment based on edge computing electronic signature system | |
| CN116073993B (en) | Data message transmission method and device, electronic equipment and storage medium |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| PB01 | Publication | ||
| PB01 | Publication | ||
| SE01 | Entry into force of request for substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| GR01 | Patent grant | ||
| GR01 | Patent grant |



