CN115983306B - RFID card writing method with error correction capability - Google Patents
RFID card writing method with error correction capability Download PDFInfo
- Publication number
- CN115983306B CN115983306B CN202211578384.6A CN202211578384A CN115983306B CN 115983306 B CN115983306 B CN 115983306B CN 202211578384 A CN202211578384 A CN 202211578384A CN 115983306 B CN115983306 B CN 115983306B
- Authority
- CN
- China
- Prior art keywords
- data
- area
- writing
- disaster
- rfid card
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Abstract
The invention discloses a writing method of an RFID card with error correction capability, wherein a data area and a disaster-tolerant area are divided into an RFID card memory, and in the process of writing the RFID card, information data and time data to be written are written into the data area at first; making an enabling mark for an enabling bit of the data area after writing is completed; and then writing the information data and the time data into the disaster-tolerant area, and making an enabling mark for enabling bits of the disaster-tolerant area after writing is completed. Before the writing operation of the data area is started, the RFID card firstly corrects the writing failure or error of the data area or the disaster-tolerant area in the last writing process, and when the information of the data area and the disaster-tolerant area is consistent, the RFID card starts the writing operation of the time. The method solves the problem of error of written data caused by insufficient instantaneous power supply and the like in the process of writing the RFID card chip for multiple times in the prior art, and can automatically correct errors through the disaster-tolerant area of the RFID chip.
Description
Technical Field
The invention relates to an RFID communication method, in particular to an RFID card writing method.
Background
RFID is also called radio frequency identification, and can identify and read and write specific target data into a storage medium in a wireless communication mode, so that the identification and the data reading and writing can be completed without mechanical contact or specific environment. The RFID system is generally composed of an RFID card/electronic tag, a reader/writer, and an upper computer/computer network. The RFID technology has the characteristics of no need of wire connection, strong anti-interference performance and no need of manual identification and calculation, so the RFID technology is often applied to the fields of finance, retail, logistics and the like.
The RFID card can be read-only or read/write, and is determined according to application requirements, the RFID card chip is composed of a radio frequency part and a digital part, the radio frequency part has the functions of providing energy, modulating and demodulating and POR, and the digital part is provided with a logic module, a storage module and a functional module. The communication mode is that the reader sends radio frequency signals with specific frequency through the transmitting antenna, the RFID card is located in an effective working area, the radio frequency part obtains energy through the antenna and the rectifier and demodulates signals sent by the reader, the logic part calls the functional module and the storage module according to command content to generate return information, the return information is modulated through the radio frequency module, the radio frequency signals are transmitted to the reader, and one-time communication is completed.
When a writing command is used for the RFID card, the radio frequency part can transmit the command and the data to the digital part through the circuit interface, the digital part can process the data through the functional module after judging that the digital part is the writing command through the functional module, and the processed result is written into the memory in an electric erasing mode to finish the writing operation.
In the prior art, the writing process is to write data into the data area, i.e. complete the storage operation. In application practice, the following problems exist in the prior art: the RFID card chip has the problem that the written data is in error with small probability in the process of frequently writing for a plurality of times, and through analysis and verification, the most likely reason is found that the writing is incomplete due to the fact that the instantaneous power supply is insufficient in the process of writing, so that the data is lost, and the data can be seriously lost in a key application scene.
Disclosure of Invention
The invention aims to: aiming at the prior art, an RFID card writing method with error correction capability is provided, and the problem that an RFID card chip has a certain probability of error when writing data for many times is solved.
The technical scheme is as follows: the RFID card writing method with the error correction capability comprises the steps that a nonvolatile memory is included in the structure of the RFID card, a data area with a physical address interval and a disaster-tolerant area are divided in the nonvolatile memory, and data formats in the data area and the disaster-tolerant area comprise data bits, time bits and enable bits;
in the RFID card writing process, firstly, information data and time data to be written are written into the data area; making an enabling mark for an enabling bit of the data area after writing is completed; then writing the information data and the time data into the disaster-tolerant area, and making an enabling mark for enabling bits of the disaster-tolerant area after writing is completed; before the writing operation of the data area is started, the RFID card firstly corrects the writing failure or error of the data area or the disaster-tolerant area in the last writing process, and when the information of the data area and the disaster-tolerant area are consistent, the RFID card starts the writing operation of the time.
Further, the RFID card corrects the write failure or error of the data area or the disaster area in the last write process, including the following steps:
the logic module of the RFID card calls a data area and a disaster area of corresponding addresses in the nonvolatile memory, judges whether the values of the two areas are consistent, and if not, judges that the values of the two areas are consistent: if the disaster-tolerant area enable bit is set to enable, the data of the disaster-tolerant area is copied to the data area to replace the original data, and if the data area enable bit is set to enable, the data of the data area is copied to the disaster-tolerant area to replace the original data.
Further, the writing operation of the RFID card includes the following steps:
s01: reading the data in the current data area into the RAM of the RFID card and calculating the data received from the reader to obtain new information data and time data;
s02: clearing the current data in the storage area;
s03: writing the information data and the time data newly generated in the step S01 into a data area;
s04: enabling the enabling position 1 of the data area after completing the step S03;
s05: judging whether the enabling bit of the data area is 1, if not, re-executing the step S03, and if so, executing the step S06;
s06: clearing current data in the disaster-tolerant area;
s07: copying the data corresponding to the data bit and the time bit in the data area to the disaster-tolerant area;
s08: enabling the enabling position 1 of the disaster tolerant area after the step S07 is completed;
s09: judging whether the enabling bit of the disaster tolerant area is 1, and if not, re-executing the step S06; if yes, executing step S10;
s10: judging whether the data bits and the time bits in the data area and the disaster-tolerant area are consistent, and if not, re-executing the step S06; if so, executing step S11;
s11: the RFID card returns a write success signal to the reader.
Further, at the beginning of communication establishment, the reader transmits a writing command radio frequency signal to the RFID card through the reader antenna, and simultaneously the reader starts timing, and if the total time exceeds a preset time before the RFID card returns the writing success signal, the reader judges that the data writing fails.
The beneficial effects are that: the RFID card writing method with the error correction capability solves the problem of error of written data caused by insufficient instantaneous power supply and the like in the process of writing the RFID card chip for multiple times in the prior art, and can automatically correct errors through the disaster-tolerant area of the RFID chip. The method is based on the existing architecture, can accurately write in key data such as transaction amount without excessive structural change, and is suitable for writing in RFID cards under severe conditions.
Drawings
FIG. 1 is a schematic diagram of an RFID card and reader according to the present invention;
FIG. 2 is a schematic diagram of data formats in a data area and disaster tolerant area;
FIG. 3 is a flow chart of the method of the present invention.
Detailed Description
The invention is further explained below with reference to the drawings.
The structure of the RFID card and the reader of the invention is shown in fig. 1, the RFID card and the reader structure comprises a reader 101, a reader antenna 102, an RFID card antenna 103 and an RFID card chip provided with an integrated circuit, a radio frequency module 104 and a digital module are arranged in the chip, the digital module comprises a logic module 105, a functional module 106, a ROM 107, a RAM 108 and a nonvolatile memory 109, a data area 110 with a physical address interval and a disaster-tolerant area 111 are divided in the nonvolatile memory 109, and the data formats in the data area 110 and the disaster-tolerant area 111 comprise data bits, time bits and enable bits, as shown in fig. 2. The data bit is composed of a binary sequence corresponding to information data, the time bit is composed of a binary sequence corresponding to year-month-day-time-minute-second plus a two-bit identifier, and the enabling bit is determined by one bit. The volatile memory 109 may be a FLASH memory or the like.
The reader 101 is electrically connected with the reader antenna 102, the RFID card chip provided with the integrated circuit is electrically connected with the RFID card antenna 103, the reader antenna 102 and the RFID card antenna 103 transmit information through wireless communication, the radio frequency module 104 and the digital module are electrically connected through an internal circuit interface, and the logic module 105, the functional module 106, the ROM 107, the RAM 108 and the nonvolatile memory 109 are electrically connected through the internal circuit interface.
The RFID card writing method with error correction capability comprises the following steps:
s01: the reader establishes a wireless communication connection with the RFID card.
S02: the reader transmits a writing command radio frequency signal to the RFID card through the reader antenna, and simultaneously the reader starts timing, if the total time exceeds a preset time, for example, 1 second before the tag returns a writing success signal, the reader judges that the writing fails and displays ER02 information.
S03: the write command radio frequency signal is captured by the RFID card antenna and demodulated by the RFID card radio frequency portion.
S04: the corresponding program in the functional module of the RFID card chip is activated, and is controlled by the logic module of the digital part, and the decoded information data and the time data are put into the RAM.
S05: the logic module calls the data area and disaster area of the corresponding address in the nonvolatile memory, judges whether the values of the two areas are consistent, if not, executes S06, and if so, executes S07.
S06: first, ER01 information is fed back to the reader, and if the disaster-tolerant area enable bit is set to enable, data of the disaster-tolerant area is copied to the data area to replace the original data, and if the data area enable bit is set to enable, data of the data area is copied to the disaster-tolerant area to replace the original data, and execution is restarted after completion S05.
S07: and reading the data in the current data area into the RAM, and calculating the data with the data received from the reader to obtain new information data and time data. In the step, the corresponding calculation process is preset in advance according to the application of the RFID card and related operation logic; the time data mainly records the corresponding time of the writing command, and the time generally represents important time content such as the time of transaction information.
S08: the current data in the storage area is cleared, namely, a 0 setting operation is performed.
S09: the information data and the time data newly generated in S07 are written in the data area.
S10: the enabled position 1 of the data area is set after S03 is completed.
S11: it is determined whether the enable bit of the data area is 1, if not, S09 is executed again, and if 1, S12 is executed.
S12: and (5) clearing the current data in the disaster-tolerant area, namely performing a 0 setting operation.
S13: and copying the data corresponding to the data bit and the time bit in the data area to the disaster-tolerant area.
S14: the enable position 1 of the disaster area will be accommodated after S13 is completed.
S15: judging whether the enabling bit of the disaster tolerant area is 1, and if not, re-executing the step S12; if it is 1, step S26 is executed.
S16: judging whether the data bits and the time bits in the data area and the disaster-tolerant area are consistent, and if not, re-executing the step S12; if so, step S17 is performed.
S17: the RFID card returns a write success signal to the reader.
The method of the invention writes the key data into the disaster area before the writing of the RFID card is finished each time, and realizes the writing integrity of the RFID card chip and the self-correction under partial abnormal conditions, the data in the data area and the disaster area are consistent, and the data can confirm the completion of one-time writing operation to the reader, thereby solving the problem of error of the written data caused by insufficient instantaneous power supply in the frequent writing process of the RFID card chip.
The foregoing is merely a preferred embodiment of the present invention and it should be noted that modifications and adaptations to those skilled in the art may be made without departing from the principles of the present invention, which are intended to be comprehended within the scope of the present invention.
Claims (3)
1. The RFID card writing method with the error correction capability is characterized in that the structure of the RFID card comprises a nonvolatile memory, a data area with a physical address interval and a disaster-tolerant area are divided in the nonvolatile memory, and the data formats in the data area and the disaster-tolerant area comprise data bits, time bits and enable bits;
in the RFID card writing process, firstly, information data and time data to be written are written into the data area; making an enabling mark for an enabling bit of the data area after writing is completed; then writing the information data and the time data into the disaster-tolerant area, and making an enabling mark for enabling bits of the disaster-tolerant area after writing is completed; before the writing operation of the data area is started, the RFID card firstly corrects the writing failure or error of the data area or the disaster-tolerant area in the last writing process, and when the information of the data area and the disaster-tolerant area are consistent, the RFID card starts the writing operation of the time;
the RFID card corrects the writing failure or error of the data area or the disaster-tolerant area in the last writing process, and comprises the following steps:
the logic module of the RFID card calls a data area and a disaster area of corresponding addresses in the nonvolatile memory, judges whether the values of the two areas are consistent, and if not, judges that the values of the two areas are consistent: if the disaster-tolerant area enable bit is set to enable, the data of the disaster-tolerant area is copied to the data area to replace the original data, and if the data area enable bit is set to enable, the data of the data area is copied to the disaster-tolerant area to replace the original data.
2. The method for writing an RFID card with error correction capability according to claim 1, wherein the present writing operation of the RFID card comprises the steps of:
s01: reading the data in the current data area into the RAM of the RFID card and calculating the data received from the reader to obtain new information data and time data;
s02: clearing the current data in the storage area;
s03: writing the information data and the time data newly generated in the step S01 into a data area;
s04: enabling the enabling position 1 of the data area after completing the step S03;
s05: judging whether the enabling bit of the data area is 1, if not, re-executing the step S03, and if so, executing the step S06;
s06: clearing current data in the disaster-tolerant area;
s07: copying the data corresponding to the data bit and the time bit in the data area to the disaster-tolerant area;
s08: enabling the enabling position 1 of the disaster tolerant area after the step S07 is completed;
s09: judging whether the enabling bit of the disaster tolerant area is 1, and if not, re-executing the step S06; if yes, executing step S10;
s10: judging whether the data bits and the time bits in the data area and the disaster-tolerant area are consistent, and if not, re-executing the step S06; if so, executing step S11;
s11: the RFID card returns a write success signal to the reader.
3. The method for writing an RFID card with error correction capability according to claim 2, wherein the reader transmits a write command radio frequency signal to the RFID card through the reader antenna at the beginning of communication establishment while the reader starts timing, and if the total time exceeds a preset time before the RFID card returns the write success signal, it is determined that the data writing has failed.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211578384.6A CN115983306B (en) | 2022-12-09 | 2022-12-09 | RFID card writing method with error correction capability |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211578384.6A CN115983306B (en) | 2022-12-09 | 2022-12-09 | RFID card writing method with error correction capability |
Publications (2)
Publication Number | Publication Date |
---|---|
CN115983306A CN115983306A (en) | 2023-04-18 |
CN115983306B true CN115983306B (en) | 2023-09-15 |
Family
ID=85957342
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202211578384.6A Active CN115983306B (en) | 2022-12-09 | 2022-12-09 | RFID card writing method with error correction capability |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN115983306B (en) |
Citations (13)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101051283A (en) * | 2006-04-06 | 2007-10-10 | 英业达股份有限公司 | Hard disc data backup system and method |
CN101499028A (en) * | 2009-03-18 | 2009-08-05 | 成都市华为赛门铁克科技有限公司 | Data protection method and apparatus based on non-volatile memory |
CN101539891A (en) * | 2008-03-17 | 2009-09-23 | 凤凰微电子(中国)有限公司 | Embedded type flash memory, storage system and method for power fail safeguard of data |
CN101634958A (en) * | 2008-07-23 | 2010-01-27 | 佛山市顺德区顺达电脑厂有限公司 | Flash memory with secondary backup mechanism |
CN101777013A (en) * | 2009-01-12 | 2010-07-14 | 成都市华为赛门铁克科技有限公司 | Solid state disk and data read-write method |
CN201853244U (en) * | 2010-08-25 | 2011-06-01 | 东莞市凌康信息技术有限公司 | Automatic error correction RFID (radio frequency identification) reading-writing device based on image processing |
CN103914407A (en) * | 2012-12-30 | 2014-07-09 | 航天信息股份有限公司 | Secure digital memory (SD) card power down protection and restoring method and SD card with power down protection function |
CN104111897A (en) * | 2013-04-16 | 2014-10-22 | 华为技术有限公司 | Data processing method, data processing device and computer system |
CN107885614A (en) * | 2017-11-23 | 2018-04-06 | 昌微系统科技(上海)有限公司 | A kind of data processing method and data processing equipment based on memory |
CN108139958A (en) * | 2015-10-22 | 2018-06-08 | 甲骨文国际公司 | Event batch processing, output sequence in continuous query processing and the state storage based on daily record |
CN108874576A (en) * | 2017-05-10 | 2018-11-23 | 中国航空工业集团公司西安飞行自动控制研究所 | A kind of data-storage system based on Error Correction of Coding |
CN109871932A (en) * | 2018-12-29 | 2019-06-11 | 广东中成卫星微电子发展有限公司 | A kind of RFID power down preventing NVM data storage device and its storage method |
CN115017073A (en) * | 2021-03-05 | 2022-09-06 | 龙芯中科技术股份有限公司 | Communication controller enabling method and device, electronic equipment and storage medium |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2014174548A1 (en) * | 2013-04-22 | 2014-10-30 | Hitachi, Ltd. | Storage apparatus and data copy control method |
-
2022
- 2022-12-09 CN CN202211578384.6A patent/CN115983306B/en active Active
Patent Citations (13)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101051283A (en) * | 2006-04-06 | 2007-10-10 | 英业达股份有限公司 | Hard disc data backup system and method |
CN101539891A (en) * | 2008-03-17 | 2009-09-23 | 凤凰微电子(中国)有限公司 | Embedded type flash memory, storage system and method for power fail safeguard of data |
CN101634958A (en) * | 2008-07-23 | 2010-01-27 | 佛山市顺德区顺达电脑厂有限公司 | Flash memory with secondary backup mechanism |
CN101777013A (en) * | 2009-01-12 | 2010-07-14 | 成都市华为赛门铁克科技有限公司 | Solid state disk and data read-write method |
CN101499028A (en) * | 2009-03-18 | 2009-08-05 | 成都市华为赛门铁克科技有限公司 | Data protection method and apparatus based on non-volatile memory |
CN201853244U (en) * | 2010-08-25 | 2011-06-01 | 东莞市凌康信息技术有限公司 | Automatic error correction RFID (radio frequency identification) reading-writing device based on image processing |
CN103914407A (en) * | 2012-12-30 | 2014-07-09 | 航天信息股份有限公司 | Secure digital memory (SD) card power down protection and restoring method and SD card with power down protection function |
CN104111897A (en) * | 2013-04-16 | 2014-10-22 | 华为技术有限公司 | Data processing method, data processing device and computer system |
CN108139958A (en) * | 2015-10-22 | 2018-06-08 | 甲骨文国际公司 | Event batch processing, output sequence in continuous query processing and the state storage based on daily record |
CN108874576A (en) * | 2017-05-10 | 2018-11-23 | 中国航空工业集团公司西安飞行自动控制研究所 | A kind of data-storage system based on Error Correction of Coding |
CN107885614A (en) * | 2017-11-23 | 2018-04-06 | 昌微系统科技(上海)有限公司 | A kind of data processing method and data processing equipment based on memory |
CN109871932A (en) * | 2018-12-29 | 2019-06-11 | 广东中成卫星微电子发展有限公司 | A kind of RFID power down preventing NVM data storage device and its storage method |
CN115017073A (en) * | 2021-03-05 | 2022-09-06 | 龙芯中科技术股份有限公司 | Communication controller enabling method and device, electronic equipment and storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN115983306A (en) | 2023-04-18 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP3728366B2 (en) | IC card | |
CN102446280B (en) | A kind of method of verification msg, Apparatus and system | |
US11341343B1 (en) | RFID integrated circuit identifier self-check | |
US9418224B2 (en) | Portable electronic device and control method of portable electronic device | |
US9239941B1 (en) | RFID integrated circuit identifier self-check | |
US8164424B2 (en) | System and method of integrated processing of electronic tag | |
KR20090047545A (en) | Card and host device | |
US7055752B2 (en) | IC card | |
US8112662B2 (en) | Portable electronic apparatus, processing apparatus for portable electronic apparatus, and data processing method in portable electronic apparatus | |
CN115983306B (en) | RFID card writing method with error correction capability | |
JP2002520967A (en) | Transponder system having receipt notification corresponding to each transponder | |
CN106203221A (en) | A kind of quick search RFID tag identifier (TID) method | |
US6722572B2 (en) | Recording medium control method, data management apparatus, and recording medium | |
CN102255999B (en) | Method for determining communication protocol between terminal and smart card and expansion card | |
EP3468261B1 (en) | Control method and apparatus for smart card, terminal device, and smart card | |
CN106650839B (en) | Smart card production data state control method | |
CN116225317A (en) | Data read-write method and device for user identification card, user identification card and medium | |
CN114613042A (en) | Software configuration method and device for universal automobile key | |
JP5306079B2 (en) | IC card, IC card processing device, and IC card processing system | |
JPH11250198A (en) | Non-contact data transmitter-receiver | |
US20060072157A1 (en) | Method of correcting NAND memory blocks and to a printing device employing the method | |
CN110942122A (en) | Product information binding method | |
US20180270089A1 (en) | Ic card, portable electronic device, program, processing apparatus, and processing system | |
CN112035417A (en) | Method and device for managing storage block, storage medium and electronic device | |
US8704636B2 (en) | Information processing apparatus, communication apparatus, and program |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |