[go: up one dir, main page]
More Web Proxy on the site http://driver.im/

CN104346298B - Data processing method, device and smart card based on smart card - Google Patents

Data processing method, device and smart card based on smart card Download PDF

Info

Publication number
CN104346298B
CN104346298B CN201310339964.4A CN201310339964A CN104346298B CN 104346298 B CN104346298 B CN 104346298B CN 201310339964 A CN201310339964 A CN 201310339964A CN 104346298 B CN104346298 B CN 104346298B
Authority
CN
China
Prior art keywords
data
storage location
volatile
program
memory
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
Application number
CN201310339964.4A
Other languages
Chinese (zh)
Other versions
CN104346298A (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.)
Sumavision Technologies Co Ltd
Original Assignee
Sumavision Technologies Co Ltd
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 Sumavision Technologies Co Ltd filed Critical Sumavision Technologies Co Ltd
Priority to CN201310339964.4A priority Critical patent/CN104346298B/en
Publication of CN104346298A publication Critical patent/CN104346298A/en
Application granted granted Critical
Publication of CN104346298B publication Critical patent/CN104346298B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention discloses a kind of data processing method based on smart card, device and smart cards.Wherein, this method comprises: receiving the data processing request of destination application;Obtain storage location corresponding with data processing request;Data processing is carried out to the first volatile data in storage location, wherein storage location is located in one section of physical memory fixed in smart card, and the first volatile data is requested the data of processing by destination application.Through the invention, solve the problems, such as that smart card mostly using RAM physical space deficiency under environment, is realizing the effect of multiple Application share RAM physical spaces in the prior art.

Description

Data processing method, device and smart card based on smart card
Technical field
The present invention relates to data processing fields, in particular to a kind of data processing method based on smart card, device And smart card.
Background technique
Smart card is generally regarded as by hardware (HD, Hardware), operating system (OS, Operation System), application Program (APP, Application) three parts composition, wherein application program may include multiple, such as: application program 1, application Program 2 ... application program n, as shown in Figure 1.Wherein, hardware is by central processor CPU, programmable read only memory EEPROM, random access memory ram, read only memory ROM composition.The code of OS and APP is placed in ROM, and the data of OS and APP are put In EEPROM or RAM.The data being placed in EEPROM are generally known as Nonvolatile data (NVD, Nonvolatile Data), the data being placed in RAM are known as volatile data (VD, Volatile Data).On smart card in the prior art Generally using linear application method as shown in Figure 2, the first address of the RAM is for the use distribution of volatile data in memory RamStartAddress, tail address are RamEndAddress, and the data from system are denoted as system data in Fig. 2, will Volatile data from the first application program is denoted as first using data, and the volatile data from the second application program is denoted as Second is denoted as n-th using data from the volatile data of the n-th application program using data ... ....RAM shown in Fig. 2 is used Method, the use space ram_size_os, APP1 to APPn of OS distinguish use space ram_size_app1 ... ..., ram_ size_appn.Total occupancy ram space be ram_size_total=ram_size_os+ (ram_size_app1+ ...+ Ram_size_appn), this summation increases as the quantity of APP increases.
The RAM resource of smart card is very limited, and when APP is more, using application method shown in Fig. 2, RAM resource is often It is not enough.
For smart card in the prior art mostly using the problem of RAM physical space deficiency under environment, at present not yet It puts forward effective solutions.
Summary of the invention
It mostly using the problem of RAM physical space deficiency under environment, is not yet being mentioned at present for the relevant technologies smart card Effective solution scheme out, for this purpose, the main purpose of the present invention is to provide a kind of data processing methods based on smart card, dress It sets and smart card, to solve the above problems.
To achieve the goals above, according to an aspect of the invention, there is provided a kind of data processing based on smart card Method, this method comprises: receiving the data processing request of destination application;Obtain storage corresponding with data processing request position It sets;Data processing is carried out to the first volatile data in storage location, wherein storage location is located at one fixed in smart card In section physical memory, the first volatile data is requested the data of processing by destination application.
Further, before carrying out data processing to the first volatile data in storage location, method further include: detection It whether there is the current application program that state is run mode in smart card;Existence is currently answering for run mode within a smart card In the case where program, whether detection current application program is consistent with destination application, answers in current application program and target With program it is inconsistent in the case where, detection current application program and destination application whether be located at identical logic on smart card Channel;In the case where current application program is located at different logical channels from destination application, backup current application program Current data;In the case where current application program and destination application are located at identical logical channel, storage position is removed The current data set.
It further, include: to be answered currently the step of carrying out data processing to the first volatile data in storage location In the case where being located at different logical channels from destination application with program, the state of destination application is detected;In target In the case that the state of application program is pending state, from the Backup Data for hanging up address reading destination application, number will be backed up Storage location is written according to the first volatile data, wherein hanging up address is the preset fixing address for backing up the Backup Data; In the case where the state of destination application is to move back state selection, the data of initialized target application program, by the first volatibility number According to write-in storage location.
Further, the step of backing up the current data of current application program includes: the backup address for obtaining current data; Be stored in current data as Backup Data in backup address, wherein backup address be preset memory in fixedly Location.
Further, the step of obtaining storage location corresponding with data processing request includes: that acquisition is asked with data processing Seek corresponding property parameters;Storage location corresponding with property parameters is obtained in the random access memory of smart card.
Further, data processing request includes request to create, and property parameters include: spatial content parameter, and first is volatile Property data include attribute head and data volume, wherein corresponding with property parameters storage is obtained in the random access memory of smart card The step of position includes: to obtain the first total length, wherein the first total length has created all volatile for destination application The total length of the data volume of property data;Storage location is distributed for destination application in random access memory, wherein storage location Initial address be that the position of the first total length is deviated from the initial address of physical memory, the length of storage location is spatial content The value of parameter, spatial content parameter are the length of the first volatile data.
Further, before distributing storage location in random access memory for destination application, method further include: in intelligence Free cells can be found in the programmable read only memory of card, and using the index data of free cells as the first volatile data The first Data Identification;The first space is distributed for attribute head in programmable read only memory, by first starting in the first space Free cells are written in address, wherein the first space includes: identification field, data volume origing address field (OAF) and data body length word Section;The value of first program identification of current application program, spatial content parameter and the first total length is respectively written into identifier word Section, data volume length field and data volume origing address field (OAF).
Further, data processing request includes read requests, and property parameters include: the first Data Identification, relative to First offset parameter of the initial address of the data volume of one volatile data, the first destination address parameter and reading length, In, it include: from corresponding with the first Data Identification in the step of carrying out data processing to the first volatile data in storage location The first initial address is read in free cells;Obtain the first space corresponding with the first initial address;Detect destination application Target program mark and the first program identification for being stored in the identification field in the first space it is whether consistent;It is identified in target program Under the first program identification unanimous circumstances, data volume initial address is read, to obtain the first volatile data, wherein first Second initial address of volatile data is the initial address, data volume initial address and the first offset parameter of storage location The sum of value, the length of the first volatile data are to read length;First volatile data is copied to the first destination address parameter The first memory space being directed toward.
Further, data processing request includes updating request, and property parameters include: the first Data Identification, first volatile Property the first offset parameters of initial address of data volume of data, the initial address parameter of source data and update length, wherein It include: from the free time corresponding with the first Data Identification in the step of carrying out data processing to the first volatile data in storage location The first initial address is read in unit;Obtain the first space corresponding with the first initial address;Detect the mesh of destination application Whether the first program identification stored in mark program identification and the identification field in the first space is consistent;In target program mark and the Under one program identification unanimous circumstances, data volume initial address is read, to obtain the second memory space, wherein the second storage is empty Between be space that the sum of value of initial address of storage location, data volume initial address and the first offset parameter is directed toward;By One volatile data is copied to the second memory space, wherein the initial address of the first volatile data is initial address parameter pair The address answered, the length of the first volatile data are to update length.
Further, after distributing storage location in random access memory for destination application, method further include: by the The sum of one total length and spatial content parameter are used as the second total length, and update the first total length using the second total length.
To achieve the goals above, according to another aspect of the present invention, a kind of data processing based on smart card is provided Device, which includes: the first receiving module, for receiving the data processing request of destination application;First obtains module, For obtaining storage location corresponding with data processing request;First processing module, for volatile to first in storage location Property data carry out data processing, wherein storage location is located in smart card in one section of physical memory of fixation, the first volatibility number According to the data for requesting processing by destination application.
To achieve the goals above, according to another aspect of the present invention, a kind of smart card is provided, which includes: Processor, for obtaining deposit corresponding with data processing request after receiving the data processing request of destination application Storage space is set, and then carries out data processing to the first volatile data in storage location, wherein storage location is located in smart card In one section of fixed physical memory, the first volatile data is requested the data of processing by destination application.
Further, smart card further include: programmable read only memory, it is volatile for saving the program from application program The attribute head of property data;Random access memory, including first area's random access memory and second area's random access memory, wherein the firstth area Random access memory is used to save the data volume of the system volatile data from system, and second area's random access memory is for saving journey The data volume of sequence volatile data.
Further, programmable read only memory includes: the first programmable read only memory, for saving one or more The attribute head of the attribute head of program volatile data, each program volatile data occupies a sub-spaces, every sub-spaces packet It includes: identification field, data volume origing address field (OAF) and data body length field, wherein identification field, for saving application program Program identification;Data volume origing address field (OAF), for saving address parameter of the data volume in random access memory;Data volume is long Spend field, the length data of the data volume for save routine volatile data;Second programmable read only memory, including one Or multiple free cells, each free cells are respectively used to save the first initial address of subspace shared by an attribute head;The Three programmable read only memory, the total length of the data volume for saving the program volatile data that application program has created; 4th programmable read only memory, including multiple subregions, each subregion are used to save the Backup Data of an application program.
Through the invention, the first receiving module in the processor receive destination application data processing request it Afterwards, module is obtained by first and obtain storage location corresponding with data processing request, then use first processing module by mesh First volatile data of mark application requests processing is handled in the storage location, wherein the storage location is located at intelligence In capable of blocking in one section of fixed physical memory, the first volatile data from any application APP can be protected in this way There are in one section of physical memory of the fixation, so as to allow all APP to share one section of physics memory ram, to reach section Save physics ram space purpose, solve in the prior art smart card mostly using RAM physical space under environment it is insufficient Problem realizes the effect of multiple Application share RAM physical spaces.
Detailed description of the invention
The drawings described herein are used to provide a further understanding of the present invention, constitutes part of this application, this hair Bright illustrative embodiments and their description are used to explain the present invention, and are not constituted improper limitations of the present invention.In the accompanying drawings:
Fig. 1 is the structural schematic diagram of smart card in the prior art;
Fig. 2 is the volatile data of smart card in the prior art in RAM distribution schematic diagram;
Fig. 3 is the schematic diagram of the data processing equipment according to an embodiment of the present invention based on smart card;
Fig. 4 is the data processing distribution schematic diagram of the OVD in RAM according to embodiments of the present invention;
Fig. 5 is the data structure diagram of AVD according to embodiments of the present invention;
Fig. 6 is the data processing distribution schematic diagram of the AVD in RAM according to embodiments of the present invention
Fig. 7 is the flow chart of the data processing method according to an embodiment of the present invention based on smart card;
Fig. 8 is the schematic diagram of the data processing of the RAM of embodiment according to Fig.7,;And
Fig. 9 is the schematic diagram of the data processing of the RAM of another embodiment according to Fig.7,.
Specific embodiment
It should be noted that in the absence of conflict, the features in the embodiments and the embodiments of the present application can phase Mutually combination.The present invention will be described in detail below with reference to the accompanying drawings and embodiments.
Fig. 3 is the structural schematic diagram of the data processing equipment according to an embodiment of the present invention based on smart card.Such as Fig. 3 institute Show, the first receiving module 10, for receiving the data processing request of destination application;First obtains module 30, for obtaining Storage location corresponding with data processing request;First processing module 50 is used in storage location to the first volatile data Carry out data processing, wherein storage location is located in one section of physical memory fixed in smart card, and the first volatile data is mesh Mark application program requests the data of processing.Wherein, the process of data processing includes being stored, being read to data, modified, replaced The various data handling procedures such as change, initialize, wiping.
Using the present invention, the first receiving module in the processor receive destination application data processing request it Afterwards, module is obtained by first and obtain storage location corresponding with data processing request, then use first processing module by mesh First volatile data of mark application requests processing is handled in the storage location, wherein the storage location is located at intelligence In capable of blocking in one section of fixed physical memory, the first volatile data from any application APP can be existed in this way It is handled in one section of physical memory of the fixation, so as to allow all APP to share one section of physics memory ram, to reach section Save physics ram space purpose, solve in the prior art smart card mostly using RAM physical space under environment it is insufficient Problem realizes the effect of multiple Application share RAM physical spaces.
According to the abovementioned embodiments of the present invention, device can also include: first detection module, for detecting current application journey Whether sequence is consistent with destination application, Second processing module, for inconsistent with destination application in current application program In the case where, remove the data in storage location, wherein current application program is that currently stored data are corresponding in storage location Application program.
In the above embodiment of the invention, first obtain module may include: the first sub-acquisition module, for obtain with The corresponding property parameters of data processing request;Second sub-acquisition module, for obtaining and belonging in the random access memory of smart card The property corresponding storage location of parameter.
According to the abovementioned embodiments of the present invention, device further include: whether the second detection module is deposited for detecting in smart card In the current application program that state is run mode;Third detection module is working as run mode for existence within a smart card In the case where preceding application program, detects current application program and whether destination application is consistent, the 4th detection module, be used for Current application program and destination application it is inconsistent in the case where, detection current application program and destination application whether position In logical channel identical on smart card;Third processing module, for being located at not in current application program and destination application In the case where same logical channel, the current data of current application program is backed up;Fourth processing module, in current application journey In the case that sequence and destination application are located at identical logical channel, the current data in storage location is removed.
In the above embodiment of the invention, the first processing module may include: the first sub- detection module, be used for In the case that current application program is located at different logical channels from destination application, the state of destination application is detected; First subprocessing module, for being answered from address reading target is hung up in the case where the state of destination application is pending state With the Backup Data of program, storage location is written into Backup Data and the first volatile data, wherein it is preset for hanging up address Back up the fixing address of the Backup Data;Second subprocessing module is to move back the feelings of state selection for the state in destination application Under condition, storage location is written in the first volatile data by the data of initialized target application program.
According to the abovementioned embodiments of the present invention, third processing module may include: third sub-acquisition module, work as obtaining The backup address of preceding data;Third subprocessing module, for being stored in current data as Backup Data in backup address, In, backup address is the fixing address in preset memory.
The present invention also provides a kind of smart card, which may include: processor, for receiving target application After the data processing request of program, corresponding with data processing request storage location is obtained, then to the in storage location One volatile data carries out data processing, wherein storage location is located in one section of physical memory fixed in smart card, and first easily The property lost data are requested the data of processing by destination application.
Using the present invention, the first receiving module in the processor receive destination application data processing request it Afterwards, module is obtained by first and obtain storage location corresponding with data processing request, then use first processing module by mesh First volatile data of mark application requests processing is handled in the storage location, wherein the storage location is located at intelligence In capable of blocking in one section of fixed physical memory, the first volatile data from any application APP can be protected in this way There are in one section of physical memory of the fixation, so as to allow all APP to share one section of physics memory ram, to reach section Save physics ram space purpose, solve in the prior art smart card mostly using RAM physical space under environment it is insufficient Problem realizes the effect of multiple Application share RAM physical spaces.
In the above embodiment of the invention, smart card can also include: programmable read only memory, come from for saving The attribute head of the program volatile data of application program;Random access memory, including first area's random access memory and the secondth area it is random Memory, wherein first area's random access memory is used to save the data volumes of the system volatile data from system, the secondth area with Machine memory is used for the data volume of save routine volatile data.
Specifically, programmable read only memory includes: the first programmable read only memory, for saving one or more journeys The attribute head of the attribute head of sequence volatile data, each program volatile data occupies a sub-spaces, and every sub-spaces include: Identification field, data volume origing address field (OAF) and data body length field, wherein identification field, for saving application program Program identification;Data volume origing address field (OAF), for saving address parameter of the data volume in random access memory;Data body length Field, the spatial content in length data namely above-described embodiment for saving the data volume of save routine volatile data Parameter;Second programmable read only memory, including one or more free cells, each free cells are respectively used to save one First initial address of subspace shared by attribute head;Third programmable read only memory has been created for saving application program Program volatile data data volume total length;4th programmable read only memory, including multiple subregions, each subregion are used In the Backup Data for saving an application program.
Specifically, can be arranged for each application program in system an application identifier (AID, ApplicationIdentifier), the value of AID arranges from small to large since Arabic numerals 0.Processor calls answer every time When with program (APP), choose APP by AID: the selection that the outer entity of the card of smart card sends selection application program refers to It enables, which specifies AID, after the operating system module of processor receives the selection instruction, records AID, and should Selection instruction passes to the corresponding APP of the AID, to achieve the purpose that APP and block outer entity interaction.
In the above embodiment of the invention, the system volatile data for belonging to operating system are referred to as OVD(OS VD), the program volatile data for belonging to APP is referred to as AVD(Application VD).
In the above embodiment of the invention, random access memory may include: first area's random access memory and the secondth area with Machine memory, first area's random access memory are used to save the data volume of the system volatile data from system, and the secondth area is random Memory is used to save the data volume of the program volatile data from application program, and second area's random access memory is above-mentioned reality The storage location in example is applied, is also the object of the fixed data volume for handling the first volatile data from application program Manage memory.Wherein, the volatile data AVD of the APP of current application program can be only handled on a moment RAM_APP.
Specifically, the ram space on smart card is divided into the area Liang Ge random access memory, one of RAM_OS is for storing Data from operating system module, for storing the data from APP, the address section of RAM_OS is another RAM_AP The address section of RAM_OSStartAddress~RAM_OS EndAddress, RAM_AP are RAM_APP StartAddress ~RAM_APPEndAddress.
It further, can also be that each system volatile data OVD from operating system distributes an identifier OVDID(OVD Identifier), the OVDID value is in first address of the data volume in RAM_OS of the OVD.Each OVD With a data volume (Body), the first area's random access memory of the Body of OVD in RAM_OS(RAM) in distribution as shown in figure 4, In RAM, the data volume of the system volatile data OVD from operating system: the first system data volume, second system data Body ... m system data body is successively saved since first area's first address (RAM_OS StartAddress), can by Fig. 4 To know, the data volume of the system volatile data OVD from operating system can not take entire firstth area random access memory, It i.e. can be with available free region to the first area tail address (RAM_OS EndAddress).As shown in fig. 6, in RAM, from answering With the data volume first of the program volatile data AVD of program APPn application data volume, the second application data volume ... m is answered It is successively saved since second area's first address (RAM_APP StartAddress) with data volume, as shown in Figure 6, the first ground in the secondth area There is also free areas between location and the second area tail address, and the data of current application program are only preserved in RAM_APP, Wherein, multiple data volumes that current application program has successively are stored in RAM_APP, and as shown in Figure 4 and Figure 6, each From storage region in available free region.
Smart card further include: programmable read only memory EEPROM, programmable read only memory EEPROM can be 4.
Wherein, first piece of EEPROM(i.e. the second programmable read only memory) successively store AVD Header.In the application In the EEPROM can be EEPROM_AVDHR.
Second piece of EEPROM(i.e. the first programmable read only memory) it can regard that 4 bytes are the array of a unit as, The index of array will be used as AVDID, and what m-th of unit of array stored is the first address of the Header for the AVD that AVDID is m.? The EEPROM can be EEPROM_AVDID in the application.
Third block EEPROM(, that is, third programmable read only memory) be considered as with 4 bytes be a unit array, All AVD of the corresponding APP of the AID of the index corresponding A PP of array, each unit storage AID possessed in RAM_APP The sum of space occupied.The EEPROM can be EEPROM_AVDSIZE in this application.
4th piece of i.e. the 4th programmable read only memory of EEPROM() there are CSTNum unit, respectively the 1st, 2 ... CSTNum unit, the size of the size of each unit with RAM_APP.And pass through the volatile data management module of smart card The mapping relations of maintenance unit serial number i and APP AID.Each unit is used to back up or restore all AVD of mapping APP.It is standby Part operation occurs that this block EEPROM EEPROM_BACKUP can be known as when the APP in run mode changes, wherein Number is supported to be denoted as ConcurrentSelectTotalNumer the number maximum of APP concurrent on smart card in this application, It is abbreviated as CSTNum.
Specifically, AVDID(AVD Identifier is accorded with for the program volatile data AVD setting identification from APP), it should The value of AVDID increases from Arabic numerals 0.Each AVD may each comprise: attribute head (Header) and data volume (Body). Header is placed in EEPROM, i.e. in the EEPROM_AVDHR of above-described embodiment, Body is placed in RAM_APP, wherein Header has data structure as shown in Figure 5, and the Header of each AVD may each comprise three fields: identification field (Aid Field), data volume length field (Body_Size field), data volume origing address field (OAF) (Body_Address, i.e. data volume Address in RAM).Wherein, Aid field denotes the program identification AID for the APP that the AVD is subordinate to, which is 2 bytes; Store the size of the Body of AVD in Body_Size field, which is 4 bytes;It is had recorded in Body_Address field First address of the Body in RAM_APP, the field are 4 bytes.The space size that Header is occupied is denoted as Header_Size, Header_Size=10 byte.
Smart card is instructed by APDU and blocks outer entity interaction, is blocked outer entity and is selected some APP first, then and chooses APP interactive information.In actual use scene, blocks outer entity and usually choose an APP and completed with the APP interactive information Afterwards, another APP and interactive information are chosen again, therefore only exist what only one was selected in system whithin a period of time APP.Since OS undertakes the distribution of selection and the APDU instruction of APP, the system volatile data for belonging to OS must be maintained in always In RAM, and only have the program volatile data of the currently selected APP selected just to need to be maintained in RAM in APP, therefore, the application Above-described embodiment in, processor in the case where getting the data processing request from application program, obtain with the data Corresponding storage location is requested in processing, carries out data processing to AVD in the storage location, wherein the storage location is one solid Positioning is set, and the AVD from any one APP can store RAM_APP in the position.So as to allow all APP to share one Section physics memory ram, to achieve the purpose that save physics ram space, solve smart card in the prior art makes in mostly application With the problem of RAM physical space deficiency under environment, the effect of multiple Application share RAM physical spaces is realized.
Specifically, the smart card operating system more applied is supported generally to support multiple logical channels, by smart card operation system The logical channel sum that system is supported is denoted as ChannelTotalNum.Preferably, the number of logical channel can be 20, respectively It is identified as Channel1~channel20.
Block in the first character section for every instruction that outer entity is sent to smart card and be all attached to logical channel information, operates System first determines whether that whether there is or not APP to be selected on current logic channel, if there is APP is selected, then the instruction is passed to the APP Processing;Give card outer entity if not provided, operating system directly returns to error message.
In above-described embodiment of the application, APP can have three kinds of states: move back state selection, run mode, pending state.Intelligence After card re-powers, all APP are all in moving back state selection;It selects to choose APP using instruction by sending, is receiving others Before interactive instruction, APP is in run mode;If front and back has selected APP1 and APP2 respectively, then on identity logic channel APP1 becomes moving back state selection from run mode, and APP2 becomes run mode from state selection is moved back;If having selected difference in multiple logical channels Application, for example, APP1 and APP2 have been selected respectively on Channel1 and Channel2, if present instruction is just by APP1 Reason, then APP1 is in run mode, and APP2 is in pending state;A certain moment, only only one APP are in run mode.Wherein, it moves back State selection is the state that application program is not selected, and run mode is the selected state for handling data of application program, is hung up State is that the data of application program are stored in logical channel and currently without the state of processing data.
According to the abovementioned embodiments of the present invention, the only APP in run mode can just occupy the physical space of RAM (as above State the storage location in embodiment), so as to allow all APP to share one section of physics memory ram, to reach saving physics The purpose of ram space, solve the problems, such as in the prior art smart card mostly using RAM physical space under environment it is insufficient, Realize the effect of multiple Application share RAM physical spaces.
Fig. 7 is the flow chart of the data processing method according to an embodiment of the present invention based on smart card.As shown in fig. 7, should Method may include steps of:
Step S102 receives the data processing request of destination application.
Step S104 obtains storage location corresponding with data processing request.
Step S106 carries out data processing to the first volatile data in storage location, wherein storage location is located at intelligence In capable of blocking in one section of fixed physical memory, the first volatile data is requested the data of processing by destination application.
Using the present invention, asked in the data processing for receiving destination application by the first receiving module shown in Fig. 3 After asking, module is obtained by first and obtains storage location corresponding with data processing request, then uses first processing module First volatile data of destination application request processing is stored in the storage location, wherein the storage location is located at intelligence In capable of blocking in one section of fixed physical memory, the first volatile data from any application APP can be protected in this way There are in one section of physical memory of the fixation, so as to allow all APP to share one section of physics memory ram, to reach section Save physics ram space purpose, solve in the prior art smart card mostly using RAM physical space under environment it is insufficient Problem realizes the effect of multiple Application share RAM physical spaces.
According to the abovementioned embodiments of the present invention, after the data processing request for receiving destination application, target application The state of program by pending state or will move back state selection and be changed to run mode.
In the above embodiment of the invention, the step of obtaining storage location corresponding with data processing request can wrap It includes: obtaining property parameters corresponding with data processing request;It is obtained in the random access memory of smart card corresponding with property parameters Storage location.
Specifically, target logic channel information and AID are carried in the data processing request of destination application, In, AID is the unique identification of corresponding each application program, after receiving the data processing request of destination application, from The AID of data processing request destination application, and the mapping relations between target logic channel information and AID are established, due to Target logic channel information and storage location have incidence relation, can basis after receiving data processing request Data processing request obtains corresponding storage location, and obtains target logic corresponding with storage location channel according to incidence relation Position, and the interactive instruction (i.e. data processing request) for carrying the processing data of target logic channel information can pass to tool The APP for having AID to identify, then the first volatile data for corresponding to the APP can be handled on target logic channel, to reach APP and the purpose for blocking outer entity progress data interaction.
In the above embodiment of the invention, data processing request may include request to create, wherein in storage location Before carrying out data processing to the first volatile data, method can also include: detection current application program and target application journey Whether sequence is consistent, in the case where current application program and destination application are inconsistent, removes the current number in storage location According to, wherein current application program is the corresponding application program of data currently stored in storage location.Preferably, in current application In the case that program and destination application are inconsistent, currently stored data can also be backed up.
Specifically, after data processing equipment receives request to create, it is corresponding that the data stored in storage location are detected Current application program and destination application it is whether consistent, wherein under unanimous circumstances, remove storage location on it is current Storing data.Specifically, the data removed in storage location can will store position by directly wiping the data in storage location The data set all reset to realize, can also be by the data on formatted storage position, by the data in storage location All zero is set to realize.
Specifically, if it is the request for all AVD for removing the selected APP of eve, then RAM_APP is all cleared to 0;If it is the request of all AVD of the current selection APP of initialization, then RAM_APP is all initialized as 0, it is current to create The AVD of the application program of selection, for subsequent data processing (such as: reading or update is handled).
For example, when APPi and APPj successively initiate creation to volatile data management module or read or update AVD request, Operating system module will initiate volatile data management module to remove the selected APPi's of eve when APPj is selected The request of all AVD, and initialization is then initiated by the request of all AVD of selection APPj.
Specifically, the random access memory of previous moment smart card storage location store be APPi volatile data (i.e. current data can also be referred to as currently stored data), as shown in figure 8, the second area random access memory first address (RAM_ APPStartAddress value) is equal with the value of the first area random access memory tail address (RAM_OS EndAddress), from depositing The first address RAM_APP StartAddress that storage space sets RAM_APP starts, and what is successively saved is the first number using i of APPi According to body, using i the second data volume ... using i xth data volume.
The target application journey in application APP j(i.e. above-described embodiment is received in the operating system module of processor Sequence, the program be AID=j APP) data processing request when, i.e. when APPj be selected, detect storage location store number According to the current data for being APPi, then all AVDs that remove eve selected APPi are initiated volatile data management module Instruction, and then initiate initialization by selection APPj all AVD request, the AVD of APPj is stored in storage location, As shown in figure 8, what is successively saved is i.e. since the first address RAM_APP StartAddress of storage location RAM_APP The first data volume using j of APPj, the second data volume ... using j using j xth data volume.
As shown in figure 8, using the above embodiment of the present invention, by the way that random access memory is divided into the area Liang Ge, wherein one A area saves the system volatile data from system, saves the program volatile data from application program in another area, The first system data volume for the system volatile data from system that first area's random access memory in Fig. 8 saves, the second system Unite data volume ..., m system data body, from choosing application program i to replace to when choosing application program j, the system of system The storage of volatile data does not change, the data of only second area's random access memory of variation, and saves and come from The first volatile data is saved from application in one section of fixed physical memory in the area of the program volatile data of application program The data of program i are changed to the data of the j of application program, and system controls multiple application programs, but more there is no occupying Memory, and can make in RAM that there may be idle regions.
More specifically, removing all AVD that eve is selected APPi by instruction, then to volatile data management module The AID parameter i of incoming APPi;By all AVD of instruction initialization APPj, then APPj is passed to volatile data management module AID parameter j.
In the above embodiment of the invention, before carrying out data processing to the first volatile data in storage location, Method can also include: the current application program detected in smart card with the presence or absence of state for run mode;Exist within a smart card In the case that state is the current application program of run mode, detects current application program and whether destination application is consistent, Current application program and destination application it is inconsistent in the case where, detection current application program and destination application whether position In logical channel identical on smart card;The case where current application program is located at different logical channels from destination application Under, back up the current data of current application program;It is located at identical logical channel in current application program and destination application In the case where, remove the current data in storage location.
According to the abovementioned embodiments of the present invention, the step of carrying out data processing to the first volatile data in storage location It may include: to detect target application in the case where current application program is located at different logical channels from destination application The state of program;In the case where the state of destination application is pending state, destination application is read from address is hung up Storage location is written in Backup Data and the first volatile data by Backup Data, wherein hanging up address, this is standby for preset backup The fixing address of part data;In the case where the state of destination application is to move back state selection, the number of initialized target application program According to by the first volatile data write-in storage location.
Specifically, the step of backing up the current data of current application program may include: that acquisition is corresponding with current data Backup address;It is stored in current data as Backup Data in backup address, wherein backup address is preset fixed storage Address in device.Wherein, the backup address in above-described embodiment and hang-up address are respectively positioned in the 4th programmable read only memory.
Specifically, can be led to by the operating system module service logic channel number Channel of smart card in the logic The AID of APP and the mapping relations of state are chosen on road Channel, and operating system module can be by the outer entity transmission of card Instruction (i.e. data processing request) passes to the APP of AID mark, if smart card has ChannelTotalNum logical channel, Then operating system needs to safeguard ChannelTotalNum mapping relations.When electric on smart cards, all Channel are with 0 Mapping indicates selected without application in the logical channel, and all APP states are to move back state selection.
For example, operating system module is in destination application APPj(, that is, AID=j APP, wherein the AID of APP from I Uncle's number 0 is incremented by, and j is natural number) it is selected when, if there is no APP to be in run mode on smart card, to volatile data management Module initiates the request of all AVD of initialization APPj, and is run mode by the status modifier of APPj.If there is application program In run mode, and current application program is that APPi is in run mode (i!=j), then detect current application program APPi and Whether APPj is located in identical logical channel, is located at different patrol in current application program APPi and destination application APPj In the case where in volume channel, all currently volatile of backup current application program APPi are initiated volatile data management module Property data AVD request, and detect the current state of destination application, specifically, be in and hang in destination application APPj Rise state in the case where, to volatile data management module initiate reduction destination application APPj all AVD request, i.e., from The Backup Data that destination application is read in address is hung up, then destination application is carried out according to data processing request corresponding Data interaction processing corresponding storage location e.g. is written into Backup Data and the first volatile data;In destination application APPj be in move back state selection in the case where, to volatile data management module initiate initialized target application APP j own The request of AVD, and be pending state by the status modifier of current application program APPi, by the status modifier of destination application APPj For run mode.
In the case where current application program APPi and destination application APPj is located at identity logic channel, initiate to remove The application request of all AVD of current application program APPi concurrently plays the application of initialization all AVD of destination application APPj Request, and the state of current application program APPi and destination application APPj are set to respectively move back state selection and run mode respectively. In the case where destination application APPj is in run mode, directly progress data processing.If application request is backup or clear Except all AVD of current APPi, then the AID parameter i of current APPi is passed to volatile data management module;If application request It is all AVD of reduction or initialization APPj, then is passed to the AID parameter j of APPj to volatile data management module.
In another embodiment of the present invention, as shown in figure 9, the 4th programmable read only memory includes multiple areas the (the 1st Backup space, the 2nd backup space ... ..., CSTNum backup space), each area is respectively used to one application program of storage First volatile data, similar with Fig. 8, random access memory is divided into the area Liang Ge, saves in a wherein area from system First volatile data saves the first volatile data from application program in another area, wherein first area's random storage First from system that device (from first area's random access memory first address to the first area random access memory tail address) saves is volatile The first system data volumes of property data, second system data volume ..., m system data body, second area's random access memory (from Second area's random access memory first address to the second area random access memory tail address) it is stored in the data volume from application program.
As shown in figure 9, when successively being chosen respectively on logical channel lm and logical channel ln using i and application j (at this point, It is current application program using i, is destination application using j), system can be by the data of all volatile datas of application i Body (namely current data) backs up in the 1st backup space of the 4th programmable read only memory, and in second area's random storage In device save using j the first data volume, using j the second data volume ..., using the y data volume of j, in this kind of situation Under, the state of application i is revised as pending state by run mode, the state of application j is revised as run mode by moving back state selection.In logic It is chosen on the 1p of channel using (being current application program using j at this point, being destination application using k) when k, by the institute of application j Have volatile data data volume (including application j the first data volume, using j the second data volume ..., using the y of j Data volume) backup in the 2nd backup space, and by application k the first data volume, using k the second data volume ..., using k's Z data volume is stored in storage location, and the state of application j is revised as pending state by run mode, by the state of application k Run mode is revised as by moving back state selection.If at this point, data processing request (this of the user by the outer entity sending application program j of card When, it is current application program using k, is destination application using j), then by the data volume of all volatile datas of application k (including application k the first data volume, using k the second data volume ..., using the z data volume of k) backup the 1st backup Space, and the data volume of all first volatile datas using j of last time backup is backed up in the 2nd backup space.
Through the above embodiments of the present invention, by way of backup RAM_APP to EEPROM, so that all APP are Whole spaces of RAM_APP can be shared, and the assignable RAM resource of single APP can be made to maximize, so that simultaneously The maximum number of hair APP is not limited by RAM resource size.
According to the abovementioned embodiments of the present invention, data processing request may include request to create, and property parameters may include: Spatial content parameter, the first volatile data include attribute head and data volume, wherein are obtained in the random access memory of smart card The step of storage location corresponding with property parameters includes: to obtain the first total length, wherein the first total length is target application journey The total length of the data volume for all volatile datas that sequence has created;It is deposited in random access memory for destination application distribution Storage space is set, wherein the initial address of storage location is that the position of the first total length is deviated from the initial address of physical memory, storage The length of position is the value of spatial content parameter, and spatial content parameter is the length of the first volatile data.
Wherein, above-mentioned steps are specifically that storage location corresponding with property parameters is obtained in second area's random access memory, More specifically, distributing storage location, therein, the starting of storage location in second area's random access memory for destination application Address is the position that the first total length is deviated from the initial address of second area's random access memory.
In the above embodiment of the invention, before distributing storage location in random access memory for destination application, Method can also include: that free cells are found in the programmable read only memory of smart card, and by the index number of free cells According to the first Data Identification as the first volatile data;The first space is distributed for attribute head in programmable read only memory, Free cells are written into first initial address in the first space, wherein the first space includes: identification field, data volume starting point Location field and data body length field;By the first program identification, spatial content parameter and the first overall length of current application program The value of degree is respectively written into identification field, data volume origing address field (OAF) and data body length field.
Specifically, free cells are found in the second programmable read only memory of smart card, and by the rope of free cells Argument is according to the first Data Identification as the first volatile data;It is attribute head distribution the in the first programmable read only memory The free cells in the second programmable read only memory are written in first initial address in the first space by one space.
According to the abovementioned embodiments of the present invention, data processing request may include read requests, and property parameters may include: First Data Identification, the first offset parameter of initial address of data volume relative to the first volatile data, the first destination Location parameter and reading length, wherein can wrap in the step of carrying out data processing to the first volatile data in storage location It includes: reading the first initial address from free cells corresponding with the first Data Identification;It obtains corresponding with the first initial address First space;The the first program mark stored in the target program mark and the identification field in the first space of detection destination application Whether consistent know (namely program identification of current application program);In target program mark and the first program identification unanimous circumstances Under, data volume initial address is read, to obtain the first volatile data, wherein the second initial address of the first volatile data For the sum of the initial address, data volume initial address and the value of the first offset parameter of storage location, the first volatile data Length is to read length;First volatile data is copied to the first memory space of the first destination address parameter direction.
Wherein, corresponding free cells read the first initial address from the second programmable read only memory, obtain with After corresponding first space of first initial address, and in destination application mark and the first program identification unanimous circumstances Under namely the currently stored data of storage location be destination application data, read the first total length body initial address.
In the above embodiment of the invention, data processing request may include updating request, and property parameters may include: First Data Identification, the first offset parameter of initial address of the data volume of the first volatile data, source data initial address Parameter and update length, wherein may include: in the step of carrying out data processing to the first volatile data in storage location The first initial address is read from free cells corresponding with the first Data Identification;Obtain corresponding with the first initial address first Space;The target program of detection destination application is identified with the first program identification stored in the identification field in the first space It is no consistent;In target program mark under the first program identification unanimous circumstances, data volume initial address is read, to obtain second Memory space, wherein the second memory space is the initial address of storage location, data volume initial address and the first offset parameter The space be directed toward of the sum of value;First volatile data is copied to the second memory space, wherein the first volatile data rises Beginning address is the corresponding address of initial address parameter, and the length of the first volatile data is to update length.
Wherein, in this embodiment it is possible to which corresponding free cells read first from the second programmable read only memory Initial address, after obtaining the first space corresponding with the first initial address, and in destination application mark and first Under program identification unanimous circumstances namely data that storage location is currently stored are the data of destination application, read the One total length body initial address.
Specifically, in random access memory for destination application distribute storage location after, method can also include: by The sum of first total length and spatial content parameter are used as the second total length, and update the first total length using the second total length.
Specifically, the volatile data management module by application program into processor initiates creation, reads, updates category In the request of the AVD of oneself, and safeguard one's own AVDID.If the data processing request is request to create, using to easy The incoming property parameters of the property lost data management module include: that spatial content parameter (creates the size parameter alloc_ in space Size);It include: the first volatibility number using the property parameters being passed to volatile data management module if it is read requests According to the first Data Identification AVDID, the first volatile data data volume initial address the first offset parameter offset, The the first destination address parameter dst_addr and reading length length of one volatile data;It is requested if it is updating, application To volatile data management module be passed to property parameters may include: the first volatile data the first Data Identification AVDID, The initial address of first offset parameter offset of the initial address of the data volume of source data, the source data of the first volatile data Parameter src_addr and update length length.Wherein, using incoming to volatile data management module in above-described embodiment Property parameters be carry in data processing request.
In the case where the data processing request that application program is initiated is read requests or updates request, need to first carry out wound Request is built, namely needs first to create the program volatile data of the destination application in storage location.
Specifically, when APP initiates creation to volatile data management module or reads or update AVD request, before this The APP must be chosen by the interaction of the outer entity of card and smart card.For example, APPi and APPj successively manage mould to volatile data When block initiates creation or reads or update AVD request, operating system module can be when APPj be selected, to volatile data pipe It manages module to initiate to remove the request for all AVD that eve is selected APPi, volatile data management module can also be initiated Backup eve is selected all AVD(, that is, currently stored data or current data of APPi) request, and then initiate initial Change by the request of all AVD of selection APPj.
More specifically, in the case where the data processing request from application program is request to create, it can be by as follows Method realizes the data creation to the application program (i.e. destination application) currently chosen: 1) seeing memory EEPROM_AVDID The array using nybble as unit is done, finds free cells in the array.If finding free cells, the rope of the unit is recorded Argument is according to index;2) length that size is Header_Size(attribute head is distributed in memory EEPROM_AVDHR) the One space is used to store the Header of destination application, and first initial address (i.e. first address) in first space is written The free cells of EEPROM_AVDID;From the APP(obtained in operating system module in currently selected i.e. destination application) Aid and alloc_size are respectively written into the identification field (Aid field) and data body length field (Body_ of Header by AID Size field);3) memory EEPROM_AVDSIZE is regarded as to the array of nybble Unit one, reads corresponding destination application The value of the aid unit is denoted as AVD_size_aid(i.e. the first total length);From the offset AVD_size_ of memory RAM_APP Start at aid, allocated size is the space of alloc_size, and the value for updating aid unit in EEPROM_AVDSIZE memory is (AVD_size_aid+alloc_size is the second total length after update), and by the value of the first total length write-in Header's Body_Address(, that is, data volume origing address field (OAF));4) using index as the first Data Identification AVDID, and behaviour is returned to Make system module.
In the case where the data processing request from application program is read requests, can realize by the following method pair The reading of the data for the application program (i.e. destination application) currently chosen: 1) volatile data management module is from memory The AVDID unit of EEPROM_AVDID reads the first address of Header, if it is NULL(0) then exit, on the contrary continue;2) The Aid field value that the aid and Header of the APP in currently selected are obtained from operating system module compares, if it is not the same, asking Termination is asked, otherwise is continued;3) from the Body_Address field of Header obtain data volume first address body_address(its Value is equal to the value of the first total length), it is initial address, size by the initial address+offset of body_address+ storage location The space being directed toward for the data copy in the space of length to dst_addr.
In the case where the data processing request from application program is to update request, can realize by the following method pair The update of the data for the application program (i.e. destination application) currently chosen: 1) volatile data management module is from memory The AVDID unit of EEPROM_AVDID reads the first address of Header, if it is NULL(0) then exit, on the contrary continue;2) The Aid field value that the aid and Header of the APP in currently selected are obtained from operating system module compares, if it is not the same, asking Termination is asked, otherwise is continued;3) the first address body_address of data volume is obtained from the Body_Address field of Header, it will Dst_addr is initial address, and size is that the spatial data of length is copied to the sky of (body_address+offset) direction Between in
In addition, the data processing request of operating system can also be by operating system module to volatile data management module It initiates, wherein the request of the system volatile data including creation, reading, update from system.If the request is that creation is asked It asks, the property parameters that operating system module is passed to system volatile data management module may include spatial content parameter, i.e., Create the size parameter alloc_size in space;If it is read requests, operating system module is to system volatile data management The incoming property parameters of module may include: the first system the mark OVDID, system volatile data of system volatile data The second destination address parameter dst_addr of second offset parameter offset of the initial address of data volume, system volatile data And system reads length length;It is requested if it is updating, operating system module passes system volatile data management module Enter the data volume that property parameters may include: the first system mark OVDID of system volatile data, system volatile data The initial address parameter src_addr and system update length of first offset parameter offset of initial address, source data length。
Specifically, if the data processing request from system is request to create, a block size is opened up in RAM_OS The space of alloc_size, and returned initial address as OVDID;If it is read requests, then according to incoming parameter OVDID, offset, dst_addr, length will be from the sum of OVDID and offset as initial address copy length The data of length are into dst_addr;It is requested if it is updating, since src_addr, by the data copy of length length To the sum of OVDID and offset as in the space of initial address.
It should be noted that step shown in the flowchart of the accompanying drawings can be in such as a group of computer-executable instructions It is executed in computer system, although also, logical order is shown in flow charts, and it in some cases, can be with not The sequence being same as herein executes shown or described step.
It can be seen from the above description that the present invention realizes following technical effect: using the present invention, receiving After the data processing request of destination application, storage location corresponding with data processing request is obtained, then uses first Processing module is handled in the first volatile data of the storage location to destination application request processing, wherein this is deposited Storage space can will be in run mode from any application in this way setting in one section of physical memory fixed in smart card The first volatile data of APP handled in the one of the fixation section of physical memory, so as to allow all APP shared one Section physics memory ram, to achieve the purpose that save physics ram space, solve smart card in the prior art makes in mostly application With the problem of RAM physical space deficiency under environment, the effect of multiple Application share RAM physical spaces is realized.
Obviously, those skilled in the art should be understood that each module of the above invention or each step can be with general Computing device realize that they can be concentrated on a single computing device, or be distributed in multiple computing devices and formed Network on, optionally, they can be realized with the program code that computing device can perform, it is thus possible to which they are stored Be performed by computing device in the storage device, perhaps they are fabricated to each integrated circuit modules or by they In multiple modules or step be fabricated to single integrated circuit module to realize.In this way, the present invention is not limited to any specific Hardware and software combines.
The foregoing is only a preferred embodiment of the present invention, is not intended to restrict the invention, for the skill of this field For art personnel, the invention may be variously modified and varied.All within the spirits and principles of the present invention, made any to repair Change, equivalent replacement, improvement etc., should all be included in the protection scope of the present invention.

Claims (14)

1. a kind of data processing method based on smart card characterized by comprising
Receive the data processing request of destination application;
Obtain storage location corresponding with the data processing request;
Data processing is carried out to the first volatile data in the storage location,
Wherein, the storage location is located in one section of physical memory fixed in smart card, and first volatile data is institute State the data that destination application requests processing;
It wherein, include: at the data the step of carrying out data processing to the first volatile data in the storage location In the case that reason request is read requests, from free cells corresponding with the first Data Identification of first volatile data Read the first initial address;Obtain the first space corresponding with first initial address;Detect the destination application First program identification of the current application program stored in target program mark and the identification field in first space whether one It causes;In target program mark under the first program identification unanimous circumstances, data volume initial address is read, to obtain First volatile data;
Wherein, first Data Identification is the index data of free cells in programmable read only memory, first space For the space in programmable read only memory being the distribution of attribute head.
2. the method according to claim 1, wherein being carried out in the storage location to the first volatile data Before data processing, the method also includes:
Detect the current application program in the smart card with the presence or absence of state for run mode;
In the case that existence is the current application program of run mode in the smart card, the current application is detected Whether program is consistent with the destination application,
The current application program and the destination application it is inconsistent in the case where, detect the current application program with Whether the destination application is located at identical logical channel on the smart card;
In the case where the current application program is located at different logical channels from the destination application, work as described in backup The current data of preceding application program;
In the case where the current application program and the destination application are located at identical logical channel, deposited described in removing The current data that storage space is set.
3. according to the method described in claim 2, it is characterized in that, being carried out in the storage location to the first volatile data The step of data processing includes:
In the case where the current application program is located at different logical channels from the destination application, the mesh is detected Mark the state of application program;
In the case where the state of the destination application is pending state, the destination application is read from address is hung up The storage location is written, wherein the hang-up address in the Backup Data and first volatile data by Backup Data For the fixing address of the preset backup Backup Data;
In the case where the state of the destination application is to move back state selection, the data of the destination application are initialized, it will The storage location is written in first volatile data.
4. according to the method described in claim 2, it is characterized in that, the step of backing up the current data of the current application program Include:
Obtain the backup address of the current data;
It is stored in the current data as Backup Data in the backup address, wherein the backup address is preset Fixing address in memory.
5. the method according to claim 1, wherein obtaining storage location corresponding with the data processing request The step of include:
Obtain property parameters corresponding with the data processing request;
The storage location corresponding with the property parameters is obtained in the random access memory of the smart card.
6. according to the method described in claim 5, it is characterized in that, the case where the data processing request is request to create Under, the property parameters include: spatial content parameter, and first volatile data includes attribute head and data volume, wherein The step of acquisition storage location corresponding with the property parameters, includes: in the random access memory of the smart card
Obtain the first total length, wherein first total length is all volatibility that the destination application has created The total length of the data volume of data;
It is that the destination application distributes the storage location in the random access memory,
Wherein, the initial address of the storage location is to deviate first total length from the initial address of the physical memory Position, the length of the storage location are the value of the spatial content parameter, and the spatial content parameter is described first volatile The length of property data.
7. according to the method described in claim 6, it is characterized in that, being the destination application in the random access memory It distributes before the storage location, the method also includes:
Find the free cells in the programmable read only memory of the smart card, and by the index number of the free cells According to the first Data Identification as first volatile data;
It is that the attribute head distributes the first space in programmable read only memory, by first initial address in first space The free cells are written, wherein first space includes: that identification field, data volume origing address field (OAF) and data volume are long Spend field;
By the value of the first program identification of the current application program, the spatial content parameter and first total length point The identification field, the data volume length field and the data volume origing address field (OAF) are not written.
8. the method according to the description of claim 7 is characterized in that the property parameters include: first Data Identification, phase For the first offset parameter of the initial address of the data volume of first volatile data, the first destination address parameter and reading Length is taken, the second initial address of first volatile data is the initial address of the storage location, the data volume Beginning address and first offset parameter the sum of value, the length of first volatile data is the reading length;It will First volatile data is copied to the first memory space that the first destination address parameter is directed toward.
9. the method according to the description of claim 7 is characterized in that the case where the data processing request is to update request Under, the property parameters include: first Data Identification, first volatile data data volume initial address One offset parameter, the initial address parameter of source data and update length, wherein to the first volatibility in the storage location Data carry out data processing the step of include:
The first initial address is read from the free cells corresponding with first Data Identification;
Obtain the first space corresponding with first initial address;
Detect described the stored in the target program mark and the identification field in first space of the destination application Whether one program identification is consistent;
In target program mark under the first program identification unanimous circumstances, data volume initial address is read, to obtain Take the second memory space, wherein second memory space is the initial address of the storage location, the data volume starting point The space that the sum of value of location and first offset parameter is directed toward;
First volatile data is copied to the second memory space, wherein the initial address of first volatile data For the corresponding address of the initial address parameter, the length of first volatile data is the update length.
10. the method according to any one of claim 7 to 9, which is characterized in that in the random access memory be institute Destination application is stated to distribute after the storage location, the method also includes:
It regard the sum of first total length and the spatial content parameter as the second total length, and uses second total length Update first total length.
11. a kind of data processing equipment based on smart card characterized by comprising
First receiving module, for receiving the data processing request of destination application;
First obtains module, for obtaining storage location corresponding with the data processing request;
First processing module, for carrying out data processing to the first volatile data in the storage location,
Wherein, the storage location is located in one section of physical memory fixed in smart card, and first volatile data is institute State the data that destination application requests processing;
Wherein, the first processing module be used for by following steps come in the storage location to the first volatile data into Row data processing: in the case where the data processing request is read requests, from first with first volatile data The first initial address is read in the corresponding free cells of Data Identification;It is empty to obtain corresponding with first initial address first Between;Detect the current application stored in the target program mark and the identification field in first space of the destination application Whether the first program identification of program is consistent;Under target program mark and the first program identification unanimous circumstances, Data volume initial address is read, to obtain first volatile data;
Wherein, first Data Identification is the index data of free cells in programmable read only memory, first space For the space in programmable read only memory being the distribution of attribute head.
12. a kind of smart card characterized by comprising
Processor, for obtaining and the data processing request after receiving the data processing request of destination application Then corresponding storage location carries out data processing to the first volatile data in the storage location,
Wherein, the storage location is located in one section of physical memory fixed in smart card, and first volatile data is institute State the data that destination application requests processing;
Wherein, the processor is used to carry out data to the first volatile data in the storage location by following steps Processing: in the case where the data processing request is read requests, from the first data mark with first volatile data Know and reads the first initial address in corresponding free cells;Obtain the first space corresponding with first initial address;Detection The current application program stored in the target program mark and the identification field in first space of the destination application Whether the first program identification is consistent;In target program mark under the first program identification unanimous circumstances, number is read According to body initial address, to obtain first volatile data;
Wherein, first Data Identification is the index data of free cells in programmable read only memory, first space For the space in programmable read only memory being the distribution of attribute head.
13. smart card according to claim 12, which is characterized in that the smart card further include:
Programmable read only memory, for saving the attribute head of the program volatile data from application program;
Random access memory, including first area's random access memory and second area's random access memory, wherein first area's random access memory is used In the data volume for saving the system volatile data from system, secondth area random access memory is easy for saving described program The data volume of the property lost data.
14. smart card according to claim 13, which is characterized in that the programmable read only memory includes:
First programmable read only memory, for saving the attribute head of one or more program volatile datas, each journey The attribute head of sequence volatile data occupies a sub-spaces, and each subspace includes: identification field, data volume initial address Field and data body length field, wherein
The identification field, for saving the program identification of the application program;
The data volume origing address field (OAF), for saving address parameter of the data volume in the random access memory;
The data volume length field, the length data of the data volume for saving described program volatile data;
Second programmable read only memory, including one or more free cells, each free cells are respectively used to save First initial address of the subspace shared by one attribute head;
Third programmable read only memory, for saving the data volume for the program volatile data that the application program has created Total length;
4th programmable read only memory, including multiple subregions, each subregion are used to save the backup of an application program Data.
CN201310339964.4A 2013-08-06 2013-08-06 Data processing method, device and smart card based on smart card Active CN104346298B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201310339964.4A CN104346298B (en) 2013-08-06 2013-08-06 Data processing method, device and smart card based on smart card

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310339964.4A CN104346298B (en) 2013-08-06 2013-08-06 Data processing method, device and smart card based on smart card

Publications (2)

Publication Number Publication Date
CN104346298A CN104346298A (en) 2015-02-11
CN104346298B true CN104346298B (en) 2018-12-25

Family

ID=52501944

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310339964.4A Active CN104346298B (en) 2013-08-06 2013-08-06 Data processing method, device and smart card based on smart card

Country Status (1)

Country Link
CN (1) CN104346298B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110096693B (en) * 2018-01-29 2024-05-28 北京搜狗科技发展有限公司 Data processing method and device for data processing
CN109144409B (en) * 2018-07-11 2020-02-21 华为技术有限公司 Data processing method and device, storage medium and data system
CN111488123B (en) * 2020-04-07 2022-11-04 Tcl移动通信科技(宁波)有限公司 Storage space management method and device, storage medium and mobile terminal
CN113569208B (en) * 2021-07-27 2024-10-22 恒宝股份有限公司 Data management method, smart card and computer-readable storage medium

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1879092A (en) * 2003-11-12 2006-12-13 松下电器产业株式会社 Cache memory and control method thereof
CN1940858A (en) * 2005-09-26 2007-04-04 深圳市朗科科技有限公司 Multi-task realization of media player
CN101078992A (en) * 2007-07-06 2007-11-28 大唐微电子技术有限公司 Intelligent card platform redevelopment method and system
CN101344861A (en) * 2007-07-10 2009-01-14 凤凰微电子(中国)有限公司 Smart card internal memory management method
CN101650972A (en) * 2009-06-12 2010-02-17 东信和平智能卡股份有限公司 Method for updating data of nonvolatile memory of intelligent card
US20100122259A1 (en) * 2003-02-18 2010-05-13 Microsoft Corporation Multithreaded kernel for graphics processing unit
CN102799660A (en) * 2012-07-04 2012-11-28 北京中电华大电子设计有限责任公司 JAVA card object management method

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100122259A1 (en) * 2003-02-18 2010-05-13 Microsoft Corporation Multithreaded kernel for graphics processing unit
CN1879092A (en) * 2003-11-12 2006-12-13 松下电器产业株式会社 Cache memory and control method thereof
CN1940858A (en) * 2005-09-26 2007-04-04 深圳市朗科科技有限公司 Multi-task realization of media player
CN101078992A (en) * 2007-07-06 2007-11-28 大唐微电子技术有限公司 Intelligent card platform redevelopment method and system
CN101344861A (en) * 2007-07-10 2009-01-14 凤凰微电子(中国)有限公司 Smart card internal memory management method
CN101650972A (en) * 2009-06-12 2010-02-17 东信和平智能卡股份有限公司 Method for updating data of nonvolatile memory of intelligent card
CN102799660A (en) * 2012-07-04 2012-11-28 北京中电华大电子设计有限责任公司 JAVA card object management method

Also Published As

Publication number Publication date
CN104346298A (en) 2015-02-11

Similar Documents

Publication Publication Date Title
US11487698B2 (en) Parameter server and method for sharing distributed deep learning parameter using the same
CN103324533B (en) distributed data processing method, device and system
CN104346298B (en) Data processing method, device and smart card based on smart card
KR20160124085A (en) Management of storage in a storage network
CN106843745A (en) Capacity expansion method and device
CN105224244B (en) A kind of method and apparatus of file storage
CN104346373A (en) Partition log queue synchronization management method and device
CN106201355A (en) Data processing method and device and storage system
CN103870362B (en) A kind of data reconstruction method, device and standby system
CN106708968A (en) Distributed database system and data processing method in distributed database system
CN106095589A (en) Partition allocation method, device and system
CN110442308A (en) A kind of data block storage method, device, equipment and storage medium
CN110213326A (en) Expansion method, system, equipment and the storage medium of metadata node cluster
CN105162869B (en) A kind of method and apparatus for backup data management
CN110019083A (en) Storage method, device, electronic equipment and the storage medium of distributed file system
CN108399102A (en) A kind of resource allocation methods and device
CN104461705B (en) A kind of method and storage control, cluster storage system of business access
CN108399106A (en) The method and apparatus for managing physical host
CN103119567A (en) Systems and methods for managing a virtual tape library domain
US8589652B2 (en) Reorganization of a fragmented directory of a storage data structure comprised of the fragmented directory and members
CN109213453A (en) A kind of disk management method and relevant apparatus
CN107122136A (en) A kind of capacity acquiring method and device
CN103699681B (en) The treating method and apparatus of data rewind
CN108897494A (en) The processing method and relevant apparatus of data manipulation in block storage system
CN102833295B (en) Data manipulation method and device in distributed cache system

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