CN103824101B - Logic card reading/writing method and system - Google Patents

Logic card reading/writing method and system Download PDF

Info

Publication number
CN103824101B
CN103824101B CN201410101658.1A CN201410101658A CN103824101B CN 103824101 B CN103824101 B CN 103824101B CN 201410101658 A CN201410101658 A CN 201410101658A CN 103824101 B CN103824101 B CN 103824101B
Authority
CN
China
Prior art keywords
district
transaction verification
write
verification code
multidate information
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201410101658.1A
Other languages
Chinese (zh)
Other versions
CN103824101A (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.)
GAOXIN MODERN INTELLIGENT SYSTEM CO Ltd
Original Assignee
GAOXIN MODERN INTELLIGENT 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 GAOXIN MODERN INTELLIGENT SYSTEM CO Ltd filed Critical GAOXIN MODERN INTELLIGENT SYSTEM CO Ltd
Priority to CN201410101658.1A priority Critical patent/CN103824101B/en
Publication of CN103824101A publication Critical patent/CN103824101A/en
Application granted granted Critical
Publication of CN103824101B publication Critical patent/CN103824101B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Storage Device Security (AREA)
  • Control Of Vending Devices And Auxiliary Devices For Vending Devices (AREA)

Abstract

The present invention relates to a kind of logic card reading/writing method and system.Said method comprising the steps of: read logic card, obtain the user data of described logic card;Determine reading area belonging to each multidate information district according to the backup mark in each multidate information district in described user data or write district;Data according to reading area are calculated transaction verification code, and the transaction verification code of the transaction verification Ma Huoxie district storage stored with described reading area by described transaction verification code compares, if identical, is then calculated the multidate information comprising new transaction verification code according to business datum;Write district described in being write by the multidate information comprising new transaction verification code, described in renewal, write the backup mark in district.Above-mentioned logic card reading/writing method and system achieve the alternately read-write in multidate information district, it is to avoid occur that writing card crash causes the non-serviceable problem of logic card, reduce and write card crash and need to do the probability of abnormality processing.

Description

Logic card reading/writing method and system
Technical field
The present invention relates to electronic cards process field, particularly relate to a kind of logic card reading/writing method and system.
Background technology
In automatic ticketing track traffic, logic card, made by substantial amounts of such as one way ticket card, common stored value card etc. With, when passing in and out lock, logic card is read and write frequently, but due to logic card not such as CPU(Central Processing Unit, central processing unit) card is contained within operating system, only finally when read write line writes CPU card One is alternately, and CPU card just can be by content write card, and this kind of mechanism ensure that writes card data completely with correct, And logic card is due to own structural characteristics, writes card and must write page by page or one piece of one piece writes, and each The size of data writing card often exceeds logic card one page or the size of a piece, needs multipage or many block spaces, leads Causing read write line and logic card to carry out repeatedly mutual, information in corresponding page or block then can be changed by each interaction success Write, but only from the most alternately to last mutual, every time successful, then write card just success, logic Card just can be continuing with, if any one failure alternately middle, is and writes card crash, but have in logic card Partial value is written over, and i.e. in logic card, data are modified, and the condition for validity that card reader is read and write again is modified, Then logic card can not the most normally use, and needs to semi-automatic ticket issuing equipment to carry out abnormality processing.
Summary of the invention
Based on this, it is necessary to occur writing card crash for traditional logic card and block interior data and be changed and cause patrolling Collect card and cannot use the problem that need to carry out abnormality processing, it is provided that a kind of logic card reading/writing method, logic can be reduced Caine is write card crash and is blocked interior data and be modified and cause logic card cannot use the probability that need to carry out abnormality processing.
Additionally, there is a need to provide a kind of logic card read-write system, logic card can be reduced and block because writing card crash Interior data are modified and cause logic card cannot use the probability that need to carry out abnormality processing.
A kind of logic card reading/writing method, comprises the following steps:
Read logic card, obtain the user data of described logic card;
Determine in multiple multidate information district each according to the backup mark in each multidate information district in described user data Reading area belonging to individual multidate information district or write district;
Data according to reading area are calculated transaction verification code, are stored with described reading area by described transaction verification code Transaction verification code compare, if identical, be then calculated according to business datum and comprise new transaction verification code Multidate information, if it is not, then by described transaction verification code and the described transaction verification code writing district's storage, if identical, Then it is calculated the multidate information comprising new transaction verification code according to business datum, if it is not, then terminate;
Write district described in being write by the multidate information comprising new transaction verification code, described in renewal, write the backup mark in district Will.
A kind of logic card read-write system, including:
Read module, is used for reading logic card, obtains the user data of described logic card;
Determine module, for determining multiple according to the backup mark in each multidate information district in described user data Reading area belonging to each multidate information district or write district in multidate information district;
Identifying code computing module, for being calculated transaction verification code according to the data of reading area;
Judge module, for the transaction verification code that described transaction verification code stores with described reading area is compared, if Time different, the transaction verification code that described transaction verification Ma Yuxie district stores is compared;
Multidate information computing module, for the transaction verification code at described transaction verification code with the storage of described reading area Time identical or different from the transaction verification code that described reading area stores at described transaction verification code and write with described The transaction verification code-phase of district's storage simultaneously, is calculated according to business datum and comprises the dynamic of new transaction verification code State information;
Writing module, writes district described in being write by the multidate information comprising new transaction verification code, updates institute The backup mark in Shu Xie district.
Above-mentioned logic card reading/writing method and system, by identifying that multiple multidate information districts belong to reading area or write district, Then calculated for the business datum multidate information comprising new transaction verification code is written to district, and more The backup mark in Xin Xie district, so achieves the alternately read-write in multidate information district, and in multiple multidate information district Multidate information identical, it is ensured that logic card, when card is write in transaction, was write card data last time and was not completely changed all the time, Card is write, it is to avoid occur writing card crash and internal for logic card divided data being changed and cause logic card not so that repeatable The problem that can use, reduces and writes card crash and need to do the probability of abnormality processing.
Accompanying drawing explanation
Fig. 1 is the flow chart of logic card reading/writing method in an embodiment;
Fig. 2 is the flow chart of logic card reading/writing method in another embodiment;
Fig. 3 is when detecting that this Status Flag is patrolled when being become sold state from the state of not selling in another embodiment Collect the flow chart of card reading/writing method;
Fig. 4 is the flow chart issuing logic card in an embodiment;
Fig. 5 is the structured flowchart of logic card read-write system in an embodiment;
Fig. 6 is the structured flowchart of logic card read-write system in another embodiment;
Fig. 7 is the internal structure block diagram of issuing module in an embodiment.
Detailed description of the invention
In order to make the purpose of the present invention, technical scheme and advantage clearer, below in conjunction with accompanying drawing and reality Execute example, the present invention is further elaborated.Only should be appreciated that specific embodiment described herein Only in order to explain the present invention, it is not intended to limit the present invention.
Fig. 1 is the flow chart of logic card reading/writing method in an embodiment.This logic card reading/writing method, including Following steps:
Step 102, reads logic card, obtains the user data of this logic card.
Concrete, user data includes distribution of information, sells card information and multidate information.Distribution of information includes sending out Row serial number, publisher's code, Card Type, card application identities, key version, card application version, distribution Batch, distribution identifying code etc.;Sell card information to include ticket kind, website, wallet unit can be used, effectively open Time beginning, effective end time, go out ticket for standing room mark, whether need activation marker, the ticketing amount of money etc..Dynamically letter Breath includes public information, transaction verification information and information out of the station.Public information includes Status Flag, backup Mark, card transaction sequence number and wallet etc..Transaction verification information includes transaction verification code.Information out of the station Including turnover lock mark, turnover lock time and turnover lock website.Wherein, Status Flag is used for representing logic card State, as 00 represent do not sell, 03 represent sell, 07 represent reclaim, 09 represent blacklist.
In the present embodiment, distribution of information that user data specifically includes, sell card information and multidate information such as table 1 Shown in.
Table 1
Wherein, OTP, one Time Programmable, One Time Programmable.
Step 104, determines multiple multidate information according to the backup mark in each multidate information district in this user data Reading area belonging to each multidate information district or write district in district.
Concrete, determine in multiple multidate information district that each multidate information district is belonging to reading area and still writes district, example Such as A district of Liang Ge multidate information district and B district, determining that A district is reading area or writes district, B district is reading area or writes District.The backup mark in each multidate information district and the corresponding relation of writable area can be preset.Such as, with two As a example by A district of individual multidate information district and B district, when logic card is issued, the backup mark value in A district and B district State of activation value all from 0 start, then
Read (A=0, B=0) expression and write A, A value is set equal to 1;
Reading (A=1, B=0) and represent that A is finally write, therefore B district is for writing district, and then arranging B value is 1;
Reading (A=1, B=1) and represent that B is finally write, therefore A district is for writing district, and arranging A value is 0;
Reading (A=0, B=1) and represent that A is finally write, therefore B district is for writing district, and arranging B value is 0;
Reading (A=0, B=0) and represent that B is finally write, therefore A district is for writing district, and arranging A value is 1; So circulation.
Step 106, is calculated transaction verification code according to the data of reading area, by this transaction verification code and this reading area The transaction verification code of storage compares, if identical, then perform step 110, otherwise, performs step 108.
Step 108, compares the transaction verification code that this transaction verification Ma Yugaixie district stores, if identical, then holds Row step 110, otherwise performs step 120.
Step 110, is calculated the multidate information comprising new transaction verification code according to business datum.
Business datum can produce as required, as entered the station, set off the business datum etc. produced.
Step 112, writes this by the multidate information comprising new transaction verification code and writes district, updates this and writes the standby of district Part mark.
Concrete, comprise page or the block final updating of backup mark.
Step 120, points out mistake.
After step 112, may also include that the transaction journal number that generation is new.
Reading and writing data in logic card when above-mentioned steps 102 to 120 is mainly used in out of the station.
In sum, above-mentioned logic card reading/writing method, by identifying that multiple multidate information districts belong to reading area or write District, is then written to district by calculated for the business datum multidate information comprising new transaction verification code, And update the backup mark writing district, so achieve the alternately read-write in multidate information district, and multiple multidate information Multidate information in district is identical, it is ensured that logic card when card is write in transaction, write last time card data all the time complete the most not by Change, in order to repeatable write card, it is to avoid occur writing card crash and internal for logic card divided data being changed and cause patrolling Volume block non-serviceable problem, reduce and write card crash and need to do the probability of abnormality processing.
Fig. 2 is the flow chart of logic card reading/writing method in another embodiment.This logic card reading/writing method includes:
Step 202, reads logic card, obtains the user data of this logic card.
Step 204, determines multiple multidate information according to the backup mark in each multidate information district in this user data Reading area belonging to each multidate information district or write district in district.
Step 206, is calculated transaction verification code according to the data of reading area, by this transaction verification code and this reading area The transaction verification code of storage compares, if identical, then perform step 210, otherwise, performs step 208.
Step 208, compares the transaction verification code that this transaction verification Ma Yugaixie district stores, if identical, then holds Row step 210, otherwise performs step 220.
Step 210, determines the effectiveness of logic card according to this user profile, if effectively, then performs step 212, If invalid, perform step 220.
Concrete, user profile includes card issuer code, Card Type, transaction ID etc..Can believe according to user In card issuer code in breath, Card Type, transaction ID etc., at least one carries out the effectiveness of decision logic card, As card issuer code is compared with the card issuer code prestored, if identical, it is determined that it is effective.
Step 212, is calculated the multidate information comprising new transaction verification code according to business datum.
Step 214, writes this by the multidate information comprising new transaction verification code and writes district, updates this and writes the standby of district Part mark.
Step 220, points out mistake.
Reading and writing data in logic card when above-mentioned steps 202 to 220 is mainly used in out of the station.
In sum, above-mentioned logic card reading/writing method, by identifying that multiple multidate information districts belong to reading area or write District, is then written to district by calculated for the business datum multidate information comprising new transaction verification code, And update the backup mark writing district, so achieve the alternately read-write in multidate information district, and multiple multidate information Multidate information in district is identical, it is ensured that logic card when card is write in transaction, write last time card data all the time complete the most not by Change, in order to repeatable write card, it is to avoid occur writing card crash and internal for logic card divided data being changed and cause patrolling Volume block non-serviceable problem, reduce and write card crash and need to do the probability of abnormality processing;By decision logic card Effectiveness, determine whether logic card can be used, reduce invalid operation probability.
Fig. 3 is when detecting that this Status Flag is patrolled when being become sold state from the state of not selling in another embodiment Collect the flow chart of card reading/writing method.This logic card reading/writing method includes:
Step 302, reads logic card, obtains the user data of this logic card, and this user data includes state mark Will.
Step 304, determines multiple multidate information according to the backup mark in each multidate information district in this user data Reading area belonging to each multidate information district or write district in district.
Step 306, is calculated transaction verification code according to the data of reading area, by this transaction verification code and this reading area The transaction verification code of storage compares, if identical, then perform step 310, otherwise, performs step 308.
Step 308, compares the transaction verification code that this transaction verification Ma Yugaixie district stores, if identical, then holds Row step 310, otherwise performs step 320.
Step 310, determines the effectiveness of logic card according to this user profile, if effectively, then performs step 312, If invalid, perform step 320.
Step 312, is calculated the multidate information comprising new transaction verification code according to business datum.
Step 314, will sell card information write Shou Ka district.
Step 316, writes this by the multidate information comprising new transaction verification code and writes district, updates this and writes the standby of district Part mark.
Step 318, copies this multidate information writing district to this reading area.
Concrete, mainly by the new transaction verification code information copy in multidate information to reading area, to ensure Write district consistent with the transaction verification code of reading area.
Step 320, points out mistake.
In sum, above-mentioned logic card reading/writing method, during card on sale, by identifying that multiple multidate information districts belong to In reading area or write district, then calculated for the business datum multidate information comprising new transaction verification code is write Ru Daoxie district, in Bing Jiangxie district, data copy reading area to, and update the backup mark writing district, so achieve The alternately read-write in multidate information district, and the multidate information in multiple multidate information district is identical, it is ensured that logic card exists Transaction is when writing card, write card data last time and is not completely changed to all the time repeatable write card, it is to avoid occurs writing Card crash and internal for logic card divided data is changed and causes the non-serviceable problem of logic card, reduce and write card mistake Lose the probability that need to do abnormality processing;By the effectiveness of decision logic card, determine whether logic card can be used, fall Low invalid operation probability.
In one embodiment, at this reading logic card, physical message and the user data of this logic card are obtained Before, also include: issue this logic card.
Fig. 4 is the flow chart issuing logic card in an embodiment.This distribution logic card includes:
Step 402, reads logic card, obtains the physical message of logic card.
According to this physical message, step 404, judges whether this logic card can initialize, the most then performs step 406, otherwise terminate.
Judge whether this logic card can initialized step include according to this physical message: by distribution work data In distribution serial number compare with the distribution serial number in this physical message, if identical, then this logic card can be just Beginningization, if it is not, then can not initialize, represents logic card mistake.
Step 406, determines in multiple multidate information districts of this logic card reading area belonging to each multidate information district or writes District.
Step 408, is calculated distribution identifying code and transaction verification code according to distribution work data.
Step 410, this distribution identifying code is verified, by distribution of information write distribution district.
Step 412, this transaction verification code is verified, and will sell card information write Shou Ka district and be write by multidate information Ru Gaixie district.
Step 414, copies this multidate information writing district to this reading area.
Above-mentioned distribution logic card, after distribution identifying code is verified, could issue district by distribution of information write, Complete to ensure when logic card is issued.
Fig. 5 is the structured flowchart of logic card read-write system in an embodiment.This logic card read-write system, bag Include read module 510, determine module 520, identifying code computing module 530, judge module 540, dynamically believe Breath computing module 550 and writing module 560.Wherein:
Read module 510 is used for reading logic card, obtains the user data of this logic card.
Determine that module 520 is for determining multiple according to the backup mark in each multidate information district in this user data Reading area belonging to each multidate information district or write district in multidate information district.
Identifying code computing module 530 is for being calculated transaction verification code according to the data of reading area.
Judge module 540 is for by other for this transaction verification code division and the transaction verification Ma Huoxie district of this reading area storage The transaction verification code of storage compares, if during difference, and the transaction verification that described transaction verification Ma Yuxie district is stored Code compares.
Multidate information computing module 550 is for the transaction verification at described transaction verification code with the storage of described reading area Code-phase is simultaneously, or different from the transaction verification code that described reading area stores at described transaction verification code and with described Write the transaction verification code-phase of district's storage simultaneously, be calculated according to business datum and comprise new transaction verification code Multidate information.
Writing module 560 writes district for the multidate information comprising new transaction verification code writes this, and updating should Write the backup mark in district.
Above-mentioned logic card read-write system is mainly used in read-write logic card data out of the station.It is understood that In one embodiment, this judge module 540 is additionally operable to the transaction at this transaction verification code with the storage of this reading area Identifying code or write the transaction verification code-phase of district's storage with the most afterwards, determines the effective of logic card according to this user profile Property;This multidate information computing module 550 is additionally operable to when determining that logic card is effective, calculates according to business datum Obtain comprising the multidate information of new transaction verification code.
Fig. 6 is the structured flowchart of logic card read-write system in another embodiment.This logic card read-write system, Including read module 510, determine module 520, identifying code computing module 530, judge module 540, dynamically Information computational module 550 and writing module 560, also include copying module 570 and issuing module 580.
This user data includes Status Flag;When detecting that this Status Flag is become selling state from the state of not selling Time, after this is calculated, according to business datum, the multidate information comprising new transaction verification code, and will The multidate information comprising new transaction verification code writes before this writes district, and this writing module 560 is additionally operable to sell Card information write Shou Ka district.
Copy module 570 is for copying this multidate information writing district to this reading area.
Wherein, this read module 510, determine module 520, identifying code computing module 530, judge module 540, Multidate information computing module 550, writing module 560 and copy module 570 are mainly used in when selling card logic The read-write of card data.
Issuing module 580 is used for issuing this logic card.
Fig. 7 is the internal structure block diagram of issuing module in an embodiment.This issuing module 580 includes reading Unit 581, judging unit 582, determine unit 583, identifying code computing unit 584, writing unit 585 With copy cell 586.Wherein:
Read unit 581 and be used for reading logic card, obtain the physical message of logic card.
According to this physical message, judging unit 582 is for judging whether this logic card can initialize.
This judging unit 582 is additionally operable in the distribution serial number in distribution work data and this physical message Distribution serial number compares, if identical, then this logic card can initialize.
Determine that unit 583, for when this logic card can initialize, determines multiple multidate informations of this logic card Reading area belonging to each multidate information district or write district in district.
Identifying code computing unit 584 is used for being calculated distribution identifying code according to distribution work data and transaction is tested Card code.
Writing unit 585 is for when this distribution identifying code is by checking, by distribution of information write distribution district, And when this transaction verification code passes through, card information write Shou Ka district will be sold and multidate information is write this write district.
Copy cell 586 is for copying this multidate information writing district to this reading area.
When above-mentioned logic card reading/writing method and system are applied to one-way ticket, one-way ticket typically uses Mifare Ultralight card is called for short MO card, and the EEPROM of a total of 512, they are organized into page 16, often Page 4 words, with page as access unit, the EEPROM storage organization of MO card such as table 2.
Table 2
Wherein, 4-15 page data is divided into each district as shown in table 3, including distribution district, sends out for storage Row information;Shou Ka district, is used for storing ticketing information;A district of multidate information district and B district of multidate information district.
Table 3
One-way ticket typically initializes can be fewer, typically do ticketing, enter the station, the operation such as departures, after departures again Ticketing is done in recovery.After one-way ticket ticketing for the first time, it is ensured that multidate information A and B district information is consistent, after Putting into use, process is as follows:
A=0, B=0, enter the station, and Xian Xie A district, A puts 1;
A=1, B=0, during departures, read A district, write B district, and B puts 1, reclaims one-way ticket;
A=1, B=1, again ticketing, read B district, write A district, and A sets to 0, the most again by A district information copy To B district;
A=0, B=1, enter the station, and reads A district, writes B district, and B sets to 0;
A=0, B=0, departures, read B district, write A district, A puts 1, reclaims one-way ticket;
A=1, B=0, again ticketing, read A district, write B district, and B puts 1, etc..
Wherein, A or B refers to that equal to 0 or 1 the backup mark in A district or B district is 0 or 1.
In other embodiments, it is possible to use A=0, B=0 or A=1, during B=1, write B district;A=1, When B=0 or A=0, B=1, write A district.
Above-mentioned logic card reading/writing method and system are applied to rechargeable card ticket.Typically it is called for short M1 with Mifare One card, Being divided into 16 sectors (Sector), each sector is 4 pieces (Block), and wherein first three block is data block, For depositing information, latter 1 piece is used for depositing password, and every piece of 16 bytes, with block for access unit.
Can be as shown in table 4 by data schema.
Table 4
Owing to M1 card by being sent to order and can calculate corresponding transaction verification code according to data, then move State information can no longer be provided with transaction verification code.
Rechargeable card ticket typically initializes, ticketing is the most fewer, typically supplements with money, enters the station, the operation such as departures. After for the first time ticketing of rechargeable card ticket, it is ensured that multidate information A and B district information is consistent, after put into use, Process is as follows:
A=0, B=0, enter the station, and Xian Xie A district, A puts 1;
A=1, B=0, departures, read A district, write B district, B puts 1;
A=1, B=1, enter the station, and reads B district, writes A district, and A sets to 0;
A=0, B=1, departures, read A district, write B district, B sets to 0;
A=0, B=0, supplement with money, reads B district, writes A district, and A puts 1;
A=1, B=0, enter the station, and reads A district, writes B district, and B puts 1, etc..
Regardless of M0 card or M1 card, multiple A and B district can also be set according to demand, more flexible.
Embodiment described above only have expressed the several embodiments of the present invention, and it describes more concrete and detailed, But therefore can not be interpreted as the restriction to the scope of the claims of the present invention.It should be pointed out that, for this area Those of ordinary skill for, without departing from the inventive concept of the premise, it is also possible to make some deformation and Improving, these broadly fall into protection scope of the present invention.Therefore, the protection domain of patent of the present invention should be with appended Claim is as the criterion.

Claims (10)

1. a logic card reading/writing method, comprises the following steps:
Read logic card, obtain the user data of described logic card;
Determine in multiple multidate information district each according to the backup mark in each multidate information district in described user data Reading area belonging to individual multidate information district or write district;
Data according to reading area are calculated transaction verification code, are stored with described reading area by described transaction verification code Transaction verification code compare, if the knot that the transaction verification code that described transaction verification code stores with described reading area compares The most identical, then it is calculated the multidate information comprising new transaction verification code according to business datum, will comprise new Transaction verification code multidate information write described in write district, write the backup mark in district described in renewal;If described friendship The transaction verification code result of the comparison that easily identifying code and described reading area store differs, then by described transaction verification Code compares with the described transaction verification code writing district's storage, if described transaction verification code writes district's storage with described The comparative result of transaction verification code identical, then be calculated according to business datum and comprise new transaction verification code Multidate information, by the multidate information comprising new transaction verification code write described in write district, write district described in renewal Backup mark;If described transaction verification code and the described comparative result not phase writing the transaction verification code that district stores With, then terminate.
Logic card reading/writing method the most according to claim 1, it is characterised in that described according to business Before data are calculated the step of the multidate information comprising new transaction verification code, described method also includes:
Determine the effectiveness of logic card according to user profile, if effectively, then perform to calculate according to business datum Step to the multidate information comprising new transaction verification code.
Logic card reading/writing method the most according to claim 1, it is characterised in that described user data package Include Status Flag;
When detecting that described Status Flag is become selling state from the state of not selling, described according to business datum After being calculated the step of the multidate information comprising new transaction verification code, and test comprising new transaction Before writing district described in the multidate information write of card code, described method also includes:
Card information write Shou Ka district will be sold;
Described in the multidate information comprising new transaction verification code write, write district described, described in renewal, write district After the step of backup mark, described method also includes:
Copy the described multidate information writing district to described reading area.
Logic card reading/writing method the most according to claim 1, it is characterised in that in described reading logic Card, before obtaining physical message and the user data of described logic card, also includes:
Issue the step of described logic card;
The described logic card of described distribution, including:
Read logic card, obtain the physical message of logic card;
Judge whether described logic card can initialize according to described physical message, if, it is determined that described logic Reading area belonging to each multidate information district or write district in multiple multidate information districts of card;
It is calculated distribution identifying code and transaction verification code according to distribution work data;
Described distribution identifying code is verified, then by distribution of information write distribution district;
Described transaction verification code is verified, then will sell card information write Shou Ka district and multidate information writes institute Shu Xie district;
The multidate information in district is write to described reading area described in copy.
Logic card reading/writing method the most according to claim 4, it is characterised in that believe according to described physics Breath judges whether described logic card can initialized step include:
Distribution serial number in distribution work data is compared with the distribution serial number in described physical message, if Identical, the most described logic card can initialize.
6. a logic card read-write system, it is characterised in that including:
Read module, is used for reading logic card, obtains the user data of described logic card;
Determine module, for determining multiple according to the backup mark in each multidate information district in described user data Reading area belonging to each multidate information district or write district in multidate information district;
Identifying code computing module, for being calculated transaction verification code according to the data of reading area;
Judge module, for the transaction verification code that described transaction verification code stores with described reading area is compared, if Time different, the transaction verification code that described transaction verification Ma Yuxie district stores is compared;
Multidate information computing module, for the transaction verification code at described transaction verification code with the storage of described reading area Time identical or different from the transaction verification code that described reading area stores at described transaction verification code and write with described The transaction verification code-phase of district's storage simultaneously, is calculated according to business datum and comprises the dynamic of new transaction verification code State information;
Writing module, writes district described in being write by the multidate information comprising new transaction verification code, updates institute The backup mark in Shu Xie district.
Logic card read-write system the most according to claim 6, it is characterised in that described judge module is also For the transaction verification code at described transaction verification code with the transaction verification Ma Huoxie district storage of described reading area storage After identical, determine the effectiveness of logic card according to user profile;Described multidate information computing module is additionally operable to When determining that logic card is effective, it is calculated the multidate information comprising new transaction verification code according to business datum.
Logic card read-write system the most according to claim 6, it is characterised in that described user data package Include Status Flag;
When detecting that described Status Flag is become selling state from the state of not selling, described according to business datum After being calculated the multidate information comprising new transaction verification code, and new transaction verification code will be comprised Before writing district described in multidate information write, said write module is additionally operable to sell card information write Shou Ka district;
Described system also includes: copy module, for copying the described multidate information writing district to described reading area.
Logic card read-write system the most according to claim 6, it is characterised in that described system also includes:
Issuing module, is used for issuing described logic card;
Described issuing module, including:
Read unit, be used for reading logic card, obtain the physical message of logic card;
According to described physical message, judging unit, for judging whether described logic card can initialize;
Determine unit, for when described logic card can initialize, determine the multiple dynamic letter of described logic card Reading area belonging to each multidate information district or write district in breath district;
Identifying code computing unit, for being calculated distribution identifying code and transaction verification according to distribution work data Code;
Writing unit, for when described distribution identifying code is verified, by distribution of information write distribution district, And when described transaction verification code is verified, card information write Shou Ka district will be sold and multidate information is write Described write district;
Copy cell, writes the multidate information in district to described reading area described in copying.
Logic card read-write system the most according to claim 9, it is characterised in that described judging unit It is additionally operable to compare the distribution serial number in distribution work data with the distribution serial number in described physical message, If identical, the most described logic card can initialize.
CN201410101658.1A 2014-03-18 2014-03-18 Logic card reading/writing method and system Active CN103824101B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410101658.1A CN103824101B (en) 2014-03-18 2014-03-18 Logic card reading/writing method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410101658.1A CN103824101B (en) 2014-03-18 2014-03-18 Logic card reading/writing method and system

Publications (2)

Publication Number Publication Date
CN103824101A CN103824101A (en) 2014-05-28
CN103824101B true CN103824101B (en) 2017-01-04

Family

ID=50759153

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410101658.1A Active CN103824101B (en) 2014-03-18 2014-03-18 Logic card reading/writing method and system

Country Status (1)

Country Link
CN (1) CN103824101B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104573764A (en) * 2014-12-22 2015-04-29 深圳市捷顺科技实业股份有限公司 Method and device for processing cards in parking lot
CN111105563B (en) * 2019-12-17 2021-08-24 厦门计讯物联科技有限公司 Water card data writing method, device, equipment and storage medium for preventing data loss

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101944191A (en) * 2009-07-08 2011-01-12 上海华虹集成电路有限责任公司 Anti-prying treatment method of non-contact logic encryption card

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101944191A (en) * 2009-07-08 2011-01-12 上海华虹集成电路有限责任公司 Anti-prying treatment method of non-contact logic encryption card

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
信息纽扣用于公交卡读写器的设计;陈蔚;《电子技术》;20051031;全文 *
金融智能卡操作***安全体系研究;杨帆;《计算机应用研究》;20051231;全文 *

Also Published As

Publication number Publication date
CN103824101A (en) 2014-05-28

Similar Documents

Publication Publication Date Title
CN109343790B (en) Data storage method based on NAND FLASH, terminal equipment and storage medium
US6970890B1 (en) Method and apparatus for data recovery
US6535997B1 (en) Data integrity in smartcard transactions
US8769309B2 (en) Flash memory storage system, and controller and method for anti-falsifying data thereof
CN105205508A (en) Self-service card issuing machine for intelligent card
CN109685190B (en) Power-down protection method and device for IC card
CN109254878B (en) Smart card power-down backup method and data structure based on character writing
CN107807886B (en) Index management in flash memory
CN103996412A (en) Power-fail protection method applied to intelligent-card nonvolatile memories
JP5833118B2 (en) Electronic ticket storage device, electronic ticket confirmation system and method
CN104978154A (en) Cache operation-based flash rapid read-write method and system
CN109947594A (en) A kind of data back up method and device, data reconstruction method and device
CN103824101B (en) Logic card reading/writing method and system
CN105683915A (en) Copy-on-write update-triggered consistency
CN105095352B (en) Data processing method and device applied to distributed system
CN111427726B (en) IC card and anti-power-down data backup method or data recovery method thereof
CN107957921B (en) Wear-balanced intelligent card power-down data protection method
CN107133163A (en) A kind of method and apparatus for verifying description class API
CN107257281B (en) Method, apparatus and computer readable storage medium for NOR F L ASH storage key record
CN107239229B (en) Method for performing data updates
CN102521746A (en) Safely-consuming smart card and method thereof
US20140289874A1 (en) Integrated circuit (ic) chip and method of verifying data thereof
CN104680095B (en) Non-contact IC card multi information block security update method
CN103870408B (en) Data processing method, Memory Controller and memorizer memory devices
CN112083891A (en) Method for detecting data block in memory and related equipment

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
PE01 Entry into force of the registration of the contract for pledge of patent right

Denomination of invention: Logic card reading-writing method and logic card reading-writing system

Effective date of registration: 20200709

Granted publication date: 20170104

Pledgee: Shenzhen hi tech investment small loan Co.,Ltd.

Pledgor: GAOXIN MODERN INTELLIGENT SYSTEM Co.,Ltd.

Registration number: Y2020980003921

PE01 Entry into force of the registration of the contract for pledge of patent right