Managing method for free block of Java card

A management method and technology of free blocks, applied in data processing applications, instruments, payment architecture, etc., can solve problems such as low efficiency and long transaction time, and achieve the effect of improving execution efficiency and improving operation efficiency.

Active Publication Date: 2015-07-15
东港股份有限公司
View PDF3 Cites 3 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

The existing Java Card manages storage space by saving free block information, but when applying for and reclaiming space, it usually adopts a sequential traversal mechanism, which is inefficient and takes a long time for transactions. Therefore, an efficient method is proposed Java card idle block management method is necessary, especially for applications with higher performance requirements, more efficient Java card idle block management method is needed

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Managing method for free block of Java card
  • Managing method for free block of Java card

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0073] The storage method of the free block information table is as follows:

[0074] (1) The free block information table adopts a chain storage structure. When the free block information stored by a node reaches the maximum number of MAX_TBL_BLOCK_SIZE, a successor node is created and the address of the successor node is written into the information of the current node; each node The node consists of three parts: free block information, the number of free blocks, and the address of the successor node. The free block information consists of two parts: address and size, as shown in Table 1:

[0075] Table 1 Structure of free block information table

[0076]

[0077] (2) The storage space occupied by each node of the free block information table is the same size. If the CPU word length of the Java card chip is X bits, the storage space size of each node is MAX_TBL_BLOCK_SIZE×2X+X+X bytes;

[0078] (3) Allocate space from the EEPROM for the first node of the free block infor...

Embodiment 2

[0080] A Java card free block management method, assuming that the size of the application space is E2P_SIZE, the optimal size block matching algorithm comprises the following steps:

[0081] (1) Traverse each node in the free block information table in turn;

[0082] (2) Traverse the free block information in the current node based on the binary search algorithm:

[0083] ① Determine the start block number B_NO:

[0084] A. Obtain the number of valid blocks BLOCK_Number stored in the current node;

[0085] B. Calculate the middle block number NO (the first middle block number is NO=(1+BLOCK_Number) / 2), and get the middle block size BLOCK_Size;

[0086] C. If BLOCK_Size=E2P_SIZE, the search is successful and the algorithm is executed;

[0087] D. If BLOCK_Size>E2P_SIZE, you need to continue to calculate the serial number of the middle block on the left, and obtain the new block size BLOCK_Size’, if BLOCK_Size’≤E2P_SIZE, record the current block number as the starting block;...

Embodiment 3

[0097] A kind of Java card free block management method, set release block space first address as B_Address, tail address is E_Address, and block merging and sorting algorithm comprises the steps:

[0098] (1) Traverse each node in the free block information table in turn;

[0099] (2) Traverse the free block information in the current node:

[0100] ①If E_Address=start address of the current block:

[0101] A. If the merging status FLAG is true, that is, the starting address of the released block is the end address of a free block, and a merging has already been performed, then further merging will be performed, adding the size of the last merged block information to the current block size, and modifying the current block information The address of the address is 0, which means an invalid address;

[0102] B. If the merging state FLAG is false, then save the current block information for backup, add the size of the current block information to the size of the released block...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

PUM

No PUM Login to view more

Abstract

The invention relates to a managing method of a free block in an EEPROM (Electrically Erasable Programmable Read-Only Memory) memory area of a Java card, in particular to a managing method for the free block of the Java card. The method comprises the steps of managing information of free blocks in all EEPROMs for the Java card through a free block information table, distributing a space for a first node of the free block information table from the EEPROMs in advance, and applying for memory spaces for subsequent nodes from the EEPROMs when the number of the free blocks exceeds the maximum quantity stored by an existing node; when the memory space is applied for data, traversing the free block information table and selecting the free blocks of proper sizes; when the memory space occupied by the data is released, combining the released memory space to the free blocks of proper sizes according to a block ordering-by-merging algorithm, and sorting the free block information according to size; storing the free block information in a sequence memory way from small to big according to the sizes of the blocks, so that the memory positions can be quickly found out when the memory space is applied, and the executing efficiency can be greatly improved; furthermore, the operating efficiency of the Java card can be significantly improved by the Java card managing method provided by the invention.

Description

technical field [0001] The invention relates to the field of smart cards, in particular to a Java card idle block management method. Background technique [0002] With the overall development of financial electronics, in order to meet the needs of users for one card with multiple functions, Java cards supporting multiple applications have been more and more widely used. As a smart card, the Java card's storage system is mainly composed of read-write memory (RAM), read-only memory (ROM) and erasable programming memory (EEPROM), among which RAM is used to store intermediate data and result data in the operation process , ROM is used to store the operating system of the smart card, and EEPROM is the main memory of the smart card, which is used to store the personal information of the cardholder and the information and application data of the issuing unit. [0003] With the diversification and change of business, after Java Card products are put into use, the data stored in EEP...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

Application Information

Patent Timeline
no application Login to view more
Patent Type & Authority Applications(China)
IPC IPC(8): G06F12/06G06Q20/34
Inventor 刘哲理隋传波
Owner 东港股份有限公司
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products