CN115983306A - RFID (radio frequency identification) card writing method with error correction capability - Google Patents

RFID (radio frequency identification) card writing method with error correction capability Download PDF

Info

Publication number
CN115983306A
CN115983306A CN202211578384.6A CN202211578384A CN115983306A CN 115983306 A CN115983306 A CN 115983306A CN 202211578384 A CN202211578384 A CN 202211578384A CN 115983306 A CN115983306 A CN 115983306A
Authority
CN
China
Prior art keywords
data
area
writing
rfid card
disaster
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
CN202211578384.6A
Other languages
Chinese (zh)
Other versions
CN115983306B (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.)
Jiangsu Daoyuan Technology Group Co ltd
Original Assignee
Jiangsu Daoyuan Technology Group 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 Jiangsu Daoyuan Technology Group Co ltd filed Critical Jiangsu Daoyuan Technology Group Co ltd
Priority to CN202211578384.6A priority Critical patent/CN115983306B/en
Publication of CN115983306A publication Critical patent/CN115983306A/en
Application granted granted Critical
Publication of CN115983306B publication Critical patent/CN115983306B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Techniques For Improving Reliability Of Storages (AREA)

Abstract

The invention discloses a method for writing in an RFID card with error correction capability.A data area and a disaster tolerance area are divided in an RFID card memory, and information data and time data to be written are firstly written into the data area in the process of writing the RFID card; making an enabling mark on an enabling bit of the data area after the writing is finished; and then writing the information data and the time data into the disaster tolerance area, and making an enabling mark on an enabling bit of the disaster tolerance area after the writing is finished. Before the current writing operation on 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 current writing operation. The method solves the problem of error of written data caused by insufficient instantaneous power supply and the like in the multiple writing process of the RFID card chip written in the prior art, and can automatically correct errors through a disaster recovery area of the RFID chip.

Description

RFID card writing method with error correction capability
Technical Field
The invention relates to an RFID communication method, in particular to an RFID card writing method.
Background
The RFID is also called as radio frequency identification, and the RFID identifies and reads and writes 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/reader, 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 the chip of the RFID card is determined according to application requirements and consists of a radio frequency part and a digital part, wherein the radio frequency part has the functions of providing energy, modulating and demodulating and POR, and the digital part comprises a logic module, a storage module and a functional module. The communication mode is that a reader sends a radio frequency signal with specific frequency through a transmitting antenna, an RFID card is located in an effective working area, a radio frequency part obtains energy through the antenna and a rectifier and demodulates the signal sent by the reader, a logic part calls a function module and a storage module according to command content to generate return information, the return information is modulated by a radio frequency module, and the radio frequency signal is transmitted and replied to the reader to complete one-time communication.
When a write command is used for the RFID card, the radio frequency part transmits the command and data to the digital part through the circuit interface, the digital part processes the data through the functional module after judging that the write command is the write command through the functional module, and the processed result is written into the memory in an electric erasing mode to complete the write operation.
In the current technology, the write process writes data into the data area, i.e. the storage operation is completed. In practical application, the following problems exist in the prior art: the RFID card chip has a problem of data writing errors with small probability in the process of executing frequent writing for many times, and through analysis and verification, the most probable reason is found to be that in the writing process, the writing is incomplete due to insufficient instantaneous power supply, so that data loss is caused, and in a key application scene, serious loss can be caused.
Disclosure of Invention
The purpose of the invention is as follows: aiming at the prior art, the RFID card writing method with the error correction capability is provided, and the problem that an error occurs at a certain probability when an RFID card chip writes data for multiple times is solved.
The technical scheme is as follows: a RFID card writing method with error correction capability is disclosed, wherein the structure of the RFID card comprises a nonvolatile memory, a data area and a disaster tolerance area with physical address intervals are divided in the nonvolatile memory, and the data formats in the data area and the disaster tolerance area respectively comprise a data bit, a time bit and an enable bit;
in the process of writing the RFID card, firstly, writing information data and time data to be written into the data area; making an enabling mark on an enabling bit of the data area after the writing is finished; then writing the information data and the time data into the disaster-tolerant area, and making an enabling mark on an enabling bit of the disaster-tolerant area after the writing is finished; before starting the write operation of the data area, the RFID card firstly corrects the write failure or error of the data area or the disaster tolerance area in the last write process, and when the information of the data area and the disaster tolerance area is consistent, the RFID card starts the write operation of the current time.
Further, the step of correcting the write failure or error of the data area or the disaster recovery area by the RFID card in the last write process includes the following steps:
the logic module of the RFID card calls a data area and a disaster recovery area of corresponding addresses in the nonvolatile memory, judges whether the values of the two areas are consistent, and if not: and if the enabling bit of the disaster tolerant area is set to be enabled, copying the data of the disaster tolerant area to the data area to replace the original data, and if the enabling bit of the data area is set to be enabled, copying the data of the data area to the disaster tolerant area to replace the original data.
Further, the current 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 position 1 of the data area after step S03 is completed;
s05: judging whether the enable bit of the data area is 1, if not, executing step S03 again, and if so, executing step S06;
s06: clearing current data in the disaster tolerant area;
s07: copying data corresponding to the data bit and the time bit in the data area to a disaster recovery area;
s08: enabling position 1 of the disaster-tolerant area after step S07 is completed;
s09: judging whether the enable bit of the disaster tolerant area is 1, and if not, executing the step S06 again; if the value is 1, executing the step S10;
s10: judging whether the data bits and the time bits in the data area and the disaster tolerant area are consistent or not, and if not, executing the step S06 again; if yes, 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 write command radio frequency signal to the RFID card through the reader antenna, meanwhile, the reader starts timing, and if the total time exceeds the preset time before the RFID card returns the write success signal, the data write failure is judged.
Has the advantages that: the RFID card writing method with the error correction capability solves the problem that written data is in error due to insufficient instantaneous power supply and the like in the multiple writing process of a written RFID card chip in the prior art, and can automatically correct errors through a disaster recovery area of the RFID chip. The method is established on the basis of the existing architecture, can accurately write key data such as transaction amount and the like without excessive structural change, and is suitable for writing in the RFID card under severe conditions.
Drawings
FIG. 1 is a schematic diagram of the structure of an RFID card and reader according to the present invention;
FIG. 2 is a diagram illustrating data formats in a data area and a 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 present invention is shown in fig. 1, and includes a reader 101, a reader antenna 102, an RFID card antenna 103, and an RFID card chip with an integrated circuit, wherein a radio frequency module 104 and a digital module are arranged inside the chip, the digital module includes a logic module 105, a functional module 106, a ROM 107, a RAM 108, and a nonvolatile memory 109, a data area 110 and a disaster tolerance area 111 with physical address intervals are partitioned from the nonvolatile memory 109, and data formats in the data area 110 and the disaster tolerance area 111 both include data bits, time bits, and enable bits, as shown in fig. 2. The data bit is composed of a binary sequence corresponding to the information data, the time bit is composed of a binary sequence corresponding to the year, month, day, hour, minute and second and a two-bit identifier, and the enable bit is determined by one bit. Volatile memory 109 may be 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 an internal circuit interface.
The RFID card writing method with the error correction capability comprises the following steps:
s01: the reader establishes a wireless communication connection with the RFID card.
S02: the reader transmits a write command radio frequency signal to the RFID card through the reader antenna, and simultaneously starts timing, if the total time exceeds a preset time, such as 1 second before the tag returns a write success signal, the write failure is determined, and ER02 information is displayed.
S03: the write command radio frequency signal is captured by the RFID card antenna and demodulated by the RFID card radio frequency part.
S04: the corresponding program in the RFID card chip functional module is activated and controlled by the logic module of the digital part, and the decoded information data and the time data are put into the RAM.
S05: and the logic module calls a data area and a disaster recovery area of corresponding addresses in the nonvolatile memory, judges whether the values of the two areas are consistent, if not, executes S06, and if so, executes S07.
S06: firstly feeding back ER01 information to a reader, copying data of the disaster tolerant area to a data area to replace original data if an enable bit of the disaster tolerant area is set to be enabled, copying the data of the data area to the disaster tolerant area to replace the original data if the enable bit of the data area is set to be enabled, and restarting to execute S05 after the completion.
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 use of the RFID card and the related operation logic; the time data mainly records the corresponding time of the write command, and the time generally represents important time content such as the time of the transaction information.
S08: the current data in the memory area is cleared, i.e., a set 0 operation is performed.
S09: the information data and the time data newly generated in S07 are written in the data area.
S10: the enable position 1 of the data area is set after S03 is completed.
S11: and judging whether the enable bit of the data area is 1, if not, executing the step S09 again, and if so, executing the step S12.
S12: and clearing the current data in the disaster tolerant area, namely performing 0 setting operation.
S13: and copying data corresponding to the data bits and the time bits in the data area to the disaster recovery area.
S14: position 1 of the disaster-tolerant area will be enabled after completion of S13.
S15: judging whether the enable bit of the disaster tolerant area is 1, and if not, executing the step S12 again; if it is 1, go to step S26.
S16: judging whether the data bits and the time bits in the data area and the disaster tolerance area are consistent, and if not, executing the step S12 again; if yes, go to step S17.
S17: the RFID card returns a write success signal to the reader.
According to the method, the key data are written into the disaster-tolerant area before the writing of the RFID card is finished every time, the writing integrity of the chip of the RFID card and the self-error correction under partial abnormal conditions are realized, the data in the data area and the disaster-tolerant area are consistent, and the completion of one-time writing operation can be confirmed to a reader, so that the problem of writing data errors caused by insufficient instantaneous power supply in the frequent writing process of the chip of the RFID card can be solved.
The foregoing is only a preferred embodiment of the present invention, and it should be noted that, for those skilled in the art, various modifications and decorations can be made without departing from the principle of the present invention, and these modifications and decorations should also be regarded as the protection scope of the present invention.

Claims (4)

1. A RFID card writing method with error correction capability is characterized in that the structure of the RFID card comprises a nonvolatile memory, a data area and a disaster tolerance area with physical address intervals are divided in the nonvolatile memory, and the data formats in the data area and the disaster tolerance area respectively comprise a data bit, a time bit and an enable bit;
in the process of writing the RFID card, firstly, writing information data and time data to be written into the data area; making an enabling mark on an enabling bit of the data area after the writing is finished; then writing the information data and the time data into the disaster tolerant area, and making an enabling mark on an enabling bit of the disaster tolerant area after the writing is finished; before starting the current writing operation on the data area, the RFID card firstly corrects the writing failure or error of the data area or the disaster tolerance area in the last writing process, and when the information of the data area and the disaster tolerance area is consistent, the RFID card only starts the current writing operation.
2. The method for writing in an RFID card with error correction capability according to claim 1, wherein the RFID card performs error correction on the write failure or error in the data area or the disaster recovery 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 recovery area of corresponding addresses in the nonvolatile memory, judges whether the values of the two areas are consistent, and if not: and if the enabling bit of the disaster tolerant area is set to be enabled, copying the data of the disaster tolerant area to the data area to replace the original data, and if the enabling bit of the data area is set to be enabled, copying the data of the data area to the disaster tolerant area to replace the original data.
3. The writing method of the RFID card with the error correction capability according to claim 1 or 2, wherein the current writing operation of the RFID card comprises 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 position 1 of the data area after step S03 is completed;
s05: judging whether the enable bit of the data area is 1, if not, executing the step S03 again, and if so, executing the step S06;
s06: clearing current data in the disaster tolerant area;
s07: copying data corresponding to data bits and time bits in the data area to a disaster recovery area;
s08: enabling position 1 of the disaster-tolerant area after step S07 is completed;
s09: judging whether the enable bit of the disaster tolerant area is 1, and if not, executing the step S06 again; if the value is 1, executing the step S10;
s10: judging whether the data bits and the time bits in the data area and the disaster-tolerant area are consistent or not, and if not, executing the step S06 again; if yes, executing step S11;
s11: the RFID card returns a write success signal to the reader.
4. The RFID card writing method with error correction capability of claim 3, wherein at the beginning of the communication setup, the reader transmits a writing command RF signal to the RFID card through the reader antenna, and the reader starts to count time, and if the total time exceeds a preset time before the RFID card returns the writing success signal, the current data writing is determined to be failed.
CN202211578384.6A 2022-12-09 2022-12-09 RFID card writing method with error correction capability Active CN115983306B (en)

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 true CN115983306A (en) 2023-04-18
CN115983306B 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 (14)

* Cited by examiner, † Cited by third party
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
US20140317367A1 (en) * 2013-04-22 2014-10-23 Hitachi, Ltd. Storage apparatus and data copy control method
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

Patent Citations (14)

* Cited by examiner, † Cited by third party
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
US20140317367A1 (en) * 2013-04-22 2014-10-23 Hitachi, Ltd. Storage apparatus and data copy control method
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
CN115983306B (en) 2023-09-15

Similar Documents

Publication Publication Date Title
EP2216719B1 (en) Mobile electronic apparatus and data management method in mobile electronic apparatus
US9659196B2 (en) Method, apparatus and system for verifying data
EP1619579A2 (en) Mobile electronic equipment
US8164424B2 (en) System and method of integrated processing of electronic tag
US7017825B2 (en) IC card and data processing method therefor
US20020104890A1 (en) Ic card
CN102799931B (en) Data protection method of radio frequency smart card
CN115983306B (en) RFID card writing method with error correction capability
EP3468261B1 (en) Control method and apparatus for smart card, terminal device, and smart card
CN116880781B (en) Storage device and control method thereof
CN102255999B (en) Method for determining communication protocol between terminal and smart card and expansion card
JP2006040185A (en) Semiconductor device for ic tag, ic tag and method for controlling ic tag
US20010045468A1 (en) Ic card
US20020139860A1 (en) Recording medium control method, data management apparatus, and recording medium
CN107426270A (en) A kind of data breakpoint continuous transmission method of vehicle remote monitoring terminal
CN106650839B (en) Smart card production data state control method
CN111417106B (en) Registration method and device of user identification card, storage medium and terminal
JP3568772B2 (en) Non-contact data transmission / reception device
CN114613042A (en) Software configuration method and device for universal automobile key
JP2006293941A (en) Non-contact data carrier, non-contact data carrier system and data processing method thereof
JP2008107991A (en) Information processing medium, program therefor, error processing method for information processing medium, and information processing system
JP5306079B2 (en) IC card, IC card processing device, and IC card processing system
JP4388100B2 (en) Mobile phone
CN115454710B (en) Flash memory data reading method and device, electronic equipment and storage medium
CN112099812B (en) Flash material identification and identification method, system, equipment and medium

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