CN102799931A - Data protection method of radio frequency smart card - Google Patents

Data protection method of radio frequency smart card Download PDF

Info

Publication number
CN102799931A
CN102799931A CN2011103919245A CN201110391924A CN102799931A CN 102799931 A CN102799931 A CN 102799931A CN 2011103919245 A CN2011103919245 A CN 2011103919245A CN 201110391924 A CN201110391924 A CN 201110391924A CN 102799931 A CN102799931 A CN 102799931A
Authority
CN
China
Prior art keywords
data
sign
radio frequency
smart card
frequency smart
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
CN2011103919245A
Other languages
Chinese (zh)
Other versions
CN102799931B (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.)
Shenzhen Bureau of Polytron Technologies Inc
Original Assignee
SHENZHEN ZHONGKE XUNLIAN TECHNOLOGY 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 SHENZHEN ZHONGKE XUNLIAN TECHNOLOGY Co Ltd filed Critical SHENZHEN ZHONGKE XUNLIAN TECHNOLOGY Co Ltd
Priority to CN201110391924.5A priority Critical patent/CN102799931B/en
Publication of CN102799931A publication Critical patent/CN102799931A/en
Application granted granted Critical
Publication of CN102799931B publication Critical patent/CN102799931B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The invention discloses a data protection method of a radio frequency smart card, and the method comprises the following steps of: receiving a write instruction through a radio frequency module so as to obtain application identification codes; backing up the raw data corresponding to the application identification codes in a data storage area to a date backup area, and setting and writing a start identification into an identification storage area; writing new data into the data storage area; setting a finish identification when the wireless transaction is finished, and then writing the finish identification into the identification storage area; when the radio frequency smart card is reset or electrified again, checking the identification storage area firstly so as to judge whether data exception occurs; if the judgment result is 'no', enabling the radio frequency smart card to enter the normal working state; and if the judgment result is 'yes', writing the data in the data backup area into the data storage area again. According to the data protection method of the radio frequency smart card, the data can be recovered when the write operation is interrupted accidentally during the wireless card wiping process, so that the card wiping speed can not be influenced, and the use safety and reliability of the radio frequency smart card are improved.

Description

The method of radio frequency smart card protected data
Technical field
The present invention relates to smart card, relate in particular to a kind of method of radio frequency smart card protected data.
Background technology
RF identification (RFSIM; Radio Frequency Subscriber Identity Model) card is the mobile phone intelligent card of wireless near field communication in can realizing; It is an all-around service platform that can replace wallet, key and I.D.; Can realize the many application of a card, comprise that stored value card, simulation IC-card are used and Simulation with I D card is used.And the data in the above-mentioned application all are stored in the nonvolatile memory of MCU (Micro Controller Unit) in the radio frequency smart card, when application data need change, need nonvolatile memory is wiped operation and write operation, promptly wipe earlier the mode of afterwards writing.Usually wipe operation and do not support byte manipulation, adopt the mode of pressing page operations mostly, one page is 512 bytes or 1024 bytes etc.A disposable so erasable page data, the time is longer, fortuitous events such as outage in the process of wiping, write operation, might occur, can cause data exception, causes using entanglement occurring, and consequence is very serious.And to recover these data, difficulty is bigger.
The traditional data guard method is before each write operation, all to put sign earlier, backs up former data then, carries out write operation afterwards, identifies clearly after having write again.And the speed of swiping the card is to be one of important indicator of weighing the application of IC cards quality charge time always.And above-mentioned classic method will experience repeatedly erasable step, can increase many charge times on the one hand, and unusual if there is single stepping to occur in the whole flow process on the other hand, swiping the card specifically writes off, even can cause the application data generation entanglement of radio frequency smart card.
To sum up; Be necessary to provide a kind of method of radio frequency smart card protected data; Both can save the charge time of radio frequency smart card, and can solve the problem that radio-frequency intelligent is stuck in the data exception that causes because of abnormal conditions (like outage, wireless interruption etc.) in the wireless process of swiping the card again.
Summary of the invention
The present invention is for avoiding the inconvenience of above-mentioned prior art, and the method for a kind of radio frequency smart card protected data that proposes.
The method of the radio frequency smart card protected data among the present invention, the storer in said radio frequency smart card are divided into data storage area, data backup district and sign memory block.The method of said radio frequency smart card protected data comprises: the said radio frequency smart card of A. receives write command through radio-frequency module, obtains application identification code wherein; B. application identification code described in the said data storage area is corresponding former data backup to said data backup district, and for said former data setting begins sign, the said sign that begins are write said sign memory block; C. new data is written to said data storage area, finishes sign for new data is provided with after accomplishing, and said end sign is write said sign memory block; D. after said radio frequency smart card occurred resetting or re-powers, the said sign of inspection memory block earlier judged whether to occur the situation of data exception; E. if judged result is " denying ", then said radio frequency smart card enters into normal operating conditions; F. if judged result is " being ", then the data with said data backup district are then written to said data storage area.
Preferably, in said step B, will begin also to comprise step: judge whether the space is full in said sign memory block,, then empty said sign memory block before sign writes said sign backup area if the space has been full.
Preferably, the content of said sign memory block comprises at least: application identification code, begin sign and finish sign.
Preferably, judge whether that in step D the method that data exception occurs is: what same application identification code was corresponding in the inspection sign memory block begins sign and finishes sign, judges whether the two is corresponding one by one; Wherein, if corresponding one by one, data exception does not appear then; If can't be corresponding one by one, data exception then appears.
Preferably, in step F, also comprise: in said sign memory block, search the application identification code that data exception occurs, and the data that said application identification code is corresponding are written to the data storage area from said data backup district.
Preferably, said storer is a nonvolatile memory.
Preferably, before steps A, also comprise: receive the wireless transactions instruction; Judge whether the wireless transactions instruction that receives is article one write command; Wherein, if then get into step B and back up; If not, then carry out said wireless transactions instruction.
Preferably, in step C, after accomplishing write operation, said sign is set before, comprise the steps: also to judge whether the instruction of receiving is END instruction; Wherein, if END instruction then is provided with and finishes sign; If not END instruction is then returned steps A and is continued to receive said wireless transactions instruction.
Preferably, said data are application datas.
Radio frequency smart card data guard method in the present invention can not influence the speed of swiping the card again under the fortuitous events such as outage or wireless interruption data being recovered suddenly, has improved security and reliability during radio frequency smart card uses.
Description of drawings
Fig. 1 is the structural representation of the radio frequency smart card of one embodiment of the invention.
Fig. 2 is the process flow diagram of the radio frequency smart card of one embodiment of the invention data backup process when swiping the card.
Fig. 3 is the radio frequency smart card of the one embodiment of the invention process flow diagram flow chart that data are recovered when swiping the card.
Embodiment
In order to make the object of the invention, technical scheme and advantage clearer,, the present invention is further elaborated below in conjunction with accompanying drawing and specific embodiment.Should be appreciated that specific embodiment described herein only in order to explanation the present invention, and be not used in qualification the present invention.
Below in conjunction with accompanying drawing specific embodiment of the present invention is done detailed elaboration.
Fig. 1 is the radio frequency smart card synoptic diagram of one embodiment of the invention.Radio frequency smart card 100 comprises that component package such as radio-frequency module 10 and microcontroller (MCU, micro controller unit) 20 are in the card body.
Radio-frequency module 10 is used for carrying out radio communication with peripherals, for example, and radio-frequency card reader.Microcontroller 20 is chips of elements such as integrated central processing unit (CPU, center process unit) 21, storer 22.In this embodiment, storer 22 is preferably nonvolatile memory, and flash memory (flash memory) for example can be erasable repeatedly, and dirigibility is strong.
In this embodiment, storer 22 is 224 except comprising conventional data storage area 221 and program storage area, also comprises data backup district 222 and identifies memory block 223.Wherein, data backup district 221 is to open up two independently spaces in the storer 22 with sign memory block 223, is used for data memory area 221 and carries out data protection.In this embodiment, data comprise application data, and for example PBOC uses, simulates IC-card application, the application of Simulation with I D card etc.
Radio frequency smart card 100 as shown in Figure 1, the method for its protected data are divided into two parts: first part is the data backup part, and is as shown in Figure 2; Second part is the data recovered part, and be as shown in Figure 3.
Fig. 2 is the radio frequency smart card of one embodiment of the present of invention data backup process when swiping the card, and may further comprise the steps:
A. radio frequency smart card receives the wireless transactions instruction through radio-frequency module in the card, and obtains application identification code wherein.
Usually; In the radio frequency smart card each used and all is assigned with a unique application identification code (AID; Application Identification) and one page data storage area, radio-frequency card reader at first need send application identification code when swiping the card, and could confirm it is concrete what application after radio frequency smart card receives orders; In the process of swiping the card afterwards, just can find corresponding data storage area to handle relevant data according to application identification code.Like application identification code is " 01 ", expression simulation IC-card application 1, and application identification code is " 02 ", expression simulation IC-card application 2, application identification code is " 11 " expression Simulation with I D card application 1.
B. judge whether the wireless transactions instruction that receives is article one write command that receives; Wherein, if article one write command then gets into step C and backs up; If not article one write command then gets into step F and carries out described wireless transactions instruction.
C. application identification code described in the said data storage area is corresponding former data backup to said data backup district.
D. judge whether the space is full in said sign memory block,, then empty said sign memory block if the space is full.In this said mode, the content of sign memory block comprises application identification code at least, begins sign and finishes sign.
E. for said former data setting begin the sign, and will begin the sign with application identification code together write said sign memory block.
Before carrying out data protection, write and begin sign and application identification code,, accomplish to write after the data protection and finish sign " 01 " like " 0102 ".Each normal data protection (abnormal conditions do not take place) needs to write three bytes at the sign storage area, and like " 010201 ", it is just to have write to begin sign and application identification code that unusual situation takes place, and does not write and finishes sign, and corresponding data are " 0102FF ".Need not earlier wipe sign when writing sign during data protection next time, but then writing, and like " 011101 ", the data of sign storage area just become " 010201011101 ", after writing a full page data, wipe whole page data again.In this embodiment, sign is generally 1 byte with application identification code, saves the space, needn't before writing, wipe operation at every turn.
F. carry out the wireless transactions instruction that receives.In this embodiment, if the wireless transactions of receiving instruction comprises authentication instruction, read operation instruction, write operation instruction etc.Wherein,, then new data is written to said data storage area, that is, carries out write operation to the data storage area if judge it is article one write command among the step B; If non-article one write command of judging among the step B, the corresponding operating that then carries out other wireless transactions instruction for example carries out authentication.
G. judge whether the instruction of receiving is END instruction.In this embodiment, if END instruction then is provided with and finishes sign; If not END instruction is then returned steps A and is continued to receive said wireless transactions instruction.Whether in this embodiment, having increased is the judgement of beginning write operation and END instruction, and protecting data is more targeted, and can not influence the speed of swiping the card.
H, will finish the sign write the sign memory block.In this embodiment.Write to the sign memory block when way that adopts is beginning and begin sign; Write during end and finish sign; After the space of sign memory block is full, unify again to empty then; Saved the time of twice wiping card operation in traditional way of swiping the card, improved the speed of traditional mode of swiping the card, for the user provides the better experience of swiping the card.
Behind G, the completing steps H, current Transaction Success is described, has been accomplished all flow processs, finish to withdraw from.
The process flow diagram flow chart that data were recovered when Fig. 3 swiped the card for the radio frequency smart card of one embodiment of the present of invention.Before each radio frequency smart card is carried out application data, all to check, judge whether that there is unusual situation in the radio frequency smart card application data, does corresponding processing then.Concrete step is following:
After A, radio-frequency intelligent were stuck in and occur resetting or re-power, the situation that whether occurs data exception in the radio frequency smart card was judged in inspection sign memory block, wherein, as if data exception not occurring, then withdraws from the program of this recovery; If data exception occurs, then get into step B.
In this embodiment, determination methods is: what same application identification code was corresponding in the inspection sign memory block begins sign and finishes sign, judges whether corresponding one by one the two is; If it is corresponding one by one; Data exception does not then appear, if not corresponding one by one, data exception then appears.
Be to begin sign, application identification code, end to be designated example successively with the storage format of logo area below.That is, identifying each three bytes in memory block reading of data successively, relatively whether first byte and the 3rd byte equal " 01 ", and the words that equal are then represented corresponding one by one, if first byte is " 01 ", the 3rd byte is " FF ".Then expression has abnormal conditions to take place, if first byte is " FF ", explains that this byte does not also write, and withdraws from comparison.
B, obtain the application identification code that data exception takes place at the sign storage area.For example, occur in three data that read in the steps A first byte for " 01 " with the 3rd byte during for " FF ", second byte is exactly the application identification code of generation data exception.
C, according to application identification code, the data in data backup district are written in the zone of this application data store.
D, will finish the sign, for example " 01 ", write the sign corresponding position, memory block, withdraw from after the completion.
After accomplishing above-mentioned steps, promptly accomplished and recovered unusual data to occur because of fortuitous events such as electric power or wireless interruptions.Simultaneously, the radio frequency smart card data guard method among the present invention can not influence the speed of swiping the card, and has improved security and reliability during radio frequency smart card uses, can bring the better experience of swiping the card for the user.
Above-described embodiment of the present invention does not constitute the qualification to protection domain of the present invention.Any modification of within spirit of the present invention and principle, being done, be equal to replacement and improvement etc., all should be included within the claim protection domain of the present invention.

Claims (9)

1. the method for a radio frequency smart card protected data is characterized in that: the storer in the said radio frequency smart card is divided into data storage area, data backup district and sign memory block; The method of said radio frequency smart card protected data comprises:
A. said radio frequency smart card receives write command through radio-frequency module, obtains application identification code wherein;
B. application identification code described in the said data storage area is corresponding former data backup to said data backup district, and for said former data setting begins sign, the said sign that begins are write said sign memory block;
C. new data is written to said data storage area, finishes sign for new data is provided with after accomplishing, and said end sign is write said sign memory block;
D. after said radio frequency smart card occurs resetting or re-powers, check said sign memory block, judge whether to occur the situation of data exception;
E. if judged result is " denying ", then said radio frequency smart card enters into normal operating conditions; Or
F. if judged result is " being ", then the data with said data backup district are then written to said data storage area.
2. the method for radio frequency smart card protected data as claimed in claim 1; It is characterized in that: in said step B, will begin the sign write said sign backup area before, also comprise step: judge whether the space is full in said sign memory block; If the space is full, then empty said sign memory block.
3. the method for radio frequency smart card protected data as claimed in claim 2 is characterized in that: the content of said sign memory block comprises at least: application identification code, begin sign and end sign.
4. the method for radio frequency smart card protected data as claimed in claim 3 is characterized in that: judge whether that in step D the method that data exception occurs is:
What same application identification code was corresponding in the inspection sign memory block begins sign and finishes sign, judges whether the two is corresponding one by one; Wherein,
If corresponding one by one, data exception does not then appear; Or
If can't be corresponding one by one, data exception then appears.
5. the method for radio frequency smart card protected data as claimed in claim 4; It is characterized in that: in step F; Also comprise: in said sign memory block, search the application identification code that data exception occurs, and the data that said application identification code is corresponding are written to the data storage area from said data backup district.
6. the method for radio frequency smart card protected data as claimed in claim 1 is characterized in that: said storer is a nonvolatile memory.
7. the method for radio frequency smart card protected data as claimed in claim 1 is characterized in that: before steps A, also comprise:
Judge whether the wireless instructions that receives is article one write command; Wherein,
If then get into step B and back up; Or
If not, then carry out said wireless transactions instruction.
8. the method for radio frequency smart card protected data as claimed in claim 7 is characterized in that: in step C, after accomplishing write operation, said sign is set before, also comprise the steps:
Judge whether the instruction of receiving is END instruction; Wherein:
If END instruction then is provided with and finishes sign; Or
If not END instruction is then returned steps A and is continued to receive said wireless transactions instruction.
9. the method for radio frequency smart card protected data as claimed in claim 1 is characterized in that: said data are application datas.
CN201110391924.5A 2011-11-29 2011-11-29 Data protection method of radio frequency smart card Active CN102799931B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201110391924.5A CN102799931B (en) 2011-11-29 2011-11-29 Data protection method of radio frequency smart card

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201110391924.5A CN102799931B (en) 2011-11-29 2011-11-29 Data protection method of radio frequency smart card

Publications (2)

Publication Number Publication Date
CN102799931A true CN102799931A (en) 2012-11-28
CN102799931B CN102799931B (en) 2015-03-04

Family

ID=47199030

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201110391924.5A Active CN102799931B (en) 2011-11-29 2011-11-29 Data protection method of radio frequency smart card

Country Status (1)

Country Link
CN (1) CN102799931B (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103345647A (en) * 2013-05-09 2013-10-09 马钢控制技术有限责任公司 Back-up and access method of data at RFID electronic tag
CN103744746A (en) * 2013-12-30 2014-04-23 北京工业大学 Index-based smart card record backup and recovery method
CN104699569A (en) * 2015-03-24 2015-06-10 积成电子股份有限公司 MQX operating system mapping structure, MQX operating system, electric energy data acquire terminal and mapping updating method
CN104732156A (en) * 2015-03-18 2015-06-24 北京控制工程研究所 Method for protecting important data of spacecraft space rendezvous and docking software
CN106776134A (en) * 2016-12-09 2017-05-31 珠海天威技术开发有限公司 A kind of method and device for rewriting chip data
CN109254878A (en) * 2018-09-27 2019-01-22 北京中电华大电子设计有限责任公司 A kind of intelligent card power failure backup method write based on word and data structure
CN112185031A (en) * 2020-09-18 2021-01-05 广州市贺氏办公设备有限公司 Method, system, device and medium for processing abnormal data of consumer machine

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101187948A (en) * 2007-12-20 2008-05-28 中国科学院计算技术研究所 A continuous data protection system and its realization method
CN101226604A (en) * 2007-01-19 2008-07-23 东信和平智能卡股份有限公司 Smart card and data write-in method
CN101321341A (en) * 2008-07-11 2008-12-10 东信和平智能卡股份有限公司 Smart card power-off protection method

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101226604A (en) * 2007-01-19 2008-07-23 东信和平智能卡股份有限公司 Smart card and data write-in method
CN101187948A (en) * 2007-12-20 2008-05-28 中国科学院计算技术研究所 A continuous data protection system and its realization method
CN101321341A (en) * 2008-07-11 2008-12-10 东信和平智能卡股份有限公司 Smart card power-off protection method

Cited By (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103345647A (en) * 2013-05-09 2013-10-09 马钢控制技术有限责任公司 Back-up and access method of data at RFID electronic tag
CN103345647B (en) * 2013-05-09 2017-08-22 马钢控制技术有限责任公司 A kind of backup access method of data in RFID
CN103744746A (en) * 2013-12-30 2014-04-23 北京工业大学 Index-based smart card record backup and recovery method
CN103744746B (en) * 2013-12-30 2016-08-03 北京工业大学 A kind of intelligent card records backup based on index and restoration methods
CN104732156A (en) * 2015-03-18 2015-06-24 北京控制工程研究所 Method for protecting important data of spacecraft space rendezvous and docking software
CN104732156B (en) * 2015-03-18 2018-02-09 北京控制工程研究所 A kind of method that spacecraft space spacecrafts rendezvous software reusage data are protected
CN104699569A (en) * 2015-03-24 2015-06-10 积成电子股份有限公司 MQX operating system mapping structure, MQX operating system, electric energy data acquire terminal and mapping updating method
CN104699569B (en) * 2015-03-24 2017-12-08 积成电子股份有限公司 A kind of MQX operation system images structure, MQX operating systems, power information acquisition terminal and image update method
CN106776134A (en) * 2016-12-09 2017-05-31 珠海天威技术开发有限公司 A kind of method and device for rewriting chip data
CN109254878A (en) * 2018-09-27 2019-01-22 北京中电华大电子设计有限责任公司 A kind of intelligent card power failure backup method write based on word and data structure
CN109254878B (en) * 2018-09-27 2021-09-17 北京中电华大电子设计有限责任公司 Smart card power-down backup method and data structure based on character writing
CN112185031A (en) * 2020-09-18 2021-01-05 广州市贺氏办公设备有限公司 Method, system, device and medium for processing abnormal data of consumer machine

Also Published As

Publication number Publication date
CN102799931B (en) 2015-03-04

Similar Documents

Publication Publication Date Title
CN102799931B (en) Data protection method of radio frequency smart card
CN100390754C (en) Information processing equipment and information processing method and computer program
CN103310537B (en) A kind of many application identifications access method, smart card and POS
CN100555315C (en) Semiconductor memory card
CN102790632A (en) Mobile equipment having near field communication protection function and protection method for mobile equipment
WO2011127687A1 (en) Non-contact card terminal and abnormal state processing method thereof
CN103794000A (en) Method for processing in case of non-contact IC card data reading failure and device for implementing method
CN103021081A (en) Method for realizing communication and interaction between non-contact integrated circuit (IC) cards and card reading terminal on basis of multi-card fusion application
CN100535935C (en) CPUCPU and logic encryption double-purpose smart card and its data synchronization method
KR101783526B1 (en) Ic card, electronic device and portable electronic device
CN105590367B (en) Processing method for transaction abnormity of IC card and acceptance terminal for realizing processing method
CN103744746B (en) A kind of intelligent card records backup based on index and restoration methods
CN105957275A (en) POS system power failure protection system and on-site recovery method
CN102521746B (en) Safely-consuming smart card and method thereof
CN102184317A (en) Resident medical data mobile storage device and implementation method thereof
CN101971185A (en) Method of securing execution of a program
CN107957921B (en) Wear-balanced intelligent card power-down data protection method
EP2367108A2 (en) Portable electronic device, communication device, and command processing method
CN104992212A (en) Intelligent card system for travel
CN106650839B (en) Smart card production data state control method
CN105162782A (en) User biological characteristic storage method, device and terminal
CN102147846A (en) Method for writing data in intelligent card and intelligent card
CN105183673A (en) Method and apparatus for supporting hot swap of external storage device under recovery mode
CN102708485B (en) Things protection method of mobile phone payment card transactions and mobile phone payment card
CN104951823A (en) Composite card management 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
CP03 Change of name, title or address

Address after: 518055 1407 floor, 14 floor, Fuguang business building, 1 Nanshan District Road, Taoyuan, Shenzhen, Guangdong

Patentee after: Shenzhen Bureau of Polytron Technologies Inc

Address before: 301401, building six, building B, No.1 building, No.1 Industrial Road, Nanshan District, Guangdong, Shenzhen, 518055

Patentee before: Shenzhen Zhongke Xunlian Technology Co., Ltd

CP03 Change of name, title or address