CN101546446B - Method for processing non-timescale data of radio-frequency card reader - Google Patents
Method for processing non-timescale data of radio-frequency card reader Download PDFInfo
- Publication number
- CN101546446B CN101546446B CN2008100431933A CN200810043193A CN101546446B CN 101546446 B CN101546446 B CN 101546446B CN 2008100431933 A CN2008100431933 A CN 2008100431933A CN 200810043193 A CN200810043193 A CN 200810043193A CN 101546446 B CN101546446 B CN 101546446B
- Authority
- CN
- China
- Prior art keywords
- card reader
- record
- card
- reader
- time
- 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
Images
Abstract
The invention discloses a method for processing non-timescale data of a radio-frequency card reader, which comprises the following steps: (1) successfully connecting a computer with the card reader; (2) reading the stored time when the card reader completes the startup from a file; (3) reading data in the card reader; if reading the record, determining that the timescale currently recorded is equal to the time when the card reader completes the startup plus the timing seconds of the data, recording the timescale to a database, repeating the step (3), and if reading no record, switching to the next step; (4) activating the card reader; (5) reading real-time card punching record, if reading successfully, determining that the timescale currently recorded is the current system time of the computer, recoding the timescale to the database, and if reading unsuccessfully, switching to the step (1); and (6) using the current system time of the computer to subtract the timing seconds of the record to modify the time when the card reader completes the startup, and switching to the step (5). The method realizes the effective retrospection on the card punching record after a failure of the card reader or the computer occurs.
Description
Technical field
The present invention relates to time data disposal route in a kind of access control system, be specifically related to a kind of disposal route of non-timescale data of radio-frequency card reader.
Background technology
In the vehicle turnover automatic recognition system, used remote wireless radio-frequency, at each entrance guard place card reader (Reader) and antenna are set, be placed in radio frequency card on the vehicle and represent the identity of vehicle, vehicle is through radio frequency induction when zone, and Reader is the record of swiping the card of registration of vehicle, and is sent to the computing machine that is attached thereto in real time, realize entrance guard management, and the historical record of registration of vehicle turnover in Computer Database.
Because Reader does not have the system time of oneself, therefore when registration of vehicle is swiped the card historical record, need stamp markers, thereby the vehicle turnover means that historical record is reviewed are provided.All move under the normal situation at Reader and computing machine, can provide the time of vehicle brushing card according to the system for computer time; But when computing machine reads the real time data dysfunction (such as computer failure, obstructed etc. with the Reader network), can preserve the historical record of some in the Reader internal memory, after computing machine recovery normally, historical record in the Reader internal memory is transferred in the Computer Database, at this time just have target problem when accurate of how stamping, purpose of the present invention will solve under the various situations exactly can stamp markers for every the record of swiping the card exactly, so that historical tracing to be provided.
Analyzing the characteristic of Reader can learn:
(1) behind the Reader electrifying startup, the timer of Reader is that unit picks up counting from 0 with the second.All comprise the numerical value of timer at that time in each the bar record that is produced later; After Reader was restarted, this count value zero clearing restarted timing.
(2) Reader must could be received card image after the software activation; After Reader is restarted, can receive card image after needing software to activate once more.
(3) in a single day Reader is activated, and can break away from software and works, break away from software after, brushing card data is kept in the Reader internal memory, as long as do not cut off the power supply, can preserve 30,000 records in the internal memory
(4) normal workflow should be: connect Reader->activation Reader->read record of swiping the card in real time.
(5) Reader is activated, broken away from software work a period of time, data are kept in the internal memory, when software connects Reader again, then need not to remake activation manipulation, can directly read the data in the internal memory, workflow should be: connect Reader->the read history record of swiping the card, read sky till->read the record of swiping the card in real time.
Working state analysis according to computing machine or Reader has following failure condition simultaneously:
(1), when Reader outage or fault, and computer program still is in operation, at this moment vehicle produces through the out-of-date data that do not have.When Reader recovers just often, computing machine should not need human intervention promptly to begin to gather the data among the Reader and stamp correct markers, under various normal and unusual situations in the future, how correctly to write down for swiping the card and stamps markers simultaneously.
(2), normally move as Reader, and computer hardware or software break down or during network anomaly, and computing machine is image data from Reader not just, and this moment, Reader can save the data in the internal memory of oneself.After computing machine recovers normal operation again, historical record in the Reader internal memory is transferred in the database of computing machine, in this case, how can stamp correct markers for historical record, simultaneously under various normal and unusual situations in the future, how correctly to write down and stamp markers for swiping the card.
(3), former thereby successively quit work when Reader and computer program because of some, after a period of time, successively start again, in this case, how stamp correct markers, under various normal and unusual situations in the future, how correctly to write down and stamp markers simultaneously for swiping the card for the record of swiping the card.
Summary of the invention
Technical matters to be solved by this invention provides a kind of disposal route of non-timescale data of radio-frequency card reader, and it can establish charge time for the non-timescale data of storing in the card reader after the computer system fault.
For solving the problems of the technologies described above, the disposal route of non-timescale data of radio-frequency card reader of the present invention may further comprise the steps:
(1) computing machine connects card reader, up to successful connection;
(2) card reader that reads in the file to be preserved starts the moment of finishing;
(3) read data in the card reader, if read historical record, then determine current record the time be designated as card reader and start timing number second that the moment of finishing adds this historical record, record in the database, and repeating step (3), if do not read historical record, then change next step over to;
(4) activate card reader;
(5) read the record of swiping the card in real time, if read success, then determine current record the time be designated as the current system time of computing machine, record in the database; If read failure, then forward step (1) to;
(6) deduct this timing of writing down of swiping the card in real time with the current system time of computing machine and count the moment that the startup of correction card reader is finished second, forward step (5) to.
The present invention stores card reader and starts the moment finish, and revises this startups moment when card reader is restarted or during the timer sideslip, and do not have markers timing numerical value in conjunction with card reader and obtain charge time accurately,
Realized that back effectively reviewing the record of swiping the card taken place for card reader fault or computer failure situation.
Description of drawings
Below in conjunction with the drawings and specific embodiments the present invention is described in further detail.
Fig. 1 is the process flow diagram of the disposal route of non-timescale data of radio-frequency card reader of the present invention;
Fig. 2 is a specific embodiment of the present invention.
Embodiment
At analyzing the problem that the Reader performance is discussed in the background technology, further analyze:
The real-time record of swiping the card can adopt computer acquisition to the system time of the record of swiping the card as markers.And for overstocking history in the Reader record of swiping the card, because Reader can provide one to be the counting of unit with the second behind device start, and be included in each bar and swipe the card in the historical record, therefore our startup StartTime constantly that need safeguard a Reader swipes the card accurate moment of historical record thereby can calculate each bar.
To problem (1) because the Reader power-off restarting can not advising process, but necessarily there are not overstocked data among the Reader after restarting, but need safeguard the StartTime of Reader, so that computer failure recovers again just often later on, for the overstocked historical record of being read is stamped markers accurately.
To problem (2), because we have safeguarded StartTime accurately, therefore can calculate the moment of swiping the card accurately according to the timer that overstocks in the historical record, stamp markers accurately, because data that the record that does not have software interface to be read from Reader for the program judgement is overstock before being or the data of swiping the card in real time, so a kind of judgment mechanism need be provided, make calling program normally can treat processing with a certain discrimination with real-time brushing card data to overstocking data after the startup.
To problem (3), if there is not the activation of program, after Reader started, just timer was in work, and card-punching system can't operate as normal.When Reader did not open, computer program started the constantly action of retry activation Reader of back, but constantly failure successfully starts up to Reader.The successful article one record read the back that starts must be that real-time swiping the card write down but not overstocked data, and we can obtain the moment that Reader begins operate as normal like this.
Above-mentioned analysis is a design philosophy of the present invention, and the present invention safeguards the information of " the Reader timing StartTime zero hour " in computing machine.Because the card reader operate as normal needs the program deactivation, so system swipes the card when taking place the first time after setting up, and deducts second number in this record with the computing machine current time, promptly obtains the initial value of StartTime, StartTime write file preserve.No matter be Reader, computing machine or network failure, as long as Reader and computing machine one connect, begin to read the overstocked data among the Reader immediately, the StartTime that is safeguarded in the disk file that uses a computer adds the second number in the record of swiping the card, for markers stamped in record, till reading sky.Then enter the state that wait is swiped the card in real time.After swiping the card in real time, get current system time, for markers stamped in record, and the StartTime value of real-time modified R eader.
The disposal route of non-timescale data of radio-frequency card reader of the present invention may further comprise the steps: at first computing machine connects card reader, up to successful connection.The card reader that reads in the file then to be preserved starts the moment StartTime that finishes.Next step directly reads the overstocked data in the card reader, reads till the sky, if read record, then timing number second in the record is tv_sec, stamps markers with StartTime+tv_sec; Not reading record, may be not have record, also may be not activate, and then further activates card reader (even activate, it is also out of question to call activation instruction), reads in the record of swiping the card in real time.If read success, then stamp markers with the current system time SysTime of computing machine, record in the database; If read failure, expression loses with card reader and is connected, and the return information section start connects card reader.The clock of considering the timer of card reader and computing machine at last may sideslip, therefore revises the value of StartTime with SysTime-tv_sec, continues to read in the record of swiping the card in real time.
Be illustrated in figure 1 as the process flow diagram of the disposal route of non-timescale data of radio-frequency card reader of the present invention, at first computing machine connects card reader, up to successful connection.After the successful connection, directly carry out historical the reading of data of overstocking, here in two kinds of situation (card reader is in normal state of activation and card reader is in unactivated state), for first kind of situation, we think that computing machine once activated it, it is correct that the card reader of then being safeguarded in the computing machine starts the moment StartTime that finishes, the record that to read is handled as historical record so, and keeping original card reader, to start the moment StartTime value of finishing constant, start the moment StartTime finish with card reader and add that the timing in the record counts tv_sec as markers second, and the historical record action is read in circulation; For second kind of situation, we think during computer failure, card reader also once took place to restart, the historical data that overstock can not be arranged in the card reader, computing machine necessarily reads less than history and overstocks data, and computing machine reading card device activates so, then enters the circulation of reading real-time brushing card data, computing machine current time SysTime as the markers of record of swiping the card, and is constantly revised the value that card reader starts the moment StartTime finish.
If find after successful connection or after reading successfully that not reading card reader has brushing card data, can judge that then card reader is at the state that reads in real time among the present invention, promptly next data of reading in must be real time datas; Promptly do not read data if after successful connection, make activation manipulation, then be judged to be overstocked data are arranged in the card reader, reading to overstock in the process of data, swipe the card in real time if take place, overstock the algorithm of data according to judgement of the present invention, be to equal the timing numerical value that zero-time adds these data charge time all can obtain correct charge time, so above-mentioned in the present invention two kinds of situations all are judged to be and overstock data and calculate.
Be a specific embodiment of the present invention as shown in Figure 2, take place when certain vehicle doorn access control system has following process:
2008-02-04 10:33:48 is the Reader initial start constantly;
2008-03-07 08:26:10 Reader constantly breaks down;
After 2008-03-07 08:40:21 handled fault constantly, Reader restarted and finishes, and after Reader recovered normally, computing machine connected with Reader immediately, and overstock data this moment, and computing machine promptly activates Reader, goes forward side by side into reading the circulation of swiping the card in real time;
The 2008-03-07 08:43:49 incident of swiping the card takes place, this moment system time SysTime=2008-03-07 08:43:49, the timing numerical value tv_sec=208 second of this record, then upgrade card reader StartTime=SysTime-tv_sec=2008-03-07 start-up time 08:40:21, judge that charge time is computing machine current time SysTime;
2008-03-15 10:56:55 computing machine and Reader network interrupt;
The 2008-03-15 11:06:02 incident of swiping the card takes place, but because network interrupts, computing machine can not read;
2008-03-15 11:36:26 network recovery is normal, computing machine rebulids with Reader and is connected, promptly begin to read the historical data that overstock, the timing numerical value tv_sec=699733 second that read data this moment, then charge time CurTime=StartTime+tv_sec=2008-03-07 08:40:21+699733 second=2008-03-15 11:06:02.Continue to read the historical data that overstock again, up to reading sky, then carry out activation manipulation, and enter real-time brushing card data reading state.
The foregoing description method of the present invention as can be seen is very simple to the processing procedure of data, can obtain charge time accurately, has realized that back effectively reviewing the record of swiping the card taken place for card reader fault or computer failure situation.
Claims (1)
1. the disposal route of a non-timescale data of radio-frequency card reader; It is characterized in that, comprise the steps:
(1) computing machine connects card reader, up to successful connection;
(2) card reader that reads in the file to be preserved starts the moment of finishing;
(3) read data in the card reader, if read historical record, then determine current record the time be designated as card reader and start timing number second that the moment of finishing adds this historical record, record in the database, and repeating step (3), if do not read historical record, then change next step over to;
(4) activate card reader;
(5) read the record of swiping the card in real time, if read success, then determine current record the time be designated as the current system time of computing machine, record in the database; If read failure, then forward step (1) to;
(6) deduct this timing of writing down of swiping the card in real time with the current system time of computing machine and count the moment that the startup of correction card reader is finished second, forward step (5) to.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN2008100431933A CN101546446B (en) | 2008-03-26 | 2008-03-26 | Method for processing non-timescale data of radio-frequency card reader |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN2008100431933A CN101546446B (en) | 2008-03-26 | 2008-03-26 | Method for processing non-timescale data of radio-frequency card reader |
Publications (2)
Publication Number | Publication Date |
---|---|
CN101546446A CN101546446A (en) | 2009-09-30 |
CN101546446B true CN101546446B (en) | 2011-02-09 |
Family
ID=41193564
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN2008100431933A Active CN101546446B (en) | 2008-03-26 | 2008-03-26 | Method for processing non-timescale data of radio-frequency card reader |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN101546446B (en) |
Families Citing this family (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102306407B (en) * | 2011-09-14 | 2013-12-25 | 颜力 | RFRD (radio frequency identification)-based timing method, device and system |
CN102360415B (en) * | 2011-09-27 | 2014-03-26 | 颜力 | Radio frequency identifier sorting method and radio frequency identification system |
CN106052298B (en) * | 2016-06-29 | 2018-07-31 | 合肥美的智能科技有限公司 | A kind of intelligent refrigerator record food is put into the method, system and intelligent refrigerator of time |
CN115366958B (en) * | 2022-08-25 | 2023-08-22 | 中车青岛四方机车车辆股份有限公司 | Self-diagnosis method, system and data management system |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1458016A (en) * | 2003-06-11 | 2003-11-26 | 乔永康 | Intelligent management system for entrance guard without stopping car |
CN1598881A (en) * | 2004-09-17 | 2005-03-23 | 深圳市博思高科技有限公司 | Intelligent timing fee collecting system of parking lot |
US20060267736A1 (en) * | 2005-05-31 | 2006-11-30 | Tc License Ltd. | Automatic mode detection in a dual operating mode RFID tag |
CN101021956A (en) * | 2007-03-05 | 2007-08-22 | 倚天资讯股份有限公司 | Curb parking fee collecting system and method |
US7333012B1 (en) * | 2004-05-25 | 2008-02-19 | Martin Khang Nguyen | Vehicle monitoring and control using radio frequency identification |
-
2008
- 2008-03-26 CN CN2008100431933A patent/CN101546446B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1458016A (en) * | 2003-06-11 | 2003-11-26 | 乔永康 | Intelligent management system for entrance guard without stopping car |
US7333012B1 (en) * | 2004-05-25 | 2008-02-19 | Martin Khang Nguyen | Vehicle monitoring and control using radio frequency identification |
CN1598881A (en) * | 2004-09-17 | 2005-03-23 | 深圳市博思高科技有限公司 | Intelligent timing fee collecting system of parking lot |
US20060267736A1 (en) * | 2005-05-31 | 2006-11-30 | Tc License Ltd. | Automatic mode detection in a dual operating mode RFID tag |
CN101021956A (en) * | 2007-03-05 | 2007-08-22 | 倚天资讯股份有限公司 | Curb parking fee collecting system and method |
Also Published As
Publication number | Publication date |
---|---|
CN101546446A (en) | 2009-09-30 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US10019334B2 (en) | Apparatus and methods for monitoring one or more portable data terminals | |
CN100498719C (en) | Method and device for executing batch processing job | |
CN101546446B (en) | Method for processing non-timescale data of radio-frequency card reader | |
CN101681288A (en) | Providing event-controlled continuous logging for a mobile operating environment | |
CN102981944B (en) | A kind of log storing method based on file system | |
CN101206772A (en) | Gate inhibition management system by brushing card in running | |
CN101017547A (en) | Employee attendance integrated management method and device thereof | |
CN104254097A (en) | Flow control method and device | |
CN104461631B (en) | A kind of system OTA upgrade methods and device | |
CN101918981B (en) | Pattern matching system, pattern matching method | |
CN101909189A (en) | File recovery method, system and DVR (Digital Video Recorder) | |
CN114092082A (en) | Consumption method and system of intelligent consumption machine based on multiple consumption situations | |
EP1892645A2 (en) | A smart card operating system and method | |
CN102799931A (en) | Data protection method of radio frequency smart card | |
CN105117242A (en) | System resetting method and terminal | |
CN107729196A (en) | Smart card power failure test method | |
CN109615720A (en) | A kind of noninductive attendance checking system based on recognition of face API | |
EP3411826A1 (en) | Method for managing a real-time clock in a portable tamper-resistant device | |
CN106897063A (en) | A kind of method and system being forever added to OS startup items based on EFI in BIOS | |
EP2367108A2 (en) | Portable electronic device, communication device, and command processing method | |
CN114613024B (en) | Method, device and system for pushing face recognition pictures based on action data | |
CN215599697U (en) | Park payment system | |
CN101369238A (en) | Exception monitoring and reset processing method for USB equipment | |
CN109934327B (en) | Timing method and system of smart card | |
CN110109700B (en) | Data statistics method and device for iOS App without buried points |
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 |