CN115599409B - Application program installation method and device of Java card - Google Patents
Application program installation method and device of Java card Download PDFInfo
- Publication number
- CN115599409B CN115599409B CN202211514229.8A CN202211514229A CN115599409B CN 115599409 B CN115599409 B CN 115599409B CN 202211514229 A CN202211514229 A CN 202211514229A CN 115599409 B CN115599409 B CN 115599409B
- Authority
- CN
- China
- Prior art keywords
- class
- cache region
- objects
- cache
- caching
- 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
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/60—Software deployment
- G06F8/61—Installation
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0602—Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
- G06F3/061—Improving I/O performance
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0628—Interfaces specially adapted for storage systems making use of a particular technique
- G06F3/0655—Vertical data movement, i.e. input-output transfer; data movement between one or more hosts and one or more storage devices
- G06F3/0656—Data buffering arrangements
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0668—Interfaces specially adapted for storage systems adopting a particular infrastructure
- G06F3/0671—In-line storage system
- G06F3/0673—Single storage device
- G06F3/0679—Non-volatile semiconductor memory device, e.g. flash memory, one time programmable memory [OTP]
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/46—Multiprogramming arrangements
- G06F9/54—Interprogram communication
- G06F9/544—Buffers; Shared memory; Pipes
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D10/00—Energy efficient computing, e.g. low power processors, power management or thermal management
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Software Systems (AREA)
- Human Computer Interaction (AREA)
- Memory System Of A Hierarchy Structure (AREA)
- Devices For Executing Special Programs (AREA)
Abstract
The invention discloses a method and a device for installing an application program of a Java card, wherein the method comprises the following steps: starting the cache region at a first installation node, and caching the first class of objects into the cache region; when the second class object meets the caching condition, caching the second class object into the caching area; when the second class of objects in the cache region meet the storage condition, storing the second class of objects from the cache region to a nonvolatile memory; saving the first class objects from the cache region to the nonvolatile memory at a second installation node, and closing the cache region; by setting a cache region in the RAM cache and establishing the class object into the cache region, the method realizes sharing a part of read-write operation by the RAM cache, fully exerts the advantage of the read-write speed of the RAM cache and reduces the influence of the lower read-write speed of the NVM on the installation process.
Description
Technical Field
The invention relates to the technical field of computers, in particular to a method and a device for installing an application program of a Java card.
Background
A Java card is a smart card that carries Java programs. In the field of NFC communication, many NFC cards essentially belong to Java cards. In the using process of the Java card, a plurality of application programs can be installed in the Java virtual machine environment so as to enrich the using functions of the application programs.
In the installation process of the existing Java card application program, byte codes compiled by Java codes are strictly executed, so that installation is completed. That is, during the installation process, a plurality of class objects (class) will be created (new) and values assigned to the various class variables (field) in the class objects.
In the process of creating a class object, a large amount of data read and write operations are directly performed on Non-volatile Memory (NVM). Therefore, a large amount of read-write operations are brought to the NVM, so that the installation efficiency of the application program is reduced, the installation time is prolonged, and the user experience is reduced.
Disclosure of Invention
The invention provides a method and a device for installing an application program of a Java card, which utilize RAM (random access memory) for caching in the process of installing the application program, thereby improving the installation efficiency.
In a first aspect, the present invention provides a method for installing an application program on a Java card, where a cache area is preset, and the method includes:
opening the cache region at a first installation node, and caching a first class of objects into the cache region;
when the second class object meets the caching condition, caching the second class object into the caching area;
when the second class of objects in the cache region meet the storage condition, storing the second class of objects from the cache region to a nonvolatile memory;
and saving the first class objects from the cache region to the nonvolatile memory at a second installation node, and closing the cache region.
Preferably, the method further comprises the following steps:
when the class object corresponding to the class variable to be assigned is the first class object or the second class object in the cache region, caching the class variable to be assigned into the cache region, and assigning the class variable to be assigned.
Preferably, the method further comprises the following steps:
and when the class object corresponding to the class variable to be read is the first class object or the second class object in the cache region, reading the class variable to be read from the cache region.
Preferably, after the closing the cache region, the method further includes:
and initializing the cache region at a third installation node, and opening the cache region.
Preferably, the second class object satisfying the caching condition includes:
and when the number of the class variables corresponding to the second class object is greater than 1 and the volume of the second class object is smaller than the residual storage capacity of the cache region, the second class object meets the cache condition.
Preferably, the caching the second class object in the cache region includes:
if the third class object is not stored in the cache region, directly caching the second class object into the cache region;
if the third class of objects are stored in the cache region, storing the third class of objects from the cache region to the nonvolatile memory, and deleting the third class of objects in the cache region; after deleting the third class of objects, caching the second class of objects into the cache region.
Preferably, the preset buffer area includes:
and setting the storage capacity of the cache region and setting the maximum number of cache class objects in the cache region.
In a second aspect, the present invention provides an apparatus for installing an application program on a Java card, the apparatus comprising:
the cache module is used for starting the cache region at a first installation node and caching the first class of objects into the cache region; or when the second class object meets the caching condition, caching the second class object into the caching area;
the storage module is used for storing the first class of objects from the cache region to the nonvolatile memory at a second installation node and closing the cache region; or when the second class object in the cache region meets the storage condition, storing the second class object from the cache region to a nonvolatile memory.
In a third aspect, the invention provides a readable medium comprising executable instructions, which when executed by a processor of an electronic device, perform the method according to any of the first aspect.
In a fourth aspect, the present invention provides an electronic device, including a processor and a memory storing execution instructions, wherein when the processor executes the execution instructions stored in the memory, the processor performs the method according to any one of the first aspect.
The invention provides a method and a device for installing an application program of a Java card, wherein a cache region is established in an RAM cache, and a class object is established in the cache region, so that the RAM cache is utilized to share part of read-write operation, and the advantage of the read-write speed of the RAM cache is fully exerted; after the class object is created, the class object can be saved into the NVM once, so that frequent read-write operation on the NVM is avoided, and the influence of the lower read-write speed of the NVM on the installation process is reduced.
Further effects of the above-mentioned unconventional preferred modes will be described below in conjunction with specific embodiments.
Drawings
In order to more clearly illustrate the embodiments or the prior art solutions of the present invention, the drawings needed to be used in the description of the embodiments or the prior art will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments described in the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without inventive labor.
Fig. 1 is a schematic flowchart of an application installation method for a Java card according to an embodiment of the present invention;
fig. 2 is a schematic diagram illustrating a relationship between class objects in a cache area in an application installation method for a Java card according to an embodiment of the present invention;
fig. 3 is a schematic flowchart of another method for installing an application program in a Java card according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of an application installation apparatus for Java cards according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the technical solutions of the present invention will be described in detail and completely with reference to the following embodiments and accompanying drawings. It is to be understood that the described embodiments are merely exemplary of the invention, and not restrictive of the full scope of the invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
In the installation process of the existing Java card application program, byte codes compiled by Java codes are strictly executed, so that installation is completed. That is, during the installation process, a plurality of class objects (class) will be created (new) and values assigned to the various class variables (field) in the class objects.
In this process of creating class objects, a large amount of data reads and writes may be involved. And all data reading and writing are directly performed on NVM (Non-volatile Memory, i.e. Non-volatile Memory for short). Relatively speaking, the read and write speed of NVM is slow. Therefore, the great amount of reading and writing the NVM can reduce the speed of creating the class object, i.e. reduce the installation efficiency of the application program, and increase the time consumption for installing the application program.
The read/write speed of a RAM (Random Access Memory) is significantly higher than that of an NVM. Therefore, in the process of installing the application program, if a part of read-write operation can be shared by the RAM cache, the installation efficiency can be improved.
In view of this, the present invention provides a method for installing an application program in a Java card. Referring to fig. 1, a specific embodiment of an application installation method of a Java card according to the present invention is shown. In this embodiment, a cache area is preset in a cache device (e.g., a RAM cache) of the Java card. The cache region can share a part of read-write operation in the installation process of the application program. Specifically, the storage capacity of the cache area may be set; for example, the storage capacity of the buffer area is set to 512 bytes. The maximum number of the cache class objects in the cache region can be set; for example, setting the maximum number to 3 means that at most 3 class objects can be cached in the cache region at the same time. The method specifically comprises the following steps:
The first installation node may be a specific link in the application installation process. For example, the phase before the application starts to install may be set as the first installation node, or the phase before the AppletEntry entry item is created may be set as the first installation node. The cache region will be opened when the installation process reaches the first installation node. After the cache region is opened, the class objects to be created in the subsequent installation can be cached in the cache region.
In the prior art, all class objects need to be created into the NVM. That is, the RAM cache does not participate in the process, and the above-mentioned cache area is not specially set in the RAM cache. In this embodiment, the class object can be cached after the cache region is opened. Therefore, the RAM cache is enabled to share a part of read-write operation in the installation process of the application program.
The first class object in this embodiment is a class object that is more important and has a larger volume in the application program installation process. Typically the first type of object is the program ontology of the application. The number of class variables included in the first class object is large, and the number of read-write operations involved in the creation process is also large. And the first class of objects will tend to start being created first. Therefore, if the read-write operation related to the first class object is placed in the cache region for execution, the installation efficiency of the application program can be optimized to a greater extent.
Therefore, in this step, when creating the first type object, the first type object may be directly cached in the cache region, or directly created in the cache region. Subsequent various read and write operations related to the creation of the first type object (such as assignment and numerical value reading of various type variables in the first type object) are performed in the cache region. Therefore, the advantage of the read-write speed of the RAM cache can be more fully exerted, and the installation efficiency is improved.
And 102, caching the second class object into a cache region when the second class object meets the cache condition.
After the first type of object is cached in the cache region, there may be a remaining storage capacity in the cache region. In addition, in this embodiment, the maximum number of the cache class objects in the cache region is set to be 3, which means that after the cache region caches the first class object, 2 other class objects can be additionally cached. In this embodiment, other class objects than the first class object may be referred to as second class objects.
When a certain second class object needs to be created in the installation process, whether the second class object meets the cache condition can be judged. If the caching condition is met, caching the second class object into a cache region, namely creating the second class object into the cache region; all read and write operations related to the creation of the second class object are undertaken by the cache area. If, instead, the caching condition is not satisfied, the second class of objects may be created in the NVM in a conventional manner. When the second type object is created in the cache region, various subsequent read-write operations related to the creation of the second type object are all performed in the cache region. Therefore, the advantage of the read-write speed of the RAM cache can be more fully exerted, and the installation efficiency is improved.
In this embodiment, when the number of the class variables corresponding to the second class object is greater than 1, and the volume of the second class object is smaller than the remaining storage capacity of the cache region, it may be determined that the second class object satisfies the cache condition.
It will be appreciated that the greater the number of class variables in a class object, the more read and write operations are involved. Therefore, if the second class object only corresponds to 1 class variable, the optimization effect on the installation efficiency is not obvious if the second class object is created in the cache region, and the storage capacity in the cache region is wasted. Therefore, if the number of the class variables corresponding to the second class object is 1, the cache condition is not satisfied. In addition, if the volume of the second type object is larger than the remaining storage capacity of the cache region, the second type object cannot be created to the cache region. So that the buffer condition is not satisfied at this time. Therefore, when the number of the class variables corresponding to the second class object is greater than 1 and the volume of the second class object is smaller than the remaining storage capacity of the cache region, it can be determined that the second class object satisfies the cache condition.
And 103, when the second class object in the cache region meets the storage condition, storing the second class object from the cache region to the nonvolatile memory.
After the creation of the second class object is completed in the cache region, the second class object may be temporarily stored in the cache region. When the specific saving condition is met, the created second class object needs to be saved into the NVM once. Because the second class object is stored in the NVM once, only one-time read-write operation is needed in the period, and frequent read-write operation on the NVM is avoided. Thus reducing the impact of the lower read and write speed of the NVM on the mounting process. After the second type of object is saved to the NVM, the second type of object may be cleared in the cache region to clear up the storage space in the cache region for caching other second type of objects.
For the convenience of distinction in this embodiment, the second class object that has been cached in the cache region and completed creation may be referred to as a third class object. In this embodiment, the following mechanism may be followed for flushing and backing the third class object in the cache region:
if the third class object is not stored in the cache region, directly caching the second class object into the cache region; if the third type of object is stored in the cache region, the third type of object is stored in the NVM from the cache region, and the third type of object is deleted in the cache region; after the third class of objects is deleted, the second class of objects are cached in the cache region.
That is, when there is a new second class object that satisfies the caching condition, it may be further determined whether a third class object is currently stored in the cache region before caching the second class object. If the third class object is not present in the cache region, the second class object can be directly cached in the cache region. Or, it may also be determined whether the number of class objects currently cached in the cache area reaches the above-mentioned maximum number. If the maximum number is not reached, the second type object can be directly cached in the cache region.
On the contrary, if the third class object is already currently stored in the cache region, or the number of the class objects currently cached in the cache region is already the maximum, the third class object that has been created can be further cleared in the cache region.
For example, in this embodiment, the maximum number of cache class objects in the cache region is 3. That is, after caching one first class object (class object X), it may also cache 2 third class objects, in turn, class object a and class object B, as shown in fig. 2. When the second class object (class object C) satisfying the caching condition needs to be cached, the comparison with the two third class objects can be performed in sequence.
If the volume of class object C is greater than class object A, then class object A may be purged and class object C cached. If the volume of class object C is smaller than class object A, class object C may be further compared to class object B in the order of the third class object. If the volume of class object C is larger than class object B, then class object B may be purged and class object C cached.
If so, comparing the second class of objects with each third class of objects one by one, and not finding any third class of objects with the volume smaller than that of the second class of objects; that is, in the above example, when the volume of class object B is greater than class object C, all third class objects in the cache area may be cleared. Then continue caching the second class object (class object C).
In this embodiment, the replacement of the second class object (third class object) in the cache region may be implemented according to the above mechanism. Of course, in other cases, other ways of implementing this replacement process may be used. Any means that can achieve the same or similar results can be incorporated into the overall solution of the embodiments.
And 104, saving the first class of objects from the cache area to the nonvolatile memory at the second installation node, and closing the cache area.
It should be noted that, in the above-mentioned replacement process of the second class object, the first class object in the cache region is not affected in general. Only when the installation process reaches the second installation node will the first class of objects be saved from the cache area to the NVM. The second installation node is also a specific link in the installation process of the application program. For example, a stage before the install method of the application is called may be set as the second installation node, or a stage before the application is registered (register) may be set as the second installation node.
At the second installation node, it may be considered that the whole read-write process of the first type object starts, and at this time, the first type object is once saved into the NVM from the buffer area. Similarly, since the first type object is stored in the NVM once, only one read/write operation is needed during the period, thereby avoiding frequent read/write operations on the NVM. Thereby reducing the impact of the lower read and write rates of the NVM on the installation process.
After the first type of object is saved to the NVM, the cache region may be cleared and closed. That is, the process of sharing the read/write operation by using the cache area ends between the first mount node and the second mount node.
It should also be noted that there may be multiple sets of paired first and second installation nodes in a single installation process. And the read-write operation can be shared by using the cache region between any pair of the first installation node and the second installation node. That is, after the cache region is closed, the cache region may be initialized at the third installation node, and the cache region may be opened. The third installation node, i.e. the next first installation node in the installation process. The third installation node may initialize the cache region, i.e., empty the cache region, and then reopen the cache region. The above method steps may then be repeatedly performed.
According to the technical scheme, the beneficial effects of the embodiment are as follows: a cache region is set in the RAM cache, and the class object is created into the cache region, so that the RAM cache is utilized to share a part of read-write operation, and the advantage of the read-write speed of the RAM cache is fully exerted; after the class object is created, the class object can be saved into the NVM once, so that frequent read-write operation on the NVM is avoided, and the influence of the lower read-write speed of the NVM on the installation process is reduced.
Fig. 1 is only a basic embodiment of the method of the present invention, and based on this, certain optimization and expansion can be performed, and other preferred embodiments of the method can also be obtained.
Fig. 3 shows another embodiment of the application installation method of the Java card according to the present invention. The present embodiment further describes a read/write operation process involved in the cache area on the basis of the foregoing embodiment. In this embodiment, the method includes the steps of:
And step 302, caching the second class object into a cache region when the second class object meets the cache condition.
The above steps are the same as those in the embodiment shown in fig. 1, and the description is not repeated here.
And 303, caching the to-be-assigned class variable into the cache region and assigning the to-be-assigned class variable when the class object corresponding to the to-be-assigned class variable is the first class object or the second class object in the cache region.
The process of assigning values to class variables is known in the art as "put field". The class variables that need to be assigned may be referred to as class variables to be assigned. The put field process requires a write operation to the memory (NVM or RAM). And when the class object corresponding to the class variable to be assigned is the first class object or the second class object in the cache region, performing the write operation in the put field process in the cache region. That is, the class variable to be assigned is cached in the cache region, and the class variable to be assigned is assigned.
And step 304, when the class object corresponding to the class variable to be read is the first class object or the second class object in the cache region, reading the class variable to be read from the cache region.
Similar to the above, the read procedure for a class variable is known in the art as "get field". The class variables that need to be read may be referred to as class variables to be read. The get field process requires a read operation from the memory (NVM or RAM). And when the class object corresponding to the class variable to be read is the first class object or the second class object in the cache region, the reading operation in the get field process is performed in the cache region. That is, the class variable to be read is read from the buffer area.
Through the above steps 303 to 304, the process of performing the read-write operation related to the class variable in the cache region is further described. Since the above process is performed in a cache area (i.e., RAM cache), the read and write rates are superior to NVM. Therefore, the read-write efficiency, namely the installation efficiency of the application program can be improved.
And 305, when the second type object in the cache region meets the storage condition, storing the second type object from the cache region to the nonvolatile memory.
And step 306, storing the first class of objects from the cache region to the nonvolatile memory at the second installation node, and closing the cache region.
The above steps are the same as those in the embodiment shown in fig. 1, and the description is not repeated here.
Fig. 4 shows an embodiment of an application installation apparatus for a Java card according to the present invention. The apparatus of this embodiment is an entity apparatus for executing the methods shown in fig. 1 to 3. The technical solution is essentially the same as that in the above embodiment, and the corresponding description in the above embodiment is also applicable to this embodiment. The device in this embodiment includes:
the cache module 401 is configured to open the cache region at the first installation node, and cache the first class object in the cache region; or when the second class object meets the caching condition, caching the second class object into the caching area.
A saving module 402, configured to save, at a second installation node, the first class object from the cache area to the nonvolatile memory, and close the cache area; or when the second class object in the cache region meets the storage condition, storing the second class object from the cache region to a nonvolatile memory.
In addition, on the basis of the embodiment shown in fig. 4, it is preferable that:
the writing module 403 is configured to, when the class object corresponding to the class variable to be assigned is the first class object or the second class object in the cache region, cache the class variable to be assigned in the cache region, and assign the class variable to be assigned.
The reading module 404 is configured to read the class variable to be read from the cache area when the class object corresponding to the class variable to be read is the first class object or the second class object in the cache area.
Fig. 5 is a schematic structural diagram of an electronic device according to an embodiment of the present invention. On the hardware level, the electronic device comprises a processor and optionally an internal bus, a network interface and a memory. The Memory may include a Memory, such as a Random-Access Memory (RAM), and may further include a non-volatile Memory, such as at least 1 disk Memory. Of course, the electronic device may also include hardware required for other services.
The processor, the network interface, and the memory may be connected to each other via an internal bus, which may be an ISA (Industry Standard Architecture) bus, a PCI (Peripheral Component Interconnect) bus, an EISA (Extended Industry Standard Architecture) bus, or the like. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one double-headed arrow is shown in FIG. 5, but this does not indicate only one bus or one type of bus.
And the memory is used for storing the execution instruction. In particular, a computer program that can be executed by executing instructions. The memory may include both memory and non-volatile storage and provides execution instructions and data to the processor.
In a possible implementation manner, the processor reads the corresponding execution instruction from the nonvolatile memory into the memory and then runs the corresponding execution instruction, and can also obtain the corresponding execution instruction from other equipment so as to form the application program installation device of the Java card on a logic level. The processor executes the execution instructions stored in the memory, so as to realize the application program installation method of the Java card provided by any embodiment of the invention through the executed execution instructions.
The method executed by the application installation device of the Java card according to the embodiment of the present invention shown in fig. 4 can be applied to or implemented by a processor. The processor may be an integrated circuit chip having signal processing capabilities. In implementation, the steps of the above method may be performed by integrated logic circuits of hardware in a processor or instructions in the form of software. The Processor may be a general-purpose Processor, including a Central Processing Unit (CPU), a Network Processor (NP), and the like; but also Digital Signal Processors (DSPs), application Specific Integrated Circuits (ASICs), field Programmable Gate Arrays (FPGAs) or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components. The various methods, steps and logic blocks disclosed in the embodiments of the present invention may be implemented or performed. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The steps of the method disclosed in connection with the embodiments of the present invention may be directly implemented by a hardware decoding processor, or implemented by a combination of hardware and software modules in the decoding processor. The software module may be located in ram, flash memory, rom, prom, or eprom, registers, etc. storage media as is well known in the art. The storage medium is located in a memory, and a processor reads information in the memory and completes the steps of the method in combination with hardware of the processor.
An embodiment of the present invention further provides a readable storage medium, where the readable storage medium stores an execution instruction, and when the stored execution instruction is executed by a processor of an electronic device, the electronic device can be caused to execute the method for installing the application program of the Java card provided in any embodiment of the present invention, and is specifically configured to execute the method shown in fig. 1 to fig. 3.
The electronic device described in the foregoing embodiments may be a computer.
It will be appreciated by those skilled in the art that embodiments of the present invention may be provided as a method or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects.
The embodiments of the present invention are described in a progressive manner, and the same and similar parts among the embodiments can be referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, as for the apparatus embodiment, since it is substantially similar to the method embodiment, the description is relatively simple, and for the relevant points, reference may be made to the partial description of the method embodiment.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrases "comprising a," "8230," "8230," or "comprising" does not exclude the presence of other like elements in a process, method, article, or apparatus comprising the element.
The above description is only an example of the present invention, and is not intended to limit the present invention. Various modifications and alterations to this invention will become apparent to those skilled in the art. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention should be included in the scope of the claims of the present invention.
Claims (8)
1. An application program installation method of a Java card is characterized in that a cache region is preset, and the method comprises the following steps:
starting the cache region at a first installation node, and caching the first class of objects into the cache region;
when the second class object meets the caching condition, caching the second class object into the caching area;
when the second type of objects in the cache region meet the storage condition, storing the second type of objects from the cache region to a nonvolatile memory;
saving the first class objects from the cache region to the nonvolatile memory at a second installation node, and closing the cache region;
when the class object corresponding to the class variable to be assigned is the first class object or the second class object in the cache region, caching the class variable to be assigned into the cache region, and assigning the class variable to be assigned; and when the class object corresponding to the class variable to be read is the first class object or the second class object in the cache region, reading the class variable to be read from the cache region.
2. The method of claim 1, wherein after closing the buffer area, further comprising:
and initializing the cache region at a third installation node, and opening the cache region.
3. The method of claim 1, wherein the second class of objects satisfying the caching condition comprises:
and when the number of the class variables corresponding to the second class of objects is greater than 1 and the volume of the second class of objects is smaller than the residual storage capacity of the cache region, the second class of objects meets the cache condition.
4. The method of claim 3, wherein caching the second class of objects into the cache region comprises:
if the third class object is not stored in the cache region, directly caching the second class object into the cache region;
if the third class of objects are stored in the cache region, storing the third class of objects from the cache region to the nonvolatile memory, and deleting the third class of objects in the cache region; after deleting the third class of objects, caching the second class of objects into the cache region.
5. The method according to any one of claims 1 to 4, wherein the presetting of the cache area comprises:
and setting the storage capacity of the cache region and setting the maximum number of cache class objects in the cache region.
6. An application installation apparatus of a Java card, comprising:
the cache module is used for starting a cache region at a first installation node and caching a first class of objects into the cache region; or when the second class object meets the caching condition, caching the second class object into the caching area;
the storage module is used for storing the first class of objects from the cache region to a nonvolatile memory at a second installation node and closing the cache region; or when the second class object in the cache region meets the storage condition, storing the second class object from the cache region to a nonvolatile memory;
the write-in module is used for caching the class variables to be assigned into the cache region and assigning the class variables to be assigned when the class objects corresponding to the class variables to be assigned are the first class objects or the second class objects in the cache region;
and the reading module is used for reading the class variable to be read from the cache region when the class object corresponding to the class variable to be read is the first class object or the second class object in the cache region.
7. A computer-readable storage medium storing a computer program for executing the application installation method of the Java card as recited in any of claims 1 to 5.
8. An electronic device, the electronic device comprising:
a processor;
a memory for storing the processor-executable instructions;
the processor is used for reading the executable instructions from the memory and executing the instructions to realize the application program installation method of the Java card in any one of the claims 1-5.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211514229.8A CN115599409B (en) | 2022-11-30 | 2022-11-30 | Application program installation method and device of Java card |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211514229.8A CN115599409B (en) | 2022-11-30 | 2022-11-30 | Application program installation method and device of Java card |
Publications (2)
Publication Number | Publication Date |
---|---|
CN115599409A CN115599409A (en) | 2023-01-13 |
CN115599409B true CN115599409B (en) | 2023-03-21 |
Family
ID=84852311
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202211514229.8A Active CN115599409B (en) | 2022-11-30 | 2022-11-30 | Application program installation method and device of Java card |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN115599409B (en) |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102063384A (en) * | 2009-11-13 | 2011-05-18 | 恒宝股份有限公司 | Method for performing read-write operation on programmable read-only memory with cache by JAVA card |
CN109643230A (en) * | 2016-09-02 | 2019-04-16 | 格马尔托股份有限公司 | JAVA card application packet as library packet |
Family Cites Families (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US9934014B2 (en) * | 2014-08-22 | 2018-04-03 | Apple Inc. | Automatic purposed-application creation |
EP3159821B1 (en) * | 2015-10-23 | 2018-08-15 | Giesecke+Devrient Mobile Security GmbH | Processor system with applet security settings |
EP3291088A1 (en) * | 2016-09-02 | 2018-03-07 | Gemalto Sa | Java card application memory footprint optimization |
CN111443991B (en) * | 2020-03-26 | 2023-06-23 | 恒宝股份有限公司 | Smart card control method and device and smart card |
-
2022
- 2022-11-30 CN CN202211514229.8A patent/CN115599409B/en active Active
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102063384A (en) * | 2009-11-13 | 2011-05-18 | 恒宝股份有限公司 | Method for performing read-write operation on programmable read-only memory with cache by JAVA card |
CN109643230A (en) * | 2016-09-02 | 2019-04-16 | 格马尔托股份有限公司 | JAVA card application packet as library packet |
Also Published As
Publication number | Publication date |
---|---|
CN115599409A (en) | 2023-01-13 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US7340566B2 (en) | System and method for initializing a memory device from block oriented NAND flash | |
US5371876A (en) | Computer system with a paged non-volatile memory | |
JP5292978B2 (en) | Control apparatus, information processing apparatus, and memory module recognition method | |
US20060265571A1 (en) | Processor with different types of control units for jointly used resources | |
CN112148649B (en) | eMMC HS400 transmission mode realization method and device under u-boot system | |
KR100564598B1 (en) | Synchronous flash memory device and method of operating the same | |
CN115599409B (en) | Application program installation method and device of Java card | |
US4661925A (en) | Computer control memory apparatus providing variable microinstruction length | |
WO2003021428A1 (en) | Method and apparatus for linking converted applet files | |
CN111797390A (en) | Program running method and device, electronic equipment and computer readable storage medium | |
US20210200857A1 (en) | Systems and methods for defeating stack-based cyber attacks by randomizing stack frame size | |
CN107340992B (en) | Fixed point data screening circuit | |
US6687821B1 (en) | System for dynamically configuring system logic device coupled to the microprocessor to optimize application performance by reading from selection table located in non-volatile memory | |
CN113032008B (en) | Electronic processing device and memory control method | |
CN114138688A (en) | Data reading method, system, device and medium | |
CN112286572A (en) | Configuration method and device of business process | |
US6694418B2 (en) | Memory hole modification and mixed technique arrangements for maximizing cacheable memory space | |
JP2005531842A (en) | Non-volatile memory writing method and system for realizing the method | |
US7058777B2 (en) | Microcontroller device for extending memory address by inserting a waiting state and the operation method for the device | |
KR100264758B1 (en) | Microcomputer | |
CN114064478A (en) | Method and device for generating verification case | |
JPH07182165A (en) | Processing method/device for instruction with committing condition | |
CN117112136A (en) | Interrupt virtualization method, device, operating system, equipment and storage medium | |
CN115840532A (en) | Non-continuous length-variable Flash cache method, electronic equipment and storage medium | |
CN116340222A (en) | Inter-core communication method and device of multi-core singlechip |
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 |