[go: up one dir, main page]

CN104793964A - Java card and application and update method thereof, terminal and intelligent card system applied to java card - Google Patents

Java card and application and update method thereof, terminal and intelligent card system applied to java card Download PDF

Info

Publication number
CN104793964A
CN104793964A CN201410021220.2A CN201410021220A CN104793964A CN 104793964 A CN104793964 A CN 104793964A CN 201410021220 A CN201410021220 A CN 201410021220A CN 104793964 A CN104793964 A CN 104793964A
Authority
CN
China
Prior art keywords
java card
code
memory
class
application
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201410021220.2A
Other languages
Chinese (zh)
Other versions
CN104793964B (en
Inventor
钟月婷
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Nationz Technologies Inc
Original Assignee
Nationz Technologies Inc
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Nationz Technologies Inc filed Critical Nationz Technologies Inc
Priority to CN201410021220.2A priority Critical patent/CN104793964B/en
Publication of CN104793964A publication Critical patent/CN104793964A/en
Application granted granted Critical
Publication of CN104793964B publication Critical patent/CN104793964B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Stored Programmes (AREA)

Abstract

本发明公开了一种java卡及其应用更新方法、应用于java卡的终端、智能卡系统。该终端包括:只读存储器,java卡的java卡平台实现代码掩膜于只读存储器,java卡的Applet应用实现代码中的功能类库实现代码掩膜于只读存储器,其中功能类库实现代码包括多个类;可擦写存储器,java卡的Applet应用实现代码中的应用框架实现代码以可擦写方式存储于可擦写存储器,其中应用框架实现代码用于调用类;总线,只读存储器与可擦写存储器分别与总线电连接。通过上述方式,本发明能够对java卡中掩膜于只读存储器的应用进行更新,从而有效修补java卡的应用中存在的bug,可提高用户体验,并降低更新成本。

The invention discloses a java card and its application update method, a terminal applied to the java card, and a smart card system. The terminal includes: a read-only memory, the java card platform implementation code of the java card is masked in the read-only memory, and the function class library implementation code in the Applet application implementation code of the java card is masked in the read-only memory, wherein the function class library implements the code Including multiple classes; rewritable memory, the application framework implementation code in the Applet application implementation code of the java card is stored in the rewritable memory in a rewritable manner, wherein the application framework implementation code is used to call the class; bus, read-only memory The rewritable memory is electrically connected to the bus respectively. Through the above method, the present invention can update the application masked in the read-only memory in the java card, thereby effectively repairing bugs in the application of the java card, improving user experience, and reducing update costs.

Description

java卡及其应用更新方法、应用于java卡的终端、智能卡系统Java card and its application update method, terminal applied to java card, smart card system

技术领域technical field

本发明涉及信息技术领域,特别涉及一种java卡及其应用更新方法、应用于java卡的终端、智能卡系统。The invention relates to the field of information technology, in particular to a java card and its application updating method, a terminal applied to the java card, and a smart card system.

背景技术Background technique

java卡是可以运行java程序代码的智能卡。java卡不同于传统的智能卡(Native卡),分为平台和Applet应用两部分。A java card is a smart card that can run java program codes. The java card is different from the traditional smart card (Native card), which is divided into two parts: platform and Applet application.

智能卡的存储体系主要是由读写存储器(RAM)、只读存储器(ROM)以及可擦写编程存储器(EEPROM)组成。可擦写编程存储器(EEPROM)容量小,成本高,相对而言,只读存储器(ROM)容量大,成本低。同时,Java卡的运行时数据都在EEPROM存储,对EEPROM需求量大。所以,现在好多Java卡开发厂商都把平台和Applet应用掩膜到ROM中,以腾出更多空间下载其他应用或存储数据。The storage system of the smart card is mainly composed of read-write memory (RAM), read-only memory (ROM) and erasable programmable memory (EEPROM). Erasable programmable memory (EEPROM) has a small capacity and high cost. Relatively speaking, read-only memory (ROM) has a large capacity and low cost. At the same time, the runtime data of the Java card is stored in the EEPROM, and the demand for the EEPROM is large. Therefore, many Java card developers now mask the platform and Applet applications in ROM to free up more space for downloading other applications or storing data.

但由于只能对只读存储器进行读,而不能对其进行擦写,因此当掩膜于只读存储器的Applet应用有bug(缺陷)时,就不能有效地对其进行更新,从而影响用户体验,开发厂商只能更换只读存储器,这样亦使得开发厂商的更新成本提高。However, since the read-only memory can only be read, but not erased, when there is a bug (defect) in the Applet application masked by the read-only memory, it cannot be effectively updated, thereby affecting the user experience , the developer can only replace the ROM, which also increases the update cost of the developer.

发明内容Contents of the invention

本发明主要解决的技术问题是提供一种java卡及其应用更新方法、应用于java卡的终端、智能卡系统,能够对java卡中掩膜于只读存储器的应用进行更新,从而有效修补java卡的应用中存在的bug,可提高用户体验,并降低更新成本。The technical problem mainly solved by the present invention is to provide a java card and its application update method, a terminal applied to the java card, and a smart card system, which can update the application masked in the read-only memory in the java card, thereby effectively repairing the java card Bugs in the application can improve user experience and reduce update costs.

为解决上述技术问题,本发明采用的一个技术方案是:提供一种java卡的应用更新方法,java卡包括:只读存储器,java卡的java卡平台实现代码掩膜于只读存储器,其中java卡平台实现代码用于实现标准应用编程接口和运行环境,并封装了java卡所在的智能卡系统的硬件信息;java卡的Applet应用实现代码中的功能类库实现代码掩膜于只读存储器,其中功能类库实现代码包括多个类;可擦写存储器,java卡的Applet应用实现代码中的应用框架实现代码以可擦写方式存储于可擦写存储器,其中应用框架实现代码用于调用类;总线,只读存储器与可擦写存储器分别与总线电连接;该方法包括:在检测到功能类库实现代码的类需要进行更新时,擦除java卡中存储于可擦写存储器的应用框架实现代码;与java卡进行相互认证;将新应用框架实现代码以及对应于功能类库实现代码中需要更新的类的子类写入可擦写存储器;For solving the above-mentioned technical problem, a technical scheme that the present invention adopts is: provide a kind of application update method of java card, java card comprises: read-only memory, the java card platform of java card realizes code mask in read-only memory, wherein java The card platform implementation code is used to implement the standard application programming interface and operating environment, and encapsulates the hardware information of the smart card system where the java card is located; the function class library implementation code in the Applet application implementation code of the java card is masked in the read-only memory, wherein The implementation code of the functional class library includes multiple classes; the rewritable memory, the application framework implementation code in the Applet application implementation code of the java card is stored in the rewritable memory in a rewritable manner, and the application framework implementation code is used to call the class; The bus, the read-only memory and the rewritable memory are respectively electrically connected to the bus; the method includes: when it is detected that the class implementing the code of the functional class library needs to be updated, erasing the implementation of the application framework stored in the rewritable memory in the java card Code; mutual authentication with the java card; new application framework implementation code and subclass corresponding to the class to be updated in the functional class library implementation code are written into the rewritable memory;

其中,在功能类库实现代码的需要更新的类的子类中对需要更新的类中的方法以覆盖方式进行重写。Wherein, the method in the class to be updated is overwritten in the subclass of the class to be updated in the implementation code of the functional class library.

其中,新应用框架实现代码设置为用于停止调用功能类库实现代码中需要更新的类,且用于调用功能类库实现代码中除需要更新的类外的其它类以及子类。Wherein, the implementation code of the new application framework is set to stop calling classes that need to be updated in the implementation code of the functional class library, and is used to call other classes and subclasses in the implementation code of the functional class library except the class that needs to be updated.

其中,可擦写存储器为FLASH存储器或EEPROM存储器。Wherein, the rewritable memory is FLASH memory or EEPROM memory.

为解决上述技术问题,本发明采用的另一个技术方案是:提供一种java卡,包括:只读存储器,java卡的java卡平台实现代码掩膜于只读存储器,其中java卡平台实现代码用于实现标准应用编程接口和运行环境,并封装了java卡所在的智能卡系统的硬件信息;java卡的Applet应用实现代码中的功能类库实现代码掩膜于只读存储器,其中功能类库实现代码包括多个类;可擦写存储器,java卡的Applet应用实现代码中的应用框架实现代码以可擦写方式存储于可擦写存储器,其中应用框架实现代码用于调用类;总线,只读存储器与可擦写存储器分别与总线电连接。For solving the problems of the technologies described above, another technical scheme that the present invention adopts is: provide a kind of java card, comprise: read-only memory, the java card platform of java card realizes code mask in read-only memory, wherein java card platform realizes code with It is used to realize the standard application programming interface and operating environment, and encapsulates the hardware information of the smart card system where the java card is located; the implementation code of the function class library in the Applet application implementation code of the java card is masked in the read-only memory, wherein the function class library implements the code Including multiple classes; rewritable memory, the application framework implementation code in the Applet application implementation code of the java card is stored in the rewritable memory in a rewritable manner, wherein the application framework implementation code is used to call the class; bus, read-only memory The rewritable memory is electrically connected to the bus respectively.

其中,可擦写存储器为FLASH存储器或EEPROM存储器。Wherein, the rewritable memory is FLASH memory or EEPROM memory.

为解决上述技术问题,本发明采用的另一个技术方案是:提供一种应用于上述的java卡的终端,包括:类存储模块,用于存储对应于功能类库实现代码中需要更新的类的子类,且在子类中对需要更新的类中的方法以覆盖方式进行重写;应用框架实现代码存储模块,用于存储新应用框架实现代码,其中新应用框架实现代码设置为用于停止调用功能类库实现代码中需要更新的类,且用于调用功能类库实现代码中除需要更新的类外的其它类以及子类;更新模块,用于擦除java卡中存储于可擦写存储器的应用框架实现代码,并将子类、新应用框架实现代码写入Java卡的可擦写存储器中。In order to solve the above-mentioned technical problems, another technical solution adopted by the present invention is to provide a terminal applied to the above-mentioned java card, including: a class storage module for storing the class corresponding to the class that needs to be updated in the implementation code of the function class library Subclass, and in the subclass, the method in the class that needs to be updated is overridden; the application framework implementation code storage module is used to store the new application framework implementation code, wherein the new application framework implementation code is set to stop Call the class that needs to be updated in the implementation code of the functional class library, and is used to call other classes and subclasses in the implementation code of the functional class library except the class that needs to be updated; the update module is used to erase the rewritable memory stored in the java card The implementation code of the application framework of the memory is written into the rewritable memory of the Java card.

其中,终端为POS机或读卡器。Wherein, the terminal is a POS machine or a card reader.

为解决上述技术问题,本发明采用的另一个技术方案是:提供一种智能卡系统,包括上述的java卡以及上述的终端。In order to solve the above-mentioned technical problems, another technical solution adopted by the present invention is to provide a smart card system, including the above-mentioned java card and the above-mentioned terminal.

本发明的有益效果是:与现有技术相比,本发明的java卡及其应用更新方法、应用于java卡的终端、智能卡系统通过将将子类、新应用框架实现代码写入于Java卡的可擦写存储器中,并且使得新应用框架实现代码设置为停止调用功能类库实现代码中需要更新的类,且调用功能类库实现代码中除需要更新的类外的其它类,以及子类,因此能够对java卡中掩膜于只读存储器的应用进行更新,从而有效修补java卡的应用中存在的bug,可提高用户体验,并降低更新成本。The beneficial effects of the present invention are: compared with the prior art, the java card and its application update method of the present invention, the terminal applied to the java card, and the smart card system realize code writing of subclasses and new application frameworks into the Java card In the rewritable memory of the new application framework, the implementation code of the new application framework is set to stop calling the classes that need to be updated in the implementation code of the functional class library, and call other classes and subclasses in the implementation code of the functional class library except the class that needs to be updated Therefore, the application masked in the read-only memory in the java card can be updated, thereby effectively repairing bugs in the application of the java card, improving user experience, and reducing update costs.

附图说明Description of drawings

图1是本发明java卡第一实施例的结构示意图;Fig. 1 is the structural representation of the first embodiment of the java card of the present invention;

图2是本发明java卡第一实施例中的Applet应用的结构示意图;Fig. 2 is the structural representation of the Applet application in the java card first embodiment of the present invention;

图3是本发明java卡第一实施例的的硬件结构示意图;Fig. 3 is the hardware structural representation of the java card first embodiment of the present invention;

图4是本发明java卡在应用更新后的结构示意图;Fig. 4 is the structural representation of the java card of the present invention after the application is updated;

图5是本发明应用于java卡的终端第一实施例的结构示意图。Fig. 5 is a schematic structural diagram of a first embodiment of a terminal in which the present invention is applied to a java card.

具体实施方式Detailed ways

下面结合附图和实施方式对本发明进行详细说明。The present invention will be described in detail below in conjunction with the accompanying drawings and embodiments.

首先请参见图1,图1是本发明java卡第一实施例的结构示意图,如图1所示,本发明的java卡30包括java平台40和多个Applet应用50、60、70。Please refer to FIG. 1 first. FIG. 1 is a schematic structural diagram of the first embodiment of the java card of the present invention. As shown in FIG.

java平台40用于实现标准的应用编程接口和运行环境,并封装java卡30所在的智能卡系统的硬件信息。Applet应用50、60、70套用统一的应用框架,使用java平台40提供的接口,用java语言进行开发,调用系统服务和资源。The java platform 40 is used to realize the standard application programming interface and operating environment, and encapsulate the hardware information of the smart card system where the java card 30 is located. Applet applications 50, 60, 70 apply a unified application framework, use the interface provided by the java platform 40, develop in java language, and call system services and resources.

为了更清楚地进行说明,在以下实施例中仅对Applet应用50进行说明,以下请参见图2,图2是本发明java卡第一实施例中的Applet应用的结构示意图,如图2所示,本发明的Applet应用50包括应用框架501和功能类库502,功能类库502包括多个不同的类5021、5022、5023。In order to illustrate more clearly, only the Applet application 50 is described in the following embodiments. Please refer to FIG. 2 below. FIG. 2 is a schematic structural diagram of the Applet application in the first embodiment of the java card of the present invention, as shown in FIG. 2 , the Applet application 50 of the present invention includes an application framework 501 and a function class library 502, and the function class library 502 includes a plurality of different classes 5021, 5022, 5023.

应用框架501可调用功能类库502各个类的成员和方法。The application framework 501 can call the members and methods of each class in the functional class library 502 .

以下请参见图3,图3是本发明java卡第一实施例的硬件结构示意图。如图3所示,本发明的java卡30包括只读存储器10、可擦写存储器20以及总线80,只读存储器10与可擦写存储器20分别与总线80电连接。Referring to FIG. 3 below, FIG. 3 is a schematic diagram of the hardware structure of the first embodiment of the java card of the present invention. As shown in FIG. 3 , the java card 30 of the present invention includes a read-only memory 10 , an erasable memory 20 and a bus 80 , and the read-only memory 10 and the erasable memory 20 are electrically connected to the bus 80 respectively.

值得注意的是,图1所示的java卡平台40以java卡平台实现代码101来实现,java卡中的处理器(未绘示)通过运行java卡平台实现代码101来实现java卡平台40的对应功能。It is worth noting that the java card platform 40 shown in FIG. 1 is implemented with the java card platform implementation code 101, and the processor (not shown) in the java card implements the implementation of the java card platform 40 by running the java card platform implementation code 101. corresponding function.

并且,图2所示的Applet应用50以Applet应用实现代码来实现,java卡中的处理器通过运行Applet应用实现代码来实现Applet应用的对应功能。其中Applet应用实现代码具体包括功能类库实现代码1022和应用框架实现代码1021。Moreover, the Applet application 50 shown in FIG. 2 is realized by the Applet application implementation code, and the processor in the java card implements the corresponding functions of the Applet application by running the Applet application implementation code. The Applet application implementation code specifically includes the function class library implementation code 1022 and the application framework implementation code 1021 .

在本发明中,java卡30的java卡平台实现代码101掩膜于只读存储器10,其中java卡平台实现代码101用于实现标准应用编程接口和运行环境,并封装了java卡30所在的智能卡系统的硬件信息;java卡30的Applet应用实现代码中的功能类库实现代码1022掩膜于只读存储器10,其中功能类库实现代码1022包括多个类。In the present invention, the java card platform implementation code 101 of the java card 30 is masked in the read-only memory 10, wherein the java card platform implementation code 101 is used to realize the standard application programming interface and the operating environment, and encapsulates the smart card where the java card 30 is located The hardware information of the system; the function class library implementation code 1022 in the Applet application implementation code of the java card 30 is masked in the read-only memory 10, wherein the function class library implementation code 1022 includes multiple classes.

并且,java卡30的Applet应用实现代码中的应用框架实现代码1021以可擦写方式存储于可擦写存储器20,其中应用框架实现代码1021用于调用只读存储器10中的类。Moreover, the application framework implementation code 1021 in the Applet application implementation code of the java card 30 is stored in the rewritable memory 20 in a rewritable manner, wherein the application framework implementation code 1021 is used to call the class in the read-only memory 10 .

因此,本发明的java卡30通过处理器运行掩膜于只读存储器10的java卡平台实现代码101来实现java卡平台40的对应功能,通过处理器运行掩膜于只读存储器10的功能类库实现代码1022来实现功能类库502的对应功能,通过处理器运行以可擦写方式存储于可擦写存储器20的应用框架实现代码1021来实现应用框架501的对应功能。Therefore, the java card 30 of the present invention realizes the corresponding function of the java card platform 40 by running the java card platform masked in the read-only memory 10 by the processor to implement the code 101, and running the function class masked in the read-only memory 10 by the processor The library implementation code 1022 implements the corresponding functions of the function class library 502 , and the processor runs the application framework implementation code 1021 stored in the rewritable memory 20 in a rewritable manner to implement the corresponding functions of the application framework 501 .

基于以上设定,当发现对某个Applet应用有缺陷(bug),需要对某个Applet应用进行更新时,只需运行图3所示的方法,即可对特定的Applet应用进行快速、安全的更新。Based on the above settings, when it is found that there is a defect (bug) in an Applet application and an Applet application needs to be updated, just run the method shown in Figure 3 to quickly and safely update the specific Applet application. renew.

请参见图3,图3是本发明java卡的应用更新方法第一实施例的流程图。如图3所示,本发明java卡的应用更新方法包括以下步骤:Please refer to FIG. 3 . FIG. 3 is a flow chart of the first embodiment of the java card application updating method of the present invention. As shown in Figure 3, the application updating method of java card of the present invention comprises the following steps:

步骤301:在检测到功能类库实现代码的类需要进行更新时,擦除java卡中存储于可擦写存储器的应用框架实现代码;Step 301: Erase the implementation code of the application framework stored in the rewritable memory in the java card when it is detected that the class of the implementation code of the functional class library needs to be updated;

步骤302:与java卡进行相互认证;Step 302: mutual authentication with the java card;

步骤303:将新应用框架实现代码以及对应于功能类库实现代码中需要更新的类的子类写入可擦写存储器;Step 303: writing the implementation code of the new application framework and the subclass corresponding to the class to be updated in the implementation code of the functional class library into the rewritable memory;

值得注意的是,上述步骤均由终端执行。且在步骤302中,终端可以APDU(Application Protocol Data Unit,应用协议数据单元)方式与java卡进行认证。It is worth noting that the above steps are all executed by the terminal. And in step 302, the terminal can authenticate with the java card in an APDU (Application Protocol Data Unit, application protocol data unit) manner.

并且,在功能类库实现代码的需要更新的类的子类中对需要更新的类中的方法以覆盖方式进行重写。And, in the subclass of the class that needs to be updated in the functional class library implementation code, the method in the class that needs to be updated is overridden.

并且,新应用框架实现代码设置为用于停止调用功能类库实现代码中需要更新的类,且用于调用功能类库实现代码中除需要更新的类外的其它类以及子类。Moreover, the implementation code of the new application framework is set to stop calling classes that need to be updated in the implementation code of the functional class library, and is used to call other classes and subclasses in the implementation code of the functional class library except the class that needs to be updated.

可结合图4一并进行参考,其中图4是本发明java卡在应用更新后的结构示意图。其中子类90为功能类库实现代码1022中需要更新的类的子类,且在子类90中对需要更新的类中的方法以覆盖方式进行重写,新应用框架实现代码1021设置为停止调用功能类库实现代码1022中需要更新的类,且调用功能类库实现代码1022中除需要更新的类外的其它类,以及子类90。Reference can be made in conjunction with FIG. 4, wherein FIG. 4 is a schematic structural diagram of the java card of the present invention after the application is updated. Wherein the subclass 90 is the subclass of the class that needs to be updated in the functional class library implementation code 1022, and the method in the class that needs to be updated is rewritten in the subclass 90, and the new application framework implementation code 1021 is set to stop Call the class that needs to be updated in the functional class library implementation code 1022 , and call other classes and subclasses 90 in the functional class library implementation code 1022 except the class that needs to be updated.

由于新应用框架实现代码1021设置为停止调用功能类库实现代码1022中需要更新的类,且调用功能类库实现代码1022中除需要更新的类外的其它类,以及子类90,因此,在java卡30的处理器运行新应用框架实现代码1021时,不会调用掩膜于可读存储器10的功能类库实现代码1022中需要更新的类,而是直接调用存储于可擦写存储器20的子类90。从而实现了Applet应用的更新。Because the new application framework implementation code 1021 is set to stop calling the class that needs to be updated in the function class library implementation code 1022, and calls other classes and subclasses 90 in the function class library implementation code 1022 except the class that needs to be updated, therefore, in When the processor of the java card 30 runs the new application framework implementation code 1021, it will not call the class that needs to be updated in the functional class library implementation code 1022 masked in the readable memory 10, but directly calls the class stored in the rewritable memory 20. Subclass 90. Thus, the update of the Applet application is realized.

值得注意的是,上述的应用更新方法具体可由一应用于java卡的终端执行,java卡可插入终端,使得该终端与java卡相连,从而对java卡进行应用更新。It should be noted that the above-mentioned application update method can be specifically executed by a terminal applied to a java card, and the java card can be inserted into the terminal so that the terminal is connected to the java card, thereby updating the application of the java card.

请参见图5,图5是本发明应用于java卡的终端第一实施例的结构示意图,具体地,该终端可包括:Please refer to Fig. 5, Fig. 5 is a schematic structural diagram of the first embodiment of the terminal of the present invention applied to the java card, specifically, the terminal may include:

类存储模块401,用于存储对应于功能类库实现代码中需要更新的类的子类,且在子类中对需要更新的类中的方法以覆盖方式进行重写;The class storage module 401 is used to store the subclass corresponding to the class that needs to be updated in the functional class library implementation code, and rewrite the method in the class that needs to be updated in the subclass in an overridden manner;

应用框架实现代码存储模块402,用于存储新应用框架实现代码,其中新应用框架实现代码设置为用于停止调用功能类库实现代码中需要更新的类,且用于调用功能类库实现代码中除需要更新的类外的其它类以及子类;The application framework implementation code storage module 402 is used to store the implementation code of the new application framework, wherein the implementation code of the new application framework is set to be used to stop calling the class that needs to be updated in the implementation code of the function class library, and is used to call the class that needs to be updated in the implementation code of the function class library. Other classes and subclasses except the class that needs to be updated;

更新模块403,用于擦除java卡中存储于可擦写存储器的应用框架实现代码,并将子类、新应用框架实现代码写入Java卡的可擦写存储器中。The updating module 403 is used for erasing the implementation code of the application framework stored in the rewritable memory in the Java card, and writing the implementation code of the subclass and the new application framework into the rewritable memory of the Java card.

具体地,可擦写存储器可为FLASH存储器或EEPROM存储器,终端可为POS机或读卡器。Specifically, the rewritable memory can be a FLASH memory or an EEPROM memory, and the terminal can be a POS machine or a card reader.

本发明进一步提供一种智能卡系统,其包括上述实施例中揭示的java卡及终端。The present invention further provides a smart card system, which includes the java card and terminal disclosed in the above embodiments.

因此,本发明的java卡及其应用更新方法、应用于java卡的终端、智能卡系统通过将将子类、新应用框架实现代码写入于Java卡的可擦写存储器中,并且使得新应用框架实现代码设置为停止调用功能类库实现代码中需要更新的类,且调用功能类库实现代码中除需要更新的类外的其它类,以及子类,因此能够对java卡中掩膜于只读存储器的应用进行更新,从而有效修补java卡的应用中存在的bug,可提高用户体验,并降低更新成本。Therefore, the java card and its application update method of the present invention, the terminal applied to the java card, and the smart card system write the subclass and the new application framework implementation code in the rewritable memory of the Java card, and make the new application framework The implementation code is set to stop calling the classes that need to be updated in the implementation code of the functional class library, and call other classes and subclasses in the implementation code of the functional class library except the class that needs to be updated, so the java card can be masked as read-only The application of the memory is updated, thereby effectively repairing the bugs in the application of the java card, improving user experience, and reducing update costs.

以上所述仅为本发明的实施方式,并非因此限制本发明的专利范围,凡是利用本发明说明书及附图内容所作的等效结构或等效流程变换,或直接或间接运用在其他相关的技术领域,均同理包括在本发明的专利保护范围内。The above is only the embodiment of the present invention, and does not limit the patent scope of the present invention. Any equivalent structure or equivalent process conversion made by using the description of the present invention and the contents of the accompanying drawings, or directly or indirectly used in other related technologies fields, all of which are equally included in the scope of patent protection of the present invention.

Claims (9)

1. an application update method for java card, is characterized in that, described java card comprises:
ROM (read-only memory), the java card platform code mask of described java card is in described ROM (read-only memory), wherein said java card platform code is used for realizing standard application programming interface and running environment, and encapsulates the hardware information of the smart card system at described java card place; Function class libraries code mask in the Applet application code of described java card is in described ROM (read-only memory), and wherein said function class libraries code comprises multiple class;
Scratch pad memory, the application framework code in the Applet application code of described java card is stored in described scratch pad memory in erasable mode, and wherein said application framework code is used for calling described class;
Bus, described ROM (read-only memory) is electrically connected with described bus respectively with described scratch pad memory;
Described method comprises:
When detecting that the class of described function class libraries code needs to upgrade, wipe the application framework code being stored in described scratch pad memory in described java card;
Mutual certification is carried out with described java card;
By new opplication framework code and corresponding to needing the subclass of the class upgraded to write described scratch pad memory in described function class libraries code.
2. method according to claim 1, is characterized in that, rewrites in the subclass of the class upgraded at the needs of described function class libraries code to the method in the class needing to upgrade with coverage mode.
3. method according to claim 2, it is characterized in that, described new opplication framework code be set to for stop calling in described function class libraries code need upgrade class, and for call in described function class libraries code except described need upgrade class except other class and described subclass.
4. the method according to any one of claims 1 to 3, is characterized in that, described scratch pad memory is FLASH memory or eeprom memory.
5. a java card, is characterized in that, comprising:
ROM (read-only memory), the java card platform code mask of described java card is in described ROM (read-only memory), wherein said java card platform code is used for realizing standard application programming interface and running environment, and encapsulates the hardware information of the smart card system at described java card place; Function class libraries code mask in the Applet application code of described java card is in described ROM (read-only memory), and wherein said function class libraries code comprises multiple class;
Scratch pad memory, the application framework code in the Applet application code of described java card is stored in described scratch pad memory in erasable mode, and wherein said application framework code is used for calling described class;
Bus, described ROM (read-only memory) is electrically connected with described bus respectively with described scratch pad memory.
6. java card according to claim 5, is characterized in that, described scratch pad memory is FLASH memory or eeprom memory.
7. be applied to a terminal for java card according to claim 5, it is characterized in that, comprising:
Class memory module, for storing the subclass corresponding to needing the class upgraded in described function class libraries code, and rewrites with coverage mode the method in the class needing to upgrade in described subclass;
Application framework code memory module, for storing new opplication framework code, wherein said new opplication framework code be set to for stop calling in described function class libraries code need upgrade class, and for call in described function class libraries code except described need upgrade class except other class and described subclass;
Update module, for wiping the application framework code being stored in described scratch pad memory in described java card, and writes described subclass, described new opplication framework code in the described scratch pad memory of described Java card.
8. terminal according to claim 7, is characterized in that, described terminal is POS or card reader.
9. a smart card system, is characterized in that, comprises the java card described in claim 5 or 6 and the terminal described in claim 7 or 8.
CN201410021220.2A 2014-01-16 2014-01-16 Java cards and its application update method, the terminal applied to java cards, smart card system Expired - Fee Related CN104793964B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410021220.2A CN104793964B (en) 2014-01-16 2014-01-16 Java cards and its application update method, the terminal applied to java cards, smart card system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410021220.2A CN104793964B (en) 2014-01-16 2014-01-16 Java cards and its application update method, the terminal applied to java cards, smart card system

Publications (2)

Publication Number Publication Date
CN104793964A true CN104793964A (en) 2015-07-22
CN104793964B CN104793964B (en) 2018-10-02

Family

ID=53558780

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410021220.2A Expired - Fee Related CN104793964B (en) 2014-01-16 2014-01-16 Java cards and its application update method, the terminal applied to java cards, smart card system

Country Status (1)

Country Link
CN (1) CN104793964B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107729056A (en) * 2017-10-26 2018-02-23 东信和平科技股份有限公司 The program store method and relevant apparatus of a kind of read-only storage
WO2019201053A1 (en) * 2018-04-19 2019-10-24 深圳市文鼎创数据科技有限公司 Java card multi-application management method and java card

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20010013091A1 (en) * 1999-12-30 2001-08-09 Dietmar Koschella Circuit arrangement and a method for creating and retrieveing replacement data
EP1535250A1 (en) * 2002-07-01 2005-06-01 Sospita AS Process for compiling and executing software applications in a multi-processor environment
CN101441568A (en) * 2008-11-18 2009-05-27 东信和平智能卡股份有限公司 Smart card and operating system developing method thereof
CN103309696A (en) * 2012-03-15 2013-09-18 中国移动通信集团公司 Method and device for updating Java card extended library, and Java card

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20010013091A1 (en) * 1999-12-30 2001-08-09 Dietmar Koschella Circuit arrangement and a method for creating and retrieveing replacement data
EP1535250A1 (en) * 2002-07-01 2005-06-01 Sospita AS Process for compiling and executing software applications in a multi-processor environment
CN101441568A (en) * 2008-11-18 2009-05-27 东信和平智能卡股份有限公司 Smart card and operating system developing method thereof
CN103309696A (en) * 2012-03-15 2013-09-18 中国移动通信集团公司 Method and device for updating Java card extended library, and Java card

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107729056A (en) * 2017-10-26 2018-02-23 东信和平科技股份有限公司 The program store method and relevant apparatus of a kind of read-only storage
WO2019201053A1 (en) * 2018-04-19 2019-10-24 深圳市文鼎创数据科技有限公司 Java card multi-application management method and java card

Also Published As

Publication number Publication date
CN104793964B (en) 2018-10-02

Similar Documents

Publication Publication Date Title
CN104360877B (en) ECU firmware updates based on Bootloader self refreshes
CN103299276B (en) Software Update Process for Embedded Devices
CN103207797B (en) Capsule type customized updating method based on universal extensible firmware interface firmware system
CN106708543B (en) OTA (over the air) upgrading method and device of operating system
CN102486733B (en) The upgrade method of boot and device
CN103853586B (en) Method of realizing wireless card driver in UEFI (unified extensible firmware interface) layer
CN106293849B (en) application updating method and terminal
CN104991872A (en) Method and apparatus for implementing driving of intelligent device on peripheral device
CN101937398B (en) Configuration method and device for built-in system memory pool
WO2016078263A1 (en) Upgrading control device and terminal, terminal upgrading method and system, and storage medium
CN112667265B (en) A boot program updating method and device
CN113778485B (en) System operation method and device of electronic chip, electronic chip and storage medium
ES3033489T3 (en) Method and system for preparing code to be executed by programmable control devices
CN104793964B (en) Java cards and its application update method, the terminal applied to java cards, smart card system
US9223697B2 (en) Computer reprogramming method, data storage medium and motor vehicle computer
CN107168719A (en) Application program running method and device, terminal and computer readable storage medium
CN103530165A (en) Java solution applied to internet of things
CN103309696A (en) Method and device for updating Java card extended library, and Java card
CN102567068A (en) System and method for handling kernel mmap call failure
CN107273750B (en) Patching system and method for Android device kernel vulnerability
CN103677941B (en) A kind of method and device for realizing smart card operating system module upgrade
CN206058176U (en) A kind of automobile-used BootLoader commissioning devices and test automobile
CN113094067A (en) Firmware updating method of IO module and IO module
CN105631505B (en) Intelligent card supporting JAVA card patch function
CN118349265A (en) A method and device for online upgrading of memory firmware

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20181002