A method for switching card reading and writing modes by automatic identification
By introducing automatic identification technology and matching rules in the read and write card equipment, combining embedded devices and induction cards, automatic switching of read and write card mode is achieved, solving the problems of single equipment functions, numerous devices, and online dependence in the existing technology, and achieving multiple compatibility and offline usage capabilities of the device functions.
Patent Information
- Application Number
- CN201910546980.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2019-06-24
- Publication Date
- 2025-03-25
- Estimated Expiration
- 2039-06-24
AI Technical Summary
In the prior art, the read and write card equipment has a single function and a wide range of devices. It requires multiple devices to complete basic in-card data identification and customization operations. The device needs to be online to switch the read and write card mode, and offline use is invalid.
Through automatic identification technology, embedded devices and induction cards are used, combined with matching rules and card passwords, automatic switching of read and write card modes is achieved, so that the device can work normally offline.
It realizes multiple compatibility of device functions, reduces the number of devices and installation complexity, allows the device to be used normally in offline situations, and meets the needs of remote online control and offline use.
Smart Images

Figure CN112131893B_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the field of electronics, communication and monitoring safety technology, and in particular relates to a method for switching a card reading and writing mode through automatic identification. Background Art
[0002] The existing devices on the market that can read and write data in cards are generally divided into the following three types: front-end card readers and communication control devices with card reading functions; front-end card issuers, which are generally only used for card issuance and do not have other expandable functions; front-end card readers and writers, but must be used in conjunction with a host computer or back-end platform, and human intervention is required to control the card reader and writer through the communication interface to switch the reading and writing modes.
[0003] The above existing technologies have the following disadvantages: single function and numerous devices. For a card reader that only has a card reading function, it is necessary to connect a controller with a function of analyzing the data sent by the card reader, and then cooperate with the above-mentioned card issuer specifically used for writing cards to complete the basic card data recognition and subsequent customized operation functions. Through the above restriction description, it is found that because each device has a single function, three or more devices are required to complete only one daily use (such as swiping a card to enter the door), which increases the number of product categories in the production process and the cumbersomeness of the installation process.
[0004] There are devices in the market that combine the front-end card reader with the controller. This method reduces the number of connections of the front-end device and removes the exposed communication interface (such as serial port or Wiegand) between the card reader and the controller, reducing the number of basic devices from three to two, but it still does not solve the problem of using the card reader and writer devices separately. For devices that have both card reader and writer functions, in order to complete the switching between the card reader mode and the card writer mode, it is necessary to connect online (through the serial port, network port, etc.) to maintain close communication with the host computer or the background, and only through the protocol can the normal single-step switching be performed. Once the interface communication is interrupted, such as disconnection from the network, the host computer or the background service is closed, the front-end reader will not work properly. For example, if it is used in an access control device, it may prevent the tenant from entering the door, that is, it needs to be operated online, and offline operation is invalid. Summary of the invention
[0005] In view of the shortcomings of the prior art, the purpose of the present invention is to propose a method for switching the reading and writing card mode through automatic identification. By proposing specific matching rules, automatic identification and switching of the reading and writing card mode are realized, so that only one device is required in the whole process, which has the three functions of reading cards, writing cards, and identifying and automatically switching working modes, which can meet the needs of remote online control operations and allow offline use.
[0006] In order to solve the above technical problems, the present invention provides a method for switching the card reading and writing mode by automatic identification, comprising an embedded device having a functional module for recognizing keywords, and an induction card having an operation password and capable of reading and writing valid data of internal applications, characterized in that it comprises the following steps:
[0007] (1) Start;
[0008] (2) searching for an induction card in a radio frequency field by means of the embedded device;
[0009] (3) reading the keywords of the sensing card;
[0010] (4) entering a rule pool, matching rules, and selecting rules from the matching rules, wherein the rules include first-category rules or second-category rules;
[0011] (5) When entering the first or second category of rules, at least the operation password verification process and the keyword matching list search process are performed;
[0012] (6) After the matching of the first or second rules is completed, a custom linkage operation including at least switching of the card reading and writing mode is performed;
[0013] (7)End.
[0014] Preferably, the keywords are card type and card physical number.
[0015] Preferably, valid data is pre-written into the card, and subsequent association operations are performed.
[0016] Preferably, the matching rules include two parts: communication security and project customization.
[0017] Preferably, in the first type of rules, the keyword matching list is only stored in the background and the embedded device, the card only stores the password, and the database of the embedded device stores all keyword matching lists; further, when entering the first type of rules, the following steps are specifically included:
[0018] a. When the password verification is passed, check whether there is a list of keyword matches in the database. If yes, perform linkage operation; if not, give an alarm;
[0019] b. When the password verification fails and it is found to be the factory password, the database is searched to see if there is a keyword matching list. If so, the mode is switched to the card writing mode, the card issuance operation is performed, and the new password is written. After the card issuance is completed, the mode is switched back to the card reading mode. If not, an alarm is triggered.
[0020] c. When the password verification fails and it is found to be an unknown password, the card will not be written and an alarm will be issued.
[0021] Preferably, in the second type of rules, a keyword matching list is saved in the card, all keyword matching lists are saved in the background, and the database of the embedded device only saves the keyword matching list that has not been updated and written into the card; further, when entering the second type of rules, the following steps are specifically included:
[0022] a. Password verification. If the password verification passes, jump to step d;
[0023] b. If the password verification fails and it is found to be the factory password, check whether there is an unupdated keyword matching list in the database. If so, switch to the card writing mode to issue the card, write the new password and list, and perform linkage operations based on the new list. Finally, switch back to the card reading mode and delete the matching list in the database. If not, an alarm will be issued and the process ends.
[0024] c. If the password verification fails and it is found to be an unknown password, the card will not be written, an alarm will be given, and the process ends;
[0025] d. Read the card's matching list from the card and check whether there is an unupdated keyword matching list in the database;
[0026] e. If there is a corresponding keyword matching list in the device database, switch to the card writing operation, write the new list into the card to replace it, and perform linkage operations based on the new list, and finally switch back to the card reading mode to delete the matching list in the database;
[0027] f. If there is no corresponding keyword matching list in the device database, the list read from the card is the latest one, and the linkage operation is performed directly based on this list.
[0028] Preferably, the first type of rules is applicable to embedded devices with larger storage space.
[0029] Preferably, the second type of rules is applicable to embedded devices with less storage space.
[0030] Compared with the prior art, the present invention has at least the following beneficial effects or advantages:
[0031] The method provided by the present invention for switching the card reading and writing modes through automatic identification uses matching rules, combines the card password with the keyword matching list in the embedded device, and timely updates the valid data in the card (including the password and the matching list) during the card reading process, thereby achieving the goal of not only reading the card but also issuing the card according to the background requirements, allowing offline use.
[0032] It includes the control functions of card reading, card issuance, and card data analysis, so that there is only one device in the production, installation, and use links that takes into account two types of embedded devices with storage capacity: the matching rules introduced in this proposal contain two methods, both of which can automatically identify and switch the card reading and writing modes, which are suitable for embedded devices with large and small storage capacities respectively. It not only meets the requirements of remote control, but also allows offline use. The keyword matching list in the embedded device supports remote background distribution, that is, the administrator can manage the card (add, delete, modify) through the operating platform web page. However, at the same time, after receiving the corresponding list, the embedded device does not switch the mode immediately. Instead, when the work process contacts the card with the corresponding keyword, it switches to the card writing mode and modifies the data in the card. At this time, it allows offline use. BRIEF DESCRIPTION OF THE DRAWINGS
[0033] The present invention will be further described in detail below with reference to the accompanying drawings;
[0034] Figure 1 It is a workflow diagram of the method of the present invention. DETAILED DESCRIPTION
[0035] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0036] The present invention provides a method for switching the card reading and writing mode by automatic identification, including an embedded device with a functional module for recognizing keywords, an induction card with an operation password and capable of reading and writing valid data of internal applications, and the embedded device already has a functional module for recognizing the card type and the card physical number; the card used in the present invention can be written with valid data for subsequent associated operations. For a card capable of reading and writing valid data of internal applications, the device needs to know the operation password in advance. For a card for which the operation password is unknown, valid data cannot be read and written.
[0037] After the device identifies the keyword information in the radio frequency field, such as the card type and the physical card number, it searches for the keyword matching list in its own database. Based on the result of the matching rule verification, it automatically switches the device's current working mode and chooses to read the valid data in the card or write the matching data into the card. When the device is connected to the background normally, the background will send the list data corresponding to the specified card number from time to time, that is, the valid application data. After receiving it, the device will store it in a non-volatile storage medium and update the database. The background does not directly operate the device's card reading and writing mode. The device will identify and decide on its own after encountering the card. The list remains valid after going offline.
[0038] like Figure 1 As shown, the specific process steps include the following:
[0039] (1) Start;
[0040] (2) searching for an induction card in a radio frequency field by means of the embedded device;
[0041] (3) reading out keywords of the sensing card, wherein the keywords are the card type and the card physical number;
[0042] (4) Entering the rule pool and matching rules, wherein the matching rules include communication security and project customization, and selecting rules in the matching rules, wherein the rules include first-category rules or second-category rules;
[0043] (5) When entering the first or second category of rules, at least the operation password verification process and the keyword matching list search process are performed;
[0044] (6) After the matching of the first or second rules is completed, a custom linkage operation including at least switching of the card reading and writing mode is performed;
[0045] In the first type of rules, the keyword matching list is only stored in the background and embedded devices, the card only stores the password, and the database of the embedded device stores all keyword matching lists; it is suitable for embedded devices with large storage space, and the database capacity is large, which can store all keyword matching lists. Correspondingly, the card has fewer read and write operations, and only needs to read and write the password used for communication security verification. Further, when entering the first type of rules, it specifically includes the following steps:
[0046] a. When the password verification is passed, check whether there is a list of keyword matches in the database. If yes, perform linkage operation; if not, give an alarm;
[0047] b. When the password verification fails and it is found to be the factory password, the database is searched to see if there is a keyword matching list. If so, the mode is switched to the card writing mode, the card issuance operation is performed, and the new password is written. After the card issuance is completed, the mode is switched back to the card reading mode. If not, an alarm is triggered.
[0048] c. If the password verification fails and it is found to be an unknown password, the card will not be written, an alarm will be issued, and the process will end.
[0049] In the second type of rules, a keyword matching list is saved in the card, and all keyword matching lists are saved in the background. The database of the embedded device only saves the keyword matching list that has not been updated and written into the card. It is suitable for embedded devices with less storage space. The database only stores a small amount of keyword matching lists that have not been updated and written into the card, and deletes them immediately after writing to save space. However, in this approach, the device itself does not know all the matching lists, and all management work is done by the background platform. Moreover, the larger the amount of data written into the card, the slower the interaction speed. It is not suitable for project applications with large amounts of list data. Furthermore, when entering the second type of rules, the following steps are specifically included:
[0050] a. Password verification. If the password verification passes, jump to step d;
[0051] b. If the password verification fails and it is found to be the factory password, check whether there is an unupdated keyword matching list in the database. If so, switch to the card writing mode to issue the card, write the new password and list, and perform linkage operations based on the new list. Finally, switch back to the card reading mode and delete the matching list in the database. If not, an alarm will be issued and the process ends.
[0052] c. If the password verification fails and it is found to be an unknown password, the card will not be written, an alarm will be given, and the process ends;
[0053] d. Read the card's matching list from the card and check whether there is an unupdated keyword matching list in the database;
[0054] e. If there is a corresponding keyword matching list in the device database, switch to the card writing operation, write the new list into the card to replace it, and perform linkage operations based on the new list, and finally switch back to the card reading mode to delete the matching list in the database;
[0055] f. If there is no corresponding keyword matching list in the device database, the list read from the card is the latest one, and the linkage operation is performed directly based on this list.
[0056] (7)End.
[0057] In summary, the method of switching the card reading and writing mode by automatic identification of the present invention uses matching rules, combines the card password with the keyword matching list in the embedded device, and timely updates the valid data in the card (including the password and the matching list) during the card reading process, so as to achieve both card reading and card issuance according to the background requirements, allowing offline use. Using the application password and factory password of the card, combined with whether there is a matching list of the card keyword in the embedded device, the card reading and writing mode of the device is automatically switched, and the password is written; using the keyword matching list in the database to be updated of the embedded device, when a card that meets the keyword is detected, the card reading and writing mode of the device is automatically switched, and a new matching list is written into the card, so as to perform both card reading and card issuance operations.
[0058] It includes the control functions of card reading, card issuance, and card data analysis, so that only one device in the production, installation, and use links has two storage capacity embedded devices: the matching rules introduced in this proposal contain two methods, both of which can automatically identify and switch the card reading and writing mode, which are suitable for embedded devices with large and small storage capacities respectively. It can meet the needs of remote control and allow offline use.
[0059] The keyword matching list in the embedded device supports remote background distribution, that is, the administrator can manage the card (add, delete, modify) through the operation platform web page. However, at the same time, after receiving the corresponding list, the embedded device does not switch the mode immediately, but when the work process contacts the card with the corresponding keyword, it switches to the card writing mode and modifies the data in the card, allowing offline use at this time.
[0060] The above examples are merely illustrative of the present invention and do not constitute a limitation on the protection scope of the present invention. All designs that are the same or similar to the present invention fall within the protection scope of the present invention.
Claims
1. A method for switching the card reading and writing mode by automatic identification, comprising an embedded device having a functional module for recognizing keywords, an induction card having an operation password and capable of reading and writing valid data of internal applications, characterized in that: The steps include: (1) Start; (2) searching for an induction card in a radio frequency field by means of the embedded device; (3) reading the keywords of the sensing card; (4) entering a rule pool, matching rules, and selecting rules from the matching rules, wherein the rules include first-category rules or second-category rules; (5) When entering the first or second category of rules, at least the operation password verification process and the keyword matching list search process are performed; In the first type of rules, the keyword matching list is only stored in the background and embedded device, the card only stores the password, and the database of the embedded device stores all keyword matching lists; When entering the first type of rules, the specific steps include: a. When the password verification is passed, check whether there is a list of keyword matches in the database. If yes, perform linkage operation; if not, give an alarm; b. When the password verification fails and it is found to be the factory password, the database is searched to see if there is a keyword matching list. If so, the mode is switched to the card writing mode, the card issuance operation is performed, and the new password is written. After the card issuance is completed, the mode is switched back to the card reading mode. If not, an alarm is triggered. c. If the password verification fails and it is found to be an unknown password, the card will not be written and an alarm will be issued; (6) After the matching of the first or second rules is completed, a custom linkage operation including at least switching of the card reading and writing mode is performed; (7)End.
2. The method according to claim 1, characterized in that: The keywords are card type and card physical number.
3. The method according to claim 1, characterized in that: Valid data is pre-written into the card, and subsequent association operations are performed.
4. The method according to claim 1, characterized in that: The matching rules include two parts: communication security and project customization.
5. The method according to claim 1, characterized in that: In the second type of rules, a keyword matching list is saved in the card, all keyword matching lists are saved in the background, and the database of the embedded device only saves the keyword matching list that has not been updated and written into the card; When entering the second type of rules, the specific steps include: a. Password verification. If the password verification passes, jump to step d; b. If the password verification fails and it is found to be the factory password, check whether there is an unupdated keyword matching list in the database. If so, switch to the card writing mode to issue the card, write the new password and list, and perform linkage operations based on the new list. Finally, switch back to the card reading mode and delete the matching list in the database. If not, an alarm will be issued and the process ends. c. If the password verification fails and it is found to be an unknown password, the card will not be written, an alarm will be given, and the process ends; d. Read the card's matching list from the card and check whether there is an unupdated keyword matching list in the database; e. If there is a corresponding keyword matching list in the device database, switch to the card writing operation, write the new list into the card to replace it, and perform linkage operations based on the new list, and finally switch back to the card reading mode to delete the matching list in the database; f. If there is no corresponding keyword matching list in the device database, the list read from the card is the latest one, and the linkage operation is performed directly based on this list.
6. The method according to claim 1, characterized in that: The first type of rules is applicable to embedded devices with larger storage space.
7. The method according to claim 5, characterized in that: The second type of rules is suitable for embedded devices with less storage space.
Citation Information
Patent Citations
Recharging method and recharging system for value-stored card
CN108305068A