CN103514050B - App calling method and mobile device - Google Patents
App calling method and mobile device Download PDFInfo
- Publication number
- CN103514050B CN103514050B CN201210203137.8A CN201210203137A CN103514050B CN 103514050 B CN103514050 B CN 103514050B CN 201210203137 A CN201210203137 A CN 201210203137A CN 103514050 B CN103514050 B CN 103514050B
- Authority
- CN
- China
- Prior art keywords
- java
- formula
- tunnel
- signal
- unlatching
- 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
Landscapes
- Stored Programmes (AREA)
Abstract
Description
技术领域 technical field
本发明涉及一种程式呼叫方法,特别是涉及一种应用于Java卡虚拟机架构的Java程式(Applet)呼叫方法。The invention relates to a method for calling a program, in particular to a method for calling a Java program (Applet) applied to the framework of a Java Card virtual machine.
背景技术 Background technique
随着行动终端设备上的应用越趋于多样性,以及商务环节的复杂性增加,行动终端的服务也越来越多元。As the applications on mobile terminal devices become more diverse and the complexity of business links increases, the services of mobile terminals are also becoming more and more diverse.
以往的个人服务认证识别终端,例如用户识别模块(SubscriberIdentity Module,SIM)卡、身分识别(ID)卡、银行卡等,皆是一种符合Java卡与Java SIM架构且为单一输入输出埠(I/O)界面的Java COS智能卡,而该些智能卡属于被动的元件,其是借由行动终端通过协议而呼叫,因此,该些卡片的应用Java程式若要操作于同一张卡片内Java卡虚拟机上的Java程式(Applet),就必须在Java Applet中实践SIO(Shareable Interface Object),也就是说,目前Java Applet的呼叫皆是行动终端或外部读卡设备通过指令调用而执行,若要执行JavaApplet与Java Applet之间的呼叫,则必须更改现今Java Applet的相关规范。但现今Java卡与Java SIM架构已经运行多年,发出去市面的相关智能卡已超过上亿张,并不可能更改规范,且SIO介面的实践也会有安全性的顾虑。此外,现今有很多国际组织公布的银行卡等安全性应用程式规范,并不包含此等SIO设计调用规范,更别遑论JavaApplet之间的呼叫。Previous personal service authentication and identification terminals, such as Subscriber Identity Module (Subscriber Identity Module, SIM) card, identity identification (ID) card, bank card, etc., are all a Java card and Java SIM architecture and a single input and output port (I /O) interface Java COS smart card, and these smart cards are passive components, which are called by the mobile terminal through the protocol, therefore, if the application Java programs of these cards are to be operated on the Java Card virtual machine in the same card The Java program (Applet) on the computer must implement SIO (Shareable Interface Object) in the Java Applet. That is to say, the current Java Applet calls are all executed by calling instructions from mobile terminals or external card reading devices. To execute JavaApplet Calls between Java Applet and Java Applet must change the relevant specifications of the current Java Applet. However, the current Java Card and Java SIM architectures have been in operation for many years, and more than 100 million related smart cards have been issued to the market. It is impossible to change the specifications, and the practice of the SIO interface will also have security concerns. In addition, the bank card and other security application specifications published by many international organizations do not include these SIO design call specifications, let alone calls between JavaApplets.
因此,如何在不更改现今Java Applet规范的前提下,执行JavaApplet与Java Applet之间的呼叫遂为本案的发明重点。Therefore, under the premise of not changing the current Java Applet specification, how to execute the call between Java Applet and Java Applet is the focus of the invention in this case.
发明内容 Contents of the invention
本发明的目的在于提供一种可以执行Java Applet之间沟通呼叫的程式呼叫方法。The purpose of the present invention is to provide a program call method that can execute communication calls between Java Applets.
本发明程式呼叫方法,于一控制模块中执行,该控制模块储存有数个Java程式(Applet),程式呼叫方法包含以下步骤:The program calling method of the present invention is executed in a control module, and the control module stores several Java programs (Applets), and the program calling method comprises the following steps:
(A)接收由一输入模块所传送的信号;(A) receiving a signal transmitted by an input module;
(B)根据接收到的信号,确认对应各个Java程式的实际通道与虚拟通道的状态,并进行虚拟通道的旗标设定;(B) According to the received signal, confirm the state of the actual channel and the virtual channel corresponding to each Java program, and carry out the flag setting of the virtual channel;
(C)判断接收到的信号是否包含一多通道管理指令,若是,则根据该多通道管理指令进行通道设定,并执行步骤(D);若否,则执行步骤(F);(C) judging whether the received signal contains a multi-channel management command, if so, then perform channel setting according to the multi-channel management command, and execute step (D); if not, then execute step (F);
(D)判断该被设定开启的虚拟通道是否仍为开启,若是,则执行步骤(E);若否,则执行步骤(A);(D) judging whether the virtual channel that is set to be opened is still open, if so, then perform step (E); if not, then perform step (A);
(E)接收设定开启的虚拟通道所对应的Java程式所输出的信号,并返回执行步骤(B);及(E) receiving the signal output by the Java program corresponding to the virtual channel set to open, and returning to the execution step (B); and
(F)根据该输入模块所传送信号的类型,执行对应的处理程序。如此,借由将Java程式之间的沟通信号回传给呼叫的Java程式,使得该Java程式可取代输入模块而传送相关资讯至被呼叫的Java程式,进而达成各个Java Applet之间相互沟通的功效。(F) Execute the corresponding processing program according to the type of the signal transmitted by the input module. In this way, by returning the communication signal between Java programs to the calling Java program, the Java program can replace the input module and send relevant information to the called Java program, thereby achieving the function of mutual communication between Java Applets .
较佳地说,上述步骤(D)是根据被设定开启的虚拟通道所对应的Java程式是否被其他Java程式呼叫,或是该被设定开启的虚拟通道所对应的Java程式输出的指令是否属于虚拟通道与其Java程式相关返回指令而判断该被设定开启的虚拟通道是否仍为开启。当然,呼叫开启虚拟通道的Java程式再次呼叫通道指令将虚拟通道关闭也可关闭虚拟通道。Preferably, the above step (D) is based on whether the Java program corresponding to the virtual channel that is set to be opened is called by other Java programs, or whether the command output by the Java program corresponding to the virtual channel that is set to be opened is It is determined whether the virtual channel that is set to be opened is still open by returning commands related to the virtual channel and its Java program. Of course, the virtual channel can also be closed by calling the Java program that opens the virtual channel and calling the channel command again to close the virtual channel.
详细来说,步骤(D)是根据被开启的虚拟通道所对应的Java程式输出的信号所包含的旗标(Flag)是否被标注使用中而判断是否被其他Java程式呼叫。In detail, the step (D) is to determine whether the virtual channel is called by other Java programs according to whether the flag (Flag) included in the signal output by the Java program corresponding to the opened virtual channel is marked as being in use.
此外,步骤(F)包括以下子步骤:In addition, step (F) includes the following sub-steps:
(F-1)判断输入模块所传送信号是否为一认证鉴全指令,若是,则控制Java程式与对应该认证鉴全指令的Java程式相互沟通以传输资讯;若否,则执行步骤(F-2);(F-1) Judging whether the signal sent by the input module is an authentication command, if so, then controlling the Java program to communicate with the Java program corresponding to the authentication command to transmit information; if not, then execute step (F- 2);
(F-2)判断输入模块所传送信号是否为一标准Java Applet指令,若是,则根据标准Java Applet指令执行,若需要呼叫其他Java程式可以通过特殊虚拟通道命令格式去呼叫其他对应的Java程式;若否,则执行步骤(F-3);及(F-2) Determine whether the signal transmitted by the input module is a standard Java Applet command, if so, then execute according to the standard Java Applet command, if you need to call other Java programs, you can call other corresponding Java programs through the special virtual channel command format; If not, proceed to step (F-3); and
(F-3)回传信号至输入模块。(F-3) Return the signal to the input module.
再者,本程式呼叫方法还包含一位于步骤(A)之前的步骤(G),输入模块传送一重置指令至控制模块,以在每次系统重设定或开机等操作前先将控制模块重置。Moreover, this program call method also includes a step (G) before the step (A), the input module sends a reset command to the control module, so that the control module will be reset before each system reset or power on. reset.
步骤(B)是根据对应各该虚拟通道的一旗标是否被注册而确认各该虚拟通道的使用状态。Step (B) is to confirm the use status of each virtual channel according to whether a flag corresponding to each virtual channel is registered.
在步骤(C)中,若接收到的信号包含多通道管理指令,则根据多通道管理指令进行通道设定,将执行其关联通道设定为开启,且将通道开启期间设定此虚拟通道对应的一旗标标注为占用。In step (C), if the received signal contains a multi-channel management command, the channel is set according to the multi-channel management command, the associated channel is set to be executed, and the corresponding virtual channel is set during the channel opening period. A flag of is marked as occupied.
另外,本发明的另一目的,即在提供一种可以执行上述程式呼叫方法的行动装置。In addition, another object of the present invention is to provide a mobile device capable of executing the above program calling method.
本发明行动装置包含一输入模块及一控制模块。其中,控制模块包括一电连接于输入模块的输入输出埠、一储存有数个Java程式的程式储存区,及一电连接于输入输出埠及程式储存区的控制单元。The mobile device of the present invention includes an input module and a control module. Wherein, the control module includes an input-output port electrically connected to the input module, a program storage area storing several Java programs, and a control unit electrically connected to the input-output port and the program storage area.
控制单元接收由输入模块所传送的信号,并根据接收到的信号,确认对应各个Java程式的一虚拟通道的状态,Java程式可自行呼叫一没占用的通道并定义成一虚拟通道的状态并在本虚拟通道调用卡内其他Java程式,系统若所接收到的信号包含一多通道管理指令,则根据该多通道管理指令进行通道设定,并判断该被开启的虚拟通道是否仍为开启,若是,则接收该设定开启的虚拟通道所对应的Java程式所输出的信号并重复执行系统程式不返回输入模块;若所接收到的信号未包含该等虚拟通道调用Java程式的流程与此虚拟通道关联多通道管理指令,则根据该输入模块所传送信号的类型,执行对应的处理程序。如此同样能达到各个Java Applet之间相互沟通的功效。The control unit receives the signal sent by the input module, and according to the received signal, confirms the status of a virtual channel corresponding to each Java program. The Java program can call an unoccupied channel by itself and define it as a status of a virtual channel. The virtual channel calls other Java programs in the card. If the signal received by the system includes a multi-channel management command, the channel setting is performed according to the multi-channel management command, and it is judged whether the opened virtual channel is still open. If so, Then receive the signal output by the Java program corresponding to the virtual channel opened by the setting and execute the system program repeatedly without returning to the input module; if the received signal does not include such virtual channel, the process of calling the Java program is associated with this virtual channel The multi-channel management command executes the corresponding processing program according to the type of the signal transmitted by the input module. This can also achieve the effect of mutual communication between various Java Applets.
较佳地,输入模块为一基频模块。Preferably, the input module is a baseband module.
较佳地说,控制单元是根据被设定开启的虚拟通道所对应的Java程式是否被其他Java程式呼叫,或是该被设定开启的虚拟通道所对应的Java程式输出的指令是否属于虚拟通道与其Java程式相关返回指令而判断该被设定开启的虚拟通道是否仍为开启。当然,呼叫开启虚拟通道的Java程式再次呼叫通道指令将虚拟通道关闭也可关闭虚拟通道。Preferably, the control unit is based on whether the Java program corresponding to the virtual channel that is set to be opened is called by other Java programs, or whether the command output by the Java program corresponding to the virtual channel that is set to be opened belongs to the virtual channel Determine whether the virtual channel that is set to be opened is still open by returning an instruction related to the Java program. Of course, the virtual channel can also be closed by calling the Java program that opens the virtual channel and calling the channel command again to close the virtual channel.
详细地说,控制单元是根据被开启的虚拟通道所对应的Java程式输出的信号所包含的旗标是否被标注使用中而判断是否呼叫其他Java程式。Specifically, the control unit judges whether to call other Java programs according to whether the flag contained in the signal output by the Java program corresponding to the opened virtual channel is marked as being in use.
此外,控制单元判断该被设定开启的虚拟通道所对应的Java程式是否被其他Java程式呼叫或是该被设定开启的虚拟通道所对应的Java程式输出的指令是否属于虚拟通道与其Java程式相关返回指令,若是,则接收Java程式所输出的信号并进行虚拟通道的旗标设定。In addition, the control unit judges whether the Java program corresponding to the virtual channel that is set to be opened is called by other Java programs or whether the command output by the Java program corresponding to the virtual channel that is set to be opened belongs to the virtual channel and is related to its Java program. Return command, if yes, receive the signal output by the Java program and set the flag of the virtual channel.
此外,若输入模块所传送信号未包含多通道管理指令,则控制单元判断输入模块所传送信号是否为一认证鉴全指令,若是,则控制Java程式与对应该认证鉴全指令的Java程式相互沟通以传输资讯,若否,则控制单元判断输入模块所传送信号是否为一标准Java Applet指令,若是,则根据该标准Java Applet指令执行,若需要呼叫其他Java Applet程式可以通过特殊虚拟通道命令格式去呼叫其他对应的Java程式,否则回传信号至输入模块。In addition, if the signal transmitted by the input module does not contain a multi-channel management command, the control unit judges whether the signal transmitted by the input module is an authentication command, and if so, controls the Java program to communicate with the Java program corresponding to the authentication command. To transmit information, if not, then the control unit judges whether the signal transmitted by the input module is a standard Java Applet command, if so, then execute according to the standard Java Applet command, if it is necessary to call other Java Applet programs, it can go through the special virtual channel command format Call other corresponding Java programs, otherwise return the signal to the input module.
控制单元若判断所接收到的信号包含多通道管理指令,则根据该多通道管理指令进行通道设定,将执行其关联通道设定为开启,且将该通道开启期间设定此虚拟通道对应的一旗标(Flag)标注为占用。If the control unit judges that the received signal contains a multi-channel management command, it will set the channel according to the multi-channel management command, set the execution of its associated channel to open, and set the period corresponding to the virtual channel during the channel opening period. A flag (Flag) indicates that it is occupied.
此外,控制单元是根据对应各该虚拟通道的一旗标是否被注册而确认各该虚拟通道的状态。In addition, the control unit confirms the status of each virtual channel according to whether a flag corresponding to each virtual channel is registered.
本发明的有益效果在于:通过本程式呼叫方法可以在不更改现今Java Applet的规范下,执行Java Applet之间的相互沟通。The beneficial effect of the present invention lies in that the mutual communication between Java Applets can be executed without changing the standard of the current Java Applets through the calling method of the program.
附图说明 Description of drawings
图1是说明本发明行动装置的电路方块示意图;FIG. 1 is a schematic block diagram illustrating a circuit of a mobile device of the present invention;
图2是说明本行动装置在出厂前所执行的初始化设定流程;FIG. 2 is an illustration of the initial setting process performed by the mobile device before leaving the factory;
图3是说明本实施例的控制模块运作时所执行的细部流程。FIG. 3 illustrates the detailed flow executed by the control module of this embodiment.
具体实施方式 detailed description
下面结合附图及实施例对本发明进行详细说明。The present invention will be described in detail below in conjunction with the accompanying drawings and embodiments.
参阅图1,为本发明行动装置100的较佳实施例,本行动装置100可为移动电话或个人数字助理(Personal Digital Assistant,PDA)等需要通过用户识别模块(Subscriber Identity Module,SIM)与移动网络通讯的装置。Referring to Fig. 1, it is a preferred embodiment of the mobile device 100 of the present invention, the mobile device 100 can be a mobile phone or a personal digital assistant (Personal Digital Assistant, PDA), etc. Devices for network communication.
在本实施例中,行动装置100包含一输入模块10及一控制模块20。In this embodiment, the mobile device 100 includes an input module 10 and a control module 20 .
输入模块10为一基频模块(base band),或是包括各种与ISO7816/UART相关的输入装置,不以本实施例为限。The input module 10 is a base band module (base band), or includes various input devices related to ISO7816/UART, which is not limited to this embodiment.
控制模块20是基于Java卡设计的集成电路应用晶片(Chip),且包括一电连接于输入模块10的输入输出埠(I/O port)21、一程式储存区22及一电连接于输入输出埠21及程式储存区22的控制单元23。输入输出埠21是以ISO-7816协定与输入模块10通讯,以相互传输资讯;程式储存区22提供数个Java程式(Java Applet)存放,该些JavaApplet可由使用者根据需求而对应从空中(Over The Air,OTA)下载取得,其可为用户识别应用开发工具(SIM Application Toolkit,STK)程式或银行Java Applet等;控制单元23用以根据输入模块10所传送的信号的内容,控制将输入输出埠21与程式储存区22电连接而供输入模块10与程式储存区22相互传输资讯,并且控制程式储存区22中多个Java Applet相互沟通。The control module 20 is an integrated circuit application chip (Chip) based on Java card design, and includes an input and output port (I/O port) 21 electrically connected to the input module 10, a program storage area 22 and an electrically connected input and output port. The control unit 23 of the port 21 and the program storage area 22 . The input and output port 21 communicates with the input module 10 through the ISO-7816 protocol to transmit information each other; the program storage area 22 provides several Java programs (Java Applets) to store, and these Java Applets can be connected from the air (Over The Air, OTA) download, it can be user identification application development tool (SIM Application Toolkit, STK) program or bank Java Applet etc.; The port 21 is electrically connected to the program storage area 22 for mutual transmission of information between the input module 10 and the program storage area 22 , and controls multiple Java Applets in the program storage area 22 to communicate with each other.
在本发明中,控制模块20是建构于Java卡的虚拟机架构上,可以使行动装置100中其他同样符合Java卡标准规范的应用程式,例如:EMV、PBOC、认证机构(Certificate Authority,CA)、公钥基础建设(Public Key Infrastructure,PKI)等,能移植到控制模块20的Java虚拟机上执行,且由于Java卡的虚拟机架构为一个可支持全球平台(Global Platform)的架构,具有空中更新的能力,可更新控制模块20中程式储存区22的Java Applet、安全认证元件及系统等,是一个安全性的电路元件(Security Element)。特别说明的是,控制模块20可制作于输入模块10中,并与输入模块10整合成同一晶片,也可以独立为单一晶片,并不以何种制作方式为限。In the present invention, the control module 20 is built on the Java Card virtual machine architecture, which can make other applications in the mobile device 100 that also comply with the Java Card standard specification, such as: EMV, PBOC, and Certificate Authority (Certificate Authority, CA) , public key infrastructure (Public Key Infrastructure, PKI), etc., can be transplanted to the Java virtual machine of the control module 20 to execute, and because the virtual machine architecture of the Java card is a framework that can support the Global Platform (Global Platform), it has The ability to update can update the Java Applet, security authentication components and systems in the program storage area 22 in the control module 20, which is a security circuit element (Security Element). In particular, the control module 20 can be fabricated in the input module 10 and integrated with the input module 10 into the same chip, or can be independently formed into a single chip, and the manufacturing method is not limited.
参阅图1及图2,由于控制模块20是基于Java卡设计的集成电路应用晶片,每个行动装置100的控制模块20从工厂出厂前的产业链上,皆需要进行初始化的设定。如步骤S 11,工厂相关人员可利用读卡机或初始化设备判断控制模块20是否为一初始状态(NativeStatus),若控制模块20为初始状态,表示控制模块20为一初始卡(Native Card),则会执行步骤S 12,针对控制模块20进行初始化设定,将作业系统、卡片管理程式等软件,以及相关使用者个人化数据载入至控制模块20中。若控制模块20非为初始状态,即表示控制模块20已为Java卡(或为Java卡状态),则该控制模块20将不需要进行初始化设定,即结束流程。Referring to FIG. 1 and FIG. 2 , since the control module 20 is an integrated circuit application chip designed based on Java Card, the control module 20 of each mobile device 100 needs to be initialized in the industrial chain before leaving the factory. As in step S11, relevant personnel in the factory can use a card reader or an initialization device to judge whether the control module 20 is in an initial state (NativeStatus). If the control module 20 is in an initial state, it means that the control module 20 is an initial card (Native Card). Step S12 will be executed to initialize the control module 20 , and load the operating system, card management program and other software, as well as relevant user personalization data into the control module 20 . If the control module 20 is not in the initial state, it means that the control module 20 is already in the Java Card state (or in the Java Card state), then the control module 20 does not need to be initialized, and the process ends.
接着参阅图1及图3,以下将详细说明控制模块20运作时所执行的细部流程。Next, referring to FIG. 1 and FIG. 3 , the detailed process executed by the control module 20 will be described in detail below.
步骤S10,于使用者将行动装置100开机后或主动重置时,输入模块10在需要重置控制单元23时会送出一个重置(reset)指令到控制模块20。Step S10 , after the user turns on the mobile device 100 or actively resets it, the input module 10 sends a reset command to the control module 20 when the control unit 23 needs to be reset.
步骤S20,控制单元23通过输入输出埠21接收输入模块10所传送的信号。Step S20 , the control unit 23 receives the signal transmitted by the input module 10 through the input and output port 21 .
步骤S30,控制单元23根据接收到的信号,确认程式储存区22中对应各个Java Applet的实际通道与虚拟通道(Virtual Channel)的状态。在本实施例中,各个实际通道及虚拟通道皆具有一对应的旗标(Flag),控制单元23即是根据该些旗标是否被注册而确认各个实际通道及虚拟通道的使用状态。此外,若该信号含有通道设定指令,例如:新增通道(Create Channel)指令、关闭通道(Close Channel)指令等,则控制单元23根据该通道设定指令,设定其对应的实际通道或虚拟通道,例如:将当前Java程式(Current Applet)设定执行于其中一虚拟通道。若该信号中并无通道设定指令,则在确认各个实际通道及虚拟通道的状态后直接执行步骤S40。In step S30, the control unit 23 confirms the status of the actual channel and the virtual channel (Virtual Channel) corresponding to each Java Applet in the program storage area 22 according to the received signal. In this embodiment, each actual channel and virtual channel has a corresponding flag (Flag), and the control unit 23 confirms the use status of each actual channel and virtual channel according to whether the flags are registered or not. In addition, if the signal contains a channel setting command, such as: a new channel (Create Channel) command, a close channel (Close Channel) command, etc., then the control unit 23 sets the corresponding actual channel or channel according to the channel setting command. Virtual channels, for example: set the current Java program (Current Applet) to execute in one of the virtual channels. If there is no channel setting command in the signal, step S40 is directly executed after confirming the status of each actual channel and virtual channel.
步骤S40,控制单元23判断接收到的信号是否包含一多通道(Multi-Channel)管理指令,该多通道管理指令中包括数个通道设定,而每一通道设定会对应程式储存区22中指定的Java Applet。若控制单元23所接收的信号包含多通道管理指令,则执行步骤S50;若否,则执行步骤S80。Step S40, the control unit 23 judges whether the received signal includes a multi-channel (Multi-Channel) management command, the multi-channel management command includes several channel settings, and each channel setting will correspond to the program storage area 22 The specified Java Applet. If the signal received by the control unit 23 includes a multi-channel management instruction, execute step S50; if not, execute step S80.
步骤S50,控制单元23根据多通道管理指令进行各个通道的设定,例如:将特定通道设定为开启(ON),并将其余通道关闭(OFF),且将执行中关闭的通道内讯息存入记忆体暂存区内,或是同时将多个虚拟通道设定为开启等。在本实施例中,控制单元23是将先前根据通道设定指令所设定的虚拟通道开启,以供对应该虚拟通道的JavaApplet(即Current Applet)可与其他Java Applet或输入模块10沟通,结束后执行步骤S60。In step S50, the control unit 23 sets each channel according to the multi-channel management command, for example: setting a specific channel to be ON (ON), and turning off the rest of the channels (OFF), and storing the messages in the channels that are closed during execution. into the temporary storage area of the memory, or set multiple virtual channels to open at the same time. In this embodiment, the control unit 23 opens the virtual channel previously set according to the channel setting command, so that the JavaApplet (i.e. Current Applet) corresponding to the virtual channel can communicate with other Java Applets or input modules 10, and end Then step S60 is executed.
步骤S60,控制单元23判断被设定开启的虚拟通道是否仍为开启。在本实施例中,控制单元23是根据该被设定开启的虚拟通道所对应的Java程式(Applet)是否被其他Java程式(Applet)所呼叫,或是返回输入模块10的指令(即被设定开启的虚拟通道所对应的Java程式输出的指令)是否属于虚拟通道与其Java程式相关返回指令而判断该虚拟通道是否仍为开启,更详细地说,控制单元23是根据被开启的虚拟通道所对应的Current Applet所输出的信号所包含的旗标是否被标注使用中,若有,则执行步骤S70,控制单元23接收被设定开启的虚拟通道所对应的Current Applet所输出的信号,并于接收到后执行步骤S30。若控制单元23判断Current Applet所输出的信号不在虚拟通道设定中,则执行步骤S20。特别说明的是,呼叫开启虚拟通道的Java程式再次呼叫通道指令将虚拟通道关闭也可关闭虚拟通道。In step S60, the control unit 23 determines whether the virtual channel set to be enabled is still enabled. In this embodiment, the control unit 23 is based on whether the Java program (Applet) corresponding to the virtual channel that is set to be opened is called by other Java programs (Applet), or returns an instruction to the input module 10 (that is, it is set to Determine whether the virtual channel corresponding to the Java program output) belongs to the virtual channel and its Java program-related return instructions to determine whether the virtual channel is still open. In more detail, the control unit 23 is based on the opened virtual channel. Whether the flag contained in the signal output by the corresponding Current Applet is marked in use, if yes, then execute step S70, the control unit 23 receives the signal output by the Current Applet corresponding to the virtual channel that is set to open, and Step S30 is executed after receiving. If the control unit 23 judges that the signal output by the Current Applet is not in the virtual channel setting, step S20 is executed. In particular, the virtual channel can also be closed by calling the Java program that opens the virtual channel and calling the channel command again to close the virtual channel.
步骤S 80,控制单元23根据其所接收的信号的类型,切换至对应的处理程序。在本实施例中,步骤S80可包括以下步骤:In step S80, the control unit 23 switches to a corresponding processing program according to the type of the signal it receives. In this embodiment, step S80 may include the following steps:
步骤S81,控制单元23判断接收到的信号是否为一认证鉴全指令(例如:SIM/USIM Applet),若是,即表示该信号为全球移动通讯系统(Global System for Mobile Communications,GSM)指令,则执行步骤S82;否则执行步骤S83。Step S81, the control unit 23 judges whether the received signal is an authentication command (for example: SIM/USIM Applet), if so, it means that the signal is a Global System for Mobile Communications (Global System for Mobile Communications, GSM) command, then Execute step S82; otherwise, execute step S83.
步骤S82,控制单元23控制Current Applet与程式储存区22中对应该认证鉴全指令的Java Applet相互沟通以传输资讯。In step S82, the control unit 23 controls the Current Applet to communicate with the Java Applet corresponding to the authentication command in the program storage area 22 to transmit information.
步骤S83,控制单元23判断接收到的信号是否为标准JavaApplet指令或Java SIM Applet指令,若是,则执行步骤S84。若控制单元23所接收的信号不是GSM指令也不是标准Java Applet指令或Java SIM Applet指令,则认定为Java卡执行环境(Java Card RuntimeEnvironment,JCRE)指令或测试指令,控制单元23会执行步骤S85。In step S83, the control unit 23 judges whether the received signal is a standard Java Applet command or a Java SIM Applet command, and if so, executes step S84. If the signal received by the control unit 23 is neither a GSM command nor a standard Java Applet command or a Java SIM Applet command, then it is determined to be a Java Card Runtime Environment (JCRE) command or a test command, and the control unit 23 will execute step S85.
步骤S84,控制单元23根据该标准Java Applet指令或Java SIMApplet指令,通过特殊虚拟通道命令格式去呼叫程式储存区22中其他对应的Java Applet,使Current Applet可与被呼叫的Java Applet相互沟通以传输资讯,并于呼叫后返回执行步骤S60。Step S84, the control unit 23 calls other corresponding Java Applets in the program storage area 22 through the special virtual channel command format according to the standard Java Applet command or the Java SIM Applet command, so that the Current Applet can communicate with the called Java Applet to transmit information, and return to step S60 after calling.
步骤S85,控制单元23通过输入输出埠21将该信号回传至输入模块10。特别说明的是,所有要传送至输入模块10的信号,都会通过步骤S60的判断,以确认该信号是Java Applet之间的沟通资讯,还是Java Applet与输入模块10之间的沟通资讯。当然,配合不同的设定,控制单元23也可以将该信号递交给特定JCRE电路执行,或通过特定Java Applet指令呼叫特定的程序去调用其特定的服务指令与信号流程,并不以本实施例为限。In step S85 , the control unit 23 returns the signal to the input module 10 through the I/O port 21 . In particular, all signals to be transmitted to the input module 10 will pass through the judgment of step S60 to confirm whether the signals are communication information between Java Applets or communication information between Java Applets and the input module 10 . Of course, with different settings, the control unit 23 can also submit the signal to a specific JCRE circuit for execution, or call a specific program through a specific Java Applet command to call its specific service command and signal flow, which is not based on this embodiment. limit.
因此,由上述步骤S10至步骤S80可知,本行动装置100实现了一个多通道呼叫安全认证元件以符合Java虚拟机运行的架构,在整个运行的过程中,通道管理的机制完全是控制单元23根据信号中的多通道管理指令在管理,且在步骤S80中的切换通讯模式也全部遵循Java卡虚拟机的架构,根据各个虚拟通道中的应用程式介面(Application Programming Interface,API)或物件(Object)等去调用对应初始层(Native layer)中的指令资料库(Library)与记忆体(Memory)。此外,在Java Applet调用应用程式介面(API)时,都会先呼叫新增通道(Create Channel)指令,设定对应的虚拟通道,并于调用后呼叫关闭通道(Close Channel)指令,以释放占用的虚拟通道,如此以确保输入模块10服务指令的正常操作。Therefore, it can be seen from the above steps S10 to S80 that the mobile device 100 implements a multi-channel call security authentication element to conform to the architecture of the Java virtual machine. During the entire operation process, the channel management mechanism is completely controlled by the control unit 23 The multi-channel management command in the signal is being managed, and the switching communication mode in step S80 also all follows the framework of the Java Card virtual machine, according to the Application Programming Interface (Application Programming Interface, API) or object (Object) in each virtual channel Wait to call the instruction library (Library) and memory (Memory) in the corresponding initial layer (Native layer). In addition, when the Java Applet calls the application programming interface (API), it will first call the Create Channel command to set the corresponding virtual channel, and then call the Close Channel command to release the occupied channel. Virtual channel, so as to ensure the normal operation of the input module 10 service order.
此外,本Java Applet呼叫方法不仅能应用在单一输入输出埠的行动装置100,对于多输入输出埠的Java卡虚拟机架构同样可通过本Java Applet呼叫方法而达到Java Applet之间的相互沟通,所以并不以本实施例为限。In addition, this Java Applet calling method can not only be applied to the mobile device 100 with a single input and output port, but also can achieve mutual communication between Java Applets through this Java Applet calling method for the Java Card virtual machine framework with multiple input and output ports, so It is not limited to this embodiment.
综上所述,本发明行动装置100借由控制模块20为Java卡的虚拟机架构,并于控制单元23的应用程式介面(API)中新增用以设定虚拟通道的开启通道(Open Channel)指令、关闭通道(Close Channel)指令,以及让各Java Applet的应用程序能调用与返回相关服务指令转至虚拟通道上的Java Applet(Send-Out Going Data to VirtualChannel),如此以达到各个Java Applet之间相互沟通以传输资讯,所以确实能达成本发明的目的。In summary, the mobile device 100 of the present invention uses the control module 20 as the virtual machine architecture of the Java card, and adds an Open Channel (Open Channel) for setting the virtual channel in the application program interface (API) of the control unit 23. ) command, close channel (Close Channel) command, and allow the application programs of each Java Applet to call and return related service commands to the Java Applet (Send-Out Going Data to Virtual Channel) on the virtual channel, so as to achieve each Java Applet Communicate with each other to transmit information, so the purpose of the present invention can indeed be achieved.
Claims (17)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201210203137.8A CN103514050B (en) | 2012-06-19 | 2012-06-19 | App calling method and mobile device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201210203137.8A CN103514050B (en) | 2012-06-19 | 2012-06-19 | App calling method and mobile device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN103514050A CN103514050A (en) | 2014-01-15 |
CN103514050B true CN103514050B (en) | 2016-12-21 |
Family
ID=49896819
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201210203137.8A Active CN103514050B (en) | 2012-06-19 | 2012-06-19 | App calling method and mobile device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN103514050B (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
TWI632508B (en) * | 2017-07-31 | 2018-08-11 | 中華電信股份有限公司 | Multi-card integrated chip card application sharing authentication method |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US5987523A (en) * | 1997-06-04 | 1999-11-16 | International Business Machines Corporation | Applet redirection for controlled access to non-orginating hosts |
CN101013379A (en) * | 2006-01-09 | 2007-08-08 | 太阳微系统有限公司 | Supporting applets on a high end platform |
US7836456B1 (en) * | 2006-10-31 | 2010-11-16 | Oracle America, Inc. | Seamless extension of shareable interface mechanism to servlet and extended applet model for inter-application communication |
CN102087716A (en) * | 2011-03-02 | 2011-06-08 | 武汉天喻信息产业股份有限公司 | Multi-application Java smart card |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US8291035B2 (en) * | 2003-07-11 | 2012-10-16 | Ca, Inc. | System and method for using common communication channel by web page applets |
-
2012
- 2012-06-19 CN CN201210203137.8A patent/CN103514050B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US5987523A (en) * | 1997-06-04 | 1999-11-16 | International Business Machines Corporation | Applet redirection for controlled access to non-orginating hosts |
CN101013379A (en) * | 2006-01-09 | 2007-08-08 | 太阳微系统有限公司 | Supporting applets on a high end platform |
US7836456B1 (en) * | 2006-10-31 | 2010-11-16 | Oracle America, Inc. | Seamless extension of shareable interface mechanism to servlet and extended applet model for inter-application communication |
CN102087716A (en) * | 2011-03-02 | 2011-06-08 | 武汉天喻信息产业股份有限公司 | Multi-application Java smart card |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
TWI632508B (en) * | 2017-07-31 | 2018-08-11 | 中華電信股份有限公司 | Multi-card integrated chip card application sharing authentication method |
Also Published As
Publication number | Publication date |
---|---|
CN103514050A (en) | 2014-01-15 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US9843674B2 (en) | Managing selection and triggering of applications on a card computing device | |
EP3116161B1 (en) | Security unit management method and terminal | |
US9037857B2 (en) | System and method for downloading application | |
KR101505763B1 (en) | Method for exporting and importing data of a javacard application | |
US9351164B2 (en) | Secure NFC routing | |
JP5349681B2 (en) | Enhanced near field communication terminal, smart card and communication method thereof | |
EP2731381B1 (en) | Method for changing the mobile network operator in an embedded sim on basis of special privilege | |
CN102724315B (en) | The remote-operated method and system of smart card are realized based on smart card web page server | |
US20200137555A1 (en) | Management of subscriber profiles simultaneously active in an euicc card using a plurality of separate links | |
US9158598B2 (en) | Apparatus, method, program and system for processing information utilizing a multi-platform capable of managing a plurality of applications | |
CN101473336A (en) | Method of dynamically allocating contacts of a subscriber chip card in a mobile terminal, and corresponding subscriber chip card and mobile terminal | |
US10387219B2 (en) | Enabling multiple secure elements in a card computing device | |
CN115103336B (en) | Card information activation method, device and storage medium | |
US11907931B2 (en) | Method and system for managing virtual electronic card, secure chip, terminal and storage medium | |
CN108702613A (en) | Embedded user identity module including communication configuration file | |
US9055605B2 (en) | Method for establishing a secure logical connection between an integrated circuit card and a memory card through a terminal equipment | |
WO2010096991A1 (en) | An application downloading system and method | |
US9980128B2 (en) | Method for modifying rights to security domain for smartcard, and server, smartcard, and terminal for same | |
CN103514050B (en) | App calling method and mobile device | |
US8844827B2 (en) | Chip card, and method for the software-based modification of a chip card | |
EP2682861B1 (en) | Program calling method, and mobile device | |
CN110636491B (en) | Service-oriented trusted execution module and communication method | |
CN103379190B (en) | Mobile device, transaction system and signal transmission method | |
CN102547661B (en) | Method and device for establishing communication between Android system and telecommunications smart card | |
CN111818510B (en) | Multi-channel communication system and method based on safe intelligent thin film card |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C14 | Grant of patent or utility model | ||
GR01 | Patent grant |