CN109063522B - Card reader method and device - Google Patents

Card reader method and device Download PDF

Info

Publication number
CN109063522B
CN109063522B CN201810629047.2A CN201810629047A CN109063522B CN 109063522 B CN109063522 B CN 109063522B CN 201810629047 A CN201810629047 A CN 201810629047A CN 109063522 B CN109063522 B CN 109063522B
Authority
CN
China
Prior art keywords
card
card reader
verification
reset
response message
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.)
Expired - Fee Related
Application number
CN201810629047.2A
Other languages
Chinese (zh)
Other versions
CN109063522A (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.)
Zhejiang Gongshang University
Original Assignee
Zhejiang Gongshang University
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 Zhejiang Gongshang University filed Critical Zhejiang Gongshang University
Priority to CN201810629047.2A priority Critical patent/CN109063522B/en
Publication of CN109063522A publication Critical patent/CN109063522A/en
Application granted granted Critical
Publication of CN109063522B publication Critical patent/CN109063522B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06KGRAPHICAL DATA READING; PRESENTATION OF DATA; RECORD CARRIERS; HANDLING RECORD CARRIERS
    • G06K7/00Methods or arrangements for sensing record carriers, e.g. for reading patterns
    • G06K7/0013Methods or arrangements for sensing record carriers, e.g. for reading patterns by galvanic contacts, e.g. card connectors for ISO-7816 compliant smart cards or memory cards, e.g. SD card readers

Landscapes

  • Engineering & Computer Science (AREA)
  • Artificial Intelligence (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Power Sources (AREA)
  • Facsimiles In General (AREA)

Abstract

本发明公开了一种读卡器的读卡方法和装置,其中,方法包括:获取读卡器的上电信号,根据上电信号对读卡器进行初始化;在检测到卡片插入读卡器后,将预设的检测报文通过通讯协议传输至上位机;根据预设的时间阈值和校验参数对上位机反馈的应答报文进行验证判断,在验证判断不通过时,对读卡器进行复位处理;直到验证判断通过后,对读卡器中的卡片进行读卡操作。本发明避免读卡器外围硬件成本的增加,并且在上位机无法读取读卡器中的目标数据时,能够自动复位,让上位机的控制器重新枚举读卡器,增强读卡器健壮性。

Figure 201810629047

The invention discloses a card reading method and device of a card reader, wherein the method includes: acquiring a power-on signal of the card reader, and initializing the card reader according to the power-on signal; after detecting that the card is inserted into the card reader , transmit the preset detection message to the host computer through the communication protocol; verify and judge the response message fed back by the host computer according to the preset time threshold and verification parameters; Reset processing; until the verification judgment is passed, the card reading operation is performed on the card in the card reader. The invention avoids the increase of the cost of the peripheral hardware of the card reader, and can automatically reset when the host computer cannot read the target data in the card reader, so that the controller of the host computer can re-enumerate the card reader and enhance the robustness of the card reader. sex.

Figure 201810629047

Description

Card reading method and device of card reader
Technical Field
The invention relates to the technical field of card readers, in particular to a card reading method and a card reading device of a card reader.
Background
The card reader is a card reading device, can interact with a card through a slot for inserting the card or other wireless communication modes, and is provided with a port connected with an upper computer. The port connected with the upper computer mainly adopts two modes of a UART serial port or a USB interface. The USB does not need an external power supply, so the USB has obvious advantages compared with a UART mode. Due to the complexity of the USB software and hardware system, the stability of the USB interface mode is lower than that of the UART serial port mode. In the USB card reader, the interactive information between the card reader and the upper computer is transmitted through a USB protocol, which is very important and real-time, and once the USB has an unstable problem, the upper computer cannot read the data of the card in the card reader.
At present, the solution is to add a trigger to a peripheral hardware circuit of the card reader. Namely, when the USB card reader has a problem, the USB card reader is powered off and then powered on again by manually pressing the trigger, so that the hardware reset of the USB equipment is realized. This approach can increase the cost of the card reader peripheral hardware and is also inconvenient to use.
Disclosure of Invention
The invention provides a card reading method and a card reading device of a card reader, and mainly aims to solve the problems that in the prior art, a trigger needs to be added to a peripheral hardware circuit of the card reader, so that the peripheral hardware cost of the card reader is increased, and the use is inconvenient.
In order to solve the technical problems, the invention adopts the following technical scheme:
a card reading method of a card reader comprises the following steps;
acquiring a power-on signal of a card reader, and initializing the card reader according to the power-on signal;
after the card is detected to be inserted into the card reader, a preset detection message is transmitted to an upper computer through a communication protocol;
verifying and judging the response message fed back by the upper computer according to a preset time threshold and a verification parameter, and resetting the card reader when the verification and judgment are failed; and performing card reading operation on the card in the card reader until the verification judgment is passed.
As an implementable manner, the response message fed back by the upper computer is verified and judged according to a preset time threshold and a verification parameter, and when the verification judgment is failed, the card reader is reset; until the verification judgment is passed, carrying out card reading operation on the card in the card reader, and comprising the following steps;
judging the response message fed back by the upper computer according to a preset time threshold;
if the card reader receives a response message fed back by the upper computer within a preset time threshold, analyzing the response message; verifying the analysis result according to a preset verification parameter, and reading the card in the card reader according to the verification result;
and if the card reader does not receive the response message fed back by the upper computer within the preset time threshold, resetting the card reader.
As an implementation manner, the reading operation of the card in the card reader according to the verification result includes the following steps;
verifying the analysis result according to a preset verification parameter;
if the verification is passed, performing card reading operation on the card in the card reader;
and if the verification fails, resetting the card reader.
As an implementable manner, the card reading method of the card reader provided by the invention further comprises the following steps;
and after the card reader is initialized according to the power-on signal, circularly detecting whether the card reader is inserted into the card or not.
As an implementable manner, the card reading method of the card reader provided by the invention further comprises the following steps;
and after the card is detected to be inserted into the card reader, acquiring target data in the card, and storing the target data into a cache area of the card reader.
Correspondingly, the invention also provides a card reading device of the card reader, which comprises a power-on initialization module, a transmission module and a card reading module;
the power-on initialization module is used for acquiring a power-on signal of the card reader and initializing the card reader according to the power-on signal;
the transmission module is used for transmitting a preset detection message to the upper computer through a communication protocol after the card is detected to be inserted into the card reader;
the card reading module is used for verifying and judging the response message fed back by the upper computer according to a preset time threshold and the verification parameters, and resetting the card reader when the verification and judgment are failed; and performing card reading operation on the card in the card reader until the verification judgment is passed.
As an implementation manner, the card reading module comprises a judging unit, an analyzing unit and a resetting unit;
the judging unit is used for judging the response message fed back by the upper computer according to a preset time threshold;
the analysis unit is used for analyzing the response message fed back by the upper computer if the card reader receives the response message within a preset time threshold; verifying the analysis result according to a preset verification parameter, and reading the card in the card reader according to the verification result;
and the resetting unit is used for resetting the card reader if the card reader does not receive the response message fed back by the upper computer within a preset time threshold.
As an implementation manner, the parsing unit includes an authentication subunit, a card reading subunit and a resetting subunit;
the verification subunit is used for verifying the analysis result according to a preset verification parameter;
the card reading subunit is used for reading the card in the card reader if the verification is passed;
and the resetting subunit is used for resetting the card reader if the verification fails.
As an implementation manner, the card reading device of the card reader provided by the invention further comprises a cycle detection module;
and the cycle detection module is used for performing cycle detection on whether the card reader is inserted into the card or not after the card reader is initialized according to the power-on signal.
As an implementation manner, the card reading device of the card reader provided by the invention further comprises a cache module;
the cache module is used for acquiring target data in the card and storing the target data into a cache area of the card reader after the card is detected to be inserted into the card reader.
Compared with the prior art, the technical scheme has the following advantages:
according to the card reading method and the card reading device of the card reader, after the card is detected to be inserted into the card reader, the preset detection message is transmitted to the upper computer through a communication protocol; the card reader actively verifies and judges the communication condition between the card reader and the upper computer, and after the verification and judgment are failed, the card reader is reset, namely, the controller of the upper computer enumerates the card reader again; until the verification judgment is passed, performing card reading operation on the card in the card reader; therefore, the increase of the cost of peripheral hardware of the card reader is avoided, and when the upper computer cannot read target data in the card reader, the upper computer can automatically reset, so that the controller of the upper computer can enumerate the card reader again, and the robustness of the card reader is enhanced.
Drawings
Fig. 1 is a schematic flowchart of a card reading method of a card reader according to an embodiment of the present invention;
fig. 2 is a schematic structural diagram of a card reading device of a card reader according to a fourth embodiment of the present invention;
FIG. 3 is a schematic structural diagram of the card reading module in FIG. 2;
fig. 4 is a schematic structural diagram of the parsing unit in fig. 3.
In the figure: 100. a power-on initialization module; 200. a transmission module; 300. a card reading module; 310. a judgment unit; 320. an analysis unit; 321. a verification subunit; 322. a card reading subunit; 323. a reset subunit; 330. a reset unit; 400. and a cycle detection module.
Detailed Description
The above and further features and advantages of the present invention will be apparent from the following, complete description of the invention, taken in conjunction with the accompanying drawings, wherein the described embodiments are merely some, but not all embodiments of the invention.
Referring to fig. 1, a card reading method of a card reader according to an embodiment of the present invention includes the following steps;
s100, acquiring a power-on signal of the card reader, and initializing the card reader according to the power-on signal;
s200, after the card is detected to be inserted into the card reader, transmitting a preset detection message to an upper computer through a communication protocol;
s300, verifying and judging the response message fed back by the upper computer according to a preset time threshold and a verification parameter, and resetting the card reader when the verification and judgment are failed; and performing card reading operation on the card in the card reader until the verification judgment is passed.
It should be noted that the card reader of the present invention is of a type that performs data interaction with an upper computer in a USB interface manner. The upper computer comprises a PC end, a flat plate end, a mobile end, an industrial personal computer and other equipment. That is, the invention actually carries out data interaction on the card reader and the upper computer through the USB data line, and the upper computer reads the card of the card reader. The card reader is powered on to obtain the power-on signal, so that the card reader is initialized according to the power-on signal, wherein the initialization comprises initialization not limited to the card reader system and initialization of USB port configuration.
In this embodiment, the communication protocol includes, but is not limited to, USB communication protocol, SCSI communication protocol, CCID communication protocol, etc., and can be implemented by configuring the communication protocol in advance. The preset detection message comprises a message header, a message length, a command word parameter, data content and data verification. And the response message fed back by the upper computer comprises a message header, a message length, command word parameters, data contents and data verification.
Specifically, the data content in the detection message and the data content in the response message are in a corresponding relationship. The correspondence may be a preset data content implementation. For example, the data content in the detection message is "hello", and the data content of the response message corresponding thereto is "ok". The specific transmission feedback process is that after the upper computer receives the detection message with the hello, the detection message is analyzed and recoded. When the data content of the detected message obtained by analysis is hello, the data content is recoded to obtain a response message with ok and the response message is fed back to the card reader. Of course, if the data content of the detected packet obtained by the analysis is other data, the data may not be fed back directly or a response packet with "no" may be fed back. In other embodiments, the specific content of the correspondence between the data content in the detection message and the data content in the response message may be set arbitrarily.
For the card reader, the standard of the verification judgment needs to obtain the response message within a preset time threshold, and the data content in the response message needs to be matched with the verification parameter, which can be simply understood as that the data content of the response message is "ok". Of course, the verification parameter may be other preset data. That is, if an accurate response message is not obtained within a preset time threshold, the card reader is reset, that is, the controller of the upper computer re-enumerates the card reader. And performing card reading operation on the card in the card reader until the verification judgment is passed. The operation that a reset key needs to be manually pressed in the prior art is avoided, the time of a user is saved, and the cost of peripheral hardware of the card reader does not need to be increased.
According to the card reading method of the card reader, after the card is detected to be inserted into the card reader, the preset detection message is transmitted to the upper computer through a communication protocol; the card reader actively verifies and judges the communication condition between the card reader and the upper computer, and after the verification and judgment are failed, the card reader is reset, namely, the controller of the upper computer enumerates the card reader again; until the verification judgment is passed, performing card reading operation on the card in the card reader; therefore, the increase of the cost of peripheral hardware of the card reader is avoided, and when the upper computer cannot read target data in the card reader, the upper computer can automatically reset, so that the controller of the upper computer can enumerate the card reader again, and the robustness of the card reader is enhanced.
Further, step S300 includes the following steps;
s310, judging a response message fed back by the upper computer according to a preset time threshold;
s320, if the card reader receives a response message fed back by the upper computer within a preset time threshold, analyzing the response message; verifying the analysis result according to a preset verification parameter, and reading the card in the card reader according to the verification result;
and S320, if the card reader does not receive the response message fed back by the upper computer within the preset time threshold, resetting the card reader.
The time threshold is set in the card reader in advance, and can be 0.5S, 1S, 2S, 4S and the like. In this embodiment, if the time threshold is 1S, that is, if no response message fed back by the upper computer is received in 1S, the card reader is directly reset. The reset processing of the card reader is to enumerate the card reader again by the controller of the upper computer. The whole process of re-electrifying, initializing and sending the detection message can be automatically carried out, the operation of the card reader after the fault occurs is simplified, and convenience is brought to users.
Further, in step S320, a card reading operation is performed on a card in the card reader according to the verification result, including the following steps; verifying the analysis result according to a preset verification parameter; if the verification is passed, performing card reading operation on the card in the card reader; and if the verification fails, resetting the card reader.
The specific process of the verification may be to compare the preset verification parameter with the data content of the response message obtained by the analysis. And if the verification parameters are consistent with the data content of the response message, the verification is passed. If the verification parameter is inconsistent with the data content of the response message, the verification is not passed. Through simple comparison, complex algorithms are avoided, and therefore the response speed of the card reader is improved. The invention improves the stability grade of the card reader system with little software overhead on the premise of not increasing the hardware cost, thereby greatly improving the user experience.
In order to further improve the robustness of the card reader, compared with the first embodiment, the card reading method of the card reader provided by the second embodiment of the invention is characterized by further comprising the following steps; and after the card reader is initialized according to the power-on signal, circularly detecting whether the card reader is inserted into the card or not. The parameters configured for the port may be circularly monitored after the card reader is initialized. For example, the port configuration is 0 in the case of no card and 1 in the case of card. Then monitoring that the parameter of the port configuration becomes 1, then it is assumed that a card is inserted into the card reader. In other embodiments, a particular card type may be further identified by setting different parameters. The cycle detection can also be realized by arranging a sensor in an insertion interface of the card, for example, a position sensor is arranged, and a trigger signal is generated when the card is detected to be inserted.
In order to improve the reading speed of the target data, compared with the first embodiment, the card reading method of the card reader provided by the third embodiment of the invention is characterized by further comprising the following steps; and after the card is detected to be inserted into the card reader, acquiring target data in the card, and storing the target data into a cache area of the card reader. The buffer area of the card reader is a temporary storage area, and after the card is detected to be inserted into the card reader, the communication protocol authentication result is not considered. Firstly, storing target data in a card to a cache region of a card reader, and after the verification judgment is passed, reading the target data in the cache region by an upper computer. The card reading interruption caused by the interaction problem between the card and the card reader in the use process can be avoided.
Based on the same inventive concept, the embodiment of the invention also provides a card reading device of the card reader, and the implementation of the system can be realized by referring to the process of the method, and the repeated parts are not described redundantly.
Fig. 2 is a schematic structural diagram of a card reading device of a card reader according to a fourth embodiment of the present invention, including a power-on initialization module 100, a transmission module 200, and a card reading module 300; the power-on initialization module 100 is configured to obtain a power-on signal of the card reader, and initialize the card reader according to the power-on signal; the transmission module 200 is used for transmitting a preset detection message to an upper computer through a communication protocol after detecting that the card is inserted into the card reader; the card reading module 300 is configured to verify and judge the response message fed back by the upper computer according to a preset time threshold and the verification parameter, and perform a card reading operation on a card in the card reader after the verification and judgment are passed.
According to the card reading device of the card reader, after the card is detected to be inserted into the card reader, the preset detection message is transmitted to the upper computer through a communication protocol; the card reader actively verifies and judges the communication condition between the card reader and the upper computer, and after the verification and judgment are failed, the card reader is reset, namely, the controller of the upper computer enumerates the card reader again; until the verification judgment is passed, performing card reading operation on the card in the card reader; therefore, the increase of the cost of peripheral hardware of the card reader is avoided, and when the upper computer cannot read target data in the card reader, the upper computer can automatically reset, so that the controller of the upper computer can enumerate the card reader again, and the robustness of the card reader is enhanced.
In order to further improve the robustness of the card reader, the card reading device of the card reader provided by the fourth embodiment of the present invention further includes a cycle detection module 400; the cycle detection module 400 is configured to perform a cycle detection on whether the card reader is inserted into the card after the card reader is initialized according to the power-on signal.
In order to increase the reading speed of the target data, the card reading device of the card reader provided by the fourth embodiment of the present invention further includes a cache module; the cache module is used for acquiring target data in the card and storing the target data into a cache area of the card reader after detecting that the card is inserted into the card reader.
Fig. 3 is a schematic structural diagram of the card reading module 300, which includes a determining unit 310, an analyzing unit 320, and a resetting unit 330; the judging unit 310 is configured to judge the response message fed back by the upper computer according to a preset time threshold; the analysis unit 320 is configured to analyze the response message if the card reader receives the response message fed back by the upper computer within a preset time threshold; verifying the analysis result according to a preset verification parameter, and reading the card in the card reader according to the verification result; the resetting unit 330 is configured to perform resetting processing on the card reader if the card reader does not receive the response message fed back by the upper computer within a preset time threshold.
Fig. 4 is a schematic structural diagram of the parsing unit 320, which includes an authentication subunit 321, a card reading subunit 322, and a reset subunit 323; the verification subunit 321 is configured to verify the analysis result according to a preset verification parameter; the card reading clip unit 322 is used for reading the card in the card reader if the verification is passed; the reset subunit 323 is configured to perform a reset process on the card reader if the verification fails.
Although the present invention has been described with reference to the preferred embodiments, it is not intended to limit the present invention, and those skilled in the art can make variations and modifications of the present invention without departing from the spirit and scope of the present invention by using the methods and technical contents disclosed above.

Claims (10)

1.一种读卡器的读卡方法,其特征在于,包括以下步骤;1. a card reading method of a card reader, is characterized in that, comprises the following steps; 获取读卡器的上电信号,根据所述上电信号对读卡器进行初始化;Obtain the power-on signal of the card reader, and initialize the card reader according to the power-on signal; 在检测到卡片插入读卡器后,将预设的检测报文通过通讯协议传输至上位机;After detecting that the card is inserted into the card reader, the preset detection message is transmitted to the upper computer through the communication protocol; 根据预设的时间阈值和校验参数对上位机反馈的应答报文进行验证判断,在验证判断不通过时,对读卡器进行复位处理;直到验证判断通过后,对读卡器中的卡片进行读卡操作。According to the preset time threshold and verification parameters, the response message fed back by the host computer is verified and judged. When the verification judgment fails, the card reader is reset; until the verification judgment is passed, the card in the card reader is reset. Read card operation. 2.如权利要求1所述的读卡器的读卡方法,其特征在于,所述根据预设的时间阈值和校验参数对上位机反馈的应答报文进行验证判断,在验证判断不通过时,对读卡器进行复位处理;直到验证判断通过后,对读卡器中的卡片进行读卡操作,包括以下步骤;2. the card-reading method of card reader as claimed in claim 1, is characterized in that, described according to preset time threshold value and verification parameter, carries out verification and judgment to the response message fed back by the host computer, and does not pass the verification judgment When the card reader is reset, the card reader is reset; until the verification judgment is passed, the card reading operation is performed on the card in the card reader, including the following steps; 根据预设的时间阈值对上位机反馈的应答报文进行判断;Judging the response message fed back by the host computer according to the preset time threshold; 若在预设的时间阈值内读卡器接收到上位机反馈的应答报文,则对所述应答报文进行解析;根据预设的校验参数对解析结果进行验证,根据验证结果对读卡器中的卡片进行读卡操作;If the card reader receives the response message fed back by the host computer within the preset time threshold, it parses the response message; verifies the parsing result according to the preset verification parameters, and verifies the card reader according to the verification result. Read the card in the device; 若在预设的时间阈值内读卡器没有接收到上位机反馈的应答报文,则对读卡器进行复位处理。If the card reader does not receive a response message fed back by the host computer within the preset time threshold, the card reader is reset. 3.如权利要求2所述的读卡器的读卡方法,其特征在于,所述根据验证结果对读卡器中的卡片进行读卡操作,包括以下步骤;3. The card-reading method of a card reader according to claim 2, wherein the performing a card-reading operation on the card in the card reader according to the verification result, comprises the following steps; 根据预设的校验参数对解析结果进行验证;Verify the analysis result according to the preset verification parameters; 若验证通过,则对读卡器中的卡片进行读卡操作;If the verification is passed, read the card in the card reader; 若验证不通过,则对读卡器进行复位处理。If the verification fails, reset the card reader. 4.如权利要求1至3任意一项所述的读卡器的读卡方法,其特征在于,还包括以下步骤;4. The card reading method of a card reader according to any one of claims 1 to 3, characterized in that, further comprising the following steps; 在根据所述上电信号对读卡器进行初始化之后,对读卡器是否插入卡片进行循环检测。After the card reader is initialized according to the power-on signal, cyclic detection is performed on whether a card is inserted into the card reader. 5.如权利要求1至3任意一项所述的读卡器的读卡方法,其特征在于,还包括以下步骤;5. The card reading method of a card reader according to any one of claims 1 to 3, characterized in that, further comprising the following steps; 在检测到卡片插入读卡器后,获取卡片中的目标数据,将所述目标数据存储至读卡器的缓存区。After detecting that the card is inserted into the card reader, obtain the target data in the card, and store the target data in the buffer area of the card reader. 6.一种读卡器的读卡装置,其特征在于,包括上电初始化模块、传输模块以及读卡模块;6. A card reading device of a card reader, characterized in that it comprises a power-on initialization module, a transmission module and a card reading module; 所述上电初始化模块,用于获取读卡器的上电信号,根据所述上电信号对读卡器进行初始化;The power-on initialization module is used to obtain the power-on signal of the card reader, and initialize the card reader according to the power-on signal; 所述传输模块,用于在检测到卡片插入读卡器后,将预设的检测报文通过通讯协议传输至上位机;The transmission module is used to transmit the preset detection message to the upper computer through the communication protocol after detecting that the card is inserted into the card reader; 所述读卡模块,用于根据预设的时间阈值和校验参数对上位机反馈的应答报文进行验证判断,在验证判断不通过时,对读卡器进行复位处理;直到验证判断通过后,对读卡器中的卡片进行读卡操作。The card reader module is used for verifying and judging the response message fed back by the host computer according to the preset time threshold and verification parameters, and when the verification and judgment fails, the card reader is reset; until the verification and judgment are passed. , to read the card in the card reader. 7.如权利要求6所述的读卡器的读卡装置,其特征在于,所述读卡模块包括判断单元、解析单元以及复位单元;7. The card reading device of a card reader according to claim 6, wherein the card reading module comprises a judgment unit, an analysis unit and a reset unit; 所述判断单元,用于根据预设的时间阈值对上位机反馈的应答报文进行判断;The judging unit is used for judging the response message fed back by the host computer according to a preset time threshold; 所述解析单元,用于若在预设的时间阈值内读卡器接收到上位机反馈的应答报文,则对所述应答报文进行解析;根据预设的校验参数对解析结果进行验证,根据验证结果对读卡器中的卡片进行读卡操作;The parsing unit is used for parsing the response message if the card reader receives the response message fed back by the host computer within the preset time threshold; verifying the parsing result according to the preset verification parameters , and read the card in the card reader according to the verification result; 所述复位单元,用于若在预设的时间阈值内读卡器没有接收到上位机反馈的应答报文,则对读卡器进行复位处理。The reset unit is configured to reset the card reader if the card reader does not receive a response message fed back by the host computer within a preset time threshold. 8.如权利要求7所述的读卡器的读卡装置,其特征在于,所述解析单元包括验证子单元、读卡子单元以及复位子单元;8. The card reading device of a card reader according to claim 7, wherein the parsing unit comprises a verification subunit, a card reading subunit and a reset subunit; 所述验证子单元,用于根据预设的校验参数对解析结果进行验证;The verification subunit is used to verify the parsing result according to preset verification parameters; 所述读卡子单元,用于若验证通过,则对读卡器中的卡片进行读卡操作;The card-reading sub-unit is used to perform a card-reading operation on the card in the card reader if the verification is passed; 所述复位子单元,用于若验证不通过,则对读卡器进行复位处理。The reset subunit is used to reset the card reader if the verification fails. 9.如权利要求6至8任意一项所述的读卡器的读卡装置,其特征在于,还包括循环检测模块;9. The card reading device of a card reader according to any one of claims 6 to 8, further comprising a cycle detection module; 所述循环检测模块,用于在根据所述上电信号对读卡器进行初始化之后,对读卡器是否插入卡片进行循环检测。The cycle detection module is configured to perform cycle detection on whether a card is inserted into the card reader after the card reader is initialized according to the power-on signal. 10.如权利要求6至8任意一项所述的读卡器的读卡装置,其特征在于,还包括缓存模块;10. The card reading device of a card reader according to any one of claims 6 to 8, further comprising a cache module; 所述缓存模块,用于在检测到卡片插入读卡器后,获取卡片中的目标数据,将所述目标数据存储至读卡器的缓存区。The cache module is used for acquiring target data in the card after detecting that the card is inserted into the card reader, and storing the target data in the buffer area of the card reader.
CN201810629047.2A 2018-06-19 2018-06-19 Card reader method and device Expired - Fee Related CN109063522B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810629047.2A CN109063522B (en) 2018-06-19 2018-06-19 Card reader method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810629047.2A CN109063522B (en) 2018-06-19 2018-06-19 Card reader method and device

Publications (2)

Publication Number Publication Date
CN109063522A CN109063522A (en) 2018-12-21
CN109063522B true CN109063522B (en) 2021-10-08

Family

ID=64820447

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810629047.2A Expired - Fee Related CN109063522B (en) 2018-06-19 2018-06-19 Card reader method and device

Country Status (1)

Country Link
CN (1) CN109063522B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109698830B (en) * 2018-12-25 2021-01-15 飞天诚信科技股份有限公司 Method and system for communicating with identity card
CN110489078B (en) * 2019-08-16 2021-05-25 兆讯恒达科技股份有限公司 Self-checking method of random number generator
CN118734879A (en) * 2024-07-09 2024-10-01 深圳奥束科技有限公司 Card reading method, system and device of card reader

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103310175A (en) * 2013-06-24 2013-09-18 飞天诚信科技股份有限公司 Standard CCID protocol based working method for multi-card-slot card reader
CN103678215A (en) * 2013-12-09 2014-03-26 飞天诚信科技股份有限公司 Working method of intelligent card reader

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4876236B2 (en) * 2006-09-01 2012-02-15 日本電産サンキョー株式会社 USB communication system, USB device, and abnormality detection method for USB communication system
CN102722687B (en) * 2012-05-30 2014-07-30 飞天诚信科技股份有限公司 Method for detecting departure of non-contact type CPU card from radio frequency field
CN102880842B (en) * 2012-08-16 2015-09-23 飞天诚信科技股份有限公司 A kind of method strengthening non-contact card and card reader communication robust
CN102930670B (en) * 2012-10-23 2014-12-10 福建鑫诺通讯技术有限公司 Intelligent financial card-reading system
CN104281825B (en) * 2014-09-29 2017-06-06 飞天诚信科技股份有限公司 A kind of method of work of the card reader based on intelligent SD card
CN106250789B (en) * 2016-08-01 2018-10-12 飞天诚信科技股份有限公司 A kind of card reader and its method that card is powered on

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103310175A (en) * 2013-06-24 2013-09-18 飞天诚信科技股份有限公司 Standard CCID protocol based working method for multi-card-slot card reader
CN103678215A (en) * 2013-12-09 2014-03-26 飞天诚信科技股份有限公司 Working method of intelligent card reader

Also Published As

Publication number Publication date
CN109063522A (en) 2018-12-21

Similar Documents

Publication Publication Date Title
US9928197B2 (en) USB device and method thereof for recognizing host operating system
US8862790B2 (en) Method for identifying version type of windows operating system on a host by a USB device
CN109063522B (en) Card reader method and device
CN201327514Y (en) Portable media device, accessory device, and integrated circuit for generating identification information
CN102034071B (en) Automatic test system and automatic test method for testing bar code identification device
US9589160B2 (en) Working method for smart card reader
US11861872B2 (en) Login method based on fingerprint recognition and device
CN108153696B (en) Embedded system serial port module matching method, device, medium and computer equipment
CN104572564A (en) Method for realizing communication of Android mobile equipment and USB OTG (On-The-Go) host computer
WO2021077825A1 (en) Security authentication method and related apparatus
CN115562895A (en) Abnormal recovery method and device for electronic equipment
TW201717093A (en) Method and device for accessing network
CN111338673B (en) Equipment debugging method and device, electronic equipment and storage medium
US20150235228A1 (en) Method, device and system for on-line payment information transmission
CN112346665B (en) PCIE-based communication method, device, equipment, system and storage medium
CN104933379A (en) Identity card information acquisition method, device and system
WO2013182053A1 (en) Sensor access detection method, device and system
CN105898382A (en) Display parameter generation method, device and system
WO2019090466A1 (en) Firmware upgrade method for stylus, terminal and stylus
WO2014106395A1 (en) Method and system for controlling power-on of mobile phones for lovers based on same
TW201544989A (en) Computer system featuring wake-up verification and computer device thereof
CN110119646B (en) Device parameter setting method and system based on radio frequency card
CN111984291A (en) Data burning method, device, terminal and storage medium
CN102307100A (en) Data processing device and data processing method thereof
CN107483723A (en) Mobile terminal, method for recording operation process thereof, and computer-readable storage 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
CF01 Termination of patent right due to non-payment of annual fee
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20211008