CN101699476A - Data processing method and device of smart cards - Google Patents

Data processing method and device of smart cards Download PDF

Info

Publication number
CN101699476A
CN101699476A CN200910236967A CN200910236967A CN101699476A CN 101699476 A CN101699476 A CN 101699476A CN 200910236967 A CN200910236967 A CN 200910236967A CN 200910236967 A CN200910236967 A CN 200910236967A CN 101699476 A CN101699476 A CN 101699476A
Authority
CN
China
Prior art keywords
data
page
leaf
word
backed item
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN200910236967A
Other languages
Chinese (zh)
Other versions
CN101699476B (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.)
Beijing Watchdata Co ltd
Original Assignee
Beijing WatchData System 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 Beijing WatchData System Co Ltd filed Critical Beijing WatchData System Co Ltd
Priority to CN200910236967.9A priority Critical patent/CN101699476B/en
Publication of CN101699476A publication Critical patent/CN101699476A/en
Application granted granted Critical
Publication of CN101699476B publication Critical patent/CN101699476B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The embodiment of the invention discloses a data processing method and device of smart cards, which relates to the field of communication. To improve the performance of the smart cards, the technical scheme provided by the embodiment of the invention has the following steps: according to the marks of backup areas, determining valid character backup areas and invalid character backup areas; acquiring the character backup item data stored in the valid character backup areas as first character backup item data; according to the first character backup item data and data acquired from a modification area, acquiring second character backup item data; writing the second character backup item data in the invalid character backup areas; erasing data in the valid character backup areas; and using the backup areas where the second character backup item data are written as the valid backup areas, using the backup areas where the first character backup item data are stored as the invalid backup areas, and updating the marks of the backup areas. The invention is suitable for the data processing of the smart cards.

Description

The data processing method of smart card and device
Technical field
The present invention relates to the communications field, relate in particular to a kind of data processing method and device of smart card.
Background technology
Along with the continuous aggravation of smart card industry competition, except the competition of technology, it is more fierce that the competition of cost performance seems.In order can on the basis of guaranteed performance, to reduce cost, begin now to consider to utilize cost lower, only support the erasable FLASH card of page or leaf to realize smart card.Because this card cost is very low, if in case before having realized on this card the function of card, cost will descend significantly, effectively improves competitive power on market, enlarges market share.
The smart card that adopts the FLASH card to realize generally can dispose a backup area at present.When upgrading the data of revising in the card, first that can will obtain earlier need carry out byte and upgrade the zone of revising, and the backed item data of promptly revising the district write this backup area.Then, the backed item data of revising the district with this first are read in the internal memory from this backup area, wipe data in this backup area.Then, in internal memory, integrate second backed item data of revising the district that first is revised the backed item data in district and obtains, the backed item data after integrating are write this backup area.By that analogy, the backed item data until all modifications district all write this backup area.At this moment, the data of distinguishing according to each modification of backed item data modification of this backup area.
In realizing process of the present invention, the inventor finds that there are the following problems at least in the prior art: the backed item data after will integrating write in the process of this backup area, if smart card cuts off the power supply, the backed item data of obtaining from this backup area before integrating so may be destroyed internal memory, and this moment, the data in this backup area also were wiped free of, the backed item data of obtaining from this backup area before integrating can't be repaired, can only revise the backed item data in district this moment from first, again back up according to the method described above, reduced the performance of smart card.
Summary of the invention
Embodiments of the invention provide a kind of data processing method and device of smart card, can improve the performance of smart card effectively.
For achieving the above object, embodiments of the invention adopt following technical scheme:
A kind of data processing method of smart card comprises:
According to the backup area mark, determine effective word backup area and invalid character backup areas;
Obtain the word backed item data of storing in the described effective word backup area, as the first word backed item data;
According to described first word backed item data and the data from revise the district, obtained, obtain the second word backed item data;
In described invalid character backup areas, write the described second word backed item data;
Wipe the data in the described effective word backup area;
Upgrade described backup area mark.
A kind of data processing equipment of smart card comprises:
The enabledisable determining unit is used for determining effective word backup area and invalid character backup areas according to the backup area mark;
Word backup acquiring unit is used for obtaining the word backed item data that effective word backup area that described enabledisable determining unit determines is stored, with the word backed item data obtained as the first word backed item data; And, obtain the second word backed item data according to described first word backed item data and the data from revise the district, obtained;
The word backup units is used for writing the second word backed item data that described word backup acquiring unit obtains to described invalid character backup areas; Wipe the data in the described effective word backup area, upgrade described backup area mark.
The data processing method of the smart card of the smart card that the embodiment of the invention provides, device, after determining effective word backup area and invalid character backup areas according to the backup area mark, obtain new word backed item data according to word backed item data of from the effective word backup area, obtaining and the data from revise the district, obtained, and, the word backed item data that this is new write in the invalid character backup areas that data have been wiped free of, upgrade the backup area mark simultaneously.Therefore, if in word backed item data write the process of backup area, cut off the power supply, then can directly obtain the word backed item data that backed up from effective backup area, and the backed item data that do not need to revise the district from first begin to back up again, and adopt this alternately back mechanism can also reduce erasable number of times to backup area, and then when guaranteeing data security, improved the performance of smart card.
Description of drawings
In order to be illustrated more clearly in the technical scheme of the embodiment of the invention, the accompanying drawing of required use is done an introduction simply in will describing embodiment below, apparently, accompanying drawing in describing below only is some embodiments of the present invention, for those of ordinary skills, under the prerequisite of not paying creative work, can also obtain other accompanying drawing according to these accompanying drawings.
The schematic flow sheet of the data processing method of a kind of smart card that Fig. 1 provides for the embodiment of the invention;
The storage node composition of the word backed item data that Fig. 2 provides for prior art;
The storage node composition of the word backed item data that Fig. 3 provides for the embodiment of the invention;
A kind of schematic flow sheet that upgrades the method for the data of revising the district that Fig. 4 provides for the embodiment of the invention;
The storage node composition of the page or leaf backed item data that Fig. 5 provides for the embodiment of the invention;
The formation synoptic diagram of the data processing equipment of a kind of smart card that Fig. 6 provides for the embodiment of the invention.
Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the invention, the technical scheme in the embodiment of the invention is clearly and completely described, obviously, described embodiment only is the present invention's part embodiment, rather than whole embodiment.Based on the embodiment among the present invention, those of ordinary skills belong to the scope of protection of the invention not making the every other embodiment that is obtained under the creative work prerequisite.
For when guaranteeing data security, improve the performance of smart card, the embodiment of the invention provides a kind of data processing method of smart card, as shown in Figure 1, comprising:
101,, determine effective word backup area and invalid character backup areas according to the backup area mark;
For example, be provided with two word backed item backup areas 0 and 1 in advance, these two word backed item backup areas are used for alternately backing up.And it is effective in order to identify the content of storing in current which word backed item backup area, a mark can be set in internal memory, for example, the setting mark value is that the content of storing in the directive backed item backup area 0 in 0 o'clock is effective, and mark value is that the content of storing in the directive backed item backup area 1 in 1 o'clock is effective.In embodiments of the present invention, this mark is called the backup area mark.With memory contents is that effective word backed item backup area is called the effective word backup area, is that invalid word backed item backup area is called invalid character backup areas with memory contents.
For example, suppose that current backup area mark value is 0, determine that then word backed item backup area 0 is effective backup area, word backed item backup area 1 is invalid backup area.
102, obtain the word backed item data of storing in the described effective word backup area, as the first word backed item data;
For example, the word backed item data in the word backed item backup area 0 are read in internal memory, with these word backed item data as the first word backed item data.
Wherein, word backed item data have certain storage format, and it is used for the information such as address, data, length and proof test value in record modification district.In embodiments of the present invention, revise the district and be meant that need carry out byte upgrades the zone of revising.
In the prior art, the storage organization of word backed item data as shown in Figure 2, when writing word backed item data successively according to this storage organization is unified, the interruption if write operation meets accident, though significant notation might appear comprising in these word backed item data in the backup area, but the infull situation of other data except that significant notation, these word backed item data can be considered to back up successfully effective because of comprising significant notation.Therefore, for avoiding above-mentioned situation, the data of wiping this backup area earlier write this backup area with other data except that significant notation, and then wipe the data of this backup area usually, and significant notation and above-mentioned other data are together write this backup area.
In embodiments of the present invention, in order to reduce the erasable number of times in the data backup process, the storage organization of word backed item data can be as shown in Figure 3, according to the unified word backed item data that write successively of this storage organization, promptly unified writing successively revised the data length of distinguishing in the word backup area, the data in described modification district, the address in described modification district, the data check in described modification district and and the significant notation of the word backed item in described modification district.Therefore, have only other data except that significant notation of word backed item data all to write this backup area, these word backed item data in the backup area just may comprise significant notation, have guaranteed the backup accuracy of word backed item data, have also reduced erasable number of times simultaneously.
103, according to described first word backed item data and the data from revise the district, obtained, obtain the second word backed item data;
For example, suppose to comprise in the first word backed item data the 1st~n the word backed item data of revising the district, can revise district's reading of data from n+1, obtain the corresponding word backed item data in this modification district according to the data that read, the first word backed item data and this are waited to revise the word backed item data organization integration in district, obtain the second word backed item data.
104, in described invalid character backup areas, write the described second word backed item data;
For example, in word backed item backup area 1, write the described second word backed item data.
105, wipe data in the described effective word backup area;
For example, wipe data in the word backed item backup area 0.
In addition, do not wipe clean problem for preventing in the erase operation process because of outage, can also be before execution in step 104, detection need write the backup area of the described second word backed item data, for example whether word backed item backup area 0 is wiped totally, clean if judgement is not wiped, and then this backup area is carried out an obliterated data operation, otherwise, directly carry out write operation.
106, the backup area that will write the described second word backed item data is as effective backup area, and the backup area of the described first word backed item data of storage as invalid backup area, is upgraded described backup area mark.
For example, the backup area mark value being updated to 1, is word backed item backup area 1 with indication effective backup area at this moment, and the invalid backup area of this moment is a word backed item backup area 0.
After cutting off the power supply, the backup area mark that is placed on internal memory can be lost, and at this moment need rejudge effective backup area behind electrification reset, and reset the backup area mark.Judge the effective word backup area, the method that word backup area mark is set is specifically as follows:
A, can judge preferentially whether word backup area 0 is effective.Wherein, the effective determination methods of word backup area is: it is correct all to satisfy significant notation as if all word backed item data in the word backup area, and proof test value is through verifying that then this word backup area is effective.
If b judges that word backup area 0 is invalid, the data of wiping word backup area 0 judge then whether word backup area 1 is effective.If judge that word backup area 1 is effective, backup area be set be labeled as 1; If judge that word backup area 1 is invalid, the data of wiping word backup area 1 are provided with backup area and are labeled as 1.
C if judge that word backup area 0 is effective, then judges word backup area 1.If judge that word backup area 1 is effective, then selecting the many backup areas of backed item is effective backup area.If judge that word backup area 1 is invalid, the data of wiping word backup area 1 are provided with backup area and are labeled as 0.
Data in all modifications district all back up, when promptly the word backed item data in all modifications district have all write in the effective word backup area, the data of revising in the district are upgraded.As shown in Figure 4, upgrading the method for revising the data of distinguishing can specifically comprise:
When 201, in the effective word backup area, having write the word backed item data in all modifications district, obtain the data of revising storage in the page or leaf, as the described raw data of revising page or leaf;
For example, with the 1st page or leaf of revising under the district, promptly the 1st all data reads of revising to store in the modification page or leaf in district are in internal memory, with these data of reading raw data as this modifications page.
202, obtain page backed item data according to the described raw data of revising page or leaf, described page or leaf backed item data comprise the described data check of revising page or leaf and;
Wherein, page or leaf backed item data can also comprise the described data length of revising page or leaf, the address of described modification page or leaf, the exclusive or check of described modification page or leaf and and the significant notation of described page or leaf backed item.
Describedly revise the data check of page or leaf and can calculate acquisition by following four algorithms at least: the summation that adds up that the described data of revising page or leaf are brought into; Described the 4th of each byte revising the data of page or leaf brought into the summation that adds up of position; With 13 pairs of described data deliverys of revising page or leaf, the delivery result is brought into the summation that adds up of position; With 17 pairs of described even address data deliverys of revising page or leaf,, the delivery result is brought into the summation that adds up of position with 97 pairs of described odd address data deliverys of revising page or leaf.
203, described page or leaf backed item data are write described page or leaf backed item backup area, the described raw data of revising page or leaf is write described exchange page or leaf;
Wherein, revise page or leaf and be meant the page or leaf of revising under distinguishing, and the exchange page or leaf is used for the old data of memory modify page or leaf, and page or leaf backed item backup area is used for memory page backed item data.
In embodiments of the present invention, for supporting the erasable chip of big page or leaf, can be in different backup areas with word backed item data and page or leaf backed item data storage, and will exchange page or leaf and a page or leaf backed item backup area be incorporated into one carry out in greatly page erasable.Therefore, can wipe or write exchange page or leaf and the uniform data in page backed item backup area, this just requires page backed item backup area effective with data or while in the exchange page or leaf, or all invalid.
In addition, the storage organization of this page backed item data can be as shown in Figure 5, according to the unified page backed item data that write successively of this storage organization, promptly unification writes the described data length of revising page or leaf successively in page or leaf backed item backup area, described address of revising page or leaf, the described exclusive or check of revising page or leaf and, the described data check of revising page or leaf and and the significant notation of described page or leaf backed item.Therefore, have only other data except that significant notation of page backed item data all to write this page backed item backup area, these word backed item data in this page backed item backup area just may comprise significant notation, have guaranteed the accuracy of page or leaf backed item data backup.
Can after described page or leaf backed item data write described page or leaf backed item backup area, the described raw data of revising page or leaf be write described exchange page or leaf.And, after power interruption recovering, can also describedly revise the data check of page or leaf and read in the internal memory what store in the data of storage in the described exchange page or leaf and the described page or leaf backed item backup area, with the data check that reads and as first data check and.Then, according to the data that from described exchange page or leaf, read carry out data check and computing, the data check that calculates and, be described second data check of revising page or leaf and.To this first data check and and second data check and comparing, if this two data verifications and equate that then the data in exchange page or leaf and the page or leaf backed item backup area are simultaneously effectively; Otherwise the data in exchange page or leaf and the page or leaf backed item backup area are simultaneously invalid.When the data in definite exchange page or leaf and page or leaf backed item backup area are all effective, recover the described data of revising in the page or leaf.
Therefore, if in the process of the raw data that writes described modification page or leaf, cut off the power supply, when power interruption recovering, the situation that the described raw data of revising page or leaf does not all write the exchange page or leaf may appear, in this case, second data check that obtains according to the data that from described exchange page or leaf, read and, with first data check that writes down in the page or leaf backed item data and unequal, data in this moment exchange page or leaf and the page or leaf backed item backup area are simultaneously invalid, thereby can guarantee to revise the accuracy of the raw data backup of page or leaf.
204, wipe the described data of revising in the page or leaf;
205,, obtain the described corresponding more new data of page or leaf of revising according to the raw data of described exchange page or leaf and the more new data in modification district;
Specifically, can in internal memory, revise the more new data that the corresponding legacy data in district is modified as this modification district in the raw data with described modification page or leaf, obtain the corresponding more new data of described modification page or leaf.
206, the described corresponding more new data of page or leaf of revising is write described modification page or leaf.
207, after upgrading successfully, unified data of wiping in exchange page or leaf and the page or leaf backed item backup area.
In addition, if in unified process of wiping the data in exchange page or leaf and the page or leaf backed item backup area, cut off the power supply, when power interruption recovering, data might occur exchanging in page or leaf and page backed item backup area and not wipe clean problem.Therefore, described page or leaf backed item data can also write described page or leaf backed item backup area, and the described raw data of revising page or leaf is being write before the described exchange page or leaf, judge whether data wipe totally in exchange page or leaf and page backed item backup area.If judge and not wipe totally that then unified data of wiping in exchange page or leaf and the page or leaf backed item backup area write described page or leaf backed item backup area with described page or leaf backed item data then, the described raw data of revising page or leaf is write described exchange page.
The data processing method of the smart card that present embodiment provides, after determining effective word backup area and invalid character backup areas according to the backup area mark, obtain new word backed item data according to word backed item data of from the effective word backup area, obtaining and the data from revise the district, obtained, and, the word backed item data that this is new write in the invalid character backup areas that data have been wiped free of, upgrade the backup area mark simultaneously.Therefore, if in word backed item data write the process of backup area, cut off the power supply, then can directly obtain the word backed item data that backed up from effective backup area, and the backed item data that do not need to revise the district from first begin to back up again, and adopt this alternately back mechanism can also reduce erasable number of times to backup area, and then when guaranteeing data security, improved the performance of smart card.
With said method accordingly, the embodiment of the invention also provides a kind of data processing equipment of smart card, as shown in Figure 6, comprising:
Enabledisable determining unit 301 is used for determining effective word backup area and invalid character backup areas according to the backup area mark;
Word backup acquiring unit 302 is used for obtaining the word backed item data that effective word backup areas that described enabledisable determining unit 301 determines are stored, with the word backed item data obtained as the first word backed item data; And, obtain the second word backed item data according to described first word backed item data and the data from revise the district, obtained;
Word backup units 303 is used for writing the second word backed item data that described word backup acquiring unit 302 obtains to described invalid character backup areas; Wipe the data in the described effective word backup area, upgrade described backup area mark.
Further, described word backed item data comprise the data length of revising the district, the data in described modification district, the address in described modification district, the data check in described modification district and and the significant notation of the word backed item in described modification district.Described word backup units 303 can also specifically comprise:
The word backup writes subelement, be used for the unified data length of revising the district that writes successively of invalid character backup areas after being wiped the subelement obliterated data by described invalid data, the data in described modification district, the address in described modification district, the data check in described modification district and and the significant notation of the word backed item in described modification district;
Invalid data is wiped subelement, is used for wiping the data of the backup area of storing the described first word backed item data;
The flag update subelement, be used for will write the backup area of the described second word backed item data as effective backup area, the backup area of the described first word backed item data of storage as invalid backup area, is upgraded described backup area mark.
Further, the data processing equipment of described smart card also comprises:
Page or leaf backup acquiring unit is used for when the effective word backup area has write the word backed item data in all modifications district, obtains the data of revising storage in the page or leaf, as the described raw data of revising page or leaf; And according to obtaining page backed item data from the described data of obtaining the page or leaf of revising, described page or leaf backed item data comprise the described data check of revising page or leaf and;
The page or leaf backup units is used for the page or leaf backed item data that described page or leaf backup acquiring unit obtains are write described page or leaf backed item backup area, and described page or leaf backup acquiring unit is write described exchange page or leaf from the described data of obtaining the page or leaf of revising;
Data updating unit, be used for after the data of wiping described modification page or leaf, revise the raw data of page or leaf and revise the more new data in district according to described, obtain the described corresponding more new data of page or leaf of revising, and after the corresponding more new data of described modification page or leaf writes described modification page or leaf, the unified data that exchange in page or leaf and the page or leaf backed item backup area of wiping.
Data recovery unit is used for when power interruption recovering, according to exchange page or leaf and page or leaf backup area data, recovers the described raw data of revising in the page or leaf.
Further, described data recovery unit can specifically comprise:
First verification and obtain subelement is used for when power interruption recovering, obtain store in the data of storage in the described exchange page or leaf and the described page or leaf backed item backup area described revise page or leaf data check and, with described data check and as first data check and;
Second verification and obtain subelement is used for the data obtained according to from described exchange page or leaf, obtain described second data check of revising page or leaf and;
The effective judgment sub-unit of page or leaf backup, be used for according to described first verification and obtain first data check that subelement obtains and and described second verification and obtain second data check that subelement obtains and, determine whether described exchange page and described page of backed item backup area effective;
Revise page or leaf and recover a subelement, be used at described exchange page or leaf and described page or leaf backed item backup area all effectively the time, recover the data in the described modification page.
Further, described page or leaf backed item data also comprise the described data length of revising page or leaf, the address of described modification page or leaf, the exclusive or check of described modification page or leaf and and the significant notation of described page or leaf backed item.Described page or leaf backup units can specifically comprise:
Revise page or leaf and write subelement, be used for and will revise data that page or leaf obtains and write described exchange page from described;
The page or leaf backup writes subelement, be used for to the unified data length that writes described modification page or leaf successively of described page or leaf backed item backup area, described address of revising page or leaf, the exclusive or check of described modification page or leaf and, the described data check of revising page or leaf and and the significant notation of described page or leaf backed item.
The data processing equipment of the smart card that the embodiment of the invention provides, after determining effective word backup area and invalid character backup areas according to the backup area mark, obtain new word backed item data according to word backed item data of from the effective word backup area, obtaining and the data from revise the district, obtained, and, the word backed item data that this is new write in the invalid character backup areas that data have been wiped free of, upgrade the backup area mark simultaneously.Therefore, if in word backed item data write the process of backup area, cut off the power supply, then can directly obtain the word backed item data that backed up from effective backup area, and the backed item data that do not need to revise the district from first begin to back up again, and adopt this alternately back mechanism can also reduce erasable number of times to backup area, and then when guaranteeing data security, improved the performance of smart card.
And,, make page backed item backup area integrated with the validity of the data of exchange page or leaf by increasing to revising the page data verification.When improving security, reduce one time erase operation.
In addition, by in word backed item data or page or leaf backed item data writing process, significant notation is placed at last writes, thereby in the backup accuracy that guarantees word backed item data or page or leaf backed item data, also reduced erasable number of times.
One of ordinary skill in the art will appreciate that all or part of flow process that realizes in the foregoing description method, be to instruct relevant hardware to finish by computer program, described program can be stored in the computer read/write memory medium, this program can comprise the flow process as the embodiment of above-mentioned each side method when carrying out.Wherein, described storage medium can be magnetic disc, CD, read-only storage memory body (Read-Only Memory, ROM) or at random store memory body (Random Access Memory, RAM) etc.
The above; only be the specific embodiment of the present invention, but protection scope of the present invention is not limited thereto, anyly is familiar with those skilled in the art in the technical scope that the present invention discloses; can expect easily changing or replacing, all should be encompassed within protection scope of the present invention.Therefore, protection scope of the present invention should be as the criterion with the protection domain of claim.

Claims (10)

1. the data processing method of a smart card is characterized in that, comprising:
According to the backup area mark, determine effective word backup area and invalid character backup areas;
Obtain the word backed item data of storing in the described effective word backup area, as the first word backed item data;
According to described first word backed item data and the data from revise the district, obtained, obtain the second word backed item data;
In described invalid character backup areas, write the described second word backed item data;
Wipe the data in the described effective word backup area;
Upgrade described backup area mark.
2. the data processing method of smart card according to claim 1, it is characterized in that, described word backed item data comprise the data length of revising the district, the data in described modification district, the address in described modification district, the data check in described modification district and and the significant notation of the word backed item in described modification district;
Describedly in described invalid character backup areas, write the described second word backed item data and comprise:
The unified data length of revising the district that writes successively in described invalid character backup areas, the data in described modification district, the address in described modification district, the data check in described modification district and and the significant notation of the word backed item in described modification district.
3. the data processing method of smart card according to claim 1 and 2 is characterized in that, also comprises:
When in the effective word backup area, having write the word backed item data in all modifications district,
Obtain the data of revising storage in the page or leaf, as the described raw data of revising page or leaf;
Obtain page backed item data according to the described raw data of revising page or leaf, described page or leaf backed item data comprise the described data check of revising page or leaf and;
Described page or leaf backed item data are write described page or leaf backed item backup area, the described raw data of revising page or leaf is write described exchange page or leaf;
Wipe the described data of revising in the page or leaf;
According to the raw data of described exchange page or leaf and the more new data in modification district, obtain the described corresponding more new data of page or leaf of revising;
The described corresponding more new data of page or leaf of revising is write described modification page or leaf;
Unified data of wiping in exchange page or leaf and the page or leaf backed item backup area.
4. the data processing method of smart card according to claim 3 is characterized in that, also comprises:
When power interruption recovering, obtain store in the data of storage in the described exchange page or leaf and the described page or leaf backed item backup area described revise page or leaf data check and, with described data check and as first data check and;
According to the data of from described exchange page or leaf, obtaining, obtain described second data check of revising page or leaf and;
According to described first data check and and described second data check and, determine described exchange page or leaf and described page or leaf backed item backup area all effectively the time, recover the data in the described modification page.
5. the data processing method of smart card according to claim 3, it is characterized in that, described page or leaf backed item data also comprise the described data length of revising page or leaf, the address of described modification page or leaf, the exclusive or check of described modification page or leaf and and the significant notation of described page or leaf backed item;
Describedly described page or leaf backed item data write described page or leaf backed item backup area comprise:
Unifiedly in described page or leaf backed item backup area write the described data length of revising page or leaf successively, the address of described modification page or leaf, the exclusive or check of described modification page or leaf and, the described data check of revising page or leaf and and the significant notation of described page or leaf backed item.
6. the data processing equipment of a smart card is characterized in that, comprising:
The enabledisable determining unit is used for determining effective word backup area and invalid character backup areas according to the backup area mark;
Word backup acquiring unit is used for obtaining the word backed item data that effective word backup area that described enabledisable determining unit determines is stored, with the word backed item data obtained as the first word backed item data; And, obtain the second word backed item data according to described first word backed item data and the data from revise the district, obtained;
The word backup units is used for writing the second word backed item data that described word backup acquiring unit obtains to described invalid character backup areas; Wipe the data in the described effective word backup area, upgrade described backup area mark.
7. the data processing equipment of smart card according to claim 6 is characterized in that, described word backup units comprises:
The word backup writes subelement, be used for the unified data length of revising the district that writes successively of invalid character backup areas after being wiped the subelement obliterated data by described invalid data, the data in described modification district, the address in described modification district, the data check in described modification district and and the significant notation of the word backed item in described modification district;
Invalid data is wiped subelement, is used for wiping the data of the backup area of storing the described first word backed item data;
The flag update subelement, be used for will write the backup area of the described second word backed item data as effective backup area, the backup area of the described first word backed item data of storage as invalid backup area, is upgraded described backup area mark.
8. according to the data processing equipment of claim 6 or 7 described smart cards, it is characterized in that, also comprise:
Page or leaf backup acquiring unit is used for when the effective word backup area has write the word backed item data in all modifications district, obtains the data of revising storage in the page or leaf, as the described raw data of revising page or leaf; And according to obtaining page backed item data from the described data of obtaining the page or leaf of revising, described page or leaf backed item data comprise the described data check of revising page or leaf and;
The page or leaf backup units is used for the page or leaf backed item data that described page or leaf backup acquiring unit obtains are write described page or leaf backed item backup area, and described page or leaf backup acquiring unit is write described exchange page or leaf from the described data of obtaining the page or leaf of revising;
Data updating unit, be used for after the data of wiping described modification page or leaf, according to the raw data of described exchange page or leaf and the more new data in modification district, obtain the described corresponding more new data of page or leaf of revising, and after the corresponding more new data of described modification page or leaf writes described modification page or leaf, the unified data that exchange in page or leaf and the page or leaf backed item backup area of wiping;
Data recovery unit is used for when power interruption recovering, according to exchange page or leaf and page or leaf backup area data, recovers the described raw data of revising in the page or leaf.
9. the data processing equipment of smart card according to claim 8 is characterized in that, described data recovery unit comprises:
First verification and obtain subelement is used for when power interruption recovering, obtain store in the data of storage in the described exchange page or leaf and the described page or leaf backed item backup area described revise page or leaf data check and, with described data check and as first data check and;
Second verification and obtain subelement is used for the data obtained according to from described exchange page or leaf, obtain described second data check of revising page or leaf and;
The effective judgment sub-unit of page or leaf backup, be used for according to described first verification and obtain first data check that subelement obtains and and described second verification and obtain second data check that subelement obtains and, determine whether described exchange page and described page of backed item backup area effective;
Revise page or leaf and recover a subelement, be used at described exchange page or leaf and described page or leaf backed item backup area all effectively the time, recover the data in the described modification page.
10. the data processing equipment of smart card according to claim 8 is characterized in that, described page or leaf backup units comprises:
Revise page or leaf and write subelement, be used for and write described exchange page or leaf from the described page data of obtaining of revising;
The page or leaf backup writes subelement, be used for to the unified data length that writes described modification page or leaf successively of described page or leaf backed item backup area, described address of revising page or leaf, the exclusive or check of described modification page or leaf and, the described data check of revising page or leaf and and the significant notation of described page or leaf backed item.
CN200910236967.9A 2009-10-29 2009-10-29 Data processing method and device of smart cards Expired - Fee Related CN101699476B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN200910236967.9A CN101699476B (en) 2009-10-29 2009-10-29 Data processing method and device of smart cards

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN200910236967.9A CN101699476B (en) 2009-10-29 2009-10-29 Data processing method and device of smart cards

Publications (2)

Publication Number Publication Date
CN101699476A true CN101699476A (en) 2010-04-28
CN101699476B CN101699476B (en) 2013-06-05

Family

ID=42147934

Family Applications (1)

Application Number Title Priority Date Filing Date
CN200910236967.9A Expired - Fee Related CN101699476B (en) 2009-10-29 2009-10-29 Data processing method and device of smart cards

Country Status (1)

Country Link
CN (1) CN101699476B (en)

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102075935A (en) * 2010-12-23 2011-05-25 北京握奇数据系统有限公司 Method and device for processing authentication related data
CN102567141A (en) * 2011-12-13 2012-07-11 北京握奇数据系统有限公司 Data item backup method and smart card
CN102789404A (en) * 2011-05-20 2012-11-21 北京同方微电子有限公司 Method for storing anti-dropping data during updating of integrated circuit (IC) card data
CN103559141A (en) * 2013-11-01 2014-02-05 北京昆腾微电子有限公司 Management method and device for nonvolatile memory (NVM)
CN104461770A (en) * 2014-10-31 2015-03-25 上海动联信息技术股份有限公司 Power-off protection method of Flash chip
CN106651359A (en) * 2016-11-09 2017-05-10 大唐微电子技术有限公司 Data processing method and apparatus
CN106709386A (en) * 2016-12-30 2017-05-24 金邦达有限公司 Smart card data writing method and device
CN109685190A (en) * 2018-12-28 2019-04-26 江苏恒宝智能系统技术有限公司 A kind of IC card power-off protection method and device
CN111105563A (en) * 2019-12-17 2020-05-05 厦门计讯物联科技有限公司 Water card data writing method, device, equipment and storage medium for preventing data loss

Cited By (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102075935A (en) * 2010-12-23 2011-05-25 北京握奇数据系统有限公司 Method and device for processing authentication related data
CN102075935B (en) * 2010-12-23 2013-07-31 北京握奇数据系统有限公司 Method and device for processing authentication related data
CN102789404A (en) * 2011-05-20 2012-11-21 北京同方微电子有限公司 Method for storing anti-dropping data during updating of integrated circuit (IC) card data
CN102567141A (en) * 2011-12-13 2012-07-11 北京握奇数据系统有限公司 Data item backup method and smart card
CN102567141B (en) * 2011-12-13 2014-03-05 北京握奇数据系统有限公司 Data item backup method and smart card
CN103559141A (en) * 2013-11-01 2014-02-05 北京昆腾微电子有限公司 Management method and device for nonvolatile memory (NVM)
CN104461770A (en) * 2014-10-31 2015-03-25 上海动联信息技术股份有限公司 Power-off protection method of Flash chip
CN104461770B (en) * 2014-10-31 2017-12-15 上海动联信息技术股份有限公司 A kind of power-off protection method of Flash chip
CN106651359A (en) * 2016-11-09 2017-05-10 大唐微电子技术有限公司 Data processing method and apparatus
CN106709386A (en) * 2016-12-30 2017-05-24 金邦达有限公司 Smart card data writing method and device
CN109685190A (en) * 2018-12-28 2019-04-26 江苏恒宝智能系统技术有限公司 A kind of IC card power-off protection method and device
CN109685190B (en) * 2018-12-28 2022-04-12 江苏恒宝智能系统技术有限公司 Power-down protection method and device for IC card
CN111105563A (en) * 2019-12-17 2020-05-05 厦门计讯物联科技有限公司 Water card data writing method, device, equipment and storage medium for preventing data loss
CN111105563B (en) * 2019-12-17 2021-08-24 厦门计讯物联科技有限公司 Water card data writing method, device, equipment and storage medium for preventing data loss

Also Published As

Publication number Publication date
CN101699476B (en) 2013-06-05

Similar Documents

Publication Publication Date Title
CN101699476B (en) Data processing method and device of smart cards
CN103914393B (en) MCU-based (microprogrammed control unit-based) non-loss FLASH storage update method
EP2003569B1 (en) Flash memory controller
CN106095620B (en) A kind of development approach of built-in Linux partition holding
CN102135942B (en) Method for realizing wear-leveling in storage equipment as well as the storage equipment
US7725646B2 (en) Method of using a flash memory for a circular buffer
CN110908925B (en) High-efficiency garbage collection method, data storage device and controller thereof
CN109582216B (en) Data storage device and data processing method of memory device
CN107943414A (en) The file partition of built-in Linux and data read-write method
CN103914407B (en) A kind of SD card power down protection, restoration methods and the SD card with power down protection
CN101615427A (en) The controller of the storage management method of nonvolatile memory and use the method
CN101321341A (en) Smart card power-off protection method
CN103996412A (en) Power-fail protection method applied to intelligent-card nonvolatile memories
US9384125B2 (en) Method for accessing flash memory having pages used for data backup and associated memory device
CN110673789B (en) Metadata storage management method, device, equipment and storage medium of solid state disk
CN103617101A (en) Power fail safeguard method and device
CN102831072A (en) Flash memory device, and management method, data read-write method and data read-write device thereof
CN105843558A (en) Method and system for processing chronological files
CN107291374A (en) Method and device for recording use time of data block
CN102063380A (en) Method and device for writing data in non-volatile memory
CN101561950B (en) Method and device for processing data of intelligent card
CN101567220A (en) Bad block identifying method, storage system and controller thereof for flash memory
CN109669889B (en) Light Nor Flash control method and device
CN101482837A (en) Error correction method and apparatus for flash memory file system
CN104978154A (en) Cache operation-based flash rapid read-write method and 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
C14 Grant of patent or utility model
GR01 Patent grant
CB03 Change of inventor or designer information

Inventor after: Diao Chunqiang

Inventor after: Cui Yi

Inventor after: Guo Tianguang

Inventor before: Diao Chunqiang

Inventor before: Cui Yi

COR Change of bibliographic data
CB03 Change of inventor or designer information
CB03 Change of inventor or designer information

Inventor after: Diao Chunqiang

Inventor after: Cui Yi

Inventor after: Guo Tianguang

Inventor after: Wang Youjun

Inventor before: Diao Chunqiang

Inventor before: Cui Yi

Inventor before: Guo Tianguang

CP01 Change in the name or title of a patent holder
CP01 Change in the name or title of a patent holder

Address after: 100015 Beijing East Chaoyang District, West Gate eight West room eight Wan Hong West Street, Yan Dong business garden.

Patentee after: BEIJING WATCHDATA Co.,Ltd.

Address before: 100015 Beijing East Chaoyang District, West Gate eight West room eight Wan Hong West Street, Yan Dong business garden.

Patentee before: BEIJING WATCH DATA SYSTEM Co.,Ltd.

CF01 Termination of patent right due to non-payment of annual fee
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20130605

Termination date: 20211029